def selMuonPParts(name, DataType, downstreamSeq): """ Make ProtoParticles out of Downstream tracks """ unpacker = UnpackTrack(name+"UnpackTrack") # do we need this or is it here for historical reason ? unpacker.InputName="pRec/Downstream/FittedTracks" unpacker.OutputName="Rec/Downstream/FittedTracks" idalg = MuonIDAlg(name+"IDalg") cm=ConfiguredMuonIDs.ConfiguredMuonIDs( DataType ) #data=DaVinci().getProp("DataType")) cm.configureMuonIDAlg(idalg) idalg.TrackLocation = "Rec/Downstream/FittedTracks" idalg.MuonIDLocation = "Rec/Muon/MuonPID/Downstream" idalg.MuonTrackLocation = "Rec/Track/MuonForDownstream" # I would call it FromDownstream …but just to be »Klugscheißer« downprotoseq = GaudiSequencer(name+"ProtoPSeq") downprotos = ChargedProtoParticleMaker(name+"ProtoPMaker") downprotos.Inputs = ["Rec/Downstream/FittedTracks"] downprotos.Output = "Rec/ProtoP/"+name+"ProtoPMaker/ProtoParticles" downprotos.addTool( DelegatingTrackSelector, name="TrackSelector" ) #tracktypes = [ "Long","Upstream","Downstream","Ttrack","Velo","VeloR" ] # only downstream needed … tracktypes = ["Downstream"] #if (trackcont == "Best") : # tracktypes = [ "Long" ] 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] # ts.MinNDoF = 1 ts.MaxChi2Cut = 10 addmuonpid = ChargedProtoParticleAddMuonInfo(name+"addmuoninfo") addmuonpid.InputMuonPIDLocation = "Rec/Muon/MuonPID/Downstream" addmuonpid.ProtoParticleLocation = "Rec/ProtoP/"+name+"ProtoPMaker/ProtoParticles" #addmuonpid.OutputLevel = 0 combinedll = ChargedProtoCombineDLLsAlg(name+"CombineDLL") combinedll.ProtoParticleLocation = "Rec/ProtoP/"+name+"ProtoPMaker/ProtoParticles" #combinedll.OutputLevel = 0 # DST post treatment #TrackToDST(name+"TrackToDST").TracksInContainer = "Rec/Downstream/Tracks" #downprotoseq.Members += [ TrackToDST(name+"TrackToDST"), downprotos, addmuonpid, combinedll ] downprotoseq.Members += [ downprotos, addmuonpid, combinedll ] # DataOnDemandSvc().AlgMap.update( { "/Event/Rec/Downstream/Tracks" : unpacker.getFullName(), "/Event/Rec/Muon/MuonPID/Downstream" : idalg.getFullName(), # "/Event/Rec/ProtoP/"+name+"ProtoPMaker" : downprotoseq.getFullName() } ) return GSWrapper(name="WrappedDownMuonProtoPSeqFor"+name, sequencer=downprotoseq, output='Rec/ProtoP/' + name +'ProtoPMaker/ProtoParticles', requiredSelections = [ downstreamSeq])
def applyConf(self): # Check the special data options for option in self.getProp("SpecialData"): if option not in self.KnownSpecialData: raise RuntimeError("Unknown SpecialData option '%s'"%option) # Phases if not self.isPropertySet("RecoSequence"): self.setProp("RecoSequence",self.DefaultSubDetsFieldOn) if self.getProp("DataType") in self.Run2DataTypes: self.setProp("RecoSequence",self.DefaultSubDetsFieldOnRun2) recoSeq = self.getProp("RecoSequence") if self.getProp("SkipTracking"): for det in self.DefaultTrackingSubdets: if det in recoSeq: recoSeq.remove(det) from Configurables import ProcessPhase ProcessPhase("Reco").DetectorList += recoSeq # Primary Vertex and V0 finding if "Vertex" in recoSeq and self.getProp("DataType") not in self.Run2DataTypes: from Configurables import PatPVOffline, TrackV0Finder pvAlg = PatPVOffline() if "2009" == self.getProp("DataType"): from PatPV import PVConf PVConf.VLoosePV().configureAlg() elif ( "veloOpen" in self.getProp("SpecialData") or "microBiasTrigger" in self.getProp("SpecialData") ): from PatPV import PVConf PVConf.LoosePV().configureAlg() elif ( not ( self.getProp("Simulation") and self.getProp("DataType") in ["2008","2009","2010","MC09"] ) ): # Default setting uses beam spot constraint from DB, available from 2011. Prior to 2011 stability of beam spot is not certain from PatPV import PVConf PVConf.StandardPV().configureAlg() # MC with particle gun cannot reconstruct PV, hence need to introduce one by hand if "pGun" in self.getProp("SpecialData"): from Configurables import PGPrimaryVertex pgPV = PGPrimaryVertex() GaudiSequencer("RecoVertexSeq").Members += [ pgPV ] else: GaudiSequencer("RecoVertexSeq").Members += [ pvAlg ]; trackV0Finder = TrackV0Finder() GaudiSequencer("RecoVertexSeq").Members += [ trackV0Finder ] # for Run 2, we run a different algorithm and don't want to have # the V0 finder in the vertex sequence (which is now after HLT1) if "Vertex" in recoSeq and self.getProp("DataType") in self.Run2DataTypes: from Configurables import PatPV3D, PVOfflineTool, LSAdaptPV3DFitter pvAlg = PatPV3D("PatPV3D") ## this should go in a configuration file when we know what to use pvAlg.addTool(PVOfflineTool,"PVOfflineTool") pvAlg.PVOfflineTool.addTool(LSAdaptPV3DFitter, "LSAdaptPV3DFitter") pvAlg.PVOfflineTool.PVFitterName = "LSAdaptPV3DFitter" pvAlg.PVOfflineTool.LSAdaptPV3DFitter.UseFittedTracks = True pvAlg.PVOfflineTool.LSAdaptPV3DFitter.AddMultipleScattering = False pvAlg.PVOfflineTool.LSAdaptPV3DFitter.TrackErrorScaleFactor = 1.0 pvAlg.PVOfflineTool.LSAdaptPV3DFitter.MinTracks = 4 pvAlg.PVOfflineTool.LSAdaptPV3DFitter.trackMaxChi2 = 12.0 pvAlg.PVOfflineTool.UseBeamSpotRCut = True pvAlg.PVOfflineTool.BeamSpotRCut = 0.2 pvAlg.PVOfflineTool.BeamSpotRHighMultiplicityCut = 0.4 pvAlg.PVOfflineTool.BeamSpotRMultiplicityTreshold = 10 pvAlg.PVOfflineTool.InputTracks = [ "Rec/Track/FittedHLT1VeloTracks" ] pvAlg.OutputVerticesName = "Rec/Vertex/Primary" pvAlg.PrimaryVertexLocation = "Rec/Vertex/PrimaryVertices" # Remove all tracks that don't belong to a PV (to save space on a DST) from Configurables import TrackContainerCleaner, SelectTrackInVertex pvVeloTracksCleaner = TrackContainerCleaner("PVVeloTracksCleaner") pvVeloTracksCleaner.inputLocation = "Rec/Track/FittedHLT1VeloTracks" pvVeloTracksCleaner.selectorName = "SelectTrackInVertex" GaudiSequencer("RecoVertexSeq").Members += [ pvAlg, pvVeloTracksCleaner ]; GaudiSequencer("RecoVertexSeq").IgnoreFilterPassed = True ## Upgrade type? if self.getProp("DataType") == 'Upgrade' : specialDataList = self.getProp("SpecialData") specialDataList.append("upgrade") self.setProp("SpecialData",specialDataList) # Tracking (Should make it more fine grained ??) DoTracking = False for seq in self.DefaultTrackingSubdets : if seq in recoSeq: DoTracking = True if DoTracking: trackConf = TrackSys() self.setOtherProps(trackConf,["SpecialData","OutputType"]) trackConf.ExpertHistos = self.expertHistos() # RICH if "RICH" in recoSeq: # The main sequence seq = GaudiSequencer("RecoRICHSeq") # Create the top level Conf object richConf = RichRecSysConf(self.richRecConfName) # set some general options self.setOtherProps(richConf,["SpecialData","Context","OutputLevel", "Simulation","DataType","OnlineMode"]) # Set the sequencer the RICH reco algs should be added to richConf.RecoSequencer = seq # Input Tracks (would be better to not hard code this. Get from TrackSys() or DstConf()) # Only set if not previously set, to allow for custom studies using non standard locations # set at the top level options file level if not richConf.trackConfig().isPropertySet("InputTracksLocation") : richConf.trackConfig().setProp("InputTracksLocation","Rec/Track/Best") # Output PID Location. Again allow for pre-defined custom locations. if not richConf.isPropertySet("RichPIDLocation") : richConf.setProp("RichPIDLocation","Rec/Rich/PIDs") # Printout import GaudiKernel.ProcessJobOptions GaudiKernel.ProcessJobOptions.PrintOn() log.debug(richConf) GaudiKernel.ProcessJobOptions.PrintOff() # CALO if "CALO" in recoSeq: import GaudiKernel.ProcessJobOptions seq = GaudiSequencer ( 'RecoCALOSeq' ) caloConf=CaloProcessor( Context = self.getProp('Context') , OutputLevel = self.getProp('OutputLevel') , UseTracks = True , EnableOnDemand = False , DataType = self.getProp ('DataType') ) GaudiKernel.ProcessJobOptions.PrintOn() seq.Members = [caloConf.caloSequence()] GaudiKernel.ProcessJobOptions.PrintOff() # MUON if "MUON" in recoSeq: from MuonID import ConfiguredMuonIDs from Configurables import RawBankReadoutStatusConverter,RawBankReadoutStatusFilter cm=ConfiguredMuonIDs.ConfiguredMuonIDs(data=self.getProp("DataType"), specialData=self.getProp("SpecialData")) MuonIDSeq=cm.getMuonIDSeq() RawBankReadoutStatusConverter("MuonProcStatus").System="Muon" RawBankReadoutStatusConverter("MuonProcStatus").BankTypes=["Muon"] RawBankReadoutStatusFilter("MuonROFilter").BankType=13 RawBankReadoutStatusFilter("MuonROFilter").RejectionMask=2067 GaudiSequencer("RecoMUONSeq").Members += [ "MuonRec", "RawBankReadoutStatusConverter/MuonProcStatus", "RawBankReadoutStatusFilter/MuonROFilter", MuonIDSeq ] # PROTO if "PROTO" in recoSeq: self.setOtherProps(GlobalRecoConf(),["DataType","SpecialData", "Context","OutputLevel"]) GlobalRecoConf().RecoSequencer = GaudiSequencer("RecoPROTOSeq") # SUMMARY if "SUMMARY" in recoSeq: from Configurables import RecSummaryAlg summary = RecSummaryAlg("RecSummary") # make a new list of uppered detectors dets = [] for det in self.getProp("Detectors"): dets.append(det.upper()) summary.Detectors = dets GaudiSequencer("RecoSUMMARYSeq").Members += [summary]
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 __hlt2ProbeMuonProtos(self): """ Charged muon protoparticles Requires chargedProtos and muon ID """ from Configurables import (ChargedProtoParticleAddMuonInfo, ChargedProtoCombineDLLsAlg, MuonIDAlg, ChargedProtoParticleMaker, DelegatingTrackSelector) from MuonID import ConfiguredMuonIDs ProbeMuonProtosOutputLocation = _baseProtoPLocation( "Hlt2", HltDefaultFitSuffix + "/" + TrackEffNames[self.trackType()]) Hlt2ProbeMuonProtoMaker = ChargedProtoParticleMaker( self.__pidAlgosAndToolsPrefix() + 'ProbeProtoPAlg') if (self.trackType() == "MuonTT"): # create the protos bm_members = [self.__hlt2MuonTTTracking()] Hlt2ProbeMuonProtoMaker.Inputs = [ self.__hlt2MuonTTTracking().outputSelection() ] Hlt2ProbeMuonProtoMaker.addTool(DelegatingTrackSelector) Hlt2ProbeMuonProtoMaker.Output = ProbeMuonProtosOutputLocation Hlt2ProbeMuonProtoMaker.DelegatingTrackSelector.TrackTypes = [ "Long" ] bm_members += [Hlt2ProbeMuonProtoMaker] elif (self.trackType() == "VeloMuon"): #build protos out of tracks bm_members = [self.__hlt2VeloMuonTracking()] Hlt2ProbeMuonProtoMaker.Inputs = [ self.__hlt2VeloMuonTracking().outputSelection() ] Hlt2ProbeMuonProtoMaker.Output = ProbeMuonProtosOutputLocation Hlt2ProbeMuonProtoMaker.addTool(DelegatingTrackSelector, name='delTrackSel') Hlt2ProbeMuonProtoMaker.delTrackSel.TrackTypes = ['Long'] bm_members += [Hlt2ProbeMuonProtoMaker] elif (self.trackType() == "FullDownstream"): # add muon ID bm_members = [self.__hlt2FullDownstreamTracking()] idalgname = self.__pidAlgosAndToolsPrefix() + "IDalg" cm = ConfiguredMuonIDs.ConfiguredMuonIDs( data=self.getProp("DataType")) idalg = cm.configureMuonIDAlgLite(idalgname) idalg.TracksLocations = [ self.__hlt2FullDownstreamTracking().outputSelection() ] idalg.MuonIDLocation = Hlt2TrackRoot + HltDefaultFitSuffix + "/" + HltSharedPIDPrefix + "/" + HltMuonIDSuffix idalg.MuonTrackLocation = Hlt2TrackRoot + HltDefaultFitSuffix + "/" + HltSharedPIDPrefix + "/" + HltMuonTracksName # Configure moun ID tools explicitly, would be better if the ConfiguredMuonIDs class # provided a comprehensive method. All tools are public, but should configure # everywhere, where they are used to be safe. import Configurables for tool, fun in (("CommonMuonTool", "IsMuonTool"), ("DLLMuonTool", "DLLMuonTool"), ("MakeMuonTool", "MakeMuonTool")): tool = getattr(Configurables, tool)() getattr(cm, "configure" + fun)(tool) # make protos Hlt2ProbeMuonProtoMaker.Inputs = [ self.__hlt2FullDownstreamTracking().outputSelection() ] Hlt2ProbeMuonProtoMaker.Output = ProbeMuonProtosOutputLocation Hlt2ProbeMuonProtoMaker.addTool(DelegatingTrackSelector, name="TrackSelector") tracktypes = ["Downstream"] Hlt2ProbeMuonProtoMaker.TrackSelector.TrackTypes = tracktypes addmuonpid = ChargedProtoParticleAddMuonInfo("addmuonpid") addmuonpid.InputMuonPIDLocation = idalg.MuonIDLocation addmuonpid.ProtoParticleLocation = Hlt2ProbeMuonProtoMaker.Output combinedll = ChargedProtoCombineDLLsAlg("combineDLL") combinedll.ProtoParticleLocation = Hlt2ProbeMuonProtoMaker.Output bm_members += [ idalg, Hlt2ProbeMuonProtoMaker, addmuonpid, combinedll ] from HltLine.HltLine import bindMembers # Build the bindMembers bm_name = self.__pidAlgosAndToolsPrefix() + "ProbeMuonProtosSeq" bm_output = ProbeMuonProtosOutputLocation return bindMembers(bm_name, bm_members).setOutputSelection(bm_output)
def configureReco(self, init): """ Configure Reconstruction to be redone """ ## CaloReco & CaloPIDs on-demand clusters = ['Digits', 'Clusters'] from Configurables import CaloProcessor caloProc = CaloProcessor(EnableOnDemand=True, OutputLevel=self.getProp("OutputLevel")) caloProc.RecList = clusters # --- if self.getProp('DataType') == 'Upgrade': caloProc.NoSpdPrs = True ## General unpacking from Configurables import DstConf if self.isPropertySet('EnableUnpack'): DstConf().setProp('EnableUnpack', self.getProp('EnableUnpack')) ## unpack Calo Hypos ? from Configurables import CaloDstUnPackConf unpack = CaloDstUnPackConf() hypos = ['Photons', 'MergedPi0s', 'SplitPhotons', 'Electrons'] # CaloHypos if self.isPropertySet( 'EnableUnpack') and "Reconstruction" in self.getProp( 'EnableUnpack'): unpack.setProp('Enable', True) else: caloProc.RecList += hypos # enable caloHypos onDemand # Reprocess explicitely the full calo sequence in the init sequence ? inputtype = self.getProp('InputType').upper() if (self.getProp("CaloReProcessing") and inputtype != 'MDST'): caloProc.RecList = clusters + hypos caloSeq = caloProc.sequence( ) # apply the CaloProcessor configuration cSeq = GaudiSequencer('CaloReProcessing') cSeq.Members += [caloSeq] init.Members += [cSeq] unpack.setProp('Enable', False) # update CaloHypo->MC Linker if self.getProp('Simulation'): log.info( "CaloReprocessing : obsolete CaloHypo2MC Links is updated") from Configurables import (TESCheck, EventNodeKiller, CaloHypoMCTruth) caloMCLinks = ["Link/Rec/Calo"] caloMCSeq = GaudiSequencer("cleanCaloMCLinks") checkCaloMCLinks = TESCheck("checkCaloMCLinks") checkCaloMCLinks.Inputs = caloMCLinks checkCaloMCLinks.Stop = False killCaloMCLinks = EventNodeKiller("killCaloMCLinks") killCaloMCLinks.Nodes = caloMCLinks caloMCSeq.Members = [checkCaloMCLinks, killCaloMCLinks] init.Members += [caloMCSeq] update = self.getProp("UpdateCaloMCLinks") if update: redoCaloMCLinks = CaloHypoMCTruth("recreteCaloMCLinks") init.Members += [redoCaloMCLinks] else: caloProc.applyConf() if inputtype != 'MDST': log.info( "CaloReProcessing cannot be processed on reduced (m)DST data" ) # For backwards compatibility with MC09, we need the following to rerun # the Muon Reco on old data. To be removed AS SOON as this backwards compatibility # is no longer needed if (self.getProp("DataType") == 'MC09' and inputtype != 'MDST' and self.getProp("AllowPIDRerunning") and inputtype != 'RDST'): from Configurables import DataObjectVersionFilter, MuonRec, TESCheck from MuonID import ConfiguredMuonIDs rerunPIDSeq = GaudiSequencer("ReRunMuonPID") init.Members += [rerunPIDSeq] # Check data version, to see if this is needed or not rerunPIDSeq.Members += [ DataObjectVersionFilter( "MuonPIDVersionCheck", DataObjectLocation="/Event/Rec/Muon/MuonPID", MaxVersion=0) ] # Check raw event is available rerunPIDSeq.Members += [ TESCheck("TESCheckRawEvent", Inputs=["DAQ/RawEvent"], Stop=False) ] # Run Muon PID cm = ConfiguredMuonIDs.ConfiguredMuonIDs( data=self.getProp("DataType")) rerunPIDSeq.Members += [MuonRec(), cm.getMuonIDSeq()] # If muon PID has rerun, need to re make the Combined DLLS... from Configurables import (ChargedProtoParticleAddMuonInfo, ChargedProtoCombineDLLsAlg) rerunPIDSeq.Members += [ ChargedProtoParticleAddMuonInfo("CProtoPAddNewMuon"), ChargedProtoCombineDLLsAlg("CProtoPCombDLLNewMuon") ] # Compatibility with pre-2011 data, where Rec/Summary and Trigger/RawEvent are missing import PhysConf.CheckMissingTESData as DataCheck DataCheck.checkForMissingData()