ATLAS Offline Software
JetRecTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // JetRecTool.cxx
6 
7 #include "JetRec/JetRecTool.h"
8 #include <iomanip>
10 #ifndef GENERATIONBASE
12 #endif //GENERATIONBASE
13 #include <fstream>
14 
16 #include "JetEDM/FastJetLink.h"
18 
21 #include <algorithm>
22 
25 
26 #if !defined (GENERATIONBASE) && !defined (XAOD_ANALYSIS)
28 #endif
29 
30 using ModifierArray = ToolHandleArray<IJetModifier>;
31 using ConsumerArray = ToolHandleArray<IJetConsumer>;
32 
33 using std::string;
34 using std::setw;
35 using std::fixed;
36 using std::setprecision;
37 using xAOD::JetContainer;
38 using xAOD::Jet;
39 
40 //**********************************************************************
41 
42 JetRecTool::JetRecTool(const std::string& myname)
43 : AsgTool(myname),
44  m_intool("",this),
45 #ifdef XAOD_ANALYSIS
46  m_hpjr("",this),
47 #else
48  m_hpjr("JetPseudojetRetriever/jpjr",this),
49 #endif
50  m_finder("",this),
51  m_groomer("",this),
52  m_trigger(false),
53  m_initCount(0),
54  m_find(false), m_groom(false), m_copy(false),
55  m_inputtype(xAOD::JetInput::Uncategorized),
56  m_ppjr(nullptr) {
57  declareProperty("InputTool", m_intool);
58  declareProperty("JetPseudojetRetriever", m_hpjr);
59  declareProperty("JetFinder", m_finder);
60  declareProperty("JetGroomer", m_groomer);
61  declareProperty("Trigger", m_trigger);
62 }
63 
64 //**********************************************************************
65 
67  ATH_MSG_INFO("Initializing JetRecTool " << name() << ".");
68  ++m_initCount;
69  // Fetch the reconstruction mode.
70  bool needinp = false;
71  bool needout = false;
72  string mode = "pseudojets";
73  if ( !m_outcoll.key().empty() ) {
74  m_outcolls.push_back(m_outcoll.key());
75  if ( ! m_finder.empty() ) {
76  mode = "find";
77  m_find = true;
78  needout = true;
79  if ( m_psjsin.empty() ) {
80  ATH_MSG_ERROR("Jet finding requested with no inputs.");
81  return StatusCode::FAILURE;
82  } else {
83  ATH_CHECK( m_psjsin.initialize() );
84  }
85  } else if ( ! m_groomer.empty() ) {
86  mode = "groom";
87  m_groom = true;
88  needinp = true;
89  needout = true;
90  ATH_CHECK(m_groomer.retrieve());
91  } else {
92  mode = "copy";
93  m_copy = true;
94  needinp = true;
95  needout = true;
96  }
97  }
98  else {
99  m_finder.disable();
100  m_groomer.disable();
101  }
102 
103  ATH_CHECK( m_psjsin.initialize() );
104  // Retrieve or create pseudojet retrieval tool.
105  if ( !m_hpjr.empty() ) {
106  if ( m_hpjr.retrieve().isSuccess() ) {
107  m_ppjr = &*m_hpjr;
108  } else {
109  ATH_MSG_ERROR("Unable to retrieve requested pseudojet retriever: " << m_hpjr.name());
110  }
111  } else {
112 #ifdef XAOD_STANDALONE
113  m_ppjr = new JetPseudojetRetriever(name()+"_retriever");
114 #else
115  m_ppjr = nullptr;
116 #endif
117  }
118  ATH_MSG_INFO("Jet reconstruction mode: " << mode);
119  // Check/set the input jet collection name.
120  if ( needinp ) {
121  if ( m_incoll.key().empty() ) {
122  if ( ! m_intool.retrieve() ) {
123  ATH_MSG_ERROR("Input collection must be specified.");
124  return StatusCode::FAILURE;
125  } else {
126  const AsgTool* pasgtool = dynamic_cast<const asg::AsgTool*>(&*m_intool);
127  if ( pasgtool != nullptr ) {
128  const string* pval = pasgtool->getProperty<std::string>("OutputContainer");
129  if ( pval != nullptr ) {
130  m_incoll = *pval;
131  }
132  }
133  if ( m_incoll.key().empty() ) {
134  ATH_MSG_ERROR("Input tool does not have output collection name.");
135  return StatusCode::FAILURE;
136  }
137  }
138  } else {
139  // Input DataHandles
140  ATH_CHECK( m_incoll.initialize() );
141  }
142  m_incolls.push_back(m_incoll.key());
143  }
144  // Check/set the output jet collection name.
145  if ( needout ) {
146  if ( m_outcoll.key().empty() ) {
147  ATH_MSG_ERROR("Output collection must be specified.");
148  return StatusCode::FAILURE;
149  } else {
150  // Output DataHandle
151  ATH_CHECK( m_outcoll.initialize() );
152  }
153  }
154  // Other checks.
155  if ( m_find ) {
156  if ( m_psjsin.empty() ) {
157  ATH_MSG_ERROR("Jet finding requested with no inputs.");
158  return StatusCode::FAILURE;
159  }
160  } else if ( m_groom ) {
161  m_groomer->setPseudojetRetriever(m_ppjr);
162  } else if ( m_copy ) {
163  } else {
164  if ( m_psjsin.empty() ) {
165  ATH_MSG_ERROR("No action requested.");
166  return StatusCode::FAILURE;
167  }
168  }
169  // Parse the pseudojet inputs
170  StatusCode rstat = StatusCode::SUCCESS;
171  string prefix = "--- ";
172  ATH_MSG_INFO(prefix << "JetRecTool " << name() << " has " << m_psjsin.size()
173  << " pseudojet inputs.");
174  for ( size_t ilab(0); ilab<m_psjsin.size(); ++ilab ) {
175  const std::string& pjcontname = m_psjsin[ilab].key();
176  if(pjcontname.size()<9) {
177  ATH_MSG_ERROR("Invalid pseudojet container name " << pjcontname);
178  ATH_MSG_ERROR("This must be of the form \"PseudoJet\"+label");
179  return StatusCode::FAILURE;
180  }
181  std::string label = pjcontname.substr(9);
182  ATH_MSG_INFO(prefix << " " << label << " --> " << pjcontname);
183  // Extract the input type from the first getter.
184  if ( ilab == 0 ) {
185  ATH_MSG_INFO(prefix << "Extracting input type from primary label.");
186  ATH_MSG_INFO(prefix << "Input label: " << label);
188  } else {
189  m_ghostlabs.push_back(label);
190  }
191  }
192  ATH_MSG_INFO(prefix << "Input type: " << m_inputtype);
193  // Fetch the jet modifiers.
194  ATH_MSG_INFO(prefix << "JetRecTool " << name() << " has " << m_modifiers.size()
195  << " jet modifiers.");
196  ATH_CHECK(m_modifiers.retrieve());
197 
198  // Fetch the jet consumers.
199  ATH_MSG_INFO(prefix << "JetRecTool " << name() << " has " << m_consumers.size()
200  << " jet consumers.");
201  ATH_CHECK(m_consumers.retrieve());
202 
203  ATH_MSG_INFO(prefix << "Input collection names:");
204  for (const auto& name : m_incolls) ATH_MSG_INFO(prefix << " " << name);
205  ATH_MSG_INFO(prefix << "Output collection names:");
206  for (const auto& name : m_outcolls) ATH_MSG_INFO(prefix << " " << name);
207 
208 #if !defined (GENERATIONBASE) && !defined (XAOD_ANALYSIS)
209  if (!m_monTool.empty()) ATH_CHECK(m_monTool.retrieve());
210 #endif
211 
212  return rstat;
213 }
214 
215 //**********************************************************************
216 
218  if ( m_initCount == 0 ) {
219  ATH_MSG_WARNING("Build requested before initialization.");
220  return nullptr;
221  }
222  ATH_MSG_DEBUG("Building jets with " << name() << ".");
223 
224  std::unique_ptr<xAOD::JetContainer> pjets = fillOutputContainer();
225 
227 
228  // Record the jet collection.
229  if(m_trigger){
230  #ifndef GENERATIONBASE
231  std::unique_ptr<xAOD::JetTrigAuxContainer> pjetsaux(dynamic_cast<xAOD::JetTrigAuxContainer*>( pjets->getStore() ));
232  ATH_MSG_DEBUG("Check Aux store: " << pjets.get() << " ... " << &pjets->auxbase() << " ... " << pjetsaux.get() );
233  if ( pjetsaux.get() == nullptr ) {
234  ATH_MSG_ERROR("Unable to retrieve Aux container");
235  return nullptr;
236  }
237  ATH_MSG_VERBOSE("Recording new Jet and Aux container.");
238  if(jetsHandle.record(std::move(pjets), std::move(pjetsaux)).isFailure()){
239  // TODO - put this back how it was
240  ATH_MSG_ERROR("Unable to write new Jet collection and aux store to event store: " << m_outcoll.key());
241  return nullptr;
242  }
243  #endif
244  }
245  else{
246  std::unique_ptr<xAOD::JetAuxContainer> pjetsaux(dynamic_cast<xAOD::JetAuxContainer*>( pjets->getStore() ));
247  ATH_MSG_DEBUG("Check Aux store: " << pjets.get() << " ... " << &pjets->auxbase() << " ... " << pjetsaux.get() );
248  if ( pjetsaux.get() == nullptr ) {
249  ATH_MSG_ERROR("Unable to retrieve Aux container");
250  return nullptr;
251  }
252  ATH_MSG_VERBOSE("Recording new Jet and Aux container.");
253  if(jetsHandle.record(std::move(pjets), std::move(pjetsaux)).isFailure()){
254  ATH_MSG_ERROR("Unable to write new Jet collection and aux store to event store: " << m_outcoll.key());
255  return nullptr;
256  }
257  }
258  ATH_MSG_DEBUG("Created new Jet collection in event store: " << m_outcoll.key());
259 
260  // Modify jets.
261  unsigned int nmod = m_modifiers.size();
262  if ( nmod ) {
263  if ( !jetsHandle.isValid() ) {
264  ATH_MSG_WARNING("There is no jet collection to modify.");
265  } else {
266  ATH_MSG_DEBUG("Executing " << nmod << " jet modifiers.");
267  for ( ModifierArray::const_iterator imod=m_modifiers.begin();
268  imod!=m_modifiers.end(); ++imod ) {
269  ATH_MSG_DEBUG(" Executing modifier " << imod->name());
270  ATH_MSG_VERBOSE(" @ " << *imod);
271  if((*imod)->modify(*jetsHandle).isFailure())
272  ATH_MSG_DEBUG(" Modifier returned FAILURE!");
273  }
274  }
275  }
276 
277  // Consume jets.
278  unsigned int ncon = m_consumers.size();
279  if ( ncon ) {
280  if ( !jetsHandle.isValid() ) {
281  ATH_MSG_WARNING("There is no jet collection to consume");
282  } else {
283  ATH_MSG_DEBUG("Executing " << ncon << " jet consumers.");
284  for ( ConsumerArray::const_iterator icon=m_consumers.begin();
285  icon!=m_consumers.end(); ++icon ) {
286  ATH_MSG_DEBUG(" Executing consumer " << icon->name());
287  ATH_MSG_VERBOSE(" @ " << *icon);
288  (*icon)->process(*jetsHandle) ;
289  }
290  }
291  }
292 
293 
294 #if !defined (GENERATIONBASE) && !defined (XAOD_ANALYSIS)
295  // monitor jet multiplicity and basic jet kinematics
296  auto njets = Monitored::Scalar<int>("JET_n");
297  auto pt = Monitored::Collection("JET_pt", *jetsHandle, [c=m_mevtogev]( const xAOD::Jet* jet ) { return jet->pt()*c; });
298  auto et = Monitored::Collection("JET_et", *jetsHandle, [c=m_mevtogev]( const xAOD::Jet* jet ) { return jet->p4().Et()*c; });
299  auto mass = Monitored::Collection("JET_m", *jetsHandle, [c=m_mevtogev]( const xAOD::Jet* jet ) { return jet->m()*c; });
300  auto eta = Monitored::Collection("JET_eta", *jetsHandle, []( const xAOD::Jet* jet ) { return jet->eta(); });
301  auto phi = Monitored::Collection("JET_phi", *jetsHandle, []( const xAOD::Jet* jet ) { return jet->phi(); });
302  auto mon = Monitored::Group(m_monTool,njets,pt,et,mass,eta,phi);
303  njets = jetsHandle->size();
304 #endif
305 
306  return jetsHandle.isValid() ? &(*jetsHandle) : nullptr;
307 }
308 
309 //**********************************************************************
310 
311 int JetRecTool::execute() const {
312  if ( m_initCount == 0 ) {
313  ATH_MSG_WARNING("Execute requested before initialization.");
314  return 1;
315  }
316 
317  if ( build() == nullptr ) {
318  ATH_MSG_ERROR("Unable to retrieve container");
319  return 1;
320  }
321  return 0;
322 }
323 
324 //**********************************************************************
325 
326 void JetRecTool::print() const {
327  ATH_MSG_INFO("Properties for JetRecTool " << name());
328 
329  ATH_MSG_INFO(" OutputContainer: " << m_outcoll.key());
330  if ( m_incoll.key().empty() ) ATH_MSG_INFO(" InputContainer is not defined");
331  else ATH_MSG_INFO(" InputContainer: " << m_incoll.key());
332  if ( m_intool.empty() ) {
333  ATH_MSG_INFO(" InputTool is not defined");
334  } else {
335  ATH_MSG_INFO(" InputTool: " << m_intool->name());
336  }
337  if ( !m_psjsin.empty() ) {
338  ATH_MSG_INFO(" InputPseudoJet container count is " << m_psjsin.size());
339  for ( const auto& pjcontkey : m_psjsin ) {
340  ATH_MSG_INFO(" " << pjcontkey.key());
341  }
342  }
343  if ( m_finder.empty() ) {
344  ATH_MSG_INFO(" Jet finder is not defined");
345  } else {
346  ATH_MSG_INFO(" Jet finder: " << m_finder->name());
347  m_finder->print();
348  ATH_MSG_INFO(" Input type: " << m_inputtype);
349  ATH_MSG_INFO(" There are " << m_ghostlabs.size() << " ghost labels:");
350  for ( const string& lab : m_ghostlabs ) ATH_MSG_INFO(" " << lab);
351  }
352  if ( m_groomer.empty() ) {
353  ATH_MSG_INFO(" Jet groomer is not defined");
354  } else {
355  ATH_MSG_INFO(" Jet groomer: " << m_groomer->name());
356  m_groomer->print();
357  }
358  if ( !m_modifiers.empty() ) {
359  ATH_MSG_INFO(" Modifier count is " << m_modifiers.size());
360  for ( ModifierArray::const_iterator imod=m_modifiers.begin();
361  imod!=m_modifiers.end(); ++imod ) {
362  ATH_MSG_INFO(" Modifier " << imod->name());
363  if ( msgLvl(MSG::DEBUG) ) {
364  ToolHandle<IJetModifier> hmod = *imod;
365  hmod->print();
366  }
367  }
368  }
369 }
370 
371 //**********************************************************************
372 
373 int JetRecTool::inputContainerNames(std::vector<std::string>& connames) {
374  if ( m_initCount == 0 ) {
375  ATH_MSG_WARNING("Input container list requested before initialization.");
376  return 1;
377  }
378  connames.insert(connames.end(), m_incolls.begin(), m_incolls.end());
379  return 0;
380 }
381 
382 //**********************************************************************
383 
384 int JetRecTool::outputContainerNames(std::vector<std::string>& connames) {
385  if ( m_initCount == 0 ) {
386  ATH_MSG_WARNING("Output container list requested before initialization.");
387  return 1;
388  }
389  connames.insert(connames.end(), m_outcolls.begin(), m_outcolls.end());
390  return 0;
391 }
392 
393 //**********************************************************************
394 
397  }
398 
399 //**********************************************************************
400 
401 std::unique_ptr<PseudoJetContainer> JetRecTool::collectPseudoJets() const{
402  // PseudoJetContainer used for jet finding
403 
404  auto allPseudoJets = std::make_unique<PseudoJetContainer>();
405 
406  ATH_MSG_DEBUG("Fetching pseudojet inputs.");
407 
408  for (const auto& pjcontkey : m_psjsin) {
409  SG::ReadHandle<PseudoJetContainer> h_newpsjs( pjcontkey );
410  ATH_MSG_DEBUG("Adding PseudoJetContainers for: " << h_newpsjs.key());
411  if(! h_newpsjs.isValid()) {
412  ATH_MSG_ERROR("Retrieval of PseudoJetContainer "
413  << h_newpsjs.key() << " failed");
414  return nullptr;
415  }
416  allPseudoJets->append(h_newpsjs.get());
417  }
418 
419  return allPseudoJets;
420 }
421 
422 //**********************************************************************
423 
424 std::unique_ptr<xAOD::JetContainer> JetRecTool::fillOutputContainer() const{
425 
426  if (!m_finder.empty()) {return findJets();}
427  if (!m_groomer.empty()) {return groomJets();}
428  return copyJets();
429 }
430 
431 //**********************************************************************
432 
434 
435  const xAOD::JetContainer* pjetsin{nullptr};
436  auto handle_in = SG::makeHandle (m_incoll);
437  if ( !m_incoll.key().empty() && handle_in.isValid()) {
438  pjetsin = handle_in.cptr();
439  }
440  if ( pjetsin == nullptr && !m_intool.empty() ) {
441  ATH_MSG_DEBUG("Executing input tool.");
442  if ( m_intool->execute() ) {
443  ATH_MSG_WARNING("Input tool execution failed.");
444  }
445  }
446 
447  if ( pjetsin == nullptr ) {
448  ATH_MSG_ERROR("Unable to retrieve input jet container: " << m_incoll.key());
449  } else {
450  ATH_MSG_DEBUG("Input collection " << m_incoll.key()
451  << " jet multiplicity is "<< pjetsin->size());
452  }
453  return pjetsin;
454 }
455 
456 //**********************************************************************
457 
458 std::unique_ptr<xAOD::JetContainer> JetRecTool::makeOutputContainer() const{
459  ATH_MSG_DEBUG("Creating output container.");
460 
461  auto pjets = std::make_unique<xAOD::JetContainer>();
462 
463  if ( !m_outcoll.key().empty() ) {
464  if(m_trigger) {
465  ATH_MSG_DEBUG("Attaching online Aux container.");
466 #ifndef GENERATIONBASE
467  pjets->setStore(new xAOD::JetTrigAuxContainer);
468 #endif
469  } else {
470  ATH_MSG_DEBUG("Attaching offline Aux container.");
471  pjets->setStore(new xAOD::JetAuxContainer);
472  }
473  }
474  return pjets;
475 }
476 
477 //**********************************************************************
478 
479 std::unique_ptr<xAOD::JetContainer> JetRecTool::findJets() const {
480 
481  ATH_MSG_DEBUG("Finding jets.");
482 
483  // The new jet collection.
484  auto jets = makeOutputContainer();
485 
486  // PseudoJetContainer used for jet finding
487  auto pseudoJets = collectPseudoJets();
488 
489  m_finder->find(*pseudoJets, *jets, m_inputtype);
490 
491  return jets;
492 }
493 
494 //**********************************************************************
495 
496 std::unique_ptr<xAOD::JetContainer> JetRecTool::groomJets() const{
497 
498  // The new jet collection.
499  auto jets = makeOutputContainer();
500 
501  // Retrieve the old jet collection.
502  const auto *jetsIn = getOldJets();
503 
504  if(jetsIn == nullptr){
505  ATH_MSG_WARNING("Grooming: but input jets not found ");
506  return jets;
507  }
508 
509  ATH_MSG_DEBUG("Grooming " << jetsIn->size() << " jets.");
510 
511  // PseudoJetContainer used for jet finding
512  auto pseudoJets = collectPseudoJets();
513 
514  for (const auto *const ijet : *jetsIn){ m_groomer->groom(*ijet,
515  *pseudoJets,
516  *jets);}
517 
518  return jets;
519 }
520 
521 //**********************************************************************
522 
523 std::unique_ptr<xAOD::JetContainer> JetRecTool::copyJets() const{
524 
525  // The new jet collection.
526  auto jets = makeOutputContainer();
527 
528  // Retrieve the old jet collection.
529  const auto *jetsIn = getOldJets();
530 
531  if(jetsIn == nullptr){
532  ATH_MSG_WARNING("Copying: but input jets not found ");
533  return jets;
534  }
535 
536 
537  ATH_MSG_DEBUG("Copying " << jetsIn->size() << " jets.");
538 
539  for (const Jet* poldjet : *jetsIn) {
540  Jet* pnewjet = new Jet;
541  jets->push_back(pnewjet);
542  *pnewjet = *poldjet;
543  }
544 
545  return jets;
546 }
WriteHandle.h
Handle class for recording to StoreGate.
JetRecTool::build
virtual const xAOD::JetContainer * build() const override
Retrieve inputs with tools and construct new jet collection.
Definition: JetRecTool.cxx:217
et
Extra patterns decribing particle interation process.
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
TrigDefs::Group
Group
Properties of a chain group.
Definition: GroupProperties.h:13
JetRecTool::m_find
bool m_find
Definition: JetRecTool.h:136
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
JetRecTool::inputContainerNames
int inputContainerNames(std::vector< std::string > &connames) override
Method to return the list of input containers.
Definition: JetRecTool.cxx:373
Jet
Basic data class defines behavior for all Jet objects The Jet class is the principal data class for...
Definition: Reconstruction/Jet/JetEvent/JetEvent/Jet.h:47
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
PlotCalibFromCool.label
label
Definition: PlotCalibFromCool.py:78
JetRecTool::findJets
std::unique_ptr< xAOD::JetContainer > findJets() const
Definition: JetRecTool.cxx:479
test_pyathena.pt
pt
Definition: test_pyathena.py:11
JetTrigAuxContainer.h
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
JetRecTool::print
void print() const override
Display the configuration.
Definition: JetRecTool.cxx:326
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
asg::AsgTool::getProperty
const T * getProperty(const std::string &name) const
Get one of the tool's properties.
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
JetRecTool::JetRecTool
JetRecTool(const std::string &myname)
Definition: JetRecTool.cxx:42
JetRecTool::m_copy
bool m_copy
Definition: JetRecTool.h:138
dqt_zlumi_pandas.mass
mass
Definition: dqt_zlumi_pandas.py:170
JetRecTool::initialize
StatusCode initialize() override
Initialization. Check all tools here.
Definition: JetRecTool.cxx:66
xAOD::JetInput::inputType
Type inputType(const std::string &n)
Definition: JetContainerInfo.cxx:208
Monitored::Collection
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
Definition: MonitoredCollection.h:38
DataVector::auxbase
const SG::AuxVectorBase & auxbase() const
Convert to AuxVectorBase.
ModifierArray
ToolHandleArray< IJetModifier > ModifierArray
Definition: JetRecTool.cxx:30
JetRecTool::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: JetRecTool.h:149
JetRecTool::m_incoll
SG::ReadHandleKey< xAOD::JetContainer > m_incoll
Definition: JetRecTool.h:122
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
xAOD::JetTrigAuxContainer_v2
Temporary container used until we have I/O for AuxStoreInternal.
Definition: JetTrigAuxContainer_v2.h:36
JetRecTool::m_trigInputJetsForGrooming
const xAOD::JetContainer * m_trigInputJetsForGrooming
Definition: JetRecTool.h:146
asg::AsgTool::AsgTool
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition: AsgTool.cxx:58
xAOD::JetAuxContainer_v1
Temporary container used until we have I/O for AuxStoreInternal.
Definition: JetAuxContainer_v1.h:37
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
JetRecTool::m_ppjr
const IJetPseudojetRetriever * m_ppjr
Definition: JetRecTool.h:143
JetRecTool::m_finder
ToolHandle< IJetFinder > m_finder
Definition: JetRecTool.h:128
JetRecTool::m_groom
bool m_groom
Definition: JetRecTool.h:137
JetPseudojetRetriever.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SG::ReadHandle::get
const_pointer_type get() const
Dereference the pointer, but don't cache anything.
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
JetRecTool::groomJets
std::unique_ptr< xAOD::JetContainer > groomJets() const
Definition: JetRecTool.cxx:496
JetRecTool::m_groomer
ToolHandle< IJetGroomer > m_groomer
Definition: JetRecTool.h:129
JetRecTool::m_inputtype
xAOD::JetInput::Type m_inputtype
Definition: JetRecTool.h:139
JetRecTool::m_outcoll
SG::WriteHandleKey< xAOD::JetContainer > m_outcoll
Definition: JetRecTool.h:121
JetRecTool::m_outcolls
std::vector< std::string > m_outcolls
Definition: JetRecTool.h:142
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Preparation.mode
mode
Definition: Preparation.py:95
JetPseudojetRetriever
Definition: JetPseudojetRetriever.h:23
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
JetRecTool::fillOutputContainer
std::unique_ptr< xAOD::JetContainer > fillOutputContainer() const
Definition: JetRecTool.cxx:424
JetRecTool.h
Monitored.h
Header file to be included by clients of the Monitored infrastructure.
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
JetRecTool::m_modifiers
ToolHandleArray< IJetModifier > m_modifiers
Definition: JetRecTool.h:130
JetRecTool::m_incolls
std::vector< std::string > m_incolls
Definition: JetRecTool.h:141
JetRecTool::m_consumers
ToolHandleArray< IJetConsumer > m_consumers
Definition: JetRecTool.h:131
SG::WriteHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
JetRecTool::setInputJetContainer
void setInputJetContainer(const xAOD::JetContainer *cont)
For trigger usage in grooming mode only : give the input ungroomed jet container.
Definition: JetRecTool.cxx:395
ReadHandle.h
Handle class for reading from StoreGate.
SG::VarHandleBase::key
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleBase.cxx:64
JetRecTool::m_initCount
int m_initCount
Definition: JetRecTool.h:135
JetRecTool::m_intool
ToolHandle< IJetExecuteTool > m_intool
Definition: JetRecTool.h:126
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
JetRecTool::getOldJets
const xAOD::JetContainer * getOldJets() const
Definition: JetRecTool.cxx:433
PseudoJetContainer.h
ConsumerArray
ToolHandleArray< IJetConsumer > ConsumerArray
Definition: JetRecTool.cxx:31
SG::WriteHandle::record
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
DEBUG
#define DEBUG
Definition: page_access.h:11
plotBeamSpotMon.mon
mon
Definition: plotBeamSpotMon.py:67
JetAuxContainer.h
JetRecTool::copyJets
std::unique_ptr< xAOD::JetContainer > copyJets() const
Definition: JetRecTool.cxx:523
JetRecTool::m_trigger
bool m_trigger
Definition: JetRecTool.h:132
defineDB.jets
list jets
Definition: JetTagCalibration/share/defineDB.py:24
IParticleHelpers.h
xAOD::JetContainer
JetContainer_v1 JetContainer
Definition of the current "jet container version".
Definition: JetContainer.h:17
JetRecTool::outputContainerNames
int outputContainerNames(std::vector< std::string > &connames) override
Method to return the list of output containers.
Definition: JetRecTool.cxx:384
JetRecTool::m_hpjr
ToolHandle< IJetPseudojetRetriever > m_hpjr
Definition: JetRecTool.h:127
Jet_PseudoJet.icc
Monitored::Scalar
Declare a monitored scalar variable.
Definition: MonitoredScalar.h:34
JetRecTool::m_psjsin
SG::ReadHandleKeyArray< PseudoJetContainer > m_psjsin
Definition: JetRecTool.h:124
python.compressB64.c
def c
Definition: compressB64.py:93
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
JetRecTool::makeOutputContainer
std::unique_ptr< xAOD::JetContainer > makeOutputContainer() const
Definition: JetRecTool.cxx:458
JetRecTool::execute
int execute() const override
Call build and put jets in event store.
Definition: JetRecTool.cxx:311
xAOD::Jet
Jet_v1 Jet
Definition of the current "jet version".
Definition: Event/xAOD/xAODJet/xAODJet/Jet.h:17
xAOD::JetInput::Uncategorized
@ Uncategorized
Definition: JetContainerInfo.h:100
JetRecTool::m_mevtogev
const double m_mevtogev
Definition: JetRecTool.h:156
JetRecTool::m_ghostlabs
IJetFinder::NameList m_ghostlabs
Definition: JetRecTool.h:140
JetRecTool::collectPseudoJets
std::unique_ptr< PseudoJetContainer > collectPseudoJets() const
Definition: JetRecTool.cxx:401