def _make_thinning_tools(self, stream): stream_name = self.stream_name self.thinning_helper = ThinningHelper(stream_name+"ThinningHelper") self.thinning_helper.AppendToStream(stream) self.thinning_tools = [] tool = DerivationFramework__TrackParticleThinning( stream_name + "TPThinningTool", StreamName = stream_name, SelectionString = "InDetTrackParticles.pt > {0}*GeV".format( self.track_threshold) ) if self.track_sel is not None: tool.SelectionString += " || InDetTrackParticles.{0.common_prefix}{0.track_sel}".format(self) self.thinning_tools.append(tool) self.thinning_tools += [ DerivationFramework__MuonTrackParticleThinning( stream_name + "MuonTPThinningTool", StreamName = stream_name, MuonKey = "Muons", InDetTrackParticlesKey = "InDetTrackParticles"), DerivationFramework__EgammaTrackParticleThinning( stream_name + "ElectronTPThinningTool", StreamName = stream_name, SGKey = "Electrons", InDetTrackParticlesKey = "InDetTrackParticles"), DerivationFramework__EgammaTrackParticleThinning( stream_name + "PhotonTPThinningTool", StreamName = stream_name, SGKey = "Photons", InDetTrackParticlesKey = "InDetTrackParticles"), DerivationFramework__TauTrackParticleThinning( stream_name + "TauTPThinningTool", StreamName = stream_name, TauKey = "TauJets", InDetTrackParticlesKey = "InDetTrackParticles") ] global ToolSvc ToolSvc += self.thinning_tools
#thinningTools.append(EGAM8JetLCTPThinningTool) # Tracks associated with Muons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning EGAM8MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning( name = "EGAM8MuonTPThinningTool", ThinningService = "EGAM8ThinningSvc", MuonKey = "Muons", InDetTrackParticlesKey = "InDetTrackParticles") ToolSvc += EGAM8MuonTPThinningTool print EGAM8MuonTPThinningTool #thinningTools.append(EGAM8MuonTPThinningTool) # Tracks associated with Electrons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning EGAM8ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name = "EGAM8ElectronTPThinningTool", ThinningService = "EGAM8ThinningSvc", SGKey = "Electrons", InDetTrackParticlesKey = "InDetTrackParticles") ToolSvc += EGAM8ElectronTPThinningTool print EGAM8ElectronTPThinningTool #thinningTools.append(EGAM8ElectronTPThinningTool) # Tracks associated with Photons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning EGAM8PhotonTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name = "EGAM8PhotonTPThinningTool", ThinningService = "EGAM8ThinningSvc", SGKey = "Photons", InDetTrackParticlesKey = "InDetTrackParticles") ToolSvc += EGAM8PhotonTPThinningTool print EGAM8PhotonTPThinningTool #thinningTools.append(EGAM8PhotonTPThinningTool)
# Tracks associated with Muons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning EXOT0MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning(name = "EXOT0MuonTPThinningTool", ThinningService = "EXOT0ThinningSvc", MuonKey = "Muons", InDetTrackParticlesKey = "InDetTrackParticles", ConeSize = 0.4) ToolSvc += EXOT0MuonTPThinningTool thinningTools.append(EXOT0MuonTPThinningTool) # Tracks associated with Electrons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning EXOT0ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name = "EXOT0ElectronTPThinningTool", ThinningService = "EXOT0ThinningSvc", SGKey = "Electrons", InDetTrackParticlesKey = "InDetTrackParticles", ConeSize = 0.4) ToolSvc += EXOT0ElectronTPThinningTool thinningTools.append(EXOT0ElectronTPThinningTool) # truth thinning from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__MenuTruthThinning EXOT0TruthTool = DerivationFramework__MenuTruthThinning(name = "EXOT0TruthTool", ThinningService = "EXOT0ThinningSvc", WritePartons = False, WriteHadrons = False, WriteBHadrons = False, WriteGeant = False, GeantPhotonPtThresh = -1.0, WriteTauHad = False,
DerivationFramework__JetTrackParticleThinning, DerivationFramework__TrackParticleThinning) # Keep tracks associated with muons EXOT5MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning( name='EXOT5MuonTPThinningTool', StreamName=stream_name, MuonKey='Muons', InDetTrackParticlesKey='InDetTrackParticles') ToolSvc += EXOT5MuonTPThinningTool thinningTools.append(EXOT5MuonTPThinningTool) # Keep tracks associated with electrons EXOT5ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name='EXOT5ElectronTPThinningTool', StreamName=stream_name, SGKey='Electrons', GSFTrackParticlesKey='GSFTrackParticles', InDetTrackParticlesKey='InDetTrackParticles') ToolSvc += EXOT5ElectronTPThinningTool thinningTools.append(EXOT5ElectronTPThinningTool) # Keep tracks associated with taus EXOT5TauTPThinningTool = DerivationFramework__TauTrackParticleThinning( name='EXOT5TauTPThinningTool', StreamName=stream_name, TauKey='TauJets', InDetTrackParticlesKey='InDetTrackParticles') ToolSvc += EXOT5TauTPThinningTool thinningTools.append(EXOT5TauTPThinningTool) # Keep tracks associated with jets
ApplyAnd = True) ToolSvc += STDM5JetTPThinningTool # Tracks associated with Muons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning STDM5MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning(name = "STDM5MuonTPThinningTool", ThinningService = STDM5ThinningHelper.ThinningSvc(), MuonKey = "Muons", InDetTrackParticlesKey = "InDetTrackParticles") ToolSvc += STDM5MuonTPThinningTool # Tracks associated with Electrons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning STDM5ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name = "STDM5ElectronTPThinningTool", ThinningService = STDM5ThinningHelper.ThinningSvc(), SGKey = "Electrons", InDetTrackParticlesKey = "InDetTrackParticles") ToolSvc += STDM5ElectronTPThinningTool # Tracks associated with taus from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning STDM5TauTPThinningTool = DerivationFramework__TauTrackParticleThinning( name = "STDM5TauTPThinningTool", ThinningService = STDM5ThinningHelper.ThinningSvc(), TauKey = "TauJets", SelectionString = "TauJets.pt > 15*GeV", ConeSize = 0.6, InDetTrackParticlesKey = "InDetTrackParticles") ToolSvc += STDM5TauTPThinningTool
ToolSvc += EXOT6TPThinningTool # Tracks associated with Muons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning EXOT6MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning( name="EXOT6MuonTPThinningTool", StreamName=streamName, MuonKey="Muons", InDetTrackParticlesKey="InDetTrackParticles") ToolSvc += EXOT6MuonTPThinningTool # Tracks associated with Electrons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning EXOT6ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name="EXOT6ElectronTPThinningTool", StreamName=streamName, SGKey="Electrons", InDetTrackParticlesKey="InDetTrackParticles") ToolSvc += EXOT6ElectronTPThinningTool EXOT6PhotonTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name="EXOT6PhotonTPThinningTool", StreamName=streamName, SGKey="Photons", InDetTrackParticlesKey="InDetTrackParticles") ToolSvc += EXOT6PhotonTPThinningTool # Calo Clusters associated with Photons from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__CaloClusterThinning EXOT6PhotonCCThinningTool = DerivationFramework__CaloClusterThinning( name="EXOT6PhotonCCThinningTool",
# TrackParticles associated with Muons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning SUSY2MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning( name="SUSY2MuonTPThinningTool", ThinningService=SUSY2ThinningHelper.ThinningSvc(), MuonKey="Muons", InDetTrackParticlesKey="InDetTrackParticles") ToolSvc += SUSY2MuonTPThinningTool thinningTools.append(SUSY2MuonTPThinningTool) # TrackParticles associated with electrons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning SUSY2ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name="SUSY2ElectronTPThinningTool", ThinningService=SUSY2ThinningHelper.ThinningSvc(), SGKey="Electrons", BestMatchOnly=False, InDetTrackParticlesKey="InDetTrackParticles") ToolSvc += SUSY2ElectronTPThinningTool thinningTools.append(SUSY2ElectronTPThinningTool) # TrackParticles associated with photons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning SUSY2PhotonTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name="SUSY2PhotonTPThinningTool", ThinningService=SUSY2ThinningHelper.ThinningSvc(), SGKey="Photons", InDetTrackParticlesKey="InDetTrackParticles") ToolSvc += SUSY2PhotonTPThinningTool thinningTools.append(SUSY2PhotonTPThinningTool) # TrackParticles associated with taus
STDM2JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name="STDM2JetTPThinningTool", ThinningService="STDM2ThinningSvc", JetKey="AntiKt4LCTopoJets", InDetTrackParticlesKey="InDetTrackParticles", SelectionString="AntiKt4LCTopoJets.pt > 15*GeV", ApplyAnd=False) ToolSvc += STDM2JetTPThinningTool # All Track within a cone DeltaR=0.6 around Electrons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning STDM2ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name="STDM2ElectronTPThinningTool", ThinningService="STDM2ThinningSvc", SGKey="Electrons", GSFTrackParticlesKey="GSFTrackParticles", InDetTrackParticlesKey="InDetTrackParticles", SelectionString=electronRequirements, BestMatchOnly=True, ConeSize=0.6, ApplyAnd=False) ToolSvc += STDM2ElectronTPThinningTool # Track associated to all Electrons for ambiguity resolver tool from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning STDM2ElectronTPThinningToolAR = DerivationFramework__EgammaTrackParticleThinning( name="STDM2ElectronTPThinningToolAR", ThinningService="STDM2ThinningSvc", SGKey="Electrons", GSFTrackParticlesKey="GSFTrackParticles", InDetTrackParticlesKey="InDetTrackParticles", BestMatchOnly=True,
EXOT16MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning( name="EXOT16MuonTPThinningTool", ThinningService="EXOT16ThinningSvc", MuonKey="Muons", InDetTrackParticlesKey="InDetTrackParticles", SelectionString="Muons.pt > 7*GeV", ConeSize=0.4) ToolSvc += EXOT16MuonTPThinningTool thinningTools.append(EXOT16MuonTPThinningTool) # Tracks associated with Electrons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning EXOT16ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name="EXOT16ElectronTPThinningTool", ThinningService="EXOT16ThinningSvc", SGKey="Electrons", InDetTrackParticlesKey="InDetTrackParticles", GSFTrackParticlesKey="GSFTrackParticles", SelectionString="Electrons.pt > 7*GeV", ConeSize=0.4) ToolSvc += EXOT16ElectronTPThinningTool thinningTools.append(EXOT16ElectronTPThinningTool) # calo cluster thinning from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__CaloClusterThinning EXOT16ElectronCCThinningTool = DerivationFramework__CaloClusterThinning( name="EXOT16ElectronCCThinningTool", ThinningService="EXOT16ThinningSvc", SGKey="Electrons", CaloClCollectionSGKey="egammaClusters", TopoClCollectionSGKey="CaloCalTopoClusters", SelectionString="Electrons.pt > 7*GeV",
MuonKey="Muons", InDetTrackParticlesKey="InDetTrackParticles", # SelectionString = muonRequirements, ConeSize=0.4) thinningTools.append(HIGG6D2MuonTPThinningTool) ToolSvc += HIGG6D2MuonTPThinningTool #==================================================================== # EgammaTrackParticleThinning #==================================================================== from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning HIGG6D2ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name="HIGG6D2ElectronTPThinningTool", StreamName=streamName, SGKey="Electrons", InDetTrackParticlesKey="InDetTrackParticles", # SelectionString = electronRequirements, ConeSize=0.4) thinningTools.append(HIGG6D2ElectronTPThinningTool) ToolSvc += HIGG6D2ElectronTPThinningTool #==================================================================== # Tracks themselves #==================================================================== from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning HIGG6D2TPThinningTool = DerivationFramework__TrackParticleThinning( name="HIGG6D2TPThinningTool", StreamName=streamName, SelectionString=
def setup(TOPQname, streamName, ToolSvc): thinningTools = [] #======================== # Track Particle Thinning !!! BUGGY (yes, that's a technical term)...CURRENTLY NOT USING !!! #======================== # PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/trunk/src/TrackParticleThinning.cxx thinning_expression = "(InDetTrackParticles.pt > 0.5*GeV) && (InDetTrackParticles.numberOfPixelHits > 0) && (InDetTrackParticles.numberOfSCTHits > 5) && (abs(DFCommonInDetTrackZ0AtPV) < 1.5)" from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning TOPQTPThinningTool = DerivationFramework__TrackParticleThinning( name=TOPQname + "TPThinningTool", StreamName=streamName, SelectionString=thinning_expression, InDetTrackParticlesKey="InDetTrackParticles") #ToolSvc += TOPQTPThinningTool #thinningTools.append(TOPQTPThinningTool) #print (TOPQname+".py", TOPQname+"TPThinningTool: ", TOPQTPThinningTool) #============================ # Jet Track Particle Thinning #============================ # PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/trunk/src/JetTrackParticleThinning.cxx from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning TOPQJetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name=TOPQname + "JetTPThinningTool", StreamName=streamName, JetKey="AntiKt4EMTopoJets", InDetTrackParticlesKey="InDetTrackParticles", SelectionString="(AntiKt4EMTopoJets.DFCommonJets_Calib_pt > 20*GeV)") ToolSvc += TOPQJetTPThinningTool thinningTools.append(TOPQJetTPThinningTool) print(TOPQname + ".py", TOPQname + "JetTPThinningTool: ", TOPQJetTPThinningTool) from DerivationFrameworkTop.DerivationFrameworkTopConf import DerivationFramework__SV1TrackThinning TOPQSV1ThinningTool = DerivationFramework__SV1TrackThinning( name=TOPQname + "SV1TrackThinning", StreamName=streamName, JetKey="AntiKt4EMTopoJets", InDetTrackParticlesKey="InDetTrackParticles", SelectionString="(AntiKt4EMTopoJets.DFCommonJets_Calib_pt > 20*GeV)") ToolSvc += TOPQSV1ThinningTool thinningTools.append(TOPQSV1ThinningTool) print(TOPQname + ".py", TOPQname + "SV1ThinningTool: ", TOPQSV1ThinningTool) TOPQLargeJetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name=TOPQname + "LargeJetTPThinningTool", StreamName=streamName, JetKey="AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets", InDetTrackParticlesKey="InDetTrackParticles", SelectionString="AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets.pt>25*GeV") ToolSvc += TOPQLargeJetTPThinningTool thinningTools.append(TOPQLargeJetTPThinningTool) print(TOPQname + ".py", TOPQname + "LargeJetTPThinningTool: ", TOPQLargeJetTPThinningTool) from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__JetCaloClusterThinning TOPQAK4CCThinningTool = DerivationFramework__JetCaloClusterThinning( name=TOPQname + "AK4CCThinningTool", StreamName=streamName, SGKey="AntiKt4EMTopoJets", TopoClCollectionSGKey="CaloCalTopoClusters", SelectionString="AntiKt4EMTopoJets.DFCommonJets_Calib_pt > 7*GeV", ConeSize=0.5) ToolSvc += TOPQAK4CCThinningTool thinningTools.append(TOPQAK4CCThinningTool) print(TOPQname + ".py", TOPQname + "AK4CCThinningTool: ", TOPQAK4CCThinningTool) from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__JetCaloClusterThinning TOPQLargeJetCCThinningTool = DerivationFramework__JetCaloClusterThinning( name=TOPQname + "LargeJetCCThinningTool", StreamName=streamName, SGKey="AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets", TopoClCollectionSGKey="CaloCalTopoClusters", SelectionString= "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets.DFCommonJets_Calib_pt > 7*GeV", ConeSize=1.1) ToolSvc += TOPQLargeJetCCThinningTool thinningTools.append(TOPQLargeJetCCThinningTool) print(TOPQname + ".py", TOPQname + "LargeJetCCThinningTool: ", TOPQLargeJetCCThinningTool) #================================= # Electron Track Particle Thinning #================================= # PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/trunk/src/EgammaTrackParticleThinning.cxx from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning TOPQElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name=TOPQname + "ElectronTPThinningTool", StreamName=streamName, SGKey="Electrons", InDetTrackParticlesKey="InDetTrackParticles") ToolSvc += TOPQElectronTPThinningTool thinningTools.append(TOPQElectronTPThinningTool) print(TOPQname + ".py", TOPQname + "ElectronTPThinningTool: ", TOPQElectronTPThinningTool) #=============================== # Electron Calo Cluster Thinning #=============================== # PhysicsAnalysis/DerivationFramework/DerivationFrameworkCalo/trunk/src/CaloClusterThinning.cxx from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__CaloClusterThinning TOPQElectronCCThinningTool = DerivationFramework__CaloClusterThinning( name=TOPQname + "ElectronCCThinningTool", StreamName=streamName, SGKey="Electrons", CaloClCollectionSGKey="egammaClusters", SelectionString= "(Electrons.Loose || Electrons.DFCommonElectronsLHLoose)", ConeSize=0.4) ToolSvc += TOPQElectronCCThinningTool thinningTools.append(TOPQElectronCCThinningTool) print(TOPQname + ".py", TOPQname + "ElectronCCThinningTool: ", TOPQElectronCCThinningTool) #======================== # Photon Track Particle Thinning #======================== from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning TOPQPhotonTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name=TOPQname + "PhotonTPThinningTool", StreamName=streamName, SGKey="Photons", InDetTrackParticlesKey="InDetTrackParticles") ToolSvc += TOPQPhotonTPThinningTool thinningTools.append(TOPQPhotonTPThinningTool) print(TOPQname + ".py", TOPQname + "PhotonTPThinningTool: ", TOPQPhotonTPThinningTool) #=============================== # Photon Calo Cluster Thinning #=============================== # PhysicsAnalysis/DerivationFramework/DerivationFrameworkCalo/trunk/src/CaloClusterThinning.cxx from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__CaloClusterThinning TOPQPhotonCCThinningTool = DerivationFramework__CaloClusterThinning( name=TOPQname + "PhotonCCThinningTool", StreamName=streamName, SGKey="Photons", CaloClCollectionSGKey="egammaClusters", SelectionString="(Photons.Loose || Photons.DFCommonPhotonsIsEMLoose)", ConeSize=0.4) ToolSvc += TOPQPhotonCCThinningTool thinningTools.append(TOPQPhotonCCThinningTool) print(TOPQname + ".py", TOPQname + "PhotonCCThinningTool: ", TOPQPhotonCCThinningTool) #============================= # Muon Track Particle Thinning #============================= # PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/trunk/src/MuonTrackParticleThinning.cxx from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning TOPQMuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning( name=TOPQname + "MuonTPThinningTool", StreamName=streamName, MuonKey="Muons", InDetTrackParticlesKey="InDetTrackParticles") ToolSvc += TOPQMuonTPThinningTool thinningTools.append(TOPQMuonTPThinningTool) print(TOPQname + ".py", TOPQname + "MuonTPThinningTool: ", TOPQMuonTPThinningTool) #============================ # Tau Track Particle Thinning #============================ # PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/trunk/src/TauTrackParticleThinning.cxx from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning TOPQTauTPThinningTool = DerivationFramework__TauTrackParticleThinning( name=TOPQname + "TauTPThinningTool", StreamName=streamName, TauKey="TauJets", InDetTrackParticlesKey="InDetTrackParticles") ToolSvc += TOPQTauTPThinningTool thinningTools.append(TOPQTauTPThinningTool) print(TOPQname + ".py", TOPQname + "TauTPThinningTool: ", TOPQTauTPThinningTool) # #============================== # # Large-R jet thinning # #============================== # # # we remove low pT large-R jets from the various collections # from AthenaCommon.GlobalFlags import globalflags # largeRjetCollsToThin = ["AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets"] # if globalflags.DataSource()=='geant4': # largeRjetCollsToThin.append("AntiKt10TruthTrimmedPtFrac5SmallR20Jets") # largeRjetCollsToThin.append("AntiKt10TruthJets") # from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__GenericObjectThinning # for largeRjetColl in largeRjetCollsToThin: # #pTvariableToCutOn = ".DFCommonJets_Calib_pt" # use calibrated pT for reco jets # pTvariableToCutOn = ".pt" # well for now the uncalibrated pT seems a more reasonable option # # use normal pT for truth jets # if largeRjetColl.find('Truth') > -1: # pTvariableToCutOn = ".pt" # TOPQLargeRJetThinning = DerivationFramework__GenericObjectThinning( # name = TOPQname + largeRjetColl + "Thinning_LargeR", # StreamName = streamName, # ContainerName = largeRjetColl, # SelectionString = largeRjetColl + pTvariableToCutOn + " > 150.0*GeV") # ToolSvc += TOPQLargeRJetThinning # thinningTools.append(TOPQLargeRJetThinning) # print (TOPQname+".py", TOPQname+largeRjetColl+"Thinning: ", TOPQLargeRJetThinning) #============================== # Photon thinning #============================== # we remove photons below 9GeV from DerivationFrameworkTools.DerivationFrameworkToolsConf import DerivationFramework__GenericObjectThinning pTPhotonVariableToCutOn = ".pt" photonColl = "Photons" TOPQPhotonThinning = DerivationFramework__GenericObjectThinning( name=TOPQname + photonColl + "Thinning_lowpTphotons", StreamName=streamName, ContainerName=photonColl, SelectionString=photonColl + ".pt > 9.0*GeV") ToolSvc += TOPQPhotonThinning thinningTools.append(TOPQPhotonThinning) print(TOPQname + ".py", TOPQname + photonColl + "Thinning: ", TOPQPhotonThinning) #============================================== # TRUTH THINNING #============================================== from AthenaCommon.GlobalFlags import globalflags if globalflags.DataSource() == 'geant4': #========================== # MENU TRUTH THINNING #========================== from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__MenuTruthThinning TOPQTruthThinningTool = DerivationFramework__MenuTruthThinning( name=TOPQname + "TruthThinningTool", StreamName=streamName, ParticlesKey="TruthParticles", VerticesKey="TruthVertices", EventsKey="TruthEvents", WritePartons=True, # keep partons? ###maybe set to FALSE? WriteHadrons=False, # keep hadrons? WriteBHadrons=False, # keep b-hadrons? WriteGeant=False, # keep Geant particles? GeantPhotonPtThresh= -1.0, # Set to <0 to not write any Geant photons; otherwise write with a pT above threshold WriteTauHad=True, # keep hadronic taus? PartonPtThresh=-1.0, # write partons with pT aboe this threhold WriteBSM=True, # keep BSM particles? WriteBSMProducts=True, # keep BSM particle decay products? WriteBosons=True, # keep bosons? WriteBosonProducts=True, # keep boson decay products? WriteTopAndDecays= True, # keep top partons and immediate decay products? WriteEverything=False, # keep everything?; overrides all other flags WriteAllLeptons=True, # keep absolutely all leptons? WriteLeptonsNotFromHadrons= False, # keep leptons not from hadron decays WriteAllStable= True, # keep all stable particles? ###maybe set to FALSE? WriteStatus3=False, # keep all particles with status code 3? WriteFirstN=10, # keep first N particles in record PreserveDescendants=False, # keep descendants of retained particles? PreserveAncestors=True, # keep ancestors of retained particles? SimBarcodeOffset=200000, # barcode offset for simulation particles WritettHFHadrons=True) # keep tt+HF hadrons ToolSvc += TOPQTruthThinningTool thinningTools.append(TOPQTruthThinningTool) print(TOPQname + ".py", TOPQname + "TruthThinningTool: ", TOPQTruthThinningTool) #============================================================================== # Thinning the photon truth collection : no photons from pi0 (origin=42) #============================================================================== # PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/trunk/src/GenericTruthThinning.cxx from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning TOPQPhotonThinning = DerivationFramework__GenericTruthThinning( name=TOPQname + "PhotonThinning", StreamName=streamName, ParticlesKey="TruthPhotons", ParticleSelectionString= "(TruthPhotons.classifierParticleOrigin != 42) || (TruthPhotons.pt > 20.0*GeV)" ) ToolSvc += TOPQPhotonThinning thinningTools.append(TOPQPhotonThinning) print(TOPQname + ".py", TOPQname + "PhotonThinning: ", TOPQPhotonThinning) #============================================================================== # Thinning TruthParticles : no gluons #============================================================================== ## PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/trunk/src/GenericTruthThinning.cxx #from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning #TOPQGluonThinning = DerivationFramework__GenericTruthThinning( # name = TOPQname + "GluonThinning", # StreamName = streamName, # ParticlesKey = "TruthParticles", # ParticleSelectionString = "(TruthParticles.pdgId != 21)") #ToolSvc += TOPQGluonThinning #thinningTools.append(TOPQGluonThinning) #print (TOPQname+".py", TOPQname+"GluonThinning: ", TOPQGluonThinning) return thinningTools
EXOT14MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning( name="EXOT14MuonTPThinningTool", ThinningService="EXOT14ThinningSvc", MuonKey="Muons", InDetTrackParticlesKey="InDetTrackParticles", SelectionString="Muons.pt > 8*GeV", ConeSize=0.4) ToolSvc += EXOT14MuonTPThinningTool # Tracks associated with Electrons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning EXOT14ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name="EXOT14ElectronTPThinningTool", ThinningService="EXOT14ThinningSvc", SGKey="Electrons", GSFTrackParticlesKey="GSFTrackParticles", InDetTrackParticlesKey="InDetTrackParticles", SelectionString="Electrons.pt > 8*GeV", BestMatchOnly=True, ConeSize=0.4) ToolSvc += EXOT14ElectronTPThinningTool # Tracks associated with Photons EXOT14PhotonTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name="EXOT14PhotonTPThinningTool", ThinningService="EXOT14ThinningSvc", SGKey="Photons", InDetTrackParticlesKey="InDetTrackParticles", SelectionString="Photons.pt > 8*GeV", ConeSize=0.6) ToolSvc += EXOT14PhotonTPThinningTool
def setup(TOPQname, TOPQThinningSvc, ToolSvc): thinningTools = [] #======================== # Track Particle Thinning !!! BUGGY (yes, that's a technical term)...CURRENTLY NOT USING !!! #======================== # PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/trunk/src/TrackParticleThinning.cxx thinning_expression = "(InDetTrackParticles.pt > 0.5*GeV) && (InDetTrackParticles.numberOfPixelHits > 0) && (InDetTrackParticles.numberOfSCTHits > 5) && (abs(DFCommonInDetTrackZ0AtPV) < 1.5)" from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning TOPQTPThinningTool = DerivationFramework__TrackParticleThinning( name=TOPQname + "TPThinningTool", ThinningService=TOPQThinningSvc, SelectionString=thinning_expression, InDetTrackParticlesKey="InDetTrackParticles", ApplyAnd=False) #ToolSvc += TOPQTPThinningTool #thinningTools.append(TOPQTPThinningTool) #print TOPQname+".py", TOPQname+"TPThinningTool: ", TOPQTPThinningTool #============================ # Jet Track Particle Thinning #============================ # PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/trunk/src/JetTrackParticleThinning.cxx from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning TOPQJetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name=TOPQname + "JetTPThinningTool", ThinningService=TOPQThinningSvc, JetKey="AntiKt4EMTopoJets", InDetTrackParticlesKey="InDetTrackParticles", ApplyAnd=False) ToolSvc += TOPQJetTPThinningTool thinningTools.append(TOPQJetTPThinningTool) print TOPQname + ".py", TOPQname + "JetTPThinningTool: ", TOPQJetTPThinningTool #================================= # Electron Track Particle Thinning #================================= # PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/trunk/src/EgammaTrackParticleThinning.cxx from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning TOPQElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name=TOPQname + "ElectronTPThinningTool", ThinningService=TOPQThinningSvc, SGKey="Electrons", InDetTrackParticlesKey="InDetTrackParticles", ApplyAnd=False) ToolSvc += TOPQElectronTPThinningTool thinningTools.append(TOPQElectronTPThinningTool) print TOPQname + ".py", TOPQname + "ElectronTPThinningTool: ", TOPQElectronTPThinningTool #=============================== # Electron Calo Cluster Thinning #=============================== # PhysicsAnalysis/DerivationFramework/DerivationFrameworkCalo/trunk/src/CaloClusterThinning.cxx from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__CaloClusterThinning TOPQElectronCCThinningTool = DerivationFramework__CaloClusterThinning( name=TOPQname + "ElectronCCThinningTool", ThinningService=TOPQThinningSvc, SGKey="Electrons", CaloClCollectionSGKey="egammaClusters", SelectionString= "(Electrons.Loose || Electrons.DFCommonElectronsLHLoose)", ConeSize=0.4, ApplyAnd=False) ToolSvc += TOPQElectronCCThinningTool thinningTools.append(TOPQElectronCCThinningTool) print TOPQname + ".py", TOPQname + "ElectronCCThinningTool: ", TOPQElectronCCThinningTool #=============================== # Photon Calo Cluster Thinning #=============================== # PhysicsAnalysis/DerivationFramework/DerivationFrameworkCalo/trunk/src/CaloClusterThinning.cxx from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__CaloClusterThinning TOPQPhotonCCThinningTool = DerivationFramework__CaloClusterThinning( name=TOPQname + "PhotonCCThinningTool", ThinningService=TOPQThinningSvc, SGKey="Photons", CaloClCollectionSGKey="egammaClusters", SelectionString="(Photons.Loose || Photons.DFCommonPhotonsIsEMLoose)", ConeSize=0.4, ApplyAnd=False) ToolSvc += TOPQPhotonCCThinningTool thinningTools.append(TOPQPhotonCCThinningTool) print TOPQname + ".py", TOPQname + "PhotonCCThinningTool: ", TOPQPhotonCCThinningTool #============================= # Muon Track Particle Thinning #============================= # PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/trunk/src/MuonTrackParticleThinning.cxx from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning TOPQMuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning( name=TOPQname + "MuonTPThinningTool", ThinningService=TOPQThinningSvc, MuonKey="Muons", InDetTrackParticlesKey="InDetTrackParticles", ApplyAnd=False) ToolSvc += TOPQMuonTPThinningTool thinningTools.append(TOPQMuonTPThinningTool) print TOPQname + ".py", TOPQname + "MuonTPThinningTool: ", TOPQMuonTPThinningTool #============================ # Tau Track Particle Thinning #============================ # PhysicsAnalysis/DerivationFramework/DerivationFrameworkInDet/trunk/src/TauTrackParticleThinning.cxx from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning TOPQTauTPThinningTool = DerivationFramework__TauTrackParticleThinning( name=TOPQname + "TauTPThinningTool", ThinningService=TOPQThinningSvc, TauKey="TauJets", ConeSize=0.6, InDetTrackParticlesKey="InDetTrackParticles", ApplyAnd=False) ToolSvc += TOPQTauTPThinningTool thinningTools.append(TOPQTauTPThinningTool) print TOPQname + ".py", TOPQname + "TauTPThinningTool: ", TOPQTauTPThinningTool #============================================== # TRUTH THINNING #============================================== from AthenaCommon.GlobalFlags import globalflags if globalflags.DataSource() == 'geant4': #========================== # MENU TRUTH THINNING #========================== from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__MenuTruthThinning TOPQTruthThinningTool = DerivationFramework__MenuTruthThinning( name=TOPQname + "TruthThinningTool", ThinningService=TOPQThinningSvc, ParticlesKey="TruthParticles", VerticesKey="TruthVertices", EventsKey="TruthEvents", WritePartons=True, # keep partons? ###maybe set to FALSE? WriteHadrons=False, # keep hadrons? WriteBHadrons=False, # keep b-hadrons? WriteGeant=False, # keep Geant particles? GeantPhotonPtThresh= -1.0, # Set to <0 to not write any Geant photons; otherwise write with a pT above threshold WriteTauHad=True, # keep hadronic taus? PartonPtThresh=-1.0, # write partons with pT aboe this threhold WriteBSM=True, # keep BSM particles? WriteBSMProducts=True, # keep BSM particle decay products? WriteBosons=True, # keep bosons? WriteBosonProducts=True, # keep boson decay products? WriteTopAndDecays= True, # keep top partons and immediate decay products? WriteEverything=False, # keep everything?; overrides all other flags WriteAllLeptons=True, # keep absolutely all leptons? WriteLeptonsNotFromHadrons= False, # keep leptons not from hadron decays WriteAllStable= True, # keep all stable particles? ###maybe set to FALSE? WriteStatus3=False, # keep all particles with status code 3? WriteFirstN=10, # keep first N particles in record PreserveDescendants=False, # keep descendants of retained particles? PreserveAncestors=True, # keep ancestors of retained particles? SimBarcodeOffset=200000, # barcode offset for simulation particles WritettHFHadrons=True) # keep tt+HF hadrons ToolSvc += TOPQTruthThinningTool thinningTools.append(TOPQTruthThinningTool) print TOPQname + ".py", TOPQname + "TruthThinningTool: ", TOPQTruthThinningTool #============================================================================== # Thinning the photon truth collection : no photons from pi0 (origin=42) #============================================================================== # PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/trunk/src/GenericTruthThinning.cxx from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning TOPQPhotonThinning = DerivationFramework__GenericTruthThinning( name=TOPQname + "PhotonThinning", ThinningService=TOPQThinningSvc, ParticlesKey="TruthPhotons", ParticleSelectionString= "(TruthPhotons.classifierParticleOrigin != 42) || (TruthPhotons.pt > 20.0*GeV)" ) ToolSvc += TOPQPhotonThinning thinningTools.append(TOPQPhotonThinning) print TOPQname + ".py", TOPQname + "PhotonThinning: ", TOPQPhotonThinning #============================================================================== # Thinning TruthParticles : no gluons #============================================================================== ## PhysicsAnalysis/DerivationFramework/DerivationFrameworkMCTruth/trunk/src/GenericTruthThinning.cxx #from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning #TOPQGluonThinning = DerivationFramework__GenericTruthThinning( # name = TOPQname + "GluonThinning", # ThinningService = TOPQThinningSvc, # ParticlesKey = "TruthParticles", # ParticleSelectionString = "(TruthParticles.pdgId != 21)") #ToolSvc += TOPQGluonThinning #thinningTools.append(TOPQGluonThinning) #print TOPQname+".py", TOPQname+"GluonThinning: ", TOPQGluonThinning return thinningTools
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning SUSY5MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning( name="SUSY5MuonTPThinningTool", ThinningService="SUSY5ThinningSvc", MuonKey="Muons", InDetTrackParticlesKey="InDetTrackParticles") ToolSvc += SUSY5MuonTPThinningTool thinningTools.append(SUSY5MuonTPThinningTool) # TrackParticles associated with electrons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning SUSY5ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name="SUSY5ElectronTPThinningTool", ThinningService="SUSY5ThinningSvc", SGKey="ElectronCollection", InDetTrackParticlesKey="InDetTrackParticles") ToolSvc += SUSY5ElectronTPThinningTool thinningTools.append(SUSY5ElectronTPThinningTool) # TrackParticles associated with taus from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning SUSY5TauTPThinningTool = DerivationFramework__TauTrackParticleThinning( name="SUSY5TauTPThinningTool", ThinningService="SUSY5ThinningSvc", TauKey="TauRecContainer", InDetTrackParticlesKey="InDetTrackParticles") ToolSvc += SUSY5TauTPThinningTool thinningTools.append(SUSY5TauTPThinningTool)
def setup(HIGG4DxName, streamName, ToolSvc): thinningTools = [] #jets and tracks from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning HIGG4DxJetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name=HIGG4DxName + "JetTPThinningTool", StreamName=streamName, JetKey="AntiKt4EMTopoJets", SelectionString="AntiKt4EMTopoJets.pt > 18*GeV", InDetTrackParticlesKey="InDetTrackParticles", ApplyAnd=True) ToolSvc += HIGG4DxJetTPThinningTool thinningTools.append(HIGG4DxJetTPThinningTool) HIGG4DxJetLCTPThinningTool = DerivationFramework__JetTrackParticleThinning( name=HIGG4DxName + "JetLCTPThinningTool", StreamName=streamName, JetKey="AntiKt4LCTopoJets", SelectionString="AntiKt4LCTopoJets.pt > 18*GeV", InDetTrackParticlesKey="InDetTrackParticles", ApplyAnd=True) ToolSvc += HIGG4DxJetLCTPThinningTool thinningTools.append(HIGG4DxJetLCTPThinningTool) #fat jets and track thinning if HIGG4DxName in ['HIGG4D2', 'HIGG4D3']: from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning HIGG4DxJetTrackThinningTool1 = DerivationFramework__JetTrackParticleThinning( name=HIGG4DxName + "JetTrackThinningTool1", StreamName=streamName, JetKey="AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets", SelectionString= "AntiKt10LCTopoTrimmedPtFrac5SmallR20Jets.pt > 150*GeV", InDetTrackParticlesKey="InDetTrackParticles", ApplyAnd=True) ToolSvc += HIGG4DxJetTrackThinningTool1 thinningTools.append(HIGG4DxJetTrackThinningTool1) if HIGG4DxName in ['HIGG4D2', 'HIGG4D3']: from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning HIGG4DxJetTrackThinningTool2 = DerivationFramework__JetTrackParticleThinning( name=HIGG4DxName + "JetTrackThinningTool2", StreamName=streamName, JetKey="AntiKt2PV0TrackJets", SelectionString="AntiKt2PV0TrackJets.pt > 6*GeV", InDetTrackParticlesKey="InDetTrackParticles", ApplyAnd=True) #ToolSvc += HIGG4DxJetTrackThinningTool2 #thinningTools.append(HIGG4DxJetTrackThinningTool2) # Tracks associated with Muons HIGG4DxMuonSelectionString = "" if HIGG4DxName in ['HIGG4D3', 'HIGG4D4']: HIGG4DxMuonSelectionString = "Muons.pt > 1*GeV" from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning HIGG4DxMuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning( name=HIGG4DxName + "MuonTPThinningTool", StreamName=streamName, MuonKey="Muons", SelectionString=HIGG4DxMuonSelectionString, InDetTrackParticlesKey="InDetTrackParticles") ToolSvc += HIGG4DxMuonTPThinningTool thinningTools.append(HIGG4DxMuonTPThinningTool) # Tracks associated with Electrons HIGG4DxElectronSelectionString = "" if HIGG4DxName in ['HIGG4D3', 'HIGG4D4']: HIGG4DxElectronSelectionString = "Electrons.pt > 1*GeV" from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning HIGG4DxElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name=HIGG4DxName + "ElectronTPThinningTool", StreamName=streamName, SGKey="Electrons", SelectionString=HIGG4DxElectronSelectionString, InDetTrackParticlesKey="InDetTrackParticles") ToolSvc += HIGG4DxElectronTPThinningTool thinningTools.append(HIGG4DxElectronTPThinningTool) # Tracks associated with taus HIGG4DxTauSelectionString = "TauJets.pt > 18*GeV" if HIGG4DxName == 'HIGG4D4': HIGG4DxTauSelectionString = "TauJets.pt > 40*GeV" from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning HIGG4DxTauTPThinningTool = DerivationFramework__TauTrackParticleThinning( name=HIGG4DxName + "TauTPThinningTool", StreamName=streamName, TauKey="TauJets", SelectionString=HIGG4DxTauSelectionString, ConeSize=0.6, InDetTrackParticlesKey="InDetTrackParticles") ToolSvc += HIGG4DxTauTPThinningTool thinningTools.append(HIGG4DxTauTPThinningTool) #Truth tau/nutau and their ancestors and descendants truth_cond_tau = "((abs(TruthParticles.pdgId) == 15 || abs(TruthParticles.pdgId) == 16) && (TruthParticles.pt > 0.01*GeV) && (TruthParticles.barcode<200000))" truth_cond_lep = "((abs(TruthParticles.pdgId) >= 11 && abs(TruthParticles.pdgId) <= 14) && (TruthParticles.pt > 4.0*GeV) && (TruthParticles.status == 1) && (TruthParticles.barcode<200000))" truth_cond_comb = "(" + truth_cond_lep + "||" + truth_cond_tau + ")" #truth_photon_thinning = "(TruthPhotons.pt > 1.0*GeV) && (abs(TruthPhotons.eta)<3.0)" # PreserveGeneratorDescendants only keeps particles that came directly from the event generator # PreserveDescendants keeps all particles including those that come from Geant processes if DFisMC: #thin special containers from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning #thin taus HIGG4DxTruthTool_TAU = DerivationFramework__GenericTruthThinning( name=HIGG4DxName + "TruthTool_TAU", StreamName=streamName, ParticleSelectionString=truth_cond_tau, PreserveDescendants=False, PreserveGeneratorDescendants=True, PreserveAncestors=False, TauHandling=False) ToolSvc += HIGG4DxTruthTool_TAU thinningTools.append(HIGG4DxTruthTool_TAU) #thin leptons and taus HIGG4DxTruthTool_COMB = DerivationFramework__GenericTruthThinning( name=HIGG4DxName + "TruthTool_COMB", StreamName=streamName, ParticleSelectionString=truth_cond_comb, PreserveDescendants=False, PreserveGeneratorDescendants=False, PreserveAncestors=True, TauHandling=False) ToolSvc += HIGG4DxTruthTool_COMB thinningTools.append(HIGG4DxTruthTool_COMB) #thin photons """HIGG4DxTruthTool_PHO = DerivationFramework__GenericTruthThinning(name = "HIGG4DxTruthTool_PHO", StreamName = streamName, ParticlesKey = "TruthPhotons", ParticleSelectionString = truth_photon_thinning) ToolSvc += HIGG4DxTruthTool_PHO thinningTools.append(HIGG4DxTruthTool_PHO)""" #thinning the master truth collection from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__MenuTruthThinning HIGG4DxTruthTool_MENU = DerivationFramework__MenuTruthThinning( name=HIGG4DxName + "TruthTool_MENU", StreamName=streamName, WritePartons=False, WriteHadrons=False, WriteBHadrons=False, WriteGeant=False, GeantPhotonPtThresh=-1.0, WriteTauHad=False, PartonPtThresh=-1.0, WriteBSM=False, WriteBosons=False, WriteBSMProducts=False, WriteBosonProducts=False, WriteTopAndDecays=False, WriteEverything=False, WriteAllLeptons=False, WriteStatus3=False, PreserveDescendants=False, PreserveGeneratorDescendants=False, PreserveAncestors=True, WriteFirstN=15) ToolSvc += HIGG4DxTruthTool_MENU thinningTools.append(HIGG4DxTruthTool_MENU) #end of MC # return thinning tools return thinningTools
ThinningService = PHYSLITEThinningHelper.ThinningSvc(), SGKey = "AnalysisPhotons", CaloClCollectionSGKey = "egammaClusters", TopoClCollectionSGKey = "CaloCalTopoClusters", #SelectionString = ""Photons.pt > 10*GeV"", ConeSize = 0.4) ToolSvc += PHYSLITEPhotonClusterThinningTool thinningTools.append(PHYSLITEPhotonClusterThinningTool) # GSF track particles thinning from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning # GSF track associated to electrons PHYSLITEElectronGsfTrackThinningTool = DerivationFramework__EgammaTrackParticleThinning(name = "PHYSLITEElectronGsfTrackThinningTool", ThinningService = PHYSLITEThinningHelper.ThinningSvc(), SGKey = "AnalysisElectrons", BestMatchOnly = False, GSFTrackParticlesKey = "GSFTrackParticles") ToolSvc += PHYSLITEElectronGsfTrackThinningTool thinningTools.append(PHYSLITEElectronGsfTrackThinningTool) # GSF track associated to photons PHYSLITEPhotonGsfTrackThinningTool = DerivationFramework__EgammaTrackParticleThinning(name = "PHYSLITEPhotonGsfTrackThinningTool", ThinningService = PHYSLITEThinningHelper.ThinningSvc(), SGKey = "AnalysisPhotons", BestMatchOnly = False, GSFTrackParticlesKey = "GSFTrackParticles") ToolSvc += PHYSLITEPhotonGsfTrackThinningTool thinningTools.append(PHYSLITEPhotonGsfTrackThinningTool) # INNER DETECTOR TRACK THINNING
DerivationFramework__JetTrackParticleThinning, DerivationFramework__TrackParticleThinning) # Keep tracks associated with muons EXOT5MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning( name='EXOT5MuonTPThinningTool', ThinningService=EXOT5ThinningHelper.ThinningSvc(), MuonKey='Muons', InDetTrackParticlesKey='InDetTrackParticles') ToolSvc += EXOT5MuonTPThinningTool thinningTools.append(EXOT5MuonTPThinningTool) # Keep tracks associated with electrons EXOT5ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name='EXOT5ElectronTPThinningTool', ThinningService=EXOT5ThinningHelper.ThinningSvc(), SGKey='Electrons', GSFTrackParticlesKey='GSFTrackParticles', InDetTrackParticlesKey='InDetTrackParticles') ToolSvc += EXOT5ElectronTPThinningTool thinningTools.append(EXOT5ElectronTPThinningTool) # Keep tracks associated with taus EXOT5TauTPThinningTool = DerivationFramework__TauTrackParticleThinning( name='EXOT5TauTPThinningTool', ThinningService=EXOT5ThinningHelper.ThinningSvc(), TauKey='TauJets', InDetTrackParticlesKey='InDetTrackParticles') ToolSvc += EXOT5TauTPThinningTool thinningTools.append(EXOT5TauTPThinningTool) # Keep tracks associated with jets
# TrackParticles associated with Muons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning JETM7MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning( name="JETM7MuonTPThinningTool", ThinningService=JETM7ThinningHelper.ThinningSvc(), MuonKey="Muons", InDetTrackParticlesKey="InDetTrackParticles") ToolSvc += JETM7MuonTPThinningTool thinningTools.append(JETM7MuonTPThinningTool) # TrackParticles associated with electrons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning JETM7ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name="JETM7ElectronTPThinningTool", ThinningService=JETM7ThinningHelper.ThinningSvc(), SGKey="Electrons", InDetTrackParticlesKey="InDetTrackParticles") ToolSvc += JETM7ElectronTPThinningTool thinningTools.append(JETM7ElectronTPThinningTool) # TrackParticles associated with electrons JETM7PhotonTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name="JETM7PhotonTPThinningTool", ThinningService=JETM7ThinningHelper.ThinningSvc(), SGKey="Photons", InDetTrackParticlesKey="InDetTrackParticles") ToolSvc += JETM7PhotonTPThinningTool thinningTools.append(JETM7PhotonTPThinningTool) # TrackParticles associated with taus
thinningTools.append(HIGG2D2JetTPThinningTool) # Tracks associated with Muons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning HIGG2D2MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning(name = "HIGG2D2MuonTPThinningTool", StreamName = streamName, MuonKey = "Muons", InDetTrackParticlesKey = "InDetTrackParticles") ToolSvc += HIGG2D2MuonTPThinningTool thinningTools.append(HIGG2D2MuonTPThinningTool) # Tracks associated with Electrons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning HIGG2D2ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning(name = "HIGG2D2ElectronTPThinningTool", StreamName = streamName, SGKey = "Electrons", InDetTrackParticlesKey = "InDetTrackParticles", BestMatchOnly = False) ToolSvc += HIGG2D2ElectronTPThinningTool thinningTools.append(HIGG2D2ElectronTPThinningTool) # Tracks associated with taus from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning HIGG2D2TauTPThinningTool = DerivationFramework__TauTrackParticleThinning(name = "HIGG2D2TauTPThinningTool", StreamName = streamName, TauKey = "TauJets", ConeSize = 0.6, InDetTrackParticlesKey = "InDetTrackParticles") ToolSvc += HIGG2D2TauTPThinningTool thinningTools.append(HIGG2D2TauTPThinningTool)
# Tracks associated with Muons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning HIGG5D2MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning( name="HIGG5D2MuonTPThinningTool", ThinningService=HIGG5D2ThinningHelper.ThinningSvc(), MuonKey="Muons", InDetTrackParticlesKey="InDetTrackParticles") ToolSvc += HIGG5D2MuonTPThinningTool thinningTools.append(HIGG5D2MuonTPThinningTool) # Tracks associated with Electrons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning HIGG5D2ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name="HIGG5D2ElectronTPThinningTool", ThinningService=HIGG5D2ThinningHelper.ThinningSvc(), SGKey="Electrons", InDetTrackParticlesKey="InDetTrackParticles", BestMatchOnly=True) ToolSvc += HIGG5D2ElectronTPThinningTool thinningTools.append(HIGG5D2ElectronTPThinningTool) # Tracks associated with Photons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning HIGG5D2PhotonTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name="HIGG5D2PhotonTPThinningTool", ThinningService=HIGG5D2ThinningHelper.ThinningSvc(), SGKey="Photons", InDetTrackParticlesKey="InDetTrackParticles", BestMatchOnly=True) ToolSvc += HIGG5D2PhotonTPThinningTool thinningTools.append(HIGG5D2PhotonTPThinningTool)
# Track thinning if jobproperties.egammaDFFlags.doEGammaDAODTrackThinning: TrackThinningKeepElectronTracks = False TrackThinningKeepPhotonTracks = True TrackThinningKeepPVTracks = False # tracks associated with Electrons if (TrackThinningKeepElectronTracks): from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning EGAM9ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name="EGAM9ElectronTPThinningTool", StreamName=streamName, SGKey="Electrons", GSFTrackParticlesKey="GSFTrackParticles", InDetTrackParticlesKey="InDetTrackParticles", SelectionString="Electrons.pt > 0*GeV", BestMatchOnly=True, ConeSize=0.3) ToolSvc += EGAM9ElectronTPThinningTool print EGAM9ElectronTPThinningTool thinningTools.append(EGAM9ElectronTPThinningTool) # tracks associated with Photons if (TrackThinningKeepPhotonTracks): from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning EGAM9PhotonTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name="EGAM9PhotonTPThinningTool", StreamName=streamName, SGKey="Photons",
InDetTrackParticlesKey="InDetTrackParticles", # SelectionString = muonRequirements, ConeSize=0.4, ApplyAnd=False) thinningTools.append(HIGG6D1MuonTPThinningTool) ToolSvc += HIGG6D1MuonTPThinningTool #==================================================================== # EgammaTrackParticleThinning #==================================================================== from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning HIGG6D1ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name="HIGG6D1ElectronTPThinningTool", ThinningService="HIGG6D1ThinningSvc", SGKey="Electrons", InDetTrackParticlesKey="InDetTrackParticles", # SelectionString = electronRequirements, ConeSize=0.4, ApplyAnd=False) thinningTools.append(HIGG6D1ElectronTPThinningTool) ToolSvc += HIGG6D1ElectronTPThinningTool #==================================================================== # Tracks themselves #==================================================================== HIGG6D1TPThinningTool = DerivationFramework__TrackParticleThinning( name="HIGG6D1TPThinningTool", ThinningService="HIGG6D1ThinningSvc", SelectionString= "abs( DFCommonInDetTrackZ0AtPV * sin(InDetTrackParticles.theta)) < 3.0",
#ToolSvc += EXOT10TPThinningTool # Tracks associated with Muons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning EXOT10MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning( name = "EXOT10MuonTPThinningTool", ThinningService = EXOT10ThinningHelper.ThinningSvc(), MuonKey = "Muons", InDetTrackParticlesKey = "InDetTrackParticles" ) #ToolSvc += EXOT10MuonTPThinningTool # Tracks associated with Electrons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning EXOT10ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name = "EXOT10ElectronTPThinningTool", ThinningService = EXOT10ThinningHelper.ThinningSvc(), SGKey = "Electrons", InDetTrackParticlesKey = "InDetTrackParticles", #SelectionString = "Electrons.pt > 30*GeV", ConeSize = 0.4) #ToolSvc += EXOT10ElectronTPThinningTool # Tracks associated with Photons EXOT10PhotonTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name = "EXOT10PhotonTPThinningTool", ThinningService = EXOT10ThinningHelper.ThinningSvc(), SGKey = "Photons", InDetTrackParticlesKey = "InDetTrackParticles", #SelectionString = "Photons.pt > 30*GeV", ConeSize = 0.6) #ToolSvc += EXOT10PhotonTPThinningTool # Calo Clusters associated with Photons from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__CaloClusterThinning
StreamName=streamName, MuonKey="Muons", InDetTrackParticlesKey="InDetTrackParticles", SelectionString="Muons.pt > 5*GeV", ConeSize=0.4) ToolSvc += EXOT8MuonTPThinningTool thinningTools.append(EXOT8MuonTPThinningTool) ######################################### # Tracks associated with Electrons ######################################### from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning EXOT8ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name="EXOT8ElectronTPThinningTool", StreamName=streamName, SGKey="Electrons", InDetTrackParticlesKey="InDetTrackParticles", SelectionString="Electrons.pt > 25*GeV", ConeSize=0.4) ToolSvc += EXOT8ElectronTPThinningTool thinningTools.append(EXOT8ElectronTPThinningTool) ######################################### # Tracks associated with R=0.4 jets ######################################### from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning EXOT8Ak4JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name="EXOT8Ak4JetTPThinningTool", StreamName=streamName, JetKey="AntiKt4LCTopoJets", SelectionString=
from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning STDM2JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name="STDM2JetTPThinningTool", StreamName=streamName, JetKey="AntiKt4LCTopoJets", InDetTrackParticlesKey="InDetTrackParticles", SelectionString="AntiKt4LCTopoJets.pt > 15*GeV") ToolSvc += STDM2JetTPThinningTool # All Track within a cone DeltaR=0.6 around Electrons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning STDM2ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name="STDM2ElectronTPThinningTool", StreamName=streamName, SGKey="Electrons", GSFTrackParticlesKey="GSFTrackParticles", InDetTrackParticlesKey="InDetTrackParticles", SelectionString=electronRequirements, BestMatchOnly=True, ConeSize=0.6) ToolSvc += STDM2ElectronTPThinningTool # Track associated to all Electrons for ambiguity resolver tool from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning STDM2ElectronTPThinningToolAR = DerivationFramework__EgammaTrackParticleThinning( name="STDM2ElectronTPThinningToolAR", StreamName=streamName, SGKey="Electrons", GSFTrackParticlesKey="GSFTrackParticles", InDetTrackParticlesKey="InDetTrackParticles", BestMatchOnly=True)