ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
ISF::ValidationTruthStrategy Class Referencefinal

#include <ValidationTruthStrategy.h>

Inheritance diagram for ISF::ValidationTruthStrategy:
Collaboration diagram for ISF::ValidationTruthStrategy:

Public Member Functions

 ValidationTruthStrategy (const std::string &t, const std::string &n, const IInterface *p)
 Constructor with parameters. More...
 
 ~ValidationTruthStrategy ()
 Destructor. More...
 
virtual StatusCode initialize () override
 
virtual StatusCode finalize () override
 
virtual bool pass (ITruthIncident &incident) const override
 true if the ITruthStrategy implementation applies to the given ITruthIncident More...
 
virtual bool appliesToRegion (unsigned short geoID) const override
 

Private Attributes

double m_minParentP2
 cuts on the parent particle More...
 
IntegerArrayProperty m_regionListProperty
 

Detailed Description

This truth strategy is used to record a high number of interaction processes. In the end the MC truth output will be used for the validation of various fast simulators.

Author
Elmar.Ritsch -at- cern.ch

Definition at line 28 of file ValidationTruthStrategy.h.

Constructor & Destructor Documentation

◆ ValidationTruthStrategy()

ISF::ValidationTruthStrategy::ValidationTruthStrategy ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

Constructor with parameters.

Constructor.

Definition at line 17 of file ValidationTruthStrategy.cxx.

17  :
18  base_class(t,n,p),
19  m_minParentP2(0.)
20 {
21  // parent particle minimum momentum
22  declareProperty("ParentMinP" , m_minParentP2 );
23  declareProperty("Regions" , m_regionListProperty );
24 }

◆ ~ValidationTruthStrategy()

ISF::ValidationTruthStrategy::~ValidationTruthStrategy ( )

Destructor.

Definition at line 27 of file ValidationTruthStrategy.cxx.

28 {
29 }

Member Function Documentation

◆ appliesToRegion()

bool ISF::ValidationTruthStrategy::appliesToRegion ( unsigned short  geoID) const
overridevirtual

Definition at line 64 of file ValidationTruthStrategy.cxx.

65 {
66  return std::find( m_regionListProperty.begin(),
68  geoID ) != m_regionListProperty.end();
69 }

◆ finalize()

StatusCode ISF::ValidationTruthStrategy::finalize ( )
overridevirtual

Definition at line 50 of file ValidationTruthStrategy.cxx.

51 {
52  ATH_MSG_VERBOSE("Finalizing ...");
53  return StatusCode::SUCCESS;
54 }

◆ initialize()

StatusCode ISF::ValidationTruthStrategy::initialize ( )
overridevirtual

Definition at line 32 of file ValidationTruthStrategy.cxx.

33 {
34  ATH_MSG_VERBOSE("Initializing ...");
35 
36  // (*) setup parent particle cuts
37  // -> compute p^2 for fast comparison
39 
40  for(auto region : m_regionListProperty.value()) {
41  if(region < AtlasDetDescr::fFirstAtlasRegion || region >= AtlasDetDescr::fNumAtlasRegions) {
42  ATH_MSG_ERROR("Unknown Region (" << region << ") specified. Please check your configuration.");
43  return StatusCode::FAILURE;
44  }
45  }
46 
47  return StatusCode::SUCCESS;
48 }

◆ pass()

bool ISF::ValidationTruthStrategy::pass ( ITruthIncident incident) const
overridevirtual

true if the ITruthStrategy implementation applies to the given ITruthIncident

Definition at line 56 of file ValidationTruthStrategy.cxx.

56  {
57 
58  // parent particle check
59  bool pass = ( ti.parentP2() >= m_minParentP2 );
60 
61  return pass;
62 }

Member Data Documentation

◆ m_minParentP2

double ISF::ValidationTruthStrategy::m_minParentP2
private

cuts on the parent particle

minimum parent particle momentum ^ 2

Definition at line 49 of file ValidationTruthStrategy.h.

◆ m_regionListProperty

IntegerArrayProperty ISF::ValidationTruthStrategy::m_regionListProperty
private

Definition at line 51 of file ValidationTruthStrategy.h.


The documentation for this class was generated from the following files:
AtlasDetDescr::fNumAtlasRegions
@ fNumAtlasRegions
Definition: AtlasRegion.h:39
ISF::ValidationTruthStrategy::pass
virtual bool pass(ITruthIncident &incident) const override
true if the ITruthStrategy implementation applies to the given ITruthIncident
Definition: ValidationTruthStrategy.cxx:56
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
ISF::ValidationTruthStrategy::m_minParentP2
double m_minParentP2
cuts on the parent particle
Definition: ValidationTruthStrategy.h:49
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
beamspotman.n
n
Definition: beamspotman.py:731
ISF::ValidationTruthStrategy::m_regionListProperty
IntegerArrayProperty m_regionListProperty
Definition: ValidationTruthStrategy.h:51