67 {
69
70
72
73
74 if( argc < 3 ) {
77 return EXIT_FAILURE;
78 }
79
81 auto start = std::time(
nullptr);
83
84
87 std::unique_ptr< TFile >
ifile( TFile::Open( fileName,
"READ" ) );
88 if( !
ifile.get() )
return EXIT_FAILURE;
89
92
93
96 ANA_MSG_INFO(
"Number of events in the file" <<
static_cast<int>(
event.getEntries()));
97
98
100
101
102 Long64_t
entries =
event.getEntries();
103 if( argc > 3 ) {
104 const Long64_t
e = atoll( argv[ 3 ] );
106 }
107
108
109#ifdef XAOD_STANDALONE
110 StatusCode::enableFailure();
111#endif
112
113 ANA_MSG_INFO(
"Initialize the standard instance of the tool");
118
119 ANA_CHECK( IsoSelectionTool.setProperty(
"OutputLevel", MSG::DEBUG) );
120 ANA_CHECK( IsoSelectionTool.initialize() );
121
122 ANA_MSG_INFO(
"Initialize the low-Pt augmentation (PLV-only)");
124 ANA_CHECK( IsoSelectionTool_lowPt.setProperty(
"OutputLevel", MSG::DEBUG) );
125 ANA_CHECK( IsoSelectionTool_lowPt.initialize() );
126
127 std::string m_sgKeyPhotons("Photons");
128 std::string m_sgKeyElectrons("Electrons");
129 std::string m_sgKeyMuons("Muons");
130
131
134 event.getEntry( entry );
135
138 ANA_MSG_INFO(
" Number of pre-selected photons: " << (
int)photons->size());
139
140 for (auto ph : *photons) {
141 if (ph->caloCluster() == nullptr) continue;
142 if (ph->pt() <
PhotonPt || std::abs(ph->caloCluster()->eta()) >
PhotonEta)
continue;
143
144 if (IsoSelectionTool.accept( *ph ))
145 ANA_MSG_INFO(Form(
" --> Photon (pt=%.1f, eta=%.3f, phi=%.3f) PASSES Isolation %s",ph->pt(),ph->eta(),ph->phi(),
PhotonIso.c_str()));
146 else
147 ANA_MSG_INFO(Form(
" --> Photon (pt=%.1f, eta=%.3f, phi=%.3f) FAILS Isolation %s",ph->pt(),ph->eta(),ph->phi(),
PhotonIso.c_str()));
148 continue;
149 }
150
154
155 for (auto el : *electrons) {
156 if (
el->caloCluster() ==
nullptr)
continue;
158 if(
ElectronIso.find(
"PLV") != std::string::npos)
ANA_CHECK( IsoSelectionTool_lowPt.augmentPLV(*el) );
159
160 if (IsoSelectionTool.accept( *el ))
162 else
164 continue;
165 }
166
169 ANA_MSG_INFO(
" Number of pre-selected muons: " << (
int)muons->size());
170
171 for (auto mu : *muons) {
173 if(
MuonIso.find(
"PLV") != std::string::npos)
ANA_CHECK( IsoSelectionTool_lowPt.augmentPLV(*mu) );
174
175 if (IsoSelectionTool.accept( *mu ))
176 ANA_MSG_INFO(Form(
" --> Muon (pt=%.1f, eta=%.3f, phi=%.3f) PASSES Isolation %s",
mu->pt(),
mu->eta(),
mu->phi(),
MuonIso.c_str()));
177 else
178 ANA_MSG_INFO(Form(
" --> Muon (pt=%.1f, eta=%.3f, phi=%.3f) FAILS Isolation %s",
mu->pt(),
mu->eta(),
mu->phi(),
MuonIso.c_str()));
179 continue;
180 }
181
182 continue;
183 }
184
185 auto end = std::time(
nullptr);
187
188 return EXIT_SUCCESS;
189}
Tool for accessing xAOD files outside of Athena.
@ kClassAccess
Access auxiliary data using the aux containers.
A relatively simple transient store for objects created in analysis.
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.
PhotonContainer_v1 PhotonContainer
Definition of the current "photon container version".
ElectronContainer_v1 ElectronContainer
Definition of the current "electron container version".
MuonContainer_v1 MuonContainer
Definition of the current "Muon container version".