コード例 #1
0
 def color(self, node):
     '''used to color dag nodes
     @param node: a node in the DAG history'''
     cols = [
         "red", "lightblue", "green", "yellow", "cyan", "grey", "white",
         "pink"
     ]
     return cols[IdCoder.get_type(node.get_value())]
コード例 #2
0
 def get_object(self, uniqueid):
     ''' given a uniqueid return the underlying obejct
     '''
     type = IdCoder.get_type(uniqueid)
     subtype = IdCoder.get_subtype(uniqueid)
     if type == IdCoder.PFOBJECTTYPE.TRACK:
         return self.tracks[uniqueid]       
     elif type == IdCoder.PFOBJECTTYPE.ECALCLUSTER:      
         return self.ecal_clusters[uniqueid] 
     elif type == IdCoder.PFOBJECTTYPE.HCALCLUSTER:            
         return self.hcal_clusters[uniqueid]            
     elif type == IdCoder.PFOBJECTTYPE.PARTICLE:
         if subtype == 'g':
             return self.sim_particles[uniqueid]       
         elif subtype == 'r':
             return self.reconstructed_particles[uniqueid]
     elif type == IdCoder.PFOBJECTTYPE.BLOCK:
         return self.blocks[uniqueid]
     else:
         assert(False)   
コード例 #3
0
 def get_object(self, uniqueid):
     ''' given a uniqueid return the underlying obejct
     '''
     type = IdCoder.get_type(uniqueid)
     subtype = IdCoder.get_subtype(uniqueid)
     if type == IdCoder.PFOBJECTTYPE.TRACK:
         return self.tracks[uniqueid]
     elif type == IdCoder.PFOBJECTTYPE.ECALCLUSTER:
         return self.ecal_clusters[uniqueid]
     elif type == IdCoder.PFOBJECTTYPE.HCALCLUSTER:
         return self.hcal_clusters[uniqueid]
     elif type == IdCoder.PFOBJECTTYPE.PARTICLE:
         if subtype == 'g':
             return self.sim_particles[uniqueid]
         elif subtype == 'r':
             return self.reconstructed_particles[uniqueid]
     elif type == IdCoder.PFOBJECTTYPE.BLOCK:
         return self.blocks[uniqueid]
     else:
         assert (False)
コード例 #4
0
ファイル: dagplotter.py プロジェクト: HEP-FCC/heppy
 def color(self, node):
     '''used to color dag nodes
     @param node: a node in the DAG history'''
     cols = ["red", "lightblue", "green", "yellow", "cyan", "grey", "white", "pink"]
     return cols[IdCoder.get_type(node.get_value())]