def getCalo ( calo = '/dd/Structure/LHCb/DownstreamRegion/Ecal' , DataType = '2010' , **args ) : """ Get DeCalorimeter by name >>> name = ... ## the name of DeCalorimeter >>> calo = getCalo ( name ) ## get the calorimeter """ from GaudiPython.Bindings import AppMgr from GaudiPython.Bindings import _gaudi if not _gaudi : from DaVinci.Configuration import DaVinci dv = DaVinci ( DataType = DataType , **args ) g = AppMgr() g.initialize() gaudi = AppMgr() detSvc = gaudi.detSvc() return detSvc[ calo ]
LHCbApp().DataType = "Upgrade" LHCbApp().Simulation = True CondDB().Upgrade = True LHCbApp().DDDBtag = "dddb-20160304" LHCbApp().CondDBtag = "sim-20150716-vc-md100" ## New numbering scheme. Remove when FT61 is in nominal CondDB. #CondDB().addLayer(dbFile = "/eos/lhcb/wg/SciFi/Custom_Geoms_Upgrade/databases/DDDB_FT60.db", dbName = "DDDB") #CondDB().addLayer(dbFile = "/afs/cern.ch/work/j/jwishahi/public/SciFiDev/databases/DDDB_FT60_noEndPlug.db", dbName = "DDDB") CondDB().addLayer( dbFile="/eos/lhcb/wg/SciFi/Custom_Geoms_Upgrade/databases/DDDB_FT61.db", dbName="DDDB") appMgr = AppMgr(outputlevel=4) det = appMgr.detSvc() FT = det['/dd/Structure/LHCb/AfterMagnetRegion/T/FT'] # TestBeam Position A in local coordinates (near mirror) #point_A = gbl.Gaudi.XYZPoint(-23.85,-1200.0+50,0) ## Channel 36 # TestBeam Position C in local coordinates (near SiPMs) #point_C = gbl.Gaudi.XYZPoint(-23.85,+1200.0-50,0) # TestBeam Position A in local coordinates (near mirror) point_A = gbl.Gaudi.XYZPoint(-23.85, -1200.0 + 50, 0) ## Channel 36 # TestBeam Position C in local coordinates (near SiPMs) point_C = gbl.Gaudi.XYZPoint(-23.85, +1200.0 - 50, 0) # Choose station, layer, quarter, module, mat station_id = 1 # first station layer_id = 0 # first layer quarter_id = 3 # upper left quarter