ATLAS Offline Software
Public Member Functions | List of all members
top::ObjectLoaderStandardCuts Class Reference

This loads our "standard" object selection used in the top group. More...

#include <ObjectLoaderStandardCuts.h>

Inheritance diagram for top::ObjectLoaderStandardCuts:
Collaboration diagram for top::ObjectLoaderStandardCuts:

Public Member Functions

top::TopObjectSelectioninit (std::shared_ptr< top::TopConfig > topConfig)
 Setup the cuts. More...
 

Detailed Description

This loads our "standard" object selection used in the top group.

You can modify this directly, inherit from it and make changes or write your own. It's really your decision and I can't tell you what to do (you should write your own in a separate library then when you change release it wont be a big deal).

Definition at line 19 of file ObjectLoaderStandardCuts.h.

Member Function Documentation

◆ init()

top::TopObjectSelection * top::ObjectLoaderStandardCuts::init ( std::shared_ptr< top::TopConfig topConfig)
virtual

Setup the cuts.

Probably easiest if you look at the code, no?

Parameters
topConfigThe config that has been loaded.
Returns
A fully configured object that can be used to control which objects (physics ones, not computer ones) are selected by the program.

– Photons –//

– Electrons –///

– Fwd Electrons –///

– Muons –///

– Soft Muons –///

– Taus –///

– Jets –///

– Large R Jets –///

Track Jets –///

– Ghost Track Jets –///

– Tracks –///

– Overlap removal –/// single parameter: boolean to do OR with large-R jets

Implements top::ObjectLoaderBase.

Definition at line 30 of file ObjectLoaderStandardCuts.cxx.

30  {
31  top::TopObjectSelection* objectSelection = new top::TopObjectSelection(topConfig->objectSelectionName());
32  top::check(objectSelection->setProperty("config", topConfig), "Failed to setProperty for top::TopObjectSelection");
33  top::check(objectSelection->initialize(), "Failed to initialize top::TopObjectSelection");
34 
35  // Debug messages?
36  // objectSelection->msg().setLevel(MSG::DEBUG);
37 
39  if (topConfig->usePhotons()) {
40  ATH_MSG_INFO("top::ObjectLoaderStandardCuts::init - Using new photon object for Release 21 - Photon");
41  objectSelection->photonSelection(new top::Photon(topConfig->photonPtcut(),
42  topConfig->photonEtacut(),
43  topConfig->photonIdentification(),
44  topConfig->photonIdentificationLoose(),
45  new top::StandardIsolation(topConfig->photonIsolation(),
46  topConfig->photonIsolationLoose())));
47  }
48 
50  if (topConfig->useElectrons()) {
51  if (topConfig->electronID().find("LH") != std::string::npos &&
52  topConfig->electronIDLoose().find("LH") != std::string::npos) {
53  //user wants likelihood electrons
54  objectSelection->electronSelection(new top::ElectronLikelihood(topConfig->electronPtcut(),
55  topConfig->electronVetoLArCrack(),
56  topConfig->electronID(),
57  topConfig->electronIDLoose(),
59  topConfig->electronIsolation(),
60  topConfig->electronIsolationLoose()),
61  topConfig->electrond0Sigcut(),
62  topConfig->electrondeltaz0cut(),
63  topConfig->applyTTVACut(),
64  topConfig->useElectronChargeIDSelection()
65  ));
66  } else {
67  ATH_MSG_ERROR("Only likelihood-based electron ID is currently supported. You have selected:\n"
68  << "Tight electron definition: " << topConfig->electronID() << "\n"
69  << "Loose electron definition: " << topConfig->electronIDLoose());
70  throw std::runtime_error("Unsupported electron ID option");
71  }
72  }
73 
75  //if (topConfig->useFwdElectrons()) {
76  // objectSelection->fwdElectronSelection(new top::FwdElectron(topConfig->fwdElectronPtcut(),
77  // topConfig->fwdElectronMinEtacut(),
78  // topConfig->fwdElectronMaxEtacut(), topConfig));
79  //}
81  if (topConfig->useMuons()) {
82  if (topConfig->useAntiMuons()) objectSelection->muonSelection(new top::AntiMuon(topConfig->muonPtcut(),
84  topConfig->muonIsolation())));
85  else objectSelection->muonSelection(new top::Muon(topConfig->muonPtcut(),
86  new top::StandardIsolation(topConfig->muonIsolation(),
87  topConfig->muonIsolationLoose()),
88  topConfig->muond0Sigcut(),
89  topConfig->muondeltaz0cut(),
90  topConfig->applyTTVACut()));
91  }
92 
94  if (topConfig->useMuons() && topConfig->useSoftMuons()) {
95  objectSelection->softmuonSelection(new top::SoftMuon(topConfig->softmuonPtcut()));
96  }
97 
98 
100  if (topConfig->useTaus()) {
101  objectSelection->tauSelection(new top::Tau());
102  }
103 
105  if (topConfig->useJets()) {
106  objectSelection->jetSelection(new top::Jet(topConfig->jetPtcut(), topConfig->jetEtacut()));
107  }
108 
110  if (topConfig->useLargeRJets()) {// not doing JVT cut for large-R jets
111  objectSelection->largeJetSelection(new top::Jet(topConfig->largeRJetPtcut(),
112  topConfig->largeRJetEtacut(),
113  topConfig->largeRJetMasscut(),
114  false));
115  }
116 
118  if (topConfig->useTrackJets()) {
119  objectSelection->trackJetSelection(new top::TrackJet(topConfig->trackJetPtcut(),
120  topConfig->trackJetEtacut()));
121  }
122 
124  if (topConfig->useJetGhostTrack()) {
125  objectSelection->jetGhostTrackSelection(new top::JetGhostTrackSelection(topConfig->ghostTrackspT(),
126  2.5,topConfig->ghostTracksVertexAssociation(),topConfig->jetPtGhostTracks(), 2.5));
127  }
128 
130  if (topConfig->useTracks()) {
131  objectSelection->trackSelection(new top::TrackSelection(topConfig->trackPtcut(), topConfig->trackEtacut()));
132  }
133 
136  if (!topConfig->isTruthDxAOD()) {
138  topConfig->useLargeRJets())));
139  }
140 
141  return objectSelection;
142  }

The documentation for this class was generated from the following files:
top::TrackJet
Definition: PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/TopObjectSelectionTools/TrackJet.h:11
top::TopConfig::useElectronChargeIDSelection
virtual void useElectronChargeIDSelection(const std::string &s)
Definition: TopConfig.h:821
top::TopConfig::trackEtacut
virtual void trackEtacut(const float eta)
Definition: TopConfig.h:1360
top::TopConfig::photonIsolationLoose
virtual void photonIsolationLoose(const std::string &quality)
Definition: TopConfig.h:986
top::TopObjectSelection::photonSelection
void photonSelection(PhotonSelectionBase *ptr)
Set the code used to select photons.
Definition: TopObjectSelection.cxx:140
top::TopConfig::objectSelectionName
virtual void objectSelectionName(const std::string &s)
Definition: TopConfig.h:2000
top::TopObjectSelection::initialize
StatusCode initialize()
Dummy implementation of the initialisation function.
Definition: TopObjectSelection.cxx:58
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
top::TopConfig::photonEtacut
virtual void photonEtacut(const float eta)
Definition: TopConfig.h:962
top::Muon
Select muons based on some early suggestions.
Definition: PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/TopObjectSelectionTools/Muon.h:18
top::TopConfig::usePhotons
bool usePhotons() const
Definition: TopConfig.h:80
top::TopObjectSelection::jetGhostTrackSelection
void jetGhostTrackSelection(JetGhostTrackSelectionBase *ptr)
Set the code used to select tracks ghost associated to small-R jets.
Definition: TopObjectSelection.cxx:152
top::TopConfig::electrond0Sigcut
virtual void electrond0Sigcut(const float d0sig)
Definition: TopConfig.h:785
top::StandardIsolation
Apply the cuts to etcone and ptcone like we used to in Run-I.
Definition: IsolationTools.h:231
top::TopConfig::muondeltaz0cut
virtual void muondeltaz0cut(const float delta_z0)
Definition: TopConfig.h:1005
top::TopObjectSelection::overlapRemovalPostSelection
void overlapRemovalPostSelection(OverlapRemovalBase *ptr)
Set the code used to perform the overlap removal.
Definition: TopObjectSelection.cxx:161
top::TopConfig::jetPtGhostTracks
virtual void jetPtGhostTracks(const float pt, const float small_jet_pt)
Definition: TopConfig.h:1241
top::TopObjectSelection::electronSelection
void electronSelection(ElectronSelectionBase *ptr)
Set the code used to select electrons.
Definition: TopObjectSelection.cxx:116
top::TopConfig::electronVetoLArCrack
virtual void electronVetoLArCrack(const bool b)
Definition: TopConfig.h:773
top::TopConfig::electronIsolation
virtual void electronIsolation(const std::string &iso)
Definition: TopConfig.h:797
top::TopConfig::muonIsolationLoose
virtual void muonIsolationLoose(const std::string &iso)
Definition: TopConfig.h:1071
top::TopConfig::trackJetEtacut
virtual void trackJetEtacut(const float eta)
Definition: TopConfig.h:1344
top::TopConfig::muonIsolation
virtual void muonIsolation(const std::string &iso)
Definition: TopConfig.h:1065
top::TopConfig::electrondeltaz0cut
virtual void electrondeltaz0cut(const float delta_z0)
Definition: TopConfig.h:791
top::TopConfig::useTrackJets
bool useTrackJets() const
Definition: TopConfig.h:88
top::TopConfig::useSoftMuons
bool useSoftMuons() const
Definition: TopConfig.h:84
top::Jet
A class that performs object cuts on Jets (of any size!).
Definition: PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/TopObjectSelectionTools/Jet.h:20
top::TopConfig::useJets
bool useJets() const
Definition: TopConfig.h:86
top::TopObjectSelection::tauSelection
void tauSelection(TauSelectionBase *ptr)
Set the code used to select taus.
Definition: TopObjectSelection.cxx:132
top::TopConfig::softmuonPtcut
virtual void softmuonPtcut(const float pt)
Definition: TopConfig.h:1158
top::AntiMuonIsolation
Apply the cuts relevant for Anti-muon model.
Definition: IsolationTools.h:197
top::TopConfig::useLargeRJets
bool useLargeRJets() const
Definition: TopConfig.h:87
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
top::TopConfig::useAntiMuons
bool useAntiMuons() const
Definition: TopConfig.h:107
top::TopConfig::electronIDLoose
virtual void electronIDLoose(const std::string &s)
Definition: TopConfig.h:761
top::TopConfig::largeRJetPtcut
virtual void largeRJetPtcut(const float pt)
Definition: TopConfig.h:1287
top::TopConfig::electronPtcut
virtual void electronPtcut(const float pt)
Definition: TopConfig.h:779
top::TopConfig::trackJetPtcut
virtual void trackJetPtcut(const float pt)
Definition: TopConfig.h:1338
top::TopObjectSelection::jetSelection
void jetSelection(JetSelectionBase *ptr)
Set the code used to select jets.
Definition: TopObjectSelection.cxx:136
top::TopObjectSelection
Configure the object selection used in the analysis.
Definition: TopObjectSelection.h:66
top::TopConfig::jetPtcut
virtual void jetPtcut(const float pt)
Definition: TopConfig.h:1229
top::TopConfig::isTruthDxAOD
bool isTruthDxAOD() const
Definition: TopConfig.h:174
top::check
void check(bool thingToCheck, const std::string &usefulFailureMessage)
Print an error message and terminate if thingToCheck is false.
Definition: EventTools.cxx:15
top::TrackSelection
Definition: TrackSelection.h:16
top::TopConfig::muonPtcut
virtual void muonPtcut(const float pt)
Definition: TopConfig.h:993
top::TopObjectSelection::trackSelection
void trackSelection(TrackSelectionBase *ptr)
Set the code used to select tracks.
Definition: TopObjectSelection.cxx:156
top::TopConfig::muond0Sigcut
virtual void muond0Sigcut(const float d0sig)
Definition: TopConfig.h:999
top::ElectronLikelihood
To select electrons based on the "likelihood" definition.
Definition: ElectronLikelihood.h:18
top::TopConfig::trackPtcut
virtual void trackPtcut(const float pt)
Definition: TopConfig.h:1354
top::TopConfig::useJetGhostTrack
bool useJetGhostTrack() const
Definition: TopConfig.h:90
top::TopConfig::largeRJetEtacut
virtual void largeRJetEtacut(const float eta)
Definition: TopConfig.h:1299
top::TopObjectSelection::trackJetSelection
void trackJetSelection(JetSelectionBase *ptr)
Set the code used to select track jets.
Definition: TopObjectSelection.cxx:148
top::Tau
To select taus based on BoostedDecisionTree definition.
Definition: Tau.h:19
top::TopConfig::photonPtcut
virtual void photonPtcut(const float pt)
Definition: TopConfig.h:956
top::JetGhostTrackSelection
Definition: JetGhostTrackSelection.h:16
top::Photon
Photon selection for top analyses.
Definition: PhysicsAnalysis/TopPhys/xAOD/TopObjectSelectionTools/TopObjectSelectionTools/Photon.h:23
top::TopConfig::useTracks
bool useTracks() const
Definition: TopConfig.h:89
top::TopConfig::useElectrons
bool useElectrons() const
Definition: TopConfig.h:81
top::TopConfig::useTaus
bool useTaus() const
Definition: TopConfig.h:85
top::TopConfig::largeRJetMasscut
virtual void largeRJetMasscut(const float m)
Definition: TopConfig.h:1293
top::AntiMuon
Select muons based on some early suggestions.
Definition: AntiMuon.h:18
top::TopConfig::photonIdentification
virtual void photonIdentification(const std::string &quality)
Definition: TopConfig.h:968
top::TopObjectSelection::softmuonSelection
void softmuonSelection(SoftMuonSelectionBase *ptr)
Set the code used to select soft muons.
Definition: TopObjectSelection.cxx:128
top::TopConfig::ghostTrackspT
virtual void ghostTrackspT(const float pt)
Definition: TopConfig.h:1258
top::TopConfig::applyTTVACut
bool applyTTVACut() const
Definition: TopConfig.h:105
top::SoftMuon
Select muons based on some early suggestions.
Definition: SoftMuon.h:18
top::TopConfig::useMuons
bool useMuons() const
Definition: TopConfig.h:83
top::OverlapRemovalASG
The Harmonization Group recommended object overlap removal.
Definition: OverlapRemovalASG.h:22
top::TopConfig::photonIsolation
virtual void photonIsolation(const std::string &quality)
Definition: TopConfig.h:980
top::TopConfig::electronID
virtual void electronID(const std::string &s)
Definition: TopConfig.h:755
top::TopConfig::ghostTracksVertexAssociation
virtual void ghostTracksVertexAssociation(const std::string &vertexassociation)
Definition: TopConfig.h:1264
top::TopConfig::electronIsolationLoose
virtual void electronIsolationLoose(const std::string &iso)
Definition: TopConfig.h:803
top::TopObjectSelection::muonSelection
void muonSelection(MuonSelectionBase *ptr)
Set the code used to select muons.
Definition: TopObjectSelection.cxx:124
top::TopConfig::doLargeJetOverlapRemoval
bool doLargeJetOverlapRemoval() const
Definition: TopConfig.h:284
top::TopConfig::photonIdentificationLoose
virtual void photonIdentificationLoose(const std::string &quality)
Definition: TopConfig.h:974
top::TopObjectSelection::largeJetSelection
void largeJetSelection(JetSelectionBase *ptr)
Set the code used to select large jets.
Definition: TopObjectSelection.cxx:144
top::TopConfig::jetEtacut
virtual void jetEtacut(const float eta)
Definition: TopConfig.h:1235