Ejemplo n.º 1
0
    def _defineMonitors(self):
        if self.getProp("KillDAQ"):
            from Configurables import EventNodeKiller
            daqKiller = EventNodeKiller("DAQKiller")
            daqKiller.Nodes += ["DAQ"]
            ApplicationMgr().TopAlg += [daqKiller]
        ApplicationMgr().TopAlg += ["PrintHeader"]
        ApplicationMgr().ExtSvc += ["ToolSvc", "DataOnDemandSvc"]

        if self.getProp("LoadAll"):
            from Configurables import StoreExplorerAlg, TESFingerPrint
            storeExp = StoreExplorerAlg(Load=True,
                                        PrintFreq=1,
                                        ExploreRelations=1)
            fingerPrint = TESFingerPrint(HeuristicsLevel="Medium",
                                         OutputLevel=1)
            ApplicationMgr().TopAlg += [storeExp, fingerPrint]

        if self.getProp("DataContent").upper() == "DST":
            from Configurables import DumpTracks
            dumpTracks = DumpTracks(OutputLevel=2)
            ApplicationMgr().TopAlg += ["DumpTracks"]
            DstConf().EnableUnpack = ["Reconstruction", "Stripping"]

        if self.getProp("WithMC"):
            DigiConf().EnableUnpack = True
            SimConf().EnableUnpack = True
            ApplicationMgr().TopAlg += ["DumpMCEventAlg"]

        if self.getProp("DataContent").upper() == "SIM":
            ApplicationMgr().TopAlg += ["DumpHepMC"]
Ejemplo n.º 2
0
    def defineGeometry(self):
        # DIGI is always simulation, as is usage of MC truth!
        if self.getProp( "WithMC" ) or self.getProp( "InputType" ).upper() == 'DIGI':
            self.setProp( "Simulation", True )

        # Check that detector list does not contain non-upgrade detectors if in upgrade mode (can crash later)
        if( self.getProp("DataType") is "Upgrade"):
            for det in self.getProp("Detectors"):
                if det in ['Velo', 'TT', 'OT', 'IT']:
                    log.warning("You are running with non-upgrade detector %s in upgrade mode."%det)
                    

        # Delegate handling to LHCbApp configurable
        self.setOtherProps(LHCbApp(),["DataType","CondDBtag","DDDBtag","Simulation","Detectors"])

        # Set list of detectors in DstConf
        dstConfDetList = []
        simConfDetList = []
        for det in self.getProp("Detectors"):
            if det in ['Rich1', 'Rich2', 'Rich1Pmt', 'Rich2Pmt']:
                if "Rich" not in dstConfDetList:
                    dstConfDetList.append("Rich")
                if "Rich" not in simConfDetList:                    
                    simConfDetList.append("Rich")
            elif det in ['Prs', 'Spd', 'Ecal', 'Hcal']:
                simConfDetList.append(det)
                if "Calo" not in dstConfDetList:
                    dstConfDetList.append("Calo")
            else:
                dstConfDetList.append(det)
                simConfDetList.append(det)
        DstConf().setProp("Detectors", dstConfDetList)
        from Configurables import SimConf
        SimConf().setProp("Detectors", simConfDetList)
Ejemplo n.º 3
0
 def defineEvents(self):
     # Delegate handling to LHCbApp configurable
     self.setOtherProps(LHCbApp(), ["EvtMax", "SkipEvents"])
     # Setup SIM input
     self.setOtherProp(DigiConf(), "EnablePack")
     SimConf().setProp("EnableUnpack", self.getProp("EnablePack"))
     detListSim = []
     if 'Velo' in self.getProp('DetectorDigi')['VELO']:
         detListSim += ['Velo']
         detListSim += ['PuVeto']  # Add also PU Veto hits
     if 'VeloPix' in self.getProp('DetectorDigi')['VELO']:
         detListSim += ['VeloPix']
     if 'TT' in self.getProp('DetectorDigi')['TT']: detListSim += ['TT']
     if 'IT' in self.getProp('DetectorDigi')['IT']: detListSim += ['IT']
     if 'OT' in self.getProp('DetectorDigi')['OT']: detListSim += ['OT']
     if 'Rich' in self.getProp('DetectorDigi')['RICH']:
         detListSim += ['Rich']
     if 'Calo' in self.getProp('DetectorDigi')['CALO']:
         detListSim += ['Spd', 'Prs', 'Ecal', 'Hcal']
     if 'Muon' in self.getProp('DetectorDigi')['MUON']:
         detListSim += ['Muon']
     SimConf().setProp("Detectors", detListSim)
Ejemplo n.º 4
0
## Moore settings
app = LHCbApp()
app.EvtMax = options.nevents
app.CondDBtag = 'sim-20131023-vc-md100'
app.DDDBtag = 'dddb-20130929-1'
app.DataType   = '2015'
app.Simulation = True

ApplicationMgr().HistogramPersistency = "ROOT"

PhysConf(EnableUnpack = ["Reconstruction", "Stripping"])
DstConf(EnableUnpack = ["Reconstruction", "Stripping"])
if app.getProp('Simulation'):
    from Configurables import SimConf
    SimConf(EnableUnpack = True, EnablePack = False)

EventSelector().PrintFreq = 100

eos_dir = '/eos/lhcb/grid/prod/lhcb/MC/Dev/XDST/00034704/0000'
p = subprocess.Popen(['/afs/cern.ch/project/eos/installation/0.3.15/bin/eos.select', 'ls', eos_dir],
                     stdout = subprocess.PIPE, stderr = subprocess.STDOUT)
o, e = p.communicate()
input_files = sorted(['root://eoslhcb.cern.ch/' + os.path.join(eos_dir, f.strip()) for f in o.split()])

seq = GaudiSequencer( "TopSequence" )

from Configurables import ( DecodeVeloRawBuffer, RawBankToSTLiteClusterAlg,
                            FastVeloTracking, L0Conf,
                            createODIN, MuonRec )
## Configure extra debug instance
Ejemplo n.º 5
0
# Configure all the unpacking, algorithms, tags and input files
appConf = ApplicationMgr()
appConf.ExtSvc += ['ToolSvc', 'DataOnDemandSvc']
appConf.TopAlg += [  #"PrPixelTracking", "PrPixelStoreClusters",
    #"VPClusterLinker",
    "MCFTDepositCreator",
    "MCFTDigitCreator",
    "FTClusterCreator",
]

from Configurables import MCFTDigitCreator
MCFTDigitCreator().IntegrationOffset = [0, 2, 4]
#MCFTDigitCreator().SimulateNoise = True
MCFTDigitCreator().SiPMGain = sipm_gain = 10. * 10

s = SimConf()
SimConf().Detectors = [
    'VP', 'UT', 'FT', 'Rich1Pmt', 'Rich2Pmt', 'Ecal', 'Hcal', 'Muon'
]
SimConf().EnableUnpack = True
SimConf().EnablePack = False

d = DigiConf()
DigiConf().Detectors = [
    'VP', 'UT', 'FT', 'Rich1Pmt', 'Rich2Pmt', 'Ecal', 'Hcal', 'Muon'
]
DigiConf().EnableUnpack = True
DigiConf().EnablePack = False

dre = DecodeRawEvent()
dre.DataOnDemand = True
Ejemplo n.º 6
0
    "FTMCHitSpillMerger", "MCFTDepositCreator", "MCFTPhotonMonitor",
    "MCFTDepositMonitor", "MCFTDigitCreator", "MCFTDigitMonitor",
    "FTClusterCreator", "FTClusterMonitor", "FTClusterTuple"
]

from Configurables import EventSelector

EventSelector().PrintFreq = 100

######################################
# Configure Boole
######################################

setupBooleForDigitisation(params, cfg.digitype, eval(cfg.thresholds))

s = SimConf()
#SimConf().Detectors = ['VP', 'UT', 'FT', 'Rich1Pmt', 'Rich2Pmt', 'Ecal', 'Hcal', 'Muon']
SimConf().Detectors = ['VP', 'FT']
SimConf().EnableUnpack = True
SimConf().EnablePack = False

d = DigiConf()
#DigiConf().Detectors = ['VP', 'UT', 'FT', 'Rich1Pmt', 'Rich2Pmt', 'Ecal', 'Hcal', 'Muon']
DigiConf().Detectors = ['VP', 'FT']
DigiConf().EnableUnpack = True
DigiConf().EnablePack = False

lhcbApp = LHCbApp()
lhcbApp.Simulation = True

IOHelper('ROOT').inputFiles(files)
Ejemplo n.º 7
0
    def configureInit(self, tae, initDets):
        """
        Set up the initialization sequence
        """
        # Start the DataOnDemandSvc ahead of ToolSvc
        ApplicationMgr().ExtSvc += ["DataOnDemandSvc"]
        ApplicationMgr().ExtSvc += ["ToolSvc"]

        ProcessPhase("Init").DetectorList.insert(
            0, "Boole")  # Always run Boole initialisation first!
        initBoole = GaudiSequencer("InitBooleSeq")
        initBoole.Members += ["BooleInit"]

        # Kept for Dirac backward compatibility
        if self.getProp("NoWarnings"):
            log.warning(
                "Boole().NoWarnings=True property is obsolete and maintained for Dirac compatibility. Please use Boole().ProductionMode=True instead"
            )
            self.setProp("ProductionMode", True)

        # Special settings for production
        if self.getProp("ProductionMode"):
            self.setProp("OutputLevel", ERROR)
            if not LHCbApp().isPropertySet("TimeStamp"):
                LHCbApp().setProp("TimeStamp", True)

        # OutputLevel
        self.setOtherProp(LHCbApp(), "OutputLevel")
        if self.isPropertySet("OutputLevel"):
            level = self.getProp("OutputLevel")
            if level == ERROR or level == WARNING:
                # Suppress known warnings
                importOptions("$BOOLEOPTS/SuppressWarnings.opts")
                # Additional information to be kept
                getConfigurable("BooleInit").OutputLevel = INFO

        # Do not print event number at every event (done already by BooleInit)
        EventSelector().PrintFreq = -1

        # Load the spillover branches, then kill those not required to prevent further access
        spillPaths = self.getProp("SpilloverPaths")
        killPaths = []
        if len(spillPaths) == 0:
            spillPaths = self.KnownSpillPaths
            self.setProp("SpilloverPaths", spillPaths)

        if self.getProp("UseSpillover"):
            if tae:
                killPaths = self.KnownSpillPaths
            else:
                self.setOtherProp(SimConf(), "SpilloverPaths")
                # Kill any spillover paths not required
                for spill in self.KnownSpillPaths:
                    if spill not in spillPaths:
                        killPaths.append(spill)
        else:
            # Kill all spillover paths
            killPaths = self.KnownSpillPaths

        from Configurables import EventNodeKiller, TESCheck
        spillLoader = TESCheck("SpilloverLoader")
        spillLoader.Inputs = spillPaths
        spillLoader.Stop = False  # In case no spillover on input file
        spillLoader.OutputLevel = ERROR
        spillKiller = EventNodeKiller("SpilloverKiller")
        spillKiller.Nodes = killPaths
        spillHandler = GaudiSequencer("SpilloverHandler")
        spillHandler.Members += [spillLoader, spillKiller]
        spillHandler.IgnoreFilterPassed = True  # In case no spillover on input file
        initBoole.Members += [spillHandler]

        if "Muon" in initDets:
            # Muon Background
            from Configurables import MuonBackground
            GaudiSequencer("InitMuonSeq").Members += [
                MuonBackground("MuonLowEnergy")
            ]
            importOptions("$MUONBACKGROUNDROOT/options/MuonLowEnergy-G4.opts")
            if not tae:
                flatSpillover = MuonBackground("MuonFlatSpillover")
                GaudiSequencer("InitMuonSeq").Members += [flatSpillover]
                if self.getProp("DataType") == "2010":
                    flatSpillover.NBXFullFull = 344
                if self.getProp("DataType") == "2009":
                    flatSpillover.NBXFullFull = 4
                importOptions(
                    "$MUONBACKGROUNDROOT/options/MuonFlatSpillover-G4.opts")