ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
TruthParticleID
McParticleTools
src
GenAodValidationTool.h
Go to the documentation of this file.
1
2
3
/*
4
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
// GenAodValidationTool.h
8
// Header file for class GenAodValidationTool
9
// Author: S.Binet<binet@cern.ch>
11
#ifndef MCPARTICLETOOLS_GENAODVALIDATIONTOOL_H
12
#define MCPARTICLETOOLS_GENAODVALIDATIONTOOL_H
13
14
// STL includes
15
#include <string>
16
#include <fstream>
17
18
// FrameWork includes
19
#include "GaudiKernel/ToolHandle.h"
20
21
// McParticleTools includes
22
#include "
TruthParticleValidationBaseTool.h
"
23
#include "
TruthIO/IIOHepMcTool.h
"
24
25
// Forward declaration
26
class
McEventCollection
;
27
#include "
AtlasHepMC/GenParticle_fwd.h
"
28
#include "
AtlasHepMC/GenVertex_fwd.h
"
29
#include "
AtlasHepMC/GenEvent_fwd.h
"
30
31
class
GenAodValidationTool
:
public
TruthParticleValidationBaseTool
32
{
33
35
// Public methods:
37
public
:
38
39
// Copy constructor:
40
42
GenAodValidationTool
(
const
std::string&
type
,
43
const
std::string& name,
44
const
IInterface* parent );
45
47
virtual
~GenAodValidationTool
();
48
50
// Const methods:
52
54
// Non-const methods:
56
58
// Protected methods:
60
protected
:
61
64
GenAodValidationTool
();
65
66
// to be implemented (if needed) by derived classes
67
virtual
StatusCode
initializeTool
();
68
virtual
StatusCode
finalizeTool
();
69
73
virtual
StatusCode
executeTool
();
74
79
virtual
StatusCode
executeTool
(
const
McEventCollection
* refMcEvents,
80
const
McEventCollection
* checkMcEvents );
81
86
virtual
StatusCode
executeTool
(
const
HepMC::GenEvent
* refMcEvents,
87
const
HepMC::GenEvent
* checkMcEvents );
88
93
bool
compareVtx
(
const
HepMC::ConstGenVertexPtr
& vtx1,
94
const
HepMC::ConstGenVertexPtr
& vtx2 )
const
;
95
103
bool
compareParts
(
const
HepMC::ConstGenParticlePtr
& p1,
104
const
HepMC::ConstGenParticlePtr
& p2 )
const
;
105
109
StatusCode
setupHepMcWriterTools
();
110
112
// Protected data:
114
protected
:
115
118
StringProperty
m_refMcEventsName
;
119
122
StringProperty
m_checkMcEventsName
;
123
127
StringProperty
m_hardVtxOutFileName
;
128
131
std::ofstream *
m_outFile
;
132
135
typedef
ToolHandle<IIOHepMcTool>
HepMcTool_t
;
136
139
HepMcTool_t
m_refMcEventWriter
;
140
143
HepMcTool_t
m_checkMcEventWriter
;
144
145
};
146
147
#endif
//> MCPARTICLETOOLS_GENAODVALIDATIONTOOL_H
GenEvent_fwd.h
GenParticle_fwd.h
GenVertex_fwd.h
IIOHepMcTool.h
TruthParticleValidationBaseTool.h
GenAodValidationTool::initializeTool
virtual StatusCode initializeTool()
Non-const methods:
Definition
GenAodValidationTool.cxx:96
GenAodValidationTool::HepMcTool_t
ToolHandle< IIOHepMcTool > HepMcTool_t
shorthand for lazy people (good coders are lazy people, aren't they ?)
Definition
GenAodValidationTool.h:135
GenAodValidationTool::compareParts
bool compareParts(const HepMC::ConstGenParticlePtr &p1, const HepMC::ConstGenParticlePtr &p2) const
Check that 2 given particles are the same:
Definition
GenAodValidationTool.cxx:307
GenAodValidationTool::setupHepMcWriterTools
StatusCode setupHepMcWriterTools()
Request pointers to the HepMcWriterTools to be able to write out HepMC::GenEvent for further comparis...
Definition
GenAodValidationTool.cxx:353
GenAodValidationTool::executeTool
virtual StatusCode executeTool()
Main method to perform the validation.
Definition
GenAodValidationTool.cxx:132
GenAodValidationTool::GenAodValidationTool
GenAodValidationTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
GenAodValidationTool.cxx:41
GenAodValidationTool::m_hardVtxOutFileName
StringProperty m_hardVtxOutFileName
Name of the output text file which will contain the hard-scattering vertices.
Definition
GenAodValidationTool.h:127
GenAodValidationTool::finalizeTool
virtual StatusCode finalizeTool()
Definition
GenAodValidationTool.cxx:125
GenAodValidationTool::m_checkMcEventWriter
HepMcTool_t m_checkMcEventWriter
Tool to write the 'to-be-checked' HepMC::GenEvent into a dedicated file.
Definition
GenAodValidationTool.h:143
GenAodValidationTool::compareVtx
bool compareVtx(const HepMC::ConstGenVertexPtr &vtx1, const HepMC::ConstGenVertexPtr &vtx2) const
Check that 2 given vertices are the same:
Definition
GenAodValidationTool.cxx:269
GenAodValidationTool::m_checkMcEventsName
StringProperty m_checkMcEventsName
Location of the 'to-be-validated' McEventCollection.
Definition
GenAodValidationTool.h:122
GenAodValidationTool::m_outFile
std::ofstream * m_outFile
Pointer to the output text file containing hard-scattering vertices.
Definition
GenAodValidationTool.h:131
GenAodValidationTool::GenAodValidationTool
GenAodValidationTool()
Default constructor:
GenAodValidationTool::~GenAodValidationTool
virtual ~GenAodValidationTool()
Destructor:
Definition
GenAodValidationTool.cxx:79
GenAodValidationTool::m_refMcEventsName
StringProperty m_refMcEventsName
Location of the reference McEventCollection.
Definition
GenAodValidationTool.h:118
GenAodValidationTool::m_refMcEventWriter
HepMcTool_t m_refMcEventWriter
Tool to write the reference HepMC::GenEvent into a dedicated file.
Definition
GenAodValidationTool.h:139
McEventCollection
This defines the McEventCollection, which is really just an ObjectVector of McEvent objectsFile: Gene...
Definition
McEventCollection.h:31
TruthParticleValidationBaseTool::TruthParticleValidationBaseTool
TruthParticleValidationBaseTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
TruthParticleValidationBaseTool.cxx:27
HepMC::ConstGenParticlePtr
HepMC3::ConstGenParticlePtr ConstGenParticlePtr
Definition
GenParticle.h:20
HepMC::ConstGenVertexPtr
HepMC3::ConstGenVertexPtr ConstGenVertexPtr
Definition
GenVertex.h:24
HepMC::GenEvent
HepMC3::GenEvent GenEvent
Definition
GenEvent.h:39
type
Generated on
for ATLAS Offline Software by
1.17.0