if is_MC and do_truth_thinning: ToolSvc += MUON5TruthTool thinningTools.append(MUON5TruthTool) #==================================================================== # CALO CLUSTER THINNING #==================================================================== # These tools thin any calorimeter clusters not associated to the # objects specified below from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__CaloClusterThinning # Egamma clusters associated with electrons MUON5ElectronEgammaCThinningTool = DerivationFramework__CaloClusterThinning( name = "MUON5ElectronEgammaCThinningTool", StreamName = streamName, SGKey = "Electrons", CaloClCollectionSGKey = "egammaClusters", SelectionString = "Electrons.pt >= 4*GeV", ConeSize = 0.4) ToolSvc += MUON5ElectronEgammaCThinningTool thinningTools.append(MUON5ElectronEgammaCThinningTool) #==================================================================== # SKIMMING TOOL #==================================================================== # Apply skimming requirement: at least one electron, muon or tau eleRequirements = '(Electrons.pt > 5*GeV) && (abs(Electrons.eta) < 2.6) && (Electrons.Loose || Electrons.DFCommonElectronsLHLoose)' muRequirements = '(Muons.DFCommonGoodMuon) && (Muons.muonType == 0) && (Muons.pt > 5*GeV) && (abs(Muons.eta) < 2.6)' tauRequirements = '(TauJets.pt > 15*GeV) && (abs(TauJets.charge)==1.0) && ((TauJets.nTracks == 1) || (TauJets.nTracks == 3)) && (abs(TauJets.eta) < 2.6)' eSelection = '(count('+eleRequirements+') >= 1)'
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) from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__CaloClusterThinning HIGG2D2MuonCCThinningTool = DerivationFramework__CaloClusterThinning(name = "HIGG2D2MuonCCThinningTool", StreamName = streamName, SGKey = "Muons", TopoClCollectionSGKey = "CaloCalTopoClusters", SelectionString = "Muons.pt>0.*GeV", ConeSize = 0.6) ToolSvc += HIGG2D2MuonCCThinningTool thinningTools.append(HIGG2D2MuonCCThinningTool) # Truth particles useGenericTruthThinning = True if useGenericTruthThinning: truth_cond_WZH = "((abs(TruthParticles.pdgId) >= 23) && (abs(TruthParticles.pdgId) <= 25))" # W, Z and Higgs truth_cond_Lepton = "((abs(TruthParticles.pdgId) >= 11) && (abs(TruthParticles.pdgId) <= 16))" # Leptons truth_cond_Quark = "((abs(TruthParticles.pdgId) == 6))" # Top quark truth_cond_Photon = "((abs(TruthParticles.pdgId) == 22) && (TruthParticles.pt > 1*GeV))" # Photon truth_expression = '('+truth_cond_WZH+' || '+truth_cond_Lepton +' || '+truth_cond_Quark +' || '+truth_cond_Photon+')'
thinningTools.append(HIGG2D2ElectronTPThinningTool) # Tracks associated with taus from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TauTrackParticleThinning HIGG2D2TauTPThinningTool = DerivationFramework__TauTrackParticleThinning(name = "HIGG2D2TauTPThinningTool", ThinningService = HIGG2D2ThinningHelper.ThinningSvc(), TauKey = "TauJets", ConeSize = 0.6, InDetTrackParticlesKey = "InDetTrackParticles") ToolSvc += HIGG2D2TauTPThinningTool thinningTools.append(HIGG2D2TauTPThinningTool) from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__CaloClusterThinning HIGG2D2MuonCCThinningTool = DerivationFramework__CaloClusterThinning(name = "HIGG2D2MuonCCThinningTool", ThinningService = HIGG2D2ThinningHelper.ThinningSvc(), SGKey = "Muons", TopoClCollectionSGKey = "CaloCalTopoClusters", SelectionString = "Muons.pt>0.*GeV", ConeSize = 0.6) ToolSvc += HIGG2D2MuonCCThinningTool thinningTools.append(HIGG2D2MuonCCThinningTool) # Truth particles useGenericTruthThinning = True if useGenericTruthThinning: truth_cond_WZH = "((abs(TruthParticles.pdgId) >= 23) && (abs(TruthParticles.pdgId) <= 25))" # W, Z and Higgs truth_cond_Lepton = "((abs(TruthParticles.pdgId) >= 11) && (abs(TruthParticles.pdgId) <= 16))" # Leptons truth_cond_Quark = "((abs(TruthParticles.pdgId) == 6))" # Top quark truth_cond_Photon = "((abs(TruthParticles.pdgId) == 22) && (TruthParticles.pt > 1*GeV))" # Photon truth_expression = '('+truth_cond_WZH+' || '+truth_cond_Lepton +' || '+truth_cond_Quark +' || '+truth_cond_Photon+')'
MUON3ThinningTool2 = DerivationFramework__MuonTrackParticleThinning( name="MUON3ThinningTool2", StreamName=streamName, MuonKey="Muons", SelectionString=thinning_expression2, ConeSize=0.3, InDetTrackParticlesKey="InDetTrackParticles") ToolSvc += MUON3ThinningTool2 MUON3ThinningTools.append(MUON3ThinningTool2) # keep topoclusters around muons from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__CaloClusterThinning MUON3ThinningTool4 = DerivationFramework__CaloClusterThinning( name="MUON3ThinningTool4", StreamName=streamName, SGKey="Muons", SelectionString="Muons.pt>2.5*GeV", TopoClCollectionSGKey="CaloCalTopoClusters", ConeSize=0.3) ToolSvc += MUON3ThinningTool4 MUON3ThinningTools.append(MUON3ThinningTool4) ### also for forward tracks thinning_expression3 = "Muons.muonType==4" MUON3ThinningTool2f = DerivationFramework__MuonTrackParticleThinning( name="MUON3ThinningTool2f", StreamName=streamName, MuonKey="Muons", SelectionString=thinning_expression3, ConeSize=0.3, InDetTrackParticlesKey="InDetForwardTrackParticles")
thinning_expression_augment = 'MUON6DIMU_trkStatus>0' from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__TrackParticleThinning MUON6ThinningToolAugment = DerivationFramework__TrackParticleThinning( name="MUON6ThinningToolAugment", StreamName=MUON6Stream.Name, SelectionString=thinning_expression_augment, InDetTrackParticlesKey="InDetTrackParticles") ToolSvc += MUON6ThinningToolAugment MUON6ThinningTools.append(MUON6ThinningToolAugment) # keep topoclusters around muons from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__CaloClusterThinning MUON6ThinningToolTopo = DerivationFramework__CaloClusterThinning( name="MUON6ThinningToolTopo", StreamName=MUON6Stream.Name, SGKey="Muons", SelectionString="Muons.pt>4*GeV", TopoClCollectionSGKey="CaloCalTopoClusters", ConeSize=0.5) ToolSvc += MUON6ThinningToolTopo MUON6ThinningTools.append(MUON6ThinningToolTopo) ### also for forward tracks thinning_expression_forward = "Muons.muonType==4" MUON6ThinningToolForward = DerivationFramework__MuonTrackParticleThinning( name="MUON6ThinningToolForward", StreamName=MUON6Stream.Name, MuonKey="Muons", SelectionString=thinning_expression_forward, ConeSize=0.5, InDetTrackParticlesKey="InDetForwardTrackParticles")
name='EXOT5TPThinningTool', ThinningService=EXOT5ThinningHelper.ThinningSvc(), SelectionString='InDetTrackParticles.pt > 10*GeV', InDetTrackParticlesKey='InDetTrackParticles') ToolSvc += EXOT5TPThinningTool thinningTools.append(EXOT5TPThinningTool) # Cluster thinning from DerivationFrameworkCalo.DerivationFrameworkCaloConf import \ DerivationFramework__CaloClusterThinning # Keep clusters associated to electrons EXOT5ElectronCCThinningTool = DerivationFramework__CaloClusterThinning( name='EXOT5ElectronCCThinningTool', ThinningService=EXOT5ThinningHelper.ThinningSvc(), SGKey='Electrons', CaloClCollectionSGKey='egammaClusters', TopoClCollectionSGKey='CaloCalTopoClusters', ConeSize=0.4) ToolSvc += EXOT5ElectronCCThinningTool thinningTools.append(EXOT5ElectronCCThinningTool) # Keep clusters associated to photons EXOT5PhotonCCThinningTool = DerivationFramework__CaloClusterThinning( name='EXOT5PhotonCCThinningTool', ThinningService=EXOT5ThinningHelper.ThinningSvc(), SGKey='Photons', CaloClCollectionSGKey='egammaClusters', TopoClCollectionSGKey='CaloCalTopoClusters', ConeSize=0.4) ToolSvc += EXOT5PhotonCCThinningTool
EGAM1TPThinningTool = DerivationFramework__TrackParticleThinning( name="EGAM1TPThinningTool", StreamName=streamName, SelectionString= "InDetTrackParticles.DFCommonTightPrimary && abs( DFCommonInDetTrackZ0AtPV * sin(InDetTrackParticles.theta)) < 3.0*mm", InDetTrackParticlesKey="InDetTrackParticles") ToolSvc += EGAM1TPThinningTool print EGAM1TPThinningTool thinningTools.append(EGAM1TPThinningTool) # keep topoclusters around electrons from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__CaloClusterThinning EGAM1CCTCThinningTool = DerivationFramework__CaloClusterThinning( name="EGAM1CCTCThinningTool", StreamName=streamName, SGKey="Electrons", SelectionString="Electrons.pt>4*GeV", TopoClCollectionSGKey="CaloCalTopoClusters", ConeSize=0.5) ToolSvc += EGAM1CCTCThinningTool print EGAM1CCTCThinningTool thinningTools.append(EGAM1CCTCThinningTool) # Truth thinning if globalflags.DataSource() == 'geant4': truth_cond_WZH = "((abs(TruthParticles.pdgId) >= 23) && (abs(TruthParticles.pdgId) <= 25))" # W, Z and Higgs truth_cond_lep = "((abs(TruthParticles.pdgId) >= 11) && (abs(TruthParticles.pdgId) <= 16))" # Leptons truth_cond_top = "((abs(TruthParticles.pdgId) == 6))" # Top quark truth_cond_gam = "((abs(TruthParticles.pdgId) == 22) && (TruthParticles.pt > 1*GeV))" # Photon truth_cond_finalState = '(TruthParticles.status == 1 && TruthParticles.barcode < 200000)' # stable particles truth_expression = '(' + truth_cond_WZH + ' || ' + truth_cond_lep + ' || ' + truth_cond_top + ' || ' + truth_cond_gam + ') || (' + truth_cond_finalState + ')'
ToolSvc += PHYSLITETopHFFilterAugmentation AugmentationTools.append(PHYSLITETopHFFilterAugmentation) nanolog.info("PHYSLITETopHFFilterAugmentationTool: {!s}".format(PHYSLITETopHFFilterAugmentation)) #==================================================================== # THINNING #==================================================================== # Cluster thinning from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__CaloClusterThinning # Caloclusters associated to electrons PHYSLITEElectronClusterThinningTool = DerivationFramework__CaloClusterThinning( name = "PHYSLITEElectronClusterThinningTool", ThinningService = PHYSLITEThinningHelper.ThinningSvc(), SGKey = "AnalysisElectrons", CaloClCollectionSGKey = "egammaClusters", TopoClCollectionSGKey = "CaloCalTopoClusters", #SelectionString = "Electrons.pt > 7*GeV", ConeSize = 0.4) ToolSvc += PHYSLITEElectronClusterThinningTool thinningTools.append(PHYSLITEElectronClusterThinningTool) # Caloclusters associated to photons PHYSLITEPhotonClusterThinningTool = DerivationFramework__CaloClusterThinning( name = "PHYSLITEPhotonClusterThinningTool", ThinningService = PHYSLITEThinningHelper.ThinningSvc(), SGKey = "AnalysisPhotons", CaloClCollectionSGKey = "egammaClusters", TopoClCollectionSGKey = "CaloCalTopoClusters", #SelectionString = ""Photons.pt > 10*GeV"", ConeSize = 0.4) ToolSvc += PHYSLITEPhotonClusterThinningTool
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
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", #FrwdClCollectionSGKey = "LArClusterEMFrwd", ConeSize=0.4) ToolSvc += EXOT16ElectronCCThinningTool thinningTools.append(EXOT16ElectronCCThinningTool) ##from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__JetCaloClusterThinning ##EXOT16CA15CCThinningTool = DerivationFramework__JetCaloClusterThinning(name = "EXOT16CA15CCThinningTool", ## ThinningService = "EXOT16ThinningSvc", ## SGKey = "CamKt15LCTopoJets", ## TopoClCollectionSGKey = "CaloCalTopoClusters", ## SelectionString = "CamKt15LCTopoJets.pt > 150*GeV", ## ConeSize = 0) ##ToolSvc += EXOT16CA15CCThinningTool
JETM12TauTPThinningTool = DerivationFramework__TauTrackParticleThinning( name="JETM12TauTPThinningTool", StreamName=streamName, TauKey="TauJets", InDetTrackParticlesKey="InDetTrackParticles") ToolSvc += JETM12TauTPThinningTool thinningTools.append(JETM12TauTPThinningTool) ################################## # CaloCalTopoCluster thinning from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__CaloClusterThinning JETM12CaloClusterThinning = DerivationFramework__CaloClusterThinning( name="JETM12CaloClusterThinning", StreamName=streamName, SGKey="InDetTrackParticles", TopoClCollectionSGKey="CaloCalTopoClusters", SelectionString= "( InDetTrackParticles.pt > 10*GeV && InDetTrackParticles.DFCommonTightPrimary && abs(DFCommonInDetTrackZ0AtPV) < 3.0*mm )", ConeSize=0.6, ) ToolSvc += JETM12CaloClusterThinning thinningTools.append(JETM12CaloClusterThinning) ################################### # Truth particle thinning doTruthThinning = True from AthenaCommon.GlobalFlags import globalflags if doTruthThinning and DerivationFrameworkIsMonteCarlo: truth_cond_status = "( (TruthParticles.status == 1) && (TruthParticles.barcode < 200000) && (TruthParticles.pt > 8*GeV) )" # high pt pions for E/p truth_cond_Lepton = "((abs(TruthParticles.pdgId) >= 11) && (abs(TruthParticles.pdgId) <= 16) && (TruthParticles.barcode < 200000))" # Leptons truth_expression = '(' + truth_cond_status + ' || ' + truth_cond_Lepton + ')'
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
ApplyAnd = True) ToolSvc += TAUP3MetTPThinningTool from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning TAUP3JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name = "TAUP3JetTPThinningTool", ThinningService = "TAUP3ThinningSvc", JetKey = "AntiKt4LCTopoJets", InDetTrackParticlesKey = "InDetTrackParticles", ApplyAnd = True) ToolSvc += TAUP3JetTPThinningTool from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__CaloClusterThinning TAUP3CaloClusterThinning = DerivationFramework__CaloClusterThinning( name = "TAUP3ClusterThinning", ThinningService = "TAUP3ThinningSvc", SGKey = "TauJets", TopoClCollectionSGKey = "CaloCalTopoClusters") ToolSvc += TAUP3CaloClusterThinning # Tracks associated with electrons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning TAUP3ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name = "TAUP3ElectronTPThinningTool", ThinningService = "TAUP3ThinningSvc", SGKey = "Electrons", InDetTrackParticlesKey = "InDetTrackParticles") ToolSvc += TAUP3ElectronTPThinningTool # Tracks associated with muons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning
# 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 EXOT10PhotonCCThinningTool = DerivationFramework__CaloClusterThinning( name = "EXOT10PhotonCCThinningTool", ThinningService = EXOT10ThinningHelper.ThinningSvc(), SGKey = "Photons", CaloClCollectionSGKey = "egammaClusters", TopoClCollectionSGKey = "CaloCalTopoClusters", #SelectionString = "Photons.pt > 30*GeV", #FrwdClCollectionSGKey = "LArClusterEMFrwd", ConeSize = 0.6) ToolSvc += EXOT10PhotonCCThinningTool # Calo Clusters associated with Electrons EXOT10ElectronCCThinningTool = DerivationFramework__CaloClusterThinning( name = "EXOT10ElectronCCThinningTool", ThinningService = EXOT10ThinningHelper.ThinningSvc(), SGKey = "Electrons", CaloClCollectionSGKey = "egammaClusters", TopoClCollectionSGKey = "CaloCalTopoClusters", #SelectionString = "Electrons.pt > 30*GeV", #FrwdClCollectionSGKey = "LArClusterEMFrwd", ConeSize = 0.4) ToolSvc += EXOT10ElectronCCThinningTool
# from DerivationFrameworkEGamma.DerivationFrameworkEGammaConf import DerivationFramework__CellThinning # MUON1ThinningTool3 = DerivationFramework__CellThinning(name = "MUON1ThinningTool3", # ThinningService = "MUON1ThinningSvc", # SGKey_muons = "Muons", # SGKey_AODCells = "AODCellContainer", # ConeSize = 0.5) # conesize is actually not used. # ToolSvc += MUON1ThinningTool3 # print MUON1ThinningTool3 # MUON1ThinningTools.append(MUON1ThinningTool3) # keep topoclusters around muons from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__CaloClusterThinning MUON1ThinningTool4 = DerivationFramework__CaloClusterThinning( name="MUON1ThinningTool4", ThinningService="MUON1ThinningSvc", SGKey="Muons", SelectionString="Muons.pt>4*GeV", TopoClCollectionSGKey="CaloCalTopoClusters", ConeSize=0.5) ToolSvc += MUON1ThinningTool4 print MUON1ThinningTool4 MUON1ThinningTools.append(MUON1ThinningTool4) #==================================================================== # CREATE THE DERIVATION KERNEL ALGORITHM AND PASS THE ABOVE TOOLS #==================================================================== from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__DerivationKernel DerivationFrameworkJob += CfgMgr.DerivationFramework__DerivationKernel( "MUON1Kernel", # AugmentationTools = [MUON1AugmentTool1], AugmentationTools=[
ApplyAnd=True) ToolSvc += TAUP1MetTPThinningTool from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__JetTrackParticleThinning TAUP1JetTPThinningTool = DerivationFramework__JetTrackParticleThinning( name="TAUP1JetTPThinningTool", ThinningService=TAUP1ThinningHelper.ThinningSvc(), JetKey="AntiKt4LCTopoJets", InDetTrackParticlesKey="InDetTrackParticles", ApplyAnd=True) ToolSvc += TAUP1JetTPThinningTool from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__CaloClusterThinning TAUP1CaloClusterThinning = DerivationFramework__CaloClusterThinning( name="TAUP1ClusterThinning", ThinningService=TAUP1ThinningHelper.ThinningSvc(), SGKey="TauJets", TopoClCollectionSGKey="CaloCalTopoClusters") ToolSvc += TAUP1CaloClusterThinning # Tracks associated with electrons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning TAUP1ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning( name="TAUP1ElectronTPThinningTool", ThinningService=TAUP1ThinningHelper.ThinningSvc(), SGKey="Electrons", InDetTrackParticlesKey="InDetTrackParticles") ToolSvc += TAUP1ElectronTPThinningTool # Tracks associated with muons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning
# ========================================================================================================================== if DerivationFrameworkIsMonteCarlo: from DerivationFrameworkMCTruth.MCTruthCommon import addStandardTruthContents addStandardTruthContents(SeqTAUP1,prefix='TAUP1_') # ========================================================================================================================== # Thinning tool # ========================================================================================================================== from DerivationFrameworkCore.ThinningHelper import ThinningHelper TAUP1ThinningHelper = ThinningHelper( "TAUP1ThinningHelper" ) TAUP1ThinningHelper.TriggerChains = "HLT_e24.*|HLT_e60.*" TAUP1ThinningHelper.AppendToStream( TAUP1Stream ) from DerivationFrameworkCalo.DerivationFrameworkCaloConf import DerivationFramework__CaloClusterThinning TAUP1CaloClusterThinning = DerivationFramework__CaloClusterThinning(name = "TAUP1ClusterThinning", StreamName = streamName, SGKey = "TauJets", TopoClCollectionSGKey = "CaloCalTopoClusters") ToolSvc += TAUP1CaloClusterThinning # Tracks associated with electrons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__EgammaTrackParticleThinning TAUP1ElectronTPThinningTool = DerivationFramework__EgammaTrackParticleThinning(name = "TAUP1ElectronTPThinningTool", StreamName = streamName, SGKey = "Electrons", InDetTrackParticlesKey = "InDetTrackParticles") ToolSvc += TAUP1ElectronTPThinningTool # Tracks associated with muons from DerivationFrameworkInDet.DerivationFrameworkInDetConf import DerivationFramework__MuonTrackParticleThinning TAUP1MuonTPThinningTool = DerivationFramework__MuonTrackParticleThinning(name = "TAUP1MuonTPThinningTool", StreamName = streamName,
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", StreamName=streamName, SGKey="Photons", CaloClCollectionSGKey="egammaClusters", TopoClCollectionSGKey="CaloCalTopoClusters", #SelectionString = "Photons.pt > 30*GeV", #FrwdClCollectionSGKey = "LArClusterEMFrwd", ConeSize=0.6) ToolSvc += EXOT6PhotonCCThinningTool #==================================================================== # SKIMMING TOOL #==================================================================== beamEnergy = jobproperties.Beam.energy() expression = '' if (beamEnergy < 4.1e+06): expression = '((EventInfo.eventTypeBitmask==1) || EF_g120_loose || EF_xe80_tclcw_tight) && (count(Photons.pt > 100*GeV) > 0) || (count(Electrons.pt > 100*GeV) > 0)' if (beamEnergy > 6.0e+06):
name='EXOT5TPThinningTool', StreamName=stream_name, SelectionString='InDetTrackParticles.pt > 10*GeV', InDetTrackParticlesKey='InDetTrackParticles') ToolSvc += EXOT5TPThinningTool thinningTools.append(EXOT5TPThinningTool) # Cluster thinning from DerivationFrameworkCalo.DerivationFrameworkCaloConf import \ DerivationFramework__CaloClusterThinning # Keep clusters associated to electrons EXOT5ElectronCCThinningTool = DerivationFramework__CaloClusterThinning( name='EXOT5ElectronCCThinningTool', StreamName=stream_name, SGKey='Electrons', CaloClCollectionSGKey='egammaClusters', TopoClCollectionSGKey='CaloCalTopoClusters', ConeSize=0.4) ToolSvc += EXOT5ElectronCCThinningTool thinningTools.append(EXOT5ElectronCCThinningTool) # Keep clusters associated to photons EXOT5PhotonCCThinningTool = DerivationFramework__CaloClusterThinning( name='EXOT5PhotonCCThinningTool', StreamName=stream_name, SGKey='Photons', CaloClCollectionSGKey='egammaClusters', TopoClCollectionSGKey='CaloCalTopoClusters', ConeSize=0.4) ToolSvc += EXOT5PhotonCCThinningTool