def DefaultDecoderToVeloClusters(
    Name                     = 'DecodeVeloRawBufferToVeloClusters',
    RawEventLocations        = ['Velo/RawEvent',
                                'Other/RawEvent',
                                'DAQ/RawEvent'],
    VeloClusterLocation      ='Raw/Velo/Clusters',
    DecodeToVeloClusters     = True,
    DecodeToVeloLiteClusters = False
    ):
    
    decoder = DecodeVeloRawBuffer( Name )
    
    decoder.RawEventLocations        = RawEventLocations
    decoder.VeloClusterLocation      = VeloClusterLocation
    decoder.DecodeToVeloClusters     = DecodeToVeloClusters
    decoder.DecodeToVeloLiteClusters = DecodeToVeloLiteClusters
    
    return decoder
itClusterPosition = STOfflinePosition('ToolSvc.ITClusterPosition')
itClusterPosition.DetType  = 'IT'
#itClusterPosition.ErrorVec = [ 0.28, 0.2, 0.3, 0.32 ]
#itClusterPosition.APE      = 0.05

ttClusterPosition = STOfflinePosition('ToolSvc.STOfflinePosition')
#ttClusterPosition.ErrorVec = [ 0.29, 0.34, 0.32, 0.46 ]
#ttClusterPosition.APE      = 0.197

from Configurables import HltRoutingBitsFilter

physFilter = HltRoutingBitsFilter( "PhysFilter", RequireMask = [ 0x0, 0x4, 0x0 ] )

veloDecoder = DecodeVeloRawBuffer('VeloDecoder')
veloDecoder.DecodeToVeloLiteClusters = False
veloDecoder.DecodeToVeloClusters = True

itDecoder = RawBankToSTClusterAlg('ITDecoder') 
itDecoder.DetType = 'IT'

ttDecoder = RawBankToSTClusterAlg('TTDecoder')

#from Configurables import CondDB, CondDBAccessSvc
# Adding an extra slice of the database (example: alignment constants)
#mycalib = CondDBAccessSvc( 'myCalib' )
#mycalib.ConnectionString = 'sqlite_file:/afs/cern.ch/user/m/mamartin/public/AlignDB/v6.2series.db/LHCBCOND'
#CondDB().addLayer( mycalib )

#In DV2012.py
## Using latest databases tags
Esempio n. 3
0
    muon_conf['MuonRec' + b].RootInTES = b
    muon_conf['MuonRec' + b].Context = 'TAE'
    dondem.AlgMap['/Event/' + b +
                  '/Raw/Muon/Coords'] = muon_conf['MuonRec' + b].getFullName()

from Configurables import DecodeVeloRawBuffer
velo_conf = {}
for b in bunch:
    velo_conf['createVeloClusters' +
              b] = DecodeVeloRawBuffer('createVeloClusters' + b)
    velo_conf['createVeloClusters' + b].ForceBankVersion = 3
    velo_conf['createVeloClusters' + b].RawEventLocation = b + '/DAQ/RawEvent'
    velo_conf['createVeloClusters' +
              b].VeloClusterLocation = b + '/Raw/Velo/Clusters'
    velo_conf['createVeloClusters' + b].DecodeToVeloClusters = True
    velo_conf['createVeloClusters' + b].DecodeToVeloLiteClusters = False
    velo_conf['createVeloLiteClusters' +
              b] = DecodeVeloRawBuffer('createVeloLiteClusters' + b)
    velo_conf['createVeloLiteClusters' + b].ForceBankVersion = 3
    velo_conf['createVeloLiteClusters' +
              b].RawEventLocation = b + '/DAQ/RawEvent'
    velo_conf['createVeloLiteClusters' +
              b].VeloLiteClustersLocation = b + '/Raw/Velo/LiteClusters'
    dondem.AlgMap['/Event/' + b + '/Raw/Velo/LiteClusters'] = velo_conf[
        'createVeloLiteClusters' + b].getFullName()
    dondem.AlgMap['/Event/' + b +
                  '/Raw/Velo/Clusters'] = velo_conf['createVeloClusters' +
                                                    b].getFullName()

from Configurables import RawBankToSTClusterAlg, RawBankToSTLiteClusterAlg
st_conf = {}
Esempio n. 4
0
    def configureLink(self, linkDets, moniDets):
        """
        Set up the MC links sequence
        """

        doWriteTruth = ("DIGI" in self.getProp("Outputs")) and (
            self.getProp("DigiType").capitalize() != "Minimal")

        if "Velo" in linkDets or "Velo" in moniDets or "Tr" in linkDets:
            seq = GaudiSequencer("LinkVeloSeq")
            from Configurables import DecodeVeloRawBuffer
            decodeVelo = DecodeVeloRawBuffer()
            decodeVelo.DecodeToVeloClusters = True
            decodeVelo.DecodeToVeloLiteClusters = False
            seq.Members += [decodeVelo]
            seq.Members += ["VeloCluster2MCHitLinker"]
            seq.Members += ["VeloCluster2MCParticleLinker"]

        if "VeloPix" in linkDets or "VeloPix" in moniDets:
            from Configurables import VeloPixDigit2MCHitLinker, VeloPixDigit2MCParticleLinker, VeloPixCluster2MCHitLinker, VeloPixCluster2MCParticleLinker
            seq = GaudiSequencer("LinkVeloPixSeq")
            seq.Members += [
                VeloPixDigit2MCHitLinker("VeloPixDigit2MCHitLinker")
            ]
            seq.Members += [
                VeloPixDigit2MCParticleLinker("VeloPixDigit2MCParticleLinker")
            ]
            seq.Members += [
                VeloPixCluster2MCHitLinker("VeloPixCluster2MCHitLinker")
            ]
            seq.Members += [
                VeloPixCluster2MCParticleLinker(
                    "VeloPixCluster2MCParticleLinker")
            ]

        if "TT" in linkDets or "IT" in linkDets or "TT" in moniDets or "IT" in moniDets or "Tr" in linkDets:
            from Configurables import STDigit2MCHitLinker, STCluster2MCHitLinker, STCluster2MCParticleLinker
            if "TT" in linkDets or "TT" in moniDets:
                seq = GaudiSequencer("LinkTTSeq")
                seq.Members += [STDigit2MCHitLinker("TTDigitLinker")]
                seq.Members += [STCluster2MCHitLinker("TTClusterLinker")]
                seq.Members += [STCluster2MCParticleLinker("TTTruthLinker")]

            if "IT" in linkDets or "IT" in moniDets:
                seq = GaudiSequencer("LinkITSeq")
                seq.Members += [
                    STDigit2MCHitLinker("ITDigitLinker", DetType="IT")
                ]
                seq.Members += [
                    STCluster2MCHitLinker("ITClusterLinker", DetType="IT")
                ]
                seq.Members += [
                    STCluster2MCParticleLinker("ITTruthLinker", DetType="IT")
                ]

        if "OT" in linkDets or "OT" in moniDets or "Tr" in linkDets:
            seq = GaudiSequencer("LinkOTSeq")
            seq.Members += ["OTMCDepositLinker"]
            seq.Members += ["OTMCHitLinker"]
            seq.Members += ["OTMCParticleLinker"]

        if "Tr" in linkDets and doWriteTruth:
            seq = GaudiSequencer("LinkTrSeq")
            if "VeloPix" in linkDets:
                seq.Members += ["BuildMCTrackWithVeloPixInfo"]
            else:
                seq.Members += ["BuildMCTrackInfo"]

        if "Rich" in linkDets and doWriteTruth:
            seq = GaudiSequencer("LinkRichSeq")
            seq.Members += ["Rich::MC::MCRichDigitSummaryAlg"]

        if "Calo" in linkDets or "Calo" in moniDets:
            from Configurables import CaloDigitsFromRaw, CaloReCreateMCLinks, CaloDigitMCTruth
            seq = GaudiSequencer("LinkCaloSeq")
            seq.Members += [CaloDigitsFromRaw("EcalFromRaw")]
            seq.Members += [CaloDigitsFromRaw("HcalFromRaw")]
            recreateLinks = CaloReCreateMCLinks()
            recreateLinks.Digits = ["Raw/Ecal/Digits", "Raw/Hcal/Digits"]
            recreateLinks.MCDigits = ["MC/Ecal/Digits", "MC/Hcal/Digits"]
            seq.Members += [recreateLinks]
            seq.Members += [CaloDigitMCTruth("EcalDigitMCTruth")]
            hcalTruth = CaloDigitMCTruth("HcalDigitMCTruth")
            hcalTruth.Input = "Raw/Hcal/Digits"
            hcalTruth.Detector = "/dd/Structure/LHCb/DownstreamRegion/Hcal"
            seq.Members += [hcalTruth]

        if "Muon" in linkDets and doWriteTruth:
            seq = GaudiSequencer("LinkMuonSeq")
            seq.Members += ["MuonDigit2MCParticleAlg"]
            seq.Members += ["MuonTileDigitInfo"]

        if "L0" in linkDets and doWriteTruth:
            from Configurables import L0Conf
            L0Conf().LinkSequencer = GaudiSequencer("LinkL0Seq")