def trackingDownPreFilter(name, prefilter, seedcut): #Test code for debugging #Jpsi_already_there = LoKi__VoidFilter("Jpsi_already_there") #Jpsi_already_there.Code = "1 <= CONTAINS('Rec/Track/Downstream')" #Jpsi_not_yet_there = LoKi__VoidFilter("Jpsi_not_yet_there") #Jpsi_not_yet_there.Code = "1 > CONTAINS('Rec/Track/Downstream')" TrackToDST(name + "_DownTrackToDST" ).TracksInContainer = "Rec/" + name + "_Downstream/FittedTracks" jpsidotracking = GaudiSequencer("DownTrackingFor" + name) #Add seed tracking DownSeeding = PatSeeding(name + "_DownSeeding") DownSeeding.OutputTracksName = "Rec/" + name + "_DownSeeding/Tracks" PatAlgConf.SeedingConf().configureAlg(SeedAlg=DownSeeding) #DownSeeding.addTool(PatSeedingTool, name=name+"_PatSeedingTool") #DownSeeding.addTool(PatSeedingTool) #PatSeedingTool(name+"_PatSeedingTool").MinMomentum = seedcut seedtoolname = name + "_PatSeedingTool" DownSeeding.addTool(PatSeedingTool, name=seedtoolname) seedtool = getattr(DownSeeding, seedtoolname) seedtool.MinMomentum = seedcut jpsidotracking.Members += [DownSeeding] #Add Seed Fit jpsidotracking.Members += [GaudiSequencer(name + "_TrackSeedFitSeq")] #AddPatDownstream downstreamTracking = PatDownstream(name + "_PatDownstream") downstreamTracking.InputLocation = DownSeeding.OutputTracksName downstreamTracking.OutputLocation = 'Rec/' + name + '_Downstream/Tracks' jpsidotracking.Members += [downstreamTracking] #AddDownstreamFitSeq DownInitAlg = TrackStateInitAlg(name + "_InitSeedDownstream") jpsidotracking.Members += [DownInitAlg] DownInitAlg.TrackLocation = "Rec/" + name + "_Downstream/Tracks" downstreamFit = ConfiguredFitDownstream(name + "_FitDownstream") downstreamFit.TracksInContainer = 'Rec/' + name + '_Downstream/Tracks' downstreamFit.TracksOutContainer = 'Rec/' + name + '_Downstream/FittedTracks' jpsidotracking.Members += [downstreamFit] jpsidotracking.Members += [TrackToDST(name + "_DownTrackToDST")] return GSWrapper(name="WrappedDownstreamTracking" + name, sequencer=jpsidotracking, output='Rec/' + name + '_Downstream/FittedTracks', requiredSelections=[prefilter])
def trackingDownPreFilter(name, prefilter): #Jpsi_already_there = LoKi__VoidFilter("Jpsi_already_there") #Jpsi_already_there.Code = "1 <= CONTAINS('Rec/Track/Downstream')" #Jpsi_not_yet_there = LoKi__VoidFilter("Jpsi_not_yet_there") #Jpsi_not_yet_there.Code = "1 > CONTAINS('Rec/Track/Downstream')" TrackToDST( "DownTrackToDST").TracksInContainer = "Rec/Downstream/FittedTracks" #TrackSys().setProp('SpecialData', ['earlyData']) jpsidotracking = GaudiSequencer("DownTrackingFor" + name) #Add seed tracking jpsidotracking.Members += [PatSeeding("PatSeeding")] PatAlgConf.SeedingConf().configureAlg() #Add Seed Fit jpsidotracking.Members += [GaudiSequencer("TrackSeedFitSeq")] #AddPatDownstream downstreamTracking = PatDownstream() downstreamTracking.OutputLocation = 'Rec/Downstream/Tracks' jpsidotracking.Members += [downstreamTracking] #AddDownstreamFitSeq jpsidotracking.Members += [TrackStateInitAlg("InitSeedDownstream")] TrackStateInitAlg( "InitSeedDownstream").TrackLocation = "Rec/Downstream/Tracks" downstreamFit = ConfiguredFitDownstream() downstreamFit.TracksInContainer = 'Rec/Downstream/Tracks' downstreamFit.TracksOutContainer = 'Rec/Downstream/FittedTracks' jpsidotracking.Members += [downstreamFit] jpsidotracking.Members += [TrackToDST("DownTrackToDST")] #alg = GaudiSequencer("JpsitracksFor" + name, # Members = [Jpsi_already_there, # jpsidotracking], # ModeOR = True, # ShortCircuit = True) return GSWrapper(name="WrappedDownstreamTracking", sequencer=jpsidotracking, output='Rec/Downstream/FittedTracks', requiredSelections=[prefilter])
def trackingDownPreFilter(name, prefilter): #Test code for debugging #Jpsi_already_there = LoKi__VoidFilter("Jpsi_already_there") #Jpsi_already_there.Code = "1 <= CONTAINS('Rec/Track/Downstream')" #Jpsi_not_yet_there = LoKi__VoidFilter("Jpsi_not_yet_there") #Jpsi_not_yet_there.Code = "1 > CONTAINS('Rec/Track/Downstream')" TrackToDST( "DownTrackToDST").TracksInContainer = "Rec/Downstream/FittedTracks" jpsidotracking = GaudiSequencer("DownTrackingFor" + name) #Add seed tracking jpsidotracking.Members += [PatSeeding("PatSeeding")] PatAlgConf.SeedingConf().configureAlg() #Add Seed Fit jpsidotracking.Members += [GaudiSequencer("TrackSeedFitSeq")] #AddPatDownstream downstreamTracking = PatDownstream() downstreamTracking.OutputLocation = 'Rec/Downstream/Tracks' jpsidotracking.Members += [downstreamTracking] #AddDownstreamFitSeq jpsidotracking.Members += [TrackStateInitAlg("InitSeedDownstream")] TrackStateInitAlg( "InitSeedDownstream").TrackLocation = "Rec/Downstream/Tracks" downstreamFit = ConfiguredFitDownstream() downstreamFit.TracksInContainer = 'Rec/Downstream/Tracks' downstreamFit.TracksOutContainer = 'Rec/Downstream/FittedTracks' jpsidotracking.Members += [downstreamFit] jpsidotracking.Members += [TrackToDST("DownTrackToDST")] return GSWrapper(name="WrappedDownstreamTracking", sequencer=jpsidotracking, output='Rec/Downstream/FittedTracks', requiredSelections=[prefilter])
def __apply_configuration__(self): """Apply the HLT persist reco configuration.""" from Configurables import GaudiSequencer from Configurables import LoKi__HDRFilter from Configurables import TrackToDST persistRecoSeq = self.getProp("Sequence") if not self.getProp("Sequence"): return persistRecoSeq.IgnoreFilterPassed = False persistRecoSeq.Members = [] # This sequence expects the proper line filter to be applied already # Cut down states in tracks first tracks = Hlt2BiKalmanFittedForwardTracking().hlt2PrepareTracks() tracksDown = Hlt2BiKalmanFittedDownstreamTracking().hlt2PrepareTracks() longStateCutter = TrackToDST("TrackToDSTLong") longStateCutter.TracksInContainer = tracks.outputSelection() downStateCutter = TrackToDST("TrackToDSTDown") downStateCutter.TracksInContainer = tracksDown.outputSelection() persistRecoSeq.Members += [longStateCutter] persistRecoSeq.Members += [downStateCutter] # Setup packers and add them to the sequence packerAlgs = self._packers() persistRecoSeq.Members += packerAlgs # Configure HltPackedDataWriter algorithm to add to the raw banks pdwriter = HltPackedDataWriter("Hlt2PackedDataWriter") pdwriter.Containers = [ out for inp, out in self.packedObjectLocations() ] persistRecoSeq.Members += [pdwriter] # Register the mapping of output locations and integers self._registerToHltANNSvc()
def configureOutput(self, dstType, withMC, handleLumi): """ Set up output stream """ # Merge genFSRs if self.getProp("WriteFSR"): if self.getProp("MergeGenFSR"): GaudiSequencer("OutputDSTSeq").Members += ["GenFSRMerge"] if dstType in [ "XDST", "DST", "LDST", "RDST" ]: writerName = "DstWriter" packType = self.getProp( "PackType" ) # event output dstWriter = OutputStream( writerName ) dstWriter.AcceptAlgs += ["Reco"] # Write only if Rec phase completed if handleLumi and self.getProp( "WriteLumi" ): dstWriter.AcceptAlgs += ["LumiSeq"] # Write also if Lumi sequence completed # set verbosity if self.getProp( "ProductionMode" ): if not dstWriter.isPropertySet( "OutputLevel" ): dstWriter.OutputLevel = INFO if self.getProp("WriteFSR"): FSRWriter = RecordStream( "FSROutputStreamDstWriter") if not FSRWriter.isPropertySet( "OutputLevel" ): FSRWriter.OutputLevel = INFO # Suppress spurious error when reading POOL files without run records if self.getProp("WriteFSR"): if self.getProp( "InputType" ).upper() not in [ "MDF" ]: from Configurables import FileRecordDataSvc FileRecordDataSvc().OutputLevel = FATAL if dstType == "XDST": # Allow multiple files open at once (SIM,DST,DIGI etc.) IODataManager().AgeLimit += 1 if dstType in ["DST","XDST","LDST"] and packType not in ["MDF"]: jseq=GaudiSequencer("RawEventSplitSeq") ################################# # Split the Raw Event for the DST # Use the RawEventJuggler. # Not delegated to DSTConf. # Some information must be shared with DSTConf ################################# juggler=RawEventJuggler() juggler.Sequencer=jseq dstseq=GaudiSequencer("OutputDSTSeq") dstseq.Members.append(jseq) # Set the output version if not already overwritten if juggler.isPropertySet("Output") and juggler.getProp("Output") is not None: #it's already set pass else: juggler.setProp("Output",self.getProp("SplitRawEventOutput")) #set the input version, could come from several places if self.isPropertySet("SplitRawEventInput") and self.getProp("SplitRawEventInput") is not None: #if set, take it from Brunel() juggler.setProp("Input",self.getProp("SplitRawEventInput")) #otherwise use the setting of the juggler if it is set elif juggler.isPropertySet("Input") and juggler.getProp("Input") is not None: pass #else find it from DecodeRawEvent elif DecodeRawEvent().isPropertySet("OverrideInputs") and DecodeRawEvent().getProp("OverrideInputs") is not None: juggler.setProp("Input",DecodeRawEvent().getProp("OverrideInputs")) #else if I'm input with a DST, assume it is a Stripping20 type elif self._isReprocessing(self.getProp("InputType")): juggler.setProp("Input",2.0) else: #or set the default to whatever comes out of Moore by default juggler.setProp("Input","Moore") #share information from the Juggler with DSTConf #always write out to where the Juggler asked! DstConf().setProp("SplitRawEventOutput", juggler.getProp("Output")) #or else the default in the juggler is used, should be 0.0 #TODO, handle the turned off Calo, shouldn't actually be a problem... from RawEventCompat.Configuration import _checkv from Configurables import RawEventFormatConf RawEventFormatConf().loadIfRequired() if juggler.getProp("Input")!=juggler.getProp("Output"): if (juggler.getProp("Input") is None or juggler.getProp("Output")) is None or (_checkv(juggler.getProp("Input")))!=(_checkv(juggler.getProp("Output"))): juggler.KillExtraBanks=True juggler.KillExtraNodes=True #really kill /Event/DAQ to prevent it re-appearing! juggler.KillExtraDirectories=True from Configurables import TrackToDST # Filter Best Track States to be written trackFilter = TrackToDST("FilterBestTrackStates") from Configurables import ProcessPhase ProcessPhase("Output").DetectorList += [ "DST" ] GaudiSequencer("OutputDSTSeq").Members += [ trackFilter ] ### For Run 2, filter the fitted Velo tracks for PV if( self.getProp("DataType") in self.Run2DataTypes ): fittedVeloTracksFilter = TrackToDST("FilterFittedVeloTrackStates", veloStates = ["ClosestToBeam"]) fittedVeloTracksFilter.TracksInContainer = "Rec/Track/FittedHLT1VeloTracks" GaudiSequencer("OutputDSTSeq").Members += [ fittedVeloTracksFilter ] if "Muon" in self.getProp("Detectors"): # Filter Muon Track States muonTrackFilter = TrackToDST("FilterMuonTrackStates") muonTrackFilter.TracksInContainer = "/Event/Rec/Track/Muon" GaudiSequencer("OutputDSTSeq").Members += [ muonTrackFilter ] if packType != "NONE": # Add the sequence to pack the DST containers packSeq = GaudiSequencer("PackDST") DstConf().PackSequencer = packSeq DstConf().AlwaysCreate = True GaudiSequencer("OutputDSTSeq").Members += [ packSeq ] # Run the packers also on Lumi only events to write empty containers if handleLumi and self.getProp( "WriteLumi" ): notPhysSeq = GaudiSequencer("NotPhysicsSeq") notPhysSeq.Members += [ packSeq ] # Define the file content DstConf().Writer = writerName DstConf().DstType = dstType DstConf().PackType = packType #In case we didn't juggle the raw event, #We should write out the same as the input type! if not DstConf().isPropertySet("SplitRawEventOutput"): if self.isPropertySet("SplitRawEventInput") and self.getProp("SplitRawEventInput") is not None: DstConf().setProp("SplitRawEventOutput",self.getProp("SplitRawEventInput")) elif DecodeRawEvent().isPropertySet("OverrideInputs") and DecodeRawEvent().getProp("OverrideInputs") is not None: DstConf().setProp("SplitRawEventOutput",DecodeRawEvent().getProp("SplitRawEventInput")) if withMC: DstConf().SimType = "Full" elif self.getProp("DigiType").capitalize() == "Minimal": from Configurables import PackMCVertex GaudiSequencer("OutputDSTSeq").Members += [PackMCVertex()] DstConf().SimType = "Minimal" DstConf().OutputName = self.outputName() self.setOtherProps(DstConf(),["DataType","WriteFSR"])
def makeMyProtoP(trackcont): unpacker = UnpackTrack(trackcont + "UnpackTrack") unpacker.InputName = "pRec/Track/" + trackcont unpacker.OutputName = "Rec/Track/" + trackcont refitter = TrackSmeared(trackcont + "TrackSmeared") refitter.InputLocation = "Rec/Track/" + trackcont refitter.OutputLocation = "Refit" refitter.smear = 1 #refitter.makePlots = 1 #refitter.OutputLevel = 2 #idalg = MuonIDAlg("BestIDalg") #idalg.OutputLevel = 0 #cm=ConfiguredMuonIDs.ConfiguredMuonIDs(data=DaVinci().getProp("DataType")) #cm.configureMuonIDAlg(idalg) #idalg.TrackLocation = "Rec/Track/Refit" #idalg.MuonIDLocation = "Rec/Muon/MuonPID/Refit" downprotoseq = GaudiSequencer(trackcont + "ProtoPSeq") downprotos = ChargedProtoParticleMaker(trackcont + "ProtoPMaker") downprotos.InputTrackLocation = ["Rec/Track/Refit"] downprotos.OutputProtoParticleLocation = "Rec/ProtoP/" + trackcont + "ProtoPMaker" downprotos.addTool(DelegatingTrackSelector, name="TrackSelector") #downprotos.OutputLevel = 0 tracktypes = ["Long", "Upstream", "Downstream", "Ttrack", "Velo", "VeloR"] downprotos.TrackSelector.TrackTypes = tracktypes selector = downprotos.TrackSelector for tsname in tracktypes: selector.addTool(TrackSelector, name=tsname) ts = getattr(selector, tsname) # Set Cuts ts.TrackTypes = [tsname] #set up associators #addmuonpid = ChargedProtoParticleAddMuonInfo("Bestaddmuoninfo") #addmuonpid.InputMuonPIDLocation = "Rec/Muon/MuonPID/Refit" #addmuonpid.ProtoParticleLocation = "Rec/ProtoP/"+trackcont+"ProtoPMaker" #addmuonpid.OutputLevel = 0 addrichpid = ChargedProtoParticleAddRichInfo("Bestaddrichinfo") addrichpid.InputRichPIDLocation = "Rec/Rich/Refit" #addrichpid.InputRichPIDLocation = "Rec/Rich/"+trackcont addrichpid.ProtoParticleLocation = "Rec/ProtoP/" + trackcont + "ProtoPMaker" #addcalopid = ChargedProtoParticleAddCaloInfo("Bestaddcaloinfo") #addcalopid.InputRichCALOLocation = "Rec/Rich/Refit" #addcalopid.ProtoParticleLocation = "Rec/ProtoP/"+trackcont+"ProtoPMaker" combinedll = ChargedProtoCombineDLLsAlg("BestCombineDLL") combinedll.ProtoParticleLocation = "Rec/ProtoP/" + trackcont + "ProtoPMaker" assoctr = TrackAssociator(trackcont + "AssocTr") #assoctr.TracksInContainer = "Rec/Track/"+trackcont assoctr.TracksInContainer = "Rec/Track/Refit" assocpp = ChargedPP2MC(trackcont + "AssocPP") #assocpp.TrackLocations = [ "Rec/Track/"+trackcont ] assocpp.TrackLocations = ["Rec/Track/Refit"] assocpp.InputData = ["Rec/ProtoP/" + trackcont + "ProtoPMaker"] #assocpp.InputData = [ "Rec/ProtoP/Refit" ] assocpp.OutputTable = "Relations/Rec/ProtoP/" + trackcont + "ProtoPMaker" # DST post treatment TrackToDST(trackcont + "TrackToDST").TracksInContainer = "Rec/Track/" + trackcont #downprotoseq.Members += [ TrackToDST(trackcont+"TrackToDST"), assoctr, downprotos, assocpp,addrichpid,combinedll ] if not DaVinci().Simulation: downprotoseq.Members += [ TrackToDST(trackcont + "TrackToDST"), downprotos, addrichpid, combinedll ] DataOnDemandSvc().AlgMap.update({ "/Event/Rec/Track/" + trackcont: unpacker.getFullName(), "/Event/Rec/Track/Refit": refitter.getFullName(), "/Event/Rec/Rich/Refit": downprotoseq.getFullName(), "/Event/Rec/ProtoP/" + trackcont + "ProtoPMaker": downprotoseq.getFullName(), "/Event/Relations/Rec/ProtoP/" + trackcont + "ProtoPMaker": downprotoseq.getFullName() }) else: if (DaVinci().Simulation): downprotoseq.Members += [ TrackToDST(trackcont + "TrackToDST"), assoctr, downprotos, addrichpid, combinedll, assocpp ] DataOnDemandSvc().AlgMap.update({ "/Event/Rec/Track/" + trackcont: unpacker.getFullName(), "/Event/Rec/Track/Refit": refitter.getFullName(), "/Event/Rec/Rich/Refit": downprotoseq.getFullName(), "/Event/Rec/ProtoP/" + trackcont + "ProtoPMaker": downprotoseq.getFullName(), "/Event/Relations/Rec/ProtoP/" + trackcont + "ProtoPMaker": downprotoseq.getFullName() })
def makeMyProtoP(trackcont): unpacker = UnpackTrack(trackcont + "UnpackTrack") unpacker.InputName = "pRec/Track/" + trackcont unpacker.OutputName = "Rec/Track/" + trackcont smeartracks = TrackSmeared(trackcont + "TrackSmeared") smeartracks.InputLocation = "Rec/Track/" + trackcont outputLocation = "Smeared" smeartracks.OutputLocation = outputLocation smeartracks.smearCopied = True smeartracks.smear = 1 #smeartracks.makePlots = 1 #smeartracks.OutputLevel = 2 protoseq = GaudiSequencer(trackcont + "ProtoPSeq") protos = ChargedProtoParticleMaker(trackcont + "ProtoPMaker") protos.InputTrackLocation = ["Rec/Track/" + outputLocation] protos.OutputProtoParticleLocation = "Rec/ProtoP/" + trackcont + "ProtoPMaker" protos.addTool(DelegatingTrackSelector, name="TrackSelector") #protos.OutputLevel = 0 tracktypes = ["Long", "Upstream", "Downstream", "Ttrack", "Velo", "VeloR"] protos.TrackSelector.TrackTypes = tracktypes selector = protos.TrackSelector for tsname in tracktypes: selector.addTool(TrackSelector, name=tsname) ts = getattr(selector, tsname) # Set Cuts ts.TrackTypes = [tsname] # Add PID information idalg = MuonIDAlg("BestIDalg") #idalg.OutputLevel = 5 cm = ConfiguredMuonIDs.ConfiguredMuonIDs( data=DaVinci().getProp("DataType")) cm.configureMuonIDAlg(idalg) idalg.TrackLocation = "Rec/Track/" + outputLocation idalg.MuonIDLocation = "Rec/Muon/MuonPID/" + outputLocation from Configurables import ( ChargedProtoParticleAddRichInfo, ChargedProtoParticleAddMuonInfo, ChargedProtoParticleAddEcalInfo, ChargedProtoParticleAddBremInfo, ChargedProtoParticleAddHcalInfo, ChargedProtoParticleAddPrsInfo, ChargedProtoParticleAddSpdInfo, ChargedProtoParticleAddVeloInfo, ChargedProtoCombineDLLsAlg) addmuonpid = ChargedProtoParticleAddMuonInfo("Bestaddmuoninfo") addmuonpid.InputMuonPIDLocation = "Rec/Muon/MuonPID/" + outputLocation addmuonpid.ProtoParticleLocation = "Rec/ProtoP/" + trackcont + "ProtoPMaker" addrichpid = ChargedProtoParticleAddRichInfo("Bestaddrichinfo") addrichpid.ProtoParticleLocation = "Rec/ProtoP/" + trackcont + "ProtoPMaker" # The rich pid is added to the track in TrackSmeared, thus only kaon pion pid is consistent # the others are not implemented. The modes smearBest and smearProto don't have the problems #addcalopid = ChargedProtoParticleAddCaloInfo("Bestaddcaloinfo") #addcalopid.InputRichCALOLocation = "Rec/Rich/"+outputLocation #addcalopid.ProtoParticleLocation = "Rec/ProtoP/"+trackcont+"ProtoPMaker" #ecal = ChargedProtoParticleAddEcalInfo("ChargedProtoPAddEcal") #ecal.ProtoParticleLocation = "Rec/ProtoP/"+trackcont+"ProtoPMaker" #brem = ChargedProtoParticleAddBremInfo("ChargedProtoPAddBrem") #brem.ProtoParticleLocation = "Rec/ProtoP/"+trackcont+"ProtoPMaker" #hcal = ChargedProtoParticleAddHcalInfo("ChargedProtoPAddHcal") #hcal.ProtoParticleLocation = "Rec/ProtoP/"+trackcont+"ProtoPMaker" #prs = ChargedProtoParticleAddPrsInfo("ChargedProtoPAddPrs") #prs.ProtoParticleLocation = "Rec/ProtoP/"+trackcont+"ProtoPMaker" #spd = ChargedProtoParticleAddSpdInfo("ChargedProtoPAddSpd") #spd.ProtoParticleLocation = "Rec/ProtoP/"+trackcont+"ProtoPMaker" #velo = ChargedProtoParticleAddVeloInfo("ChargedProtoPAddVeloDEDX") #velo.ProtoParticleLocation = "Rec/ProtoP/"+trackcont+"ProtoPMaker" combinedll = ChargedProtoCombineDLLsAlg("BestCombineDLL") combinedll.ProtoParticleLocation = "Rec/ProtoP/" + trackcont + "ProtoPMaker" #set up associators assoctr = TrackAssociator(trackcont + "AssocTr") assoctr.TracksInContainer = "Rec/Track/" + outputLocation assocpp = ChargedPP2MC(trackcont + "AssocPP") assocpp.TrackLocations = ["Rec/Track/" + outputLocation] assocpp.InputData = ["Rec/ProtoP/" + trackcont + "ProtoPMaker"] assocpp.OutputTable = "Relations/Rec/ProtoP/" + trackcont + "ProtoPMaker" # DST post treatment TrackToDST(trackcont + "TrackToDST").TracksInContainer = "Rec/Track/" + trackcont if not DaVinci().Simulation: protoseq.Members += [TrackToDST(trackcont + "TrackToDST"), protos] protoseq.Members += [ ecal, brem, hcal, prs, spd, velo, addrichpid, addmuonpid, combinedll ] DataOnDemandSvc().AlgMap.update({ "/Event/Rec/Track/" + trackcont: unpacker.getFullName(), "/Event/Rec/Track/" + outputLocation: smeartracks.getFullName(), "/Event/Rec/Rich/" + outputLocation: protoseq.getFullName(), "/Event/Rec/Muon/MuonPID/" + outputLocation: idalg.getFullName(), "/Event/Rec/ProtoP/" + trackcont + "ProtoPMaker": protoseq.getFullName(), "/Event/Relations/Rec/ProtoP/" + trackcont + "ProtoPMaker": protoseq.getFullName() }) else: if (DaVinci().Simulation): protoseq.Members += [ TrackToDST(trackcont + "TrackToDST"), assoctr, protos ] #protoseq.Members += [ ecal,brem,hcal,prs,spd,velo,addrichpid,addmuonpid,combinedll,assocpp ] protoseq.Members += [ idalg, addmuonpid, addrichpid, combinedll, assocpp ] DataOnDemandSvc().AlgMap.update({ "/Event/Rec/Track/" + trackcont: unpacker.getFullName(), "/Event/Rec/Track/" + outputLocation: smeartracks.getFullName(), "/Event/Rec/Rich/" + outputLocation: protoseq.getFullName(), "/Event/Rec/Muon/MuonPID/" + outputLocation: idalg.getFullName(), "/Event/Rec/ProtoP/" + trackcont + "ProtoPMaker": protoseq.getFullName(), "/Event/Relations/Rec/ProtoP/" + trackcont + "ProtoPMaker": protoseq.getFullName() })
def configureOutput(self, dstType): """ Set up output stream """ if dstType in ["DST", "RDST"]: if hasattr(self, "Persistency"): if self.getProp("Persistency") is not None: DstConf().Persistency = self.getProp("Persistency") writerName = "DstWriter" packType = self.getProp("PackType") # Do not pack DC06 DSTs, for consistency with existing productions if self.getProp("DataType") == "DC06": packType = "NONE" dstWriter = OutputStream(writerName) dstWriter.RequireAlgs += ["Reco" ] # Write only if Rec phase completed # Set a default output file name if not already defined in the user job options if not hasattr(dstWriter, "Output"): DstConf().OutputName = self.outputName() # Define the file content DstConf().Writer = writerName DstConf().DstType = dstType DstConf().PackType = packType DstConf().setProp("WriteFSR", self.getProp("WriteFSR")) if hasattr(self, "Persistency"): if self.getProp("Persistency") is not None: DstConf().setProp("Persistency", self.getProp("Persistency")) from Configurables import TrackToDST if dstType == "DST": # Sequence for altering DST content ProcessPhase("Output").DetectorList += ["DST"] # Filter Track States to be written trackFilter = TrackToDST() else: # Sequence for altering content of rDST compared to DST ProcessPhase("Output").DetectorList += ["L0", "DST"] # Filter Track States to be written trackFilter = TrackToDST("TrackToRDST") trackFilter.veloStates = ["ClosestToBeam"] trackFilter.longStates = ["ClosestToBeam"] trackFilter.TTrackStates = ["FirstMeasurement"] trackFilter.downstreamStates = ["FirstMeasurement"] trackFilter.upstreamStates = ["ClosestToBeam"] GaudiSequencer("OutputDSTSeq").Members += [trackFilter] if packType != "NONE": # Add the sequence to pack the DST containers packSeq = GaudiSequencer("PackDST") DstConf().PackSequencer = packSeq DstConf().AlwaysCreate = True GaudiSequencer("OutputDSTSeq").Members += [packSeq] # Always write an ETC if ETC input if self.getProp("InputType").upper() == "ETC": raise DeprecationWarning, "ETC are no longer supported by LHCb" etcWriter = TagCollectionSvc("EvtTupleSvc") ApplicationMgr().ExtSvc.append(etcWriter) ApplicationMgr().OutStream.append("GaudiSequencer/SeqTagWriter") importOptions("$ESCHEROPTS/DefineETC.opts") if not hasattr(etcWriter, "Output"): etcWriter.Output = [ "EVTTAGS2 DATAFILE='" + self.getProp("DatasetName") + "-etc.root' TYP='POOL_ROOTTREE' OPT='RECREATE' " ] # Do not print event number at every event (done already by Brunel) EventSelector().PrintFreq = -1 CountingPrescaler("EscherPrescaler").PrintFreq = self.getProp( "PrintFreq") # Modify printout defaults if self.getProp("NoWarnings"): importOptions("$ESCHEROPTS/SuppressWarnings.opts")