示例#1
0
    def _configureDBSnapshot(self):
        """
        Configure the database to use the online snapshot
        """
        tag = { "DDDB":     self.getProp('DDDBtag')
                , "LHCBCOND": self.getProp('CondDBtag')
                , "SIMCOND" : self.getProp('CondDBtag') 
                , "ONLINE"  : 'fake'
                }

        # https://savannah.cern.ch/bugs/?94454#comment12
        from Configurables import MagneticFieldSvc
        MagneticFieldSvc().UseSetCurrent = True

        cdb = CondDB()
        cdb.Tags = tag
        cdb.setProp('IgnoreHeartBeat', True)
        cdb.setProp('EnableRunChangeHandler', True)
        self.setOtherProps( cdb, [ 'UseDBSnapshot',
                                   'DBSnapshotDirectory',
                                   'PartitionName' ])

        if [det for det in ['Rich1', "Rich2", "Rich1Pmt", "Rich2Pmt"] if det in self.getProp("Detectors")]:
            log.warning( "using hack https://savannah.cern.ch/task/index.php?27329#comment45" )
            from Configurables import RichRecSysConf
            rConf = RichRecSysConf("RichOfflineRec")
            rConf.Context = "HLT"
            from Configurables import RichRecQCConf
            rMoni = RichRecQCConf("OfflineRichMoni")
            rMoni.Context = "HLT"
示例#2
0
def patchBrunel(true_online_version):
    """
        Instantiate the options to run Brunel with raw data

        @author M.Frank
  """
    import Brunel.Configuration
    import OnlineEnv

    brunel = Brunel.Configuration.Brunel()
    brunel.OnlineMode = True
    try:
        brunel.DDDBtag = OnlineEnv.DDDBTag
    except:
        print "DDDBTag not found, use default"

    try:
        brunel.CondDBtag = OnlineEnv.CondDBTag
    except:
        print "CondDBTag not found, use default"

    conddb = CondDB()
    conddb.IgnoreHeartBeat = True
    #
    # Adjust to pickup the proper online conditions
    #
    import Online as RunChange_All
    conddb.setProp('RunChangeHandlerConditions', RunChange_All.ConditionMap)
    conddb.setProp('EnableRunChangeHandler', True)
    #
    # Brunel output configuration
    #
    brunel.WriteFSR = False  # This crashes Jaap's stuff
    brunel.DataType = "2013"
    brunel.OutputType = ''

    EventLoopMgr().OutputLevel = MSG_DEBUG  #ERROR
    EventLoopMgr().Warnings = False

    from Configurables import EventClockSvc
    EventClockSvc().InitialTime = 1322701200000000000

    brunel.UseDBSnapshot = True  # try it
    #  brunel.PartitionName = "FEST"
    # Hack by Chris
    print "# Warning using CKThetaQuartzRefractCorrections = [ 0,-0.0001,0 ]"
    from Configurables import RichRecSysConf
    rConf = RichRecSysConf("RichOfflineRec")
    rConf.richTools().photonReco().CKThetaQuartzRefractCorrections = [
        0, -0.001, 0
    ]
    brunel.OutputLevel = MSG_WARNING
    brunel.PrintFreq = -1
    HistogramPersistencySvc().OutputFile = ""
    HistogramPersistencySvc().OutputLevel = MSG_ERROR

    #print brunel
    return brunel
def MinimalRichSequence():
    # Tweak a little bit RICH
    from Configurables import Escher, GaudiSequencer, RichRecSysConf, RecSysConf
    richSeqName = Escher()._instanceName(RichRecSysConf)
    richSeq = GaudiSequencer(richSeqName + "Seq")
    richSeq.MeasureTime = True
    richConf = RichRecSysConf("RichOfflineRec")
    richConf.DataType = Escher().getProp("DataType")
    #    richConf.Context    = "HLT"
    #enable 'fast' PID settings
    richConf.PidConfig = "FastGlobal"
    # only consider the Pion and Kaon hypos (instead of the full list. This means you will
    # only have DLL(K-pi) available, but if that is all you need its OK).
    richConf.Particles = ["pion", "kaon"]
    #turn off trackless ring finding
    richConf.TracklessRingAlgs = []
    #richConf.trackConfig().InputTracksLocation = '/Rec/Track/PidTracks'
    # Set the sequence to run the RICH PID in
    richConf.setProp("RecoSequencer", richSeq)
    return
示例#4
0
 def recoConf(self):
     # Hardcoded name for the moment
     return RichRecSysConf('RichOfflineRec')
示例#5
0
# Syntax is:
#   gaudirun.py myOptions.py
#
from GaudiKernel.ProcessJobOptions import importOptions
importOptions("$APPCONFIGOPTS/Brunel/DataType-2011.py")

from Gaudi.Configuration import *
from Configurables import Brunel, LHCbApp, CondDB, CondDBAccessSvc, ApplicationMgr

# Run faster over dsts
from Configurables import DstConf
ApplicationMgr().ExtSvc += ["DataOnDemandSvc"]
DstConf().EnableUnpack = ["Reconstruction"]

from Configurables import RichRecSysConf
rConf = RichRecSysConf("RichOfflineRec")

##faster photon reconstruction
rConf.richTools().photonReco().FindUnambiguousPhotons = [False, False, False]
#
#rConf.richTools().PhotonRecoType = "EstiFromRadius"#use for faster photon reconstruction!!

#Brunel options
Brunel().DataType = "2011"
Brunel().EvtMax = -1
Brunel().PrintFreq = 1
Brunel().OutputType = "None"
Brunel().InitSequence = ["Brunel"]
Brunel().RecoSequence = ["RICH"]
Brunel().Histograms = "OfflineExpress"
#tags
示例#6
0
LHCbApp().CondDBtag = "sim-20150716-vc-mu100"
LHCbApp().DataType = "Upgrade"
#LHCbApp().Detectors = ['VP', 'UT', 'FT', "Tr"]

L0Conf().EnsureKnownTCK = False

from Configurables import RootCnvSvc
RootCnvSvc().GlobalCompression = "ZLIB:1"

#from Configurables import MCFTDigitCreator
#MCFTDigitCreator().SimulateNoise = False

from Configurables import DecodeRawEvent
DecodeRawEvent().setProp("OverrideInputs", 4.2)

from Configurables import RichRecSysConf, RichRecQCConf
rConf = RichRecSysConf("RichOfflineRec")
# No Aerogel
rConf.Radiators = ["Rich1Gas", "Rich2Gas"]
# no photon sel cuts (need optimising)
rConf.photonConfig().SelectionMode = "All"
# Corrections to CK theta
rConf.richTools().photonReco().CKThetaQuartzRefractCorrections = [
    -0.00625, 0.00010, 2.9e-5
]

RecMoniConf().Detectors = ["Tr"]
RecMoniConf().MoniSequence = ["Tr"]

ApplicationMgr().ExtSvc += ["DataOnDemandSvc"]
示例#7
0
# Timestamps in messages
LHCbApp().TimeStamp = True

# No output files
Brunel().OutputType = "None"

# Only tracking and RICH reco
# Run1
#Brunel().RecoSequence = ["Decoding","VELO","TT","IT","OT","Tr","Vertex","RICH"]
# Run2
Brunel().RecoSequence = [
    "Decoding", "VELO", "TT", "IT", "OT", "TrHLT1", "Vertex", "TrHLT2", "RICH"
]

from Configurables import RichRecSysConf
rConf = RichRecSysConf("RichOfflineRec")

# Which radiators
rConf.Radiators = ["Rich1Gas", "Rich2Gas"]

# Photon selection options
rConf.photonConfig().SelectionMode = "Wide"

# No PID or ring finding, for speed
rConf.TracklessRingAlgs = []
rConf.PidConfig = "None"

# Only RICH Monitoring
from Configurables import RecMoniConf
RecMoniConf().MoniSequence = ["RICH"]
示例#8
0
 def recoConf(self):
     from Configurables import RichRecSysConf
     # Hardcoded name for the moment
     return RichRecSysConf('RichOfflineRec')