# TRUTH THINNING #==================================================================== if DerivationFrameworkIsMonteCarlo: from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__MenuTruthThinning SUSY2TruthThinningTool = DerivationFramework__MenuTruthThinning( name="SUSY2TruthThinningTool", ThinningService=SUSY2ThinningHelper.ThinningSvc(), WritePartons=False, WriteHadrons=False, WriteBHadrons=True, WriteGeant=False, GeantPhotonPtThresh=20000, WriteTauHad=True, PartonPtThresh=-1.0, WriteBSM=True, WriteBosons=True, WriteBosonProducts=True, WriteBSMProducts=True, WriteTopAndDecays=True, WriteEverything=False, WriteAllLeptons=False, WriteLeptonsNotFromHadrons=False, WriteStatus3=False, WriteFirstN=-1, PreserveAncestors=True, PreserveGeneratorDescendants=False, SimBarcodeOffset=DerivationFrameworkSimBarcodeOffset) ToolSvc += SUSY2TruthThinningTool thinningTools.append(SUSY2TruthThinningTool) from RecExConfig.RecFlags import rec
#============================================================================== # Thinning the master truth collection #============================================================================== from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__MenuTruthThinning TRUTH1TruthThinning = DerivationFramework__MenuTruthThinning( name="TRUTH1TruthThinning", ThinningService="TRUTH1ThinningSvc", WritePartons=False, WriteHadrons=False, WriteBHadrons=True, WritettHFHadrons=True, WriteGeant=False, GeantPhotonPtThresh=-1.0, WriteTauHad=True, PartonPtThresh=-1.0, WriteBSM=True, WriteBosons=True, WriteBSMProducts=True, WriteBosonProducts=True, WriteTopAndDecays=True, WriteEverything=False, WriteAllLeptons=True, WriteStatus3=False, PreserveDescendants=False, PreserveGeneratorDescendants=False, PreserveAncestors=True, WriteFirstN=10) ToolSvc += TRUTH1TruthThinning #============================================================================== # Thinning the photon truth collection : no photons from pi0 (origin=42)
#from AthenaCommon.GlobalFlags import globalflags #if globalflags.DataSource()=='geant4': # ToolSvc += EXOT7MCThinningTool # thinningTools.append(EXOT7MCThinningTool) from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__MenuTruthThinning EXOT7MCThinningTool = DerivationFramework__MenuTruthThinning( name="EXOT7MCThinningTool", StreamName=streamName, WritePartons=False, WriteHadrons=True, WriteBHadrons=True, WriteGeant=False, GeantPhotonPtThresh=-1.0, WriteTauHad=True, PartonPtThresh=-1.0, WriteBSM=False, WriteBosons=False, WriteBSMProducts=False, WriteTopAndDecays=False, WriteEverything=False, WriteAllLeptons=False, WriteLeptonsNotFromHadrons=True, WriteStatus3=False, WriteFirstN=-1, PreserveDescendants=False) EXOT7TMCThinningTool = DerivationFramework__MenuTruthThinning( name="EXOT7TMCThinningTool", StreamName=streamName, WritePartons=False, WriteHadrons=False,
# Truth particle thinning doTruthThinning = True preserveAllDescendants = False if DerivationFrameworkIsMonteCarlo: from DerivationFrameworkCore.ThinningHelper import ThinningHelper JETM15ThinningHelper = ThinningHelper("JETM15ThinningHelper") JETM15ThinningHelper.AppendToStream(JETM15Stream) from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__MenuTruthThinning TruthThinningTool = DerivationFramework__MenuTruthThinning( name="JETM15TruthThinning", StreamName=streamName, WriteAllStable=True, WritePartons=False, WriteHadrons=False, WriteBHadrons=True, WriteCHadrons=False, WriteGeant=False, WriteFirstN=-1) ToolSvc += TruthThinningTool thinningTools.append(TruthThinningTool) #==================================================================== # Add the containers to the output stream - slimming done here #==================================================================== from DerivationFrameworkCore.SlimmingHelper import SlimmingHelper JETM15SlimmingHelper = SlimmingHelper("JETM15SlimmingHelper") JETM15SlimmingHelper.AppendToDictionary = { "Kt4EMPFlowNeutEventShape": "xAOD::EventShape",
"CamKt12LCTopoJets.pt > 150*GeV && abs(CamKt12LCTopoJets.eta) < 2.8", ConeSize=0) ToolSvc += EXOT3CA12CCThinningTool thinningTools.append(EXOT3CA12CCThinningTool) #Truth Thinning from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__MenuTruthThinning EXOT3MCThinningTool = DerivationFramework__MenuTruthThinning( name="EXOT3MCThinningTool", StreamName=streamName, WriteEverything=False, WritePartons=False, WriteHadrons=True, WriteBHadrons=True, WriteGeant=False, WriteTauHad=False, WriteBSM=True, WriteBosons=True, WriteBosonProducts=True, WriteBSMProducts=True, WriteTopAndDecays=True, WriteAllLeptons=True, WriteStatus3=False, WriteFirstN=-1) if isMC: ToolSvc += EXOT3MCThinningTool thinningTools.append(EXOT3MCThinningTool) #==================================================================== # SKIMMING TOOL
if DerivationFrameworkIsMonteCarlo: from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__MenuTruthThinning MUON1TruthThinningTool = DerivationFramework__MenuTruthThinning( name="MUON1TruthThinningTool", StreamName=MUON1Stream.Name, WritePartons=False, WriteHadrons=False, WriteCHadrons=False, WriteBHadrons=True, WriteGeant=False, WriteTauHad=False, PartonPtThresh=-1.0, WriteBSM=True, WriteBosons=True, WriteBosonProducts=False, WriteBSMProducts=True, WriteTopAndDecays=False, WriteEverything=False, WriteAllLeptons=True, WriteLeptonsNotFromHadrons=False, WriteStatus3=False, WriteFirstN=-1, PreserveAncestors=False, PreserveParentsSiblingsChildren=True, PreserveGeneratorDescendants=False, SimBarcodeOffset=DerivationFrameworkSimBarcodeOffset) ToolSvc += MUON1TruthThinningTool MUON1ThinningTools.append(MUON1TruthThinningTool) from DerivationFrameworkMuons.DerivationFrameworkMuonsConf import DerivationFramework__MuonTruthClassifierFallback
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
#======================================= # CREATE PRIVATE SEQUENCE #======================================= jetm9Seq = CfgMgr.AthSequencer("JETM9Sequence") DerivationFrameworkJob += jetm9Seq #jetm9Seq = DerivationFrameworkJob # Truth particle thinning thinningTools = [] from AthenaCommon.GlobalFlags import globalflags if DerivationFrameworkIsMonteCarlo: from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__MenuTruthThinning JETM9TruthThinning = DerivationFramework__MenuTruthThinning( name="JETM9TruthThinning", StreamName=streamName, WriteStatus3=True, PreserveAncestors=True, WriteFirstN=10) # from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning # JETM9TruthParticleThinning = DerivationFramework__GenericTruthThinning(name = "JETM9TruthThinning", # StreamName = streamName, # ParticlesKey = "TruthParticles", # ParticleSelectionString = "") ToolSvc += JETM9TruthThinning thinningTools.append(JETM9TruthThinning) #==================================================================== # Special jets #==================================================================== #=======================================
#==================================================================== # TRUTH THINNING #==================================================================== if IsMonteCarlo: from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__MenuTruthThinning IDTIDE1TruthThinningTool = DerivationFramework__MenuTruthThinning( name="IDTIDE1TruthThinningTool", StreamName=streamName, WritePartons=True, WriteHadrons=True, WriteBHadrons=True, WriteGeant=True, GeantPhotonPtThresh=20000, WriteTauHad=True, PartonPtThresh=-1.0, WriteBSM=True, WriteBosons=True, WriteBosonProducts=True, WriteBSMProducts=True, WriteTopAndDecays=True, WriteEverything=True, WriteAllLeptons=True, WriteLeptonsNotFromHadrons=True, WriteStatus3=True, WriteFirstN=-1, PreserveAncestors=True, PreserveGeneratorDescendants=True) ToolSvc += IDTIDE1TruthThinningTool thinningTools.append(IDTIDE1TruthThinningTool) #==================================================================== # CREATE THE DERIVATION KERNEL ALGORITHM AND PASS THE ABOVE TOOLS
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
JetKey = "HLT_xAOD__JetContainer_a10tclcwsubjesFS", InDetTrackParticlesKey = "InDetTrackParticles", SelectionString = trigjetcuts) ToolSvc += TRIG7TrigTrackThinningTool thinningTools.append(TRIG7TrigTrackThinningTool) """ #==================================================================== # TRUTH THINNING TOOL #==================================================================== doTruthThinning = False from AthenaCommon.GlobalFlags import globalflags if doTruthThinning and DerivationFrameworkIsMonteCarlo: from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__MenuTruthThinning TRIG7TruthThinningTool = DerivationFramework__MenuTruthThinning( name="TRIG7TruthThinningTool", StreamName=streamName, WriteAllStable=True) ToolSvc += TRIG7TruthThinningTool thinningTools.append(TRIG7TruthThinningTool) #==================================================================== # CREATE THE OFFLINE SKIM KERNEL ALGORITHM AND PASS OFFLINE SKIM TOOL AND THINNING TOOLS #==================================================================== from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel trig7Seq += CfgMgr.DerivationFramework__DerivationKernel( name="TRIG7MainKernel", AugmentationTools=[], SkimmingTools=[TRIG7OfflineSkimmingTool], ThinningTools=thinningTools) #====================================================================
if globalflags.DataSource() == 'geant4': # MC Thinning from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import \ DerivationFramework__MenuTruthThinning EXOT14MCThinningTool = DerivationFramework__MenuTruthThinning( name='EXOT14MCThinningTool', ThinningService='EXOT14ThinningSvc', WriteEverything=False, WritePartons=False, PartonPtThresh=-1.0, WriteHadrons=False, WriteBHadrons=False, WriteGeant=False, GeantPhotonPtThresh=-1.0, WriteTauHad=True, WriteBSM=True, WriteBosons=True, WriteBSMProducts=True, WriteTopAndDecays=True, WriteAllLeptons=True, #WriteLeptonsNotFromHadrons = True, WriteStatus3=False, WriteFirstN=-1, #PreserveDescendants = False, ) ToolSvc += EXOT14MCThinningTool ToolSvc += CfgMgr.JetCalibrationTool( "m_JESTool", IsData=(globalflags.DataSource() == 'data'), # "data" or "geant4"
# Retain only stable truth particles, remove G4 # We want to keep all truth jet constituents # Also keep the first 10 particles mainly for the HS truth vertex jetm13thin = [] if DerivationFrameworkIsMonteCarlo: from DerivationFrameworkCore.ThinningHelper import ThinningHelper JETM13ThinningHelper = ThinningHelper("JETM13ThinningHelper") JETM13ThinningHelper.AppendToStream(JETM13Stream) from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__MenuTruthThinning TruthThinningTool = DerivationFramework__MenuTruthThinning( name="JETM13TruthThinning", StreamName=streamName, WriteAllStable=True, # Disable the flags that have been annoyingly # defaulted to True WritePartons=False, WriteHadrons=False, WriteBHadrons=True, WriteCHadrons=False, WriteGeant=False, WriteFirstN=10) ToolSvc += TruthThinningTool jetm13thin.append(TruthThinningTool) #======================================= # CREATE PRIVATE SEQUENCE #======================================= # Here we run custom reconstruction jetm13Seq = CfgMgr.AthSequencer("JETM13Sequence") DerivationFrameworkJob += jetm13Seq
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
#==================================================================== # Truth particles thinning #==================================================================== from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__MenuTruthThinning HIGG6D1TruthThinningTool = DerivationFramework__MenuTruthThinning( name="HIGG6D1TruthThinningTool", ThinningService="HIGG6D1ThinningSvc", WritePartons=False, WriteHadrons=False, WriteBHadrons=True, WriteGeant=False, GeantPhotonPtThresh=-1.0, WriteTauHad=True, PartonPtThresh=-1.0, WriteBSM=True, WriteBosons=True, WriteBSMProducts=True, WriteTopAndDecays=True, WriteEverything=False, WriteAllLeptons=False, WriteLeptonsNotFromHadrons=True, WriteStatus3=True, WriteFirstN=-1, PreserveGeneratorDescendants=True, PreserveDescendants=False) if is_MC: ToolSvc += HIGG6D1TruthThinningTool thinningTools.append(HIGG6D1TruthThinningTool) #=======================================
JETM9Stream = MSMgr.NewPoolRootStream(streamName, fileName) JETM9Stream.AcceptAlgs(["JETM9Kernel"]) # for thinning from AthenaServices.Configurables import ThinningSvc, createThinningSvc augStream = MSMgr.GetStream(streamName) evtStream = augStream.GetEventStream() svcMgr += createThinningSvc(svcName="JETM9ThinningSvc", outStreams=[evtStream]) # Truth particle thinning thinningTools = [] from AthenaCommon.GlobalFlags import globalflags if globalflags.DataSource() == 'geant4': from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__MenuTruthThinning JETM9TruthThinning = DerivationFramework__MenuTruthThinning( name="JETM9TruthThinning", ThinningService="JETM9ThinningSvc", WriteStatus3=True, PreserveAncestors=True, WriteFirstN=10) # from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__GenericTruthThinning # JETM9TruthParticleThinning = DerivationFramework__GenericTruthThinning(name = "JETM9TruthThinning", # ThinningService = "JETM9TruthThinningSvc", # ParticlesKey = "TruthParticles", # ParticleSelectionString = "") ToolSvc += JETM9TruthThinning thinningTools.append(JETM9TruthThinning) #======================================= # CREATE THE DERIVATION KERNEL ALGORITHM #======================================= from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel
thinningTools.append(EXOT8Ak10r2CCThinningTool) ######################################### # truth thinning ######################################### from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import DerivationFramework__MenuTruthThinning EXOT8TruthTool = DerivationFramework__MenuTruthThinning( name="EXOT8TruthTool", StreamName=streamName, WritePartons=False, WriteHadrons=False, WriteBHadrons=True, WriteGeant=False, GeantPhotonPtThresh=-1.0, WriteTauHad=False, PartonPtThresh=-1.0, WriteBSM=True, WriteBosons=True, WriteBSMProducts=True, WriteBosonProducts=False, WriteTopAndDecays=True, WriteEverything=False, WriteAllLeptons=True, WriteStatus3=True, PreserveGeneratorDescendants=True, WriteFirstN=-1) if globalflags.DataSource() == "geant4": ToolSvc += EXOT8TruthTool thinningTools.append(EXOT8TruthTool) #========================================================================================================================================
from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import \ DerivationFramework__MenuTruthThinning EXOT5MCThinningTool = DerivationFramework__MenuTruthThinning( name='EXOT5MCThinningTool', StreamName=streamName, WriteEverything=False, WritePartons=False, PartonPtThresh=-1.0, WriteHadrons=False, WriteBHadrons=False, WriteGeant=False, GeantPhotonPtThresh=10000, WriteTauHad=True, WriteBSM=True, WriteBosons=True, WriteBSMProducts=True, WriteTopAndDecays=True, WriteAllLeptons=True, #WriteLeptonsNotFromHadrons = True, WriteStatus3=False, WriteFirstN=-1, PreserveAncestors=True, PreserveGeneratorDescendants=False, SimBarcodeOffset=DerivationFrameworkSimBarcodeOffset, ) ToolSvc += EXOT5MCThinningTool thinningTools.append(EXOT5MCThinningTool) from DerivationFrameworkMCTruth.DerivationFrameworkMCTruthConf import \