133 def ExecuteTask(self,option=''):
134 self.comp.DestroyElements()
135 self.comp.OpenCompound()
136 cl=-1
137 for aClus in sTree.EcalClusters:
138
139 cl+=1
140 for i in range( aClus.Size() ):
141 mccell = self.ecalStructure.GetHitCell(aClus.CellNum(i))
142 if not mccell: continue
143 x1,y1,x2,y2,dz = mccell.X1(),mccell.Y1(),mccell.X2(),mccell.Y2(),mccell.GetEnergy()/u.GeV*0.5*u.m
144 if mccell.GetEnergy()/u.MeV < 4. : continue
145
146 DClus = ROOT.TEveBox()
147 DClus.SetName('EcalCluster_'+str(cl)+'_'+str(i))
148 DClus.SetPickable(ROOT.kTRUE)
149 DClus.SetTitle(aClus.__repr__())
150 DClus.SetMainColor(ROOT.kRed-4)
151 DClus.SetMainTransparency("\x10")
152 DClus.SetVertex(0,x1,y1,self.z_ecal)
153 DClus.SetVertex(1,x1,y1,self.z_ecal+dz)
154 DClus.SetVertex(2,x2,y1,self.z_ecal+dz)
155 DClus.SetVertex(3,x2,y1,self.z_ecal)
156 DClus.SetVertex(4,x1,y2,self.z_ecal)
157 DClus.SetVertex(5,x1,y2,self.z_ecal+dz)
158 DClus.SetVertex(6,x2,y2,self.z_ecal+dz)
159 DClus.SetVertex(7,x2,y2,self.z_ecal)
160 self.comp.AddElement(DClus)
161 self.comp.CloseCompound()
162 gEve.ElementChanged(self.evscene,True,True)