|
ATLAS Offline Software
|
Contains RootCore testing code for the overlap removal tools.
More...
Go to the source code of this file.
Contains RootCore testing code for the overlap removal tools.
At the beginning you will find some global accessors/decorators and selection functions. These are just for convenience and roughly simulate a "standard" object selection.
- Author
- Steve Farrell Steve.nosp@m.n.Fa.nosp@m.rrell.nosp@m.@cer.nosp@m.n.ch
Definition in file OverlapRemovalTester.cxx.
◆ CHECK
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 148 of file OverlapRemovalTester.cxx.
154 po::options_description optDesc(
"Allowed options");
155 optDesc.add_options()
156 (
"help,h",
"produce help message")
157 (
"input-file,i", po::value<std::string>()->required(),
158 "input xAOD file name")
159 (
"num-events,n", po::value<Long64_t>()->default_value(-1
ll),
160 "number of events to process")
161 (
"working-point,w", po::value<std::string>()->default_value(
"standard"),
164 po::variables_map vm;
166 if(vm.count(
"help")) {
167 std::cout << optDesc << std::endl;
174 std::cout <<
e.what() << std::endl;
180 StatusCode::enableFailure();
183 const auto fileName = vm[
"input-file"].as<std::string>();
193 Long64_t
entries =
event.getEntries();
194 Long64_t optEntries = vm[
"num-events"].as<Long64_t>();
203 const auto wp = vm[
"working-point"].as<std::string>();
204 if(
wp ==
"standard") {
206 }
else if(
wp ==
"HF") {
208 }
else if(
wp ==
"boosted") {
209 orFlags.boostedLeptons =
true;
210 }
else if(
wp ==
"boostedHF") {
212 orFlags.boostedLeptons =
true;
213 }
else if(
wp ==
"photonFavored") {
214 orFlags.doTaus =
false;
226 if(
wp ==
"photonFavored") {
242 unsigned int nTotalElectrons = 0;
243 unsigned int nTotalMuons = 0;
244 unsigned int nTotalJets = 0;
245 unsigned int nTotalTaus = 0;
246 unsigned int nTotalPhotons = 0;
247 unsigned int nSelectedElectrons = 0;
248 unsigned int nSelectedMuons = 0;
249 unsigned int nSelectedJets = 0;
250 unsigned int nSelectedTaus = 0;
251 unsigned int nSelectedPhotons = 0;
252 unsigned int nOverlapElectrons = 0;
253 unsigned int nOverlapMuons = 0;
254 unsigned int nOverlapJets = 0;
255 unsigned int nOverlapTaus = 0;
256 unsigned int nOverlapPhotons = 0;
259 std::cout <<
"Starting loop" << std::endl;
262 event.getEntry(
entry);
267 Info(
APP_NAME,
"===>>> Processing entry %lli, run %u, event %lu <<<===",
293 Info(
APP_NAME,
"nEle %lu, nMuo %lu, nJet %lu, nTau %lu, nPho %lu",
312 nSelectedElectrons++;
319 for(
auto muon : *muons){
341 for(
auto tau : *taus){
352 for(
auto photon : *photons){
362 Info(
APP_NAME,
"=====================================");
364 Info(
APP_NAME,
"Object count summaries: nOverlap / nSelected / nTotal");
366 nOverlapElectrons, nSelectedElectrons, nTotalElectrons);
368 nOverlapMuons, nSelectedMuons, nTotalMuons);
370 nOverlapJets, nSelectedJets, nTotalJets);
372 nOverlapTaus, nSelectedTaus, nTotalTaus);
373 Info(
APP_NAME,
"Number overlap photons: %5i / %5i / %5i",
374 nOverlapPhotons, nSelectedPhotons, nTotalPhotons);
◆ printObj()
◆ selectObjects()
template<class ContainerType >
void selectObjects |
( |
const ContainerType * |
container | ) |
|
◆ selectObjects< xAOD::JetContainer >()
◆ selectObjects< xAOD::TauJetContainer >()
◆ bJetDec
◆ bJetLabel
const std::string bJetLabel = "isBJet" |
◆ inputLabel
const std::string inputLabel = "selected" |
◆ objLinkAcc
◆ outputLabel
◆ outputPassValue
const bool outputPassValue = false |
◆ overlapAcc
◆ selectAcc
◆ selectDec
const std::string bJetLabel
uint64_t eventNumber() const
The current event's event number.
const ort::inputDecorator_t selectDec(inputLabel)
const std::string inputLabel
@ kAthenaAccess
Access containers/objects like Athena does.
const std::string outputLabel
StatusCode recommendedTools(const ORFlags &flags, ToolBox &toolBox)
Pre-configured standard recommended OR tools.
virtual Type::ObjectType type() const =0
The type of the object as a simple enumeration.
const ort::objLinkAccessor_t objLinkAcc("overlapObject")
Class providing the definition of the 4-vector interface.
uint32_t runNumber() const
The current event's run number.
const ort::inputAccessor_t selectAcc(inputLabel)
StatusCode readFrom(TFile *file)
POOL::TEvent event(POOL::TEvent::kClassAccess)
virtual double pt() const =0
The transverse momentum ( ) of the particle.
void selectObjects(const ContainerType *container)
Class describing the basic event information.
A relatively simple transient store for objects created in analysis.
A struct of global config options used to simplify the config helper interface.
StatusCode retrieve(const T *&obj)
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
const bool outputPassValue
Error
The different types of error that can be flagged in the L1TopoRDO.
void printObj(const char *APP_NAME, const char *type, const xAOD::IParticle *obj)
size_type size() const noexcept
Returns the number of elements in the collection.
Tool for accessing xAOD files outside of Athena.
const ort::outputAccessor_t overlapAcc(outputLabel)
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.