def add_data(job_name, job_id): IOHelper('ROOT').inputFiles(glob(join('output/scenarios', job_name, 'hists', str(job_id), 'Brunel.xdst'))) CondDB().Upgrade = True if job_name == 'Original_DB': lhcbApp.DDDBtag = "dddb-20160304" lhcbApp.CondDBtag = "sim-20150716-vc-md100" else: CondDB().addLayer(dbFile=join(os.getcwd(), 'output/DDDB.db'), dbName="DDDB") CondDB().addLayer(dbFile=join(os.getcwd(), 'output/SIMCOND.db'), dbName="SIMCOND") alignment_conditions = CondDBAccessSvc("AlignmentConditions") alignment_conditions.ConnectionString = "sqlite_file:{}/output/scenarios/{}/Alignment_SIMCOND.db/SIMCOND".format(os.getcwd(), job_name) CondDB().addLayer(alignment_conditions)
def startGaudiInspect(aligndb=""): global appMgr LHCbApp().DDDBtag = "" LHCbApp().CondDBtag = "" if aligndb: from Configurables import (CondDB, CondDBAccessSvc) counter = 1 for db in aligndb: alignCond = CondDBAccessSvc('AlignCond' + str(counter)) alignCond.ConnectionString = 'sqlite_file:' + db + '/LHCBCOND' CondDB().addLayer(alignCond) counter += 1 appConf = ApplicationMgr(OutputLevel=INFO, AppName='myBrunel') appMgr = GaudiPython.AppMgr()
def startInspect(): global appMgr LHCbApp().DDDBtag = "head-20100518" LHCbApp().CondDBtag = "head-20100518" try: if alignDB: from Configurables import ( CondDB, CondDBAccessSvc ) counter = 1 for db in alignDB: alignCond = CondDBAccessSvc( 'AlignCond' + str(counter) ) alignCond.ConnectionString = 'sqlite_file:' + db + '/LHCBCOND' CondDB().addLayer( alignCond ) counter += 1 except: pass appConf = ApplicationMgr( OutputLevel = INFO, AppName = 'myBrunel' ) appMgr = GaudiPython.AppMgr() print "/dd/Structure/LHCb/BeforeMagnetRegion/TT"
FileCatalog().Catalogs = ["xmlcatalog_file:MyCatalog.xml"] #-- Use latest database tags for real data LHCbApp().DDDBtag = "default" LHCbApp().CondDBtag = "default" LHCbApp().DDDBtag = "HEAD" LHCbApp().CondDBtag = "HEAD" #-- Set a reasonable time for the first event EventClockSvc().InitialTime = 1260350949785664000 from Configurables import (CondDB, CondDBAccessSvc) otCalib = CondDBAccessSvc('OTCalib') #otCalib.ConnectionString = 'sqlite_file:/afs/cern.ch/user/w/wouter/public/AlignDB/ConditionsOTCalibration.db/LHCBCOND' #otCalib.ConnectionString = 'sqlite_file:/afs/cern.ch/user/w/wouter/public/AlignDB/CalibrationOTQuarterT0s_071209.db/LHCBCOND' otCalib.ConnectionString = 'sqlite_file:/afs/cern.ch/user/a/akozlins/public/OT/LHCBCOND/Collision09_OT_ModuleT0s_220110_sigma4ns.db/LHCBCOND' CondDB().addLayer(otCalib) # Latest cosmic run, with CALO, OT and (!!) RICH2 (35569 events) Escher().DatasetName = 'collisions' Escher().InputType = 'MDF' #EventSelector().Input.append("DATA='castor:/castor/cern.ch/grid/lhcb/data/2009/RAW/FULL/LHCb/BEAM1/62558/062558_0000000001.raw' SVC='LHCb::MDFSelector'") #import os #runnr = os.environ['COSMICSRUNNR'] runnrs = ['63596'] path = '/castor/cern.ch/grid/lhcb/data/2009/RAW/FULL/LHCb/COLLISION09/' data = [] for runnr in runnrs:
def extractAlignmentParameters( elementsWithTESAndCondDBNodes, since, until, valueExtractor=lambda detElm: getGlobalPositionFromGeometryInfo( detElm.geometry()), DDDBtag="default", CondDBtag="default", alignDBs=[]): """ The method talking to the detector svc Extract from all DetectorElements down from each element in elementsWithTESAndCondDBNodes ( format { elm : ( detTES, [ condDBNode ] ) } ), alignment parameters using valueExtractor, for all iovs between since and until (datetimes), using the CondDBNodes. The default database is configured with database tags DDDBtag and CondDBtag, and all alignDBs [ (tag, connectString) ] are added as layers to the CondDB. Returns a dict { element : [ ( (iovBegin, iovEnd), alignmentTree ) ] } """ # Static configuration of the application manager from Configurables import LHCbApp, ApplicationMgr from LHCbKernel.Configuration import FATAL, ERROR, WARNING, INFO, DEBUG, VERBOSE ApplicationMgr().AppName = "AlignmentCollector" ApplicationMgr().OutputLevel = ERROR LHCbApp().DDDBtag = DDDBtag LHCbApp().CondDBtag = CondDBtag # >>> This part stolen from Det/DetCond/tests/scripts/getIOVs.py ApplicationMgr().TopAlg = ["LoadDDDB"] from Configurables import EventClockSvc, FakeEventTime ecs = EventClockSvc( InitialTime=toTimeStamp(datetime(2010, 1, 1, 12, tzinfo=pytz.utc))) ecs.addTool(FakeEventTime, "EventTimeDecoder") ecs.EventTimeDecoder.StartTime = ecs.InitialTime ecs.EventTimeDecoder.TimeStep = toTimeStamp(timedelta(days=1)) # <<< + "lhcbcond" below layers = ["LHCBCOND"] if len(alignDBs) > 0: from Configurables import CondDB, CondDBAccessSvc for i, (connectString, tag) in enumerate(alignDBs): layerName = "AlignCond%i" % i alignCond = CondDBAccessSvc(layerName) alignCond.ConnectionString = connectString alignCond.DefaultTAG = tag CondDB().addLayer(alignCond) layers.append(layerName) # run a gaudi application from GaudiPython import AppMgr, gbl gaudi = AppMgr() gaudi.createSvc("UpdateManagerSvc") updateManagerSvc = gaudi.service("UpdateManagerSvc", interface="IUpdateManagerSvc") gaudi.initialize() conddbReaders = list( gaudi.service(name, gbl.ICondDBReader) for name in reversed(layers)) detDataSvc = updateManagerSvc.detDataSvc() alignmentTrees = dict( (detName, []) for detName in elementsWithTESAndCondDBNodes.iterkeys()) for detName, (detPath, condNodes) in elementsWithTESAndCondDBNodes.iteritems(): ### get the IOVs for all elements, and combine them timeLine = [("gap", (since, until))] for layerReader in conddbReaders: timeLineUpdated = list(timeLine) alreadyInserted = 0 for i, (typ, (gapBegin, gapEnd)) in enumerate(timeLine): if typ == "gap": iovs = combinedIOVs([ list((max(toDateTime(iov.since.ns()), gapBegin), min(toDateTime(iov.until.ns()), gapEnd)) for iov in layerReader.getIOVs( node, gbl.ICondDBReader.IOV( gbl.Gaudi.Time(toTimeStamp(gapBegin)), gbl.Gaudi.Time(toTimeStamp(gapEnd))), 0)) for node in TrackingAlignmentCondDBNodes[detName] ]) if len(iovs) != 0: updatedTimeSlice = list( ("iov", (begin, end)) for begin, end in iovs) if updatedTimeSlice[0][1][0] > gapBegin: updatedTimeSlice.insert( 0, ("gap", (gapBegin, updatedTimeSlice[0][1][0]))) if updatedTimeSlice[-1][1][1] < gapEnd: updatedTimeSlice.append( ("gap", (updatedTimeSlice[-1][1][1], gapEnd))) timeLineUpdated[i + alreadyInserted:i + alreadyInserted + 1] = updatedTimeSlice alreadyInserted += len(updatedTimeSlice) - 1 logging.debug("timeline after adding %s : %s" % (layerReader, timeLine)) timeLine = timeLineUpdated iovs = list(timespan for typ, timespan in timeLine if typ == "iov") ### For every IOV, extract the parameters for begin, end in iovs: detDataSvc.setEventTime( gbl.Gaudi.Time(toTimeStamp(begin + (end - begin) / 2))) updateManagerSvc.newEvent() motionSystem = None if detName != "Velo" else gaudi.detSvc( ).getObject("/dd/Conditions/Online/Velo/MotionSystem") logging.info("Extracting parameters for %s between %s and %s" % (detName, begin, end)) detTree = getAlignableTreeFromDetectorElement( gaudi.detSvc().getObject(detPath), nodeValue=valueExtractor, parentName=detPath, motionSystem=motionSystem) detTree.name = detName alignmentTrees[detName].append(((begin, end), detTree)) gaudi.finalize() gaudi.exit() return alignmentTrees
from Configurables import Brunel from Configurables import CondDB from Configurables import CondDBAccessSvc from Configurables import L0Conf from Gaudi.Configuration import GaudiSequencer Brunel().InputType = "DIGI" Brunel().WithMC = True CondDB().Upgrade = True Brunel().Detectors = ['VP', 'UT', 'FT', 'Rich1Pmt', 'Rich2Pmt', 'Ecal', 'Hcal', 'Muon', 'Magnet', 'Tr'] Brunel().DataType = "Upgrade" Brunel().OutputType = 'XDST' # As we haven't ran Moore L0Conf().EnsureKnownTCK = False GaudiSequencer("CheckPatSeq").Members = [ "PrChecker", "TrackIPResolutionChecker", "VPClusterMonitor" ] CondDB().addLayer(dbFile="check_positions/DDDB.db", dbName="DDDB") CondDB().addLayer(dbFile="check_positions/SIMCOND.db", dbName="SIMCOND") alignment_conditions = CondDBAccessSvc("AlignmentConditions") alignment_conditions.ConnectionString = "sqlite_file:check_positions/Alignment_SIMCOND.db/SIMCOND" CondDB().addLayer(alignment_conditions)
#from Configurables import Escher #escher = Escher() # mae sure that the algorithms know how many iterations are coming from Configurables import TAlignment TAlignment().NumIterations = opts.numiter TAlignment().UpdateInFinalize = False # set the database layer if opts.aligndb: counter = 1 for db in opts.aligndb: from Configurables import (CondDB, CondDBAccessSvc) alignCond = CondDBAccessSvc('AlignCond' + str(counter)) if opts.lhcbcondtag: alignCond.ConnectionString = 'sqlite_file:' + db + '/LHCBCOND' else: alignCond.ConnectionString = 'sqlite_file:' + db + '/CALIBOFF' CondDB().addLayer(alignCond) counter += 1 if opts.dddb: counter = 1 for db in opts.dddb: from Configurables import (CondDB, CondDBAccessSvc) alignCond = CondDBAccessSvc('AlignDDDB' + str(counter)) alignCond.ConnectionString = 'sqlite_file:' + db + '/DDDB' CondDB().addLayer(alignCond) counter += 1 ## Instantiate application manager
def overrideONLINEWithSnapshot(): ONLINE_2015 = CondDBAccessSvc("ONLINE_2015") ONLINE_2015.ConnectionString = "sqlite_file:ONLINE-2015.db/ONLINE" conddb.addLayer(ONLINE_2015)
# add all 'private' reconstruction to this sequence which is automatically added to the alignment sequence. from Configurables import GaudiSequencer trackFilterSeq = GaudiSequencer("TrackFilterSeq") # nuova geometria OT ------------------------------------------------------------------------- # per agganciare il CondDB con le info sulle costanti di allineamento ------------------------- from Configurables import (CondDBAccessSvc, CondDB) AlignmentCondition = CondDBAccessSvc("AlignmentCondition") #AlignmentCondition.ConnectionString = "sqlite_file:/afs/cern.ch/lhcb/group/tracking/vol7/wouter/DB/OTHalfLayers.db/LHCBCOND" #######AlignmentCondition.ConnectionString = 'sqlite_file:/afs/cern.ch/user/s/svecchi/scratch0/LHCBCOND-surveyfinal1.db/LHCBCOND' #AlignmentCondition.ConnectionString = 'sqlite_file:/afs/cern.ch/user/s/spozzi/scratch0/Databases/prove/nuovoGlobalCONDITIONS2.db/LHCBCOND' #AlignmentCondition.ConnectionString = 'sqlite_file:/afs/cern.ch/lhcb/scratch/vol2/svecchi/LHCBCOND-new2stefi.db/LHCBCOND' #AlignmentCondition.ConnectionString = 'sqlite_file:/afs/cern.ch/user/s/svecchi/public/LHCBCOND-last.db/LHCBCOND' AlignmentCondition.ConnectionString = 'sqlite_file:/afs/cern.ch/user/s/svecchi/public/LHCBCOND-new5.db/LHCBCOND' # /lhcbcondPROVA.db/LHCBCOND' CondDB().addLayer(AlignmentCondition) OTAlignmentCondition = CondDBAccessSvc("OTAlignmentCondition") #OTAlignmentCondition.ConnectionString = 'sqlite_file:/afs/cern.ch/user/s/svecchi/public/ScenarioSurveyXYZ.db/LHCBCOND' #OTAlignmentCondition.ConnectionString = 'sqlite_file:/afs/cern.ch/user/s/svecchi/public/ScenarioSurveyAll.db/LHCBCOND' #OTAlignmentCondition.ConnectionString = 'sqlite_file:/afs/cern.ch/user/s/svecchi/public/OTCosmicsCFrameAlignmentTxTyTz2009.db/LHCBCOND' #OTAlignmentCondition.ConnectionString = 'sqlite_file:/afs/cern.ch/user/s/svecchi/public/OTCosmicsModulesTxCFramesTxTyTzRz2009.db/LHCBCOND' #CondDB().addLayer(OTAlignmentCondition) myDDDB = CondDBAccessSvc('myDDDB') #myDDDB.ConnectionString = 'sqlite_file:/afs/cern.ch/lhcb/scratch/vol2/svecchi/myDDDB-WanderFinal.db/DDDB' myDDDB.ConnectionString = 'sqlite_file:/afs/cern.ch/lhcb/scratch/vol2/svecchi/myDDDB-WanderDefinitive.db/DDDB' CondDB().addLayer(myDDDB)
LHCbApp().DDDBtag = "default" LHCbApp().CondDBtag = "default" #LHCbApp().DDDBtag = "HEAD" #LHCbApp().CondDBtag = "HEAD" LHCbApp().DDDBtag = 'head-20110823' LHCbApp().CondDBtag = 'head-20110901' from Configurables import (CondDB, CondDBAccessSvc) cdb = CondDB() #cdb.PartitionConnectionString["ONLINE"] = "sqlite_file:/afs/cern.ch/user/w/wouter/public/AlignDB/ONLINE-201103.db/ONLINE" #cdb.Tags["ONLINE"] = "fake" # maybe it works if we read it as a layer? myOnline = CondDBAccessSvc('MyOnline') myOnline.ConnectionString = 'sqlite_file:/afs/cern.ch/user/w/wouter/public/AlignDB/ONLINE-2011.db/ONLINE' CondDB().addLayer(myOnline) #importOptions("$APPCONFIGOPTS/DisableLFC.py") cdb.UseOracle = False cdb.DisableLFC = True import os runnr = os.environ['RUNNR'] filenames = ['/pool/spool/wouter/dimuons_%s.dst' % runnr] for f in filenames: fullname = "DATAFILE='" + f + "' TYP='POOL_ROOTTREE' OPT='READ'" EventSelector().Input.append(fullname) print "EvenSelector.Input:", EventSelector().Input
LHCbApp().DDDBtag = "default" LHCbApp().CondDBtag = "default" LHCbApp().DDDBtag = "HEAD" LHCbApp().CondDBtag = "HEAD" from Configurables import EventClockSvc EventClockSvc().InitialTime = 1270079584012864000 from Configurables import (CondDB, CondDBAccessSvc) cdb = CondDB() #cdb.PartitionConnectionString["ONLINE"] = "sqlite_file:/afs/cern.ch/user/w/wouter/public/AlignDB/ONLINE-201004.db/ONLINE" #cdb.Tags["ONLINE"] = "" # maybe it works if we read it as a layer? myOnline = CondDBAccessSvc('MyOnline') myOnline.ConnectionString = 'sqlite_file:/afs/cern.ch/user/w/wouter/public/AlignDB/ONLINE-201004.db/ONLINE' CondDB().addLayer(myOnline) otCalib = CondDBAccessSvc('OTCalib') #otCalib.ConnectionString = 'sqlite_file:/afs/cern.ch/user/a/akozlins/public/OT/LHCBCOND/ModuleT0s_2.7ns_3.35ns_180310.db/LHCBCOND' otCalib.ConnectionString = 'sqlite_file:/afs/cern.ch/user/a/akozlins/public/OT/LHCBCOND/ModuleT0s_69648_140410.db/LHCBCOND' CondDB().addLayer(otCalib) ttPitchFix = CondDBAccessSvc('TTPitchFix') ttPitchFix.ConnectionString = 'sqlite_file:/afs/cern.ch/user/w/wouter/public/AlignDB/TTPitchFix.db/DDDB' CondDB().addLayer(ttPitchFix) import os path = '/castor/cern.ch/grid/lhcb/data/2010/RAW/FULL/LHCb/COLLISION10/' runnrs = ['69355'] data = []
logging.debug(o) exec o in g, l # let the algorithm update in finalize and set the input file from Configurables import TAlignment, AlignAlgorithm TAlignment().UpdateInFinalize = True AlignAlgorithm('Alignment').InputDataFiles = derivativefiles AlignAlgorithm('Alignment').OutputDataFile = '' # set the database layer if opts.aligndb: counter = 1 for db in opts.aligndb: from Configurables import (CondDB, CondDBAccessSvc) alignCond = CondDBAccessSvc('AlignCond' + str(counter)) alignCond.ConnectionString = 'sqlite_file:' + db + '/LHCBCOND' CondDB().addLayer(alignCond) counter += 1 print 'added databases: ', opts.aligndb from GaudiPython.Bindings import AppMgr appMgr = AppMgr() # we want to reinitialize, but we don't want to initialize all # the reco algorithms, so we add just the alignment sequence: appMgr.setAlgorithms(['AlignAlgorithm/Alignment']) appMgr.configure() appMgr.initialize() # update the geometry # updatetool = appMgr.toolsvc().create( typ = "Al::AlignUpdateTool", name = "ToolSvc.AlignUpdateTool", interface = "IAlignUpdateTool" ) #updatetool = appMgr.toolsvc().create( "Al::AlignUpdateTool", interface = "Al::IAlignUpdateTool" ) #updatetool.process( self.output['derivatives'].equations(), opts.iter, 1)
def oracle_online(): oo = CondDBAccessSvc('ONLINE_ORACLE') oo.ConnectionString = 'CondDBOnline/ONLINE' CondDBDispatcherSvc('MainCondDBReader').Alternatives['/Conditions/Online'] = oo
from GaudiConf import IOHelper from Configurables import CaloDigitConf, CaloProcessor, GlobalRecoConf print os.listdir(os.getcwd()) importOptions('$STDOPTS/PreloadUnits.opts') # Load the velo conditions CondDB().addLayer( dbFile="/pc2014-data3/cburr/hybrid-distortions/try_aligning/DDDB.db", dbName="DDDB") CondDB().addLayer( dbFile="/pc2014-data3/cburr/hybrid-distortions/try_aligning/SIMCOND.db", dbName="SIMCOND") alignment_conditions = CondDBAccessSvc("AlignmentConditions") alignment_conditions.ConnectionString = "sqlite_file:/pc2014-data3/cburr/hybrid-distortions/try_aligning/Alignment_SIMCOND.db/SIMCOND" CondDB().addLayer(alignment_conditions) LHCbApp().Simulation = True LHCbApp().DataType = 'Upgrade' CondDB().Upgrade = True detectors = [ 'VP', 'UT', 'FT', 'Rich1Pmt', 'Rich2Pmt', 'Ecal', 'Hcal', 'Muon', 'Magnet', 'Tr' ] LHCbApp().Detectors = detectors CondDB().LoadCALIBDB = 'HLT1' Escher().InputType = "DIGI"
from Configurables import Brunel from Configurables import CondDB from Configurables import CondDBAccessSvc from Configurables import L0Conf from Gaudi.Configuration import GaudiSequencer Brunel().InputType = "DIGI" Brunel().WithMC = True CondDB().Upgrade = True Brunel().Detectors = [ 'VP', 'UT', 'FT', 'Rich1Pmt', 'Rich2Pmt', 'Ecal', 'Hcal', 'Muon', 'Magnet', 'Tr' ] Brunel().DataType = "Upgrade" Brunel().OutputType = 'XDST' # As we haven't ran Moore L0Conf().EnsureKnownTCK = False GaudiSequencer("CheckPatSeq").Members = [ "PrChecker", "TrackIPResolutionChecker", "VPClusterMonitor" ] CondDB().addLayer(dbFile="output/DDDB.db", dbName="DDDB") CondDB().addLayer(dbFile="output/SIMCOND.db", dbName="SIMCOND") alignment_conditions = CondDBAccessSvc("AlignmentConditions") alignment_conditions.ConnectionString = "sqlite_file:output/scenarios/{{ scenario }}/Alignment_SIMCOND.db/SIMCOND" CondDB().addLayer(alignment_conditions)
condtag = "/SIMCOND" #if opts.simtag else "/CALIBOFF" if opts.simtag: condtag = "/SIMCOND" elif opts.lhcbcondtag: condtag = "/CALIBOFF" else: condtag = "/LHCBCOND" # set the database layer if opts.aligndb: counter = 1 for db in opts.aligndb: from Configurables import (CondDB, CondDBAccessSvc) alignCond = CondDBAccessSvc('AlignCond' + str(counter)) alignCond.ConnectionString = 'sqlite_file:' + db + condtag CondDB().addLayer(alignCond) counter += 1 print 'added databases: ', opts.aligndb if opts.dddb: counter = 1 for db in opts.dddb: from Configurables import (CondDB, CondDBAccessSvc) alignCond = CondDBAccessSvc('AlignDDDB' + str(counter)) alignCond.ConnectionString = 'sqlite_file:' + db + '/DDDB' CondDB().addLayer(alignCond) counter += 1 print 'added databases: ', opts.dddb # turn off the printfreq
] NTupleSvc().Output = ["FILE1 DATAFILE='clbr.root' TYP='ROOT' OPT='NEW'"] HistogramPersistencySvc().OutputFile = "clbr_hists.root" Brunel().OutputType = "None" Brunel().Histograms = "None" Brunel().RecoSequence = ["Decoding", "VELO", "TT", "IT", "OT", "Tr", "Vertex"] from Configurables import RecMoniConf RecMoniConf().setProp("MoniSequence", ["OT"]) path_monolayer = "/afs/cern.ch/user/w/wouter/public/AlignDB/" ddbs = [] ddbs.append(path_monolayer + "OTMonoGeometry.db/DDDB") ddbs.append(path_monolayer + "OTMonoCatalog.db/LHCBCOND") ddbs.append(path_monolayer + "OTMonoAlign20141225.db/LHCBCOND") counter = 1 for db in ddbs: from Configurables import (CondDB, CondDBAccessSvc) alignCond = CondDBAccessSvc('AlignDDDB' + str(counter)) alignCond.ConnectionString = 'sqlite_file:' + db CondDB().addLayer(alignCond) counter += 1 #from Configurables import ( CondDBAccessSvc, CondDB ) #CondDB().addLayer(CondDBAccessSvc("db_global", # ConnectionString = "sqlite_file:alignDB.early2012.2days.jpsi.db/LHCBCOND") #)
# To load CondDB Layers ------------- from Configurables import (CondDBAccessSvc, CondDB) # Muon #MUONAlignmentCondition = CondDBAccessSvc("MuonAlignmentCondition") #MUONAlignmentCondition.ConnectionString = 'sqlite_file:/afs/cern.ch/user/s/svecchi/public/LHCBCOND-LocalCollisionNNet2.db/LHCBCOND' # OT OTAlignmentCondition = CondDBAccessSvc("OTAlignmentCondition") #OTAlignmentCondition.ConnectionString = 'sqlite_file:/afs/cern.ch/user/s/svecchi/public/ScenarioSurveyXYZ.db/LHCBCOND' #OTAlignmentCondition.ConnectionString = 'sqlite_file:/afs/cern.ch/user/s/svecchi/public/ScenarioSurveyAll.db/LHCBCOND' #OTAlignmentCondition.ConnectionString = 'sqlite_file:/afs/cern.ch/user/s/svecchi/public/OTCosmicsCFrameAlignmentTxTyTz2009.db/LHCBCOND' #OTAlignmentCondition.ConnectionString = 'sqlite_file:/afs/cern.ch/user/s/svecchi/public/OTCosmicsModulesTxCFramesTxTyTzRz2009.db/LHCBCOND' #OTAlignmentCondition.ConnectionString = 'sqlite_file:/afs/cern.ch/user/s/svecchi/public/VeloOTTxTyFieldOff.db/LHCBCOND' #OTAlignmentCondition.ConnectionString = 'sqlite_file:/afs/cern.ch/user/s/svecchi/public/VeloOTTxTyModulesTxFieldOff.db/LHCBCOND' OTAlignmentCondition.ConnectionString = 'sqlite_file:/afs/cern.ch/user/s/svecchi/public/VeloOTTxTyModulesTxITTxTyRzTTTxFieldOff_20100115.db/LHCBCOND' if sample == 'Mcarlo': print sample else: #CondDB().addLayer( MUONAlignmentCondition ) CondDB().addLayer(OTAlignmentCondition) # ================================================================================================ # add all 'private' reconstruction to this sequence which is automatically added to the alignment sequence. # ================================================================================================ from Configurables import GaudiSequencer trackFilterSeq = GaudiSequencer("TrackFilterSeq") # ---------------------------------------------------------------------------------- # make a selection of the Best-tracks based on the chisquare # ----------------------------------------------------------------------------------
TAlignment().Constraints = constraints TAlignment().WriteCondSubDetList = ['Velo'] TAlignment().EigenValueThreshold = 100 # still set up a track selection from Configurables import (GaudiSequencer,TrackContainerCopy,TrackSelector,TrackMonitor) trackFilterSeq = GaudiSequencer("TrackFilterSeq") alignSelector = TrackContainerCopy("AlignSelector", inputLocation = "Rec/Track/Best", outputLocation = "Rec/Track/AlignTracks") alignSelector.addTool( TrackSelector("Selector", MaxChi2Cut = 10, MinNVeloRHits = 4, MinNVeloPhiHits = 4) ) trackFilterSeq.Members.append( alignSelector ) # Load the velo misalignment from Configurables import ( CondDB, CondDBAccessSvc ) veloCond = CondDBAccessSvc( 'VeloAlignCond' ) veloCond.ConnectionString = 'sqlite_file:/afs/cern.ch/lhcb/group/tracking/vol7/wouter/DB/B2HH_LHCBCOND_Velo-slice_5sigma.db/LHCBCOND' #veloCond.ConnectionString = 'sqlite_file:/afs/cern.ch/lhcb/group/tracking/vol7/wouter/DB/B2HH_LHCBCOND_Velo-slice_5sigma_aligned.db/LHCBCOND' CondDB().addLayer( veloCond ) ############################################################################## # I/O datasets are defined in a separate file, see examples in 2008-TED_Data.py ##############################################################################