ATLAS Offline Software
Loading...
Searching...
No Matches
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
24
25// Forward declaration
30
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
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
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
140
144
145};
146
147#endif //> MCPARTICLETOOLS_GENAODVALIDATIONTOOL_H
virtual StatusCode initializeTool()
Non-const methods:
ToolHandle< IIOHepMcTool > HepMcTool_t
shorthand for lazy people (good coders are lazy people, aren't they ?)
bool compareParts(const HepMC::ConstGenParticlePtr &p1, const HepMC::ConstGenParticlePtr &p2) const
Check that 2 given particles are the same:
StatusCode setupHepMcWriterTools()
Request pointers to the HepMcWriterTools to be able to write out HepMC::GenEvent for further comparis...
virtual StatusCode executeTool()
Main method to perform the validation.
GenAodValidationTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
StringProperty m_hardVtxOutFileName
Name of the output text file which will contain the hard-scattering vertices.
virtual StatusCode finalizeTool()
HepMcTool_t m_checkMcEventWriter
Tool to write the 'to-be-checked' HepMC::GenEvent into a dedicated file.
bool compareVtx(const HepMC::ConstGenVertexPtr &vtx1, const HepMC::ConstGenVertexPtr &vtx2) const
Check that 2 given vertices are the same:
StringProperty m_checkMcEventsName
Location of the 'to-be-validated' McEventCollection.
std::ofstream * m_outFile
Pointer to the output text file containing hard-scattering vertices.
GenAodValidationTool()
Default constructor:
virtual ~GenAodValidationTool()
Destructor:
StringProperty m_refMcEventsName
Location of the reference McEventCollection.
HepMcTool_t m_refMcEventWriter
Tool to write the reference HepMC::GenEvent into a dedicated file.
This defines the McEventCollection, which is really just an ObjectVector of McEvent objectsFile: Gene...
TruthParticleValidationBaseTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
const GenParticle * ConstGenParticlePtr
Definition GenParticle.h:38
const HepMC::GenVertex * ConstGenVertexPtr
Definition GenVertex.h:60