ATLAS Offline Software
Loading...
Searching...
No Matches
PileupFilterTool Class Reference

#include <PileupFilterTool.h>

Inheritance diagram for PileupFilterTool:
Collaboration diagram for PileupFilterTool:

Public Member Functions

 PileupFilterTool (const std::string &type, const std::string &name, const IInterface *parent)
 Constructor with parameters:
virtual ~PileupFilterTool ()
 Destructor:
StatusCode buildMcAod (const McEventCollection *in, McEventCollection *out)
 This method will check the validity of the input McEventCollection and build a filtered one from the strategy implemented by this concrete tool.
StatusCode initialize ()
 Athena Algorithm's Hooks.
StatusCode execute ()
StatusCode finalize ()
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Member Functions

static const InterfaceID & interfaceID ()
 Inline methods:

Protected Types

typedef ToolHandle< IMcVtxFilterToolMcVtxFilterTool_t
typedef ToolHandle< ITruthIsolationToolIsolTool_t

Protected Member Functions

 PileupFilterTool ()
 Default constructor:
StatusCode selectSpclMcBarcodes ()
 Retrieve the GenParticles from the GenEvent object (located into the McEventCollection container), filter them and store their barcode into the list of barcodes of particles to keep.
StatusCode shapeGenEvent (McEventCollection *outEvt)
 Build the out McEventCollection by removing all the GenParticles whose barcode is not in the list of barcodes to keep.
StatusCode reconnectParticles (const McEventCollection *inEvt, McEventCollection *out)
 Reconnect the particles of the filtered McEventCollection.
StatusCode rebuildLinks (const HepMC::GenEvent *mcEvent, HepMC::GenEvent *outEvt, const HepMC::GenParticlePtr &mcPart)
 Rebuild the links between particles which were connected, eg by a long FSR chain.
StatusCode initializeTool ()
 to get tesIO
virtual StatusCode finalizeTool ()
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Protected Attributes

std::set< HepMC::ConstGenParticlePtrm_particles
 List of particles which have been labelled as "special".
DoubleProperty m_rIsol
 deltaR isolation energy cut for electrons, muons, taus and photons
DoubleProperty m_ptGamMin
 Minimum threshold for transverse momentum of photons.
DoubleProperty m_ptMin
 Minimum threshold for transverse momentum for all particles.
DoubleProperty m_etaRange
 Eta acceptance cut applied on all stable particles.
DoubleProperty m_rRange
 Radius acceptance cut on all stable particles.
BooleanProperty m_includeSimul
 Switch to include or not particles from detector simulation (Geant4)
BooleanProperty m_includePartonShowers
 Switch to include or not parton showers.
TruthHelper::GenAccessIOm_tesIO
 Pointer to a StoreGateSvc helper (Mc particle retrieval with predicates)
BooleanProperty m_removeDecayToSelf
 Switch to remove particles which decay into themselves (t->tg) but only for generated particles, not the ones from the Geant4 interactions.
McVtxFilterTool_t m_mcVtxFilterTool
 Pointer to the McVtxFilterTool to be able to select additional vertices on some decay pattern criterion.
IsolTool_t m_isolationTool
 Pointer to the TruthIsolationTool to be able to compute transverse energy isolations for various isolation cones cuts.
BooleanProperty m_doEtIsolation
 Switch to compute or not the Et-isolations for TruthParticle (and their underlying HepMC::GenParticle).
SG::ReadHandleKey< McEventCollectionm_mcEventsReadHandleKey {this,"McEvents","TruthEvent","ReadHandleKey for input McEventCollection one wants to filter"}
 ReadHandleKey for the input McEventCollection one wants to filter.
SG::WriteHandleKey< McEventCollectionm_mcEventsOutputWriteHandleKey {this,"McEventsOutput","GEN_AOD","WriteHandleKey for the output McEventCollection which has been filtered"}
 Location of the output McEventCollection which has been filtered.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 28 of file PileupFilterTool.h.

Member Typedef Documentation

◆ IsolTool_t

typedef ToolHandle<ITruthIsolationTool> TruthParticleFilterBaseTool::IsolTool_t
protectedinherited

Definition at line 80 of file TruthParticleFilterBaseTool.h.

◆ McVtxFilterTool_t

typedef ToolHandle<IMcVtxFilterTool> TruthParticleFilterBaseTool::McVtxFilterTool_t
protectedinherited

Definition at line 74 of file TruthParticleFilterBaseTool.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ PileupFilterTool() [1/2]

PileupFilterTool::PileupFilterTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

Constructor with parameters:

Definition at line 41 of file PileupFilterTool.cxx.

43 :
44 TruthParticleFilterBaseTool( type, name, parent ),
45 m_particles ( ),
46 m_tesIO ( nullptr )
47{
48
49 declareProperty( "rIsolation",
50 m_rIsol = 0.45,
51 "DeltaR isolation energy cut for electrons, muons, "
52 "taus and photons" );
53
54 declareProperty( "ptGammaMin",
55 m_ptGamMin = 0.5*GeV,
56 "Minimum threshold for transverse momentum of photons" );
57
58 declareProperty( "ptMin",
59 m_ptMin = 0.5*GeV,
60 "Minimum threshold for transverse momentum for all particles.\n"
61 "Warning: this cut is applied *before* Pt photon cut !" );
62
63 declareProperty( "etaRange",
64 m_etaRange = 5.0,
65 "Eta acceptance cut applied on all stable particles" );
66
67 declareProperty( "rRange",
68 m_rRange = 500.0,
69 "radius acceptance - in milimeters - cut applied on all stable "
70 "particles" );
71
72 // switches
73
74 declareProperty( "IncludeSimul",
75 m_includeSimul = true,
76 "Switch to include or not particles from detector simulation "
77 "(Geant 4)" );
78
79 declareProperty( "IncludePartonShowers",
81 "Switch to include or not parton showers" );
82
83 declareProperty( "RemoveDecayToSelf",
85 "Switch to remove particles which decay into themselves (t->tg) "
86 "*but* only for generated particles, not the ones from the "
87 "Geant4 interactions" );
88
89}
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
DoubleProperty m_rIsol
deltaR isolation energy cut for electrons, muons, taus and photons
TruthHelper::GenAccessIO * m_tesIO
Pointer to a StoreGateSvc helper (Mc particle retrieval with predicates)
DoubleProperty m_etaRange
Eta acceptance cut applied on all stable particles.
BooleanProperty m_removeDecayToSelf
Switch to remove particles which decay into themselves (t->tg) but only for generated particles,...
DoubleProperty m_rRange
Radius acceptance cut on all stable particles.
DoubleProperty m_ptGamMin
Minimum threshold for transverse momentum of photons.
BooleanProperty m_includeSimul
Switch to include or not particles from detector simulation (Geant4)
BooleanProperty m_includePartonShowers
Switch to include or not parton showers.
DoubleProperty m_ptMin
Minimum threshold for transverse momentum for all particles.
std::set< HepMC::ConstGenParticlePtr > m_particles
List of particles which have been labelled as "special".
TruthParticleFilterBaseTool()
Default constructor:

◆ ~PileupFilterTool()

PileupFilterTool::~PileupFilterTool ( )
virtual

Destructor:

Definition at line 93 of file PileupFilterTool.cxx.

94{
95 ATH_MSG_DEBUG("Calling destructor");
96 delete m_tesIO;
97}
#define ATH_MSG_DEBUG(x)

◆ PileupFilterTool() [2/2]

PileupFilterTool::PileupFilterTool ( )
protected

Default constructor:

Member Function Documentation

◆ buildMcAod()

StatusCode PileupFilterTool::buildMcAod ( const McEventCollection * in,
McEventCollection * out )
virtual

This method will check the validity of the input McEventCollection and build a filtered one from the strategy implemented by this concrete tool.

Implements ITruthParticleFilterTool.

Definition at line 103 of file PileupFilterTool.cxx.

105{
106 if ( nullptr == in || nullptr == out ) {
107 ATH_MSG_ERROR("Invalid pointer to McEventCollection !" << endmsg
108 << " in: " << in << endmsg
109 << " out: " << out);
110 return StatusCode::FAILURE;
111 }
112
113 // we just copy the input McEventCollection and put it into the output one
114 out->operator=( *in );
115
116 // select the barcodes of the "special" particles from the input GenEvent
117 if ( selectSpclMcBarcodes().isFailure() ) {
118 ATH_MSG_ERROR("Could not select the \"special\" barcodes !!");
119 return StatusCode::FAILURE;
120 }
121
122 // remove the not "special" particles from the filtered McEventCollection
123 if ( shapeGenEvent(out).isFailure() ) {
124 ATH_MSG_ERROR("Could not remove the not \"special\" particles from the "\
125 "filtered McEventCollection !!");
126 return StatusCode::FAILURE;
127 }
128
129 // reconnect the particles
130 if ( reconnectParticles(in, out).isFailure() ) {
131 ATH_MSG_ERROR("Could not reconnect the particles in the filtered "\
132 "McEventCollection !!");
133 return StatusCode::FAILURE;
134 }
135
136 return StatusCode::SUCCESS;
137}
#define endmsg
#define ATH_MSG_ERROR(x)
StatusCode reconnectParticles(const McEventCollection *inEvt, McEventCollection *out)
Reconnect the particles of the filtered McEventCollection.
StatusCode shapeGenEvent(McEventCollection *outEvt)
Build the out McEventCollection by removing all the GenParticles whose barcode is not in the list of ...
StatusCode selectSpclMcBarcodes()
Retrieve the GenParticles from the GenEvent object (located into the McEventCollection container),...

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode TruthParticleFilterBaseTool::execute ( )
virtualinherited

Implements ITruthParticleFilterTool.

Definition at line 120 of file TruthParticleFilterBaseTool.cxx.

121{
122 ATH_MSG_DEBUG("Executing " << name() << "...");
123
124 //Setup Handle to read input container
125 SG::ReadHandle<McEventCollection> mcEventsReadHandle(m_mcEventsReadHandleKey);
126
127 if (!mcEventsReadHandle.isValid()){
128 ATH_MSG_ERROR("Invalid ReadHandle to McEventColleciton with key: " << m_mcEventsReadHandleKey.key());
129 return StatusCode::FAILURE;
130 }
131
132 //Setup WriteHandle, and then record new McEventCollection.
133 SG::WriteHandle<McEventCollection> mcEventsOutputWriteHandle(m_mcEventsOutputWriteHandleKey);
134 ATH_CHECK(mcEventsOutputWriteHandle.record(std::make_unique<McEventCollection>()));
135
136 if (!mcEventsOutputWriteHandle.isValid()){
137 ATH_MSG_ERROR("Invalid WriteHamdle for McEventCollection with key ["
138 <<m_mcEventsOutputWriteHandleKey.key() << "] !!");
139 return StatusCode::FAILURE;
140 }
141
142 // Compute isolation for gamma/lepton.
143 if ( m_doEtIsolation.value() ) {
144 ATH_MSG_VERBOSE("Computing Et isolations...");
145 if ( m_isolationTool->buildEtIsolations(m_mcEventsReadHandleKey.key()).isFailure() ) {
146 ATH_MSG_ERROR("Could not compute Et isolations !!");
147 return StatusCode::FAILURE;
148 }
149 } //> end do Et-isolation
150
151 if ( this->buildMcAod( mcEventsReadHandle.ptr(), mcEventsOutputWriteHandle.ptr() ).isFailure() ) {
152 ATH_MSG_ERROR("Could not buildMcAod(in,out) !!");
153 return StatusCode::FAILURE;
154 }
155
156 // We have slimmed the mcEventsOutputWriteHandle.
157 // To not bias the map of isolation energies for this GenEvent, we alias
158 // it to its original one
159 if ( m_doEtIsolation.value() &&
160 !m_isolationTool->registerAlias( m_mcEventsOutputWriteHandleKey.key(),
162 ).isSuccess() ) {
163 ATH_MSG_WARNING("Could not create an alias in the map of "\
164 "isolation energies !");
165 }
166
167 return StatusCode::SUCCESS;
168}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
virtual StatusCode buildMcAod(const McEventCollection *in, McEventCollection *filtered)=0
This method will check the validity of the input McEventCollection and build a filtered one from the ...
BooleanProperty m_doEtIsolation
Switch to compute or not the Et-isolations for TruthParticle (and their underlying HepMC::GenParticle...
SG::ReadHandleKey< McEventCollection > m_mcEventsReadHandleKey
ReadHandleKey for the input McEventCollection one wants to filter.
SG::WriteHandleKey< McEventCollection > m_mcEventsOutputWriteHandleKey
Location of the output McEventCollection which has been filtered.
IsolTool_t m_isolationTool
Pointer to the TruthIsolationTool to be able to compute transverse energy isolations for various isol...

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ finalize()

StatusCode TruthParticleFilterBaseTool::finalize ( )
virtualinherited

Implements ITruthParticleFilterTool.

Definition at line 105 of file TruthParticleFilterBaseTool.cxx.

106{
107 ATH_MSG_INFO("Finalizing " << name() << "...");
108
109 m_mcVtxFilterTool->stats();
110
111 // Give the concrete (derived) tool a chance to finalize itself
112 if ( finalizeTool().isFailure() ) {
113 ATH_MSG_ERROR("Could not finalize concrete tool !");
114 return StatusCode::FAILURE;
115 }
116
117 return StatusCode::SUCCESS;
118}
#define ATH_MSG_INFO(x)
McVtxFilterTool_t m_mcVtxFilterTool
Pointer to the McVtxFilterTool to be able to select additional vertices on some decay pattern criteri...

◆ finalizeTool()

StatusCode TruthParticleFilterBaseTool::finalizeTool ( )
inlineprotectedvirtualinherited

Definition at line 124 of file TruthParticleFilterBaseTool.h.

125{
126 return StatusCode::SUCCESS;
127}

◆ initialize()

StatusCode TruthParticleFilterBaseTool::initialize ( )
virtualinherited

Athena Algorithm's Hooks.

Retrieves a private AlgTool to filter a McEventCollection

Retrieves the isolation tool (public, to be used also in TruthParticleCnvTool)

Implements ITruthParticleFilterTool.

Definition at line 65 of file TruthParticleFilterBaseTool.cxx.

66{
67 ATH_MSG_INFO("Initializing " << name() << "...");
68
70 if ( !m_mcVtxFilterTool.retrieve().isSuccess() ) {
71 ATH_MSG_ERROR("Creation of algTool IMcVtxFilterTool FAILED !");
72 return StatusCode::FAILURE;
73 }
74
76 if( m_doEtIsolation.value()) {
77 ATH_CHECK(m_isolationTool.retrieve());
78 }
79 else {
80 m_isolationTool.disable();
81 }
82
83 //initialize DataHandleKeys
86
88 (" DoEtIsolations: [" << std::boolalpha << m_doEtIsolation.value()
89 << "]" << endmsg
90 << " McEvents: [" << m_mcEventsReadHandleKey.key() << "]" << endmsg
91 << " McEventsOutput: [" << m_mcEventsOutputWriteHandleKey.key() << "]");
92
93 // Give the concrete (derived) tool a chance to initialize itself
94 if ( initializeTool().isFailure() ) {
95 ATH_MSG_ERROR("Could not initialize concrete tool !");
96 return StatusCode::FAILURE;
97 }
98
99 ATH_MSG_INFO("Options of the McVtxFilterTool:");
100 m_mcVtxFilterTool->displayOptions();
101
102 return StatusCode::SUCCESS;
103}
virtual StatusCode initializeTool()
I/O operators.

◆ initializeTool()

StatusCode PileupFilterTool::initializeTool ( )
protectedvirtual

to get tesIO

Reimplemented from TruthParticleFilterBaseTool.

Definition at line 616 of file PileupFilterTool.cxx.

617{
618 ATH_MSG_DEBUG("Calling initializeTool");
619 // accessor for particles
620 delete m_tesIO;
621 m_tesIO = new TruthHelper::GenAccessIO();
622 if( nullptr == m_tesIO ) {
623 ATH_MSG_ERROR("Unable to retrieve GenAccessIO pointer");
624 return StatusCode::FAILURE;
625 }
626 return StatusCode::SUCCESS;
627}

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & ITruthParticleFilterTool::interfaceID ( )
inlinestaticinherited

Inline methods:

Definition at line 70 of file ITruthParticleFilterTool.h.

71{
73}
static const InterfaceID IID_ITruthParticleFilterTool("ITruthParticleFilterTool", 1, 0)

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ rebuildLinks()

StatusCode PileupFilterTool::rebuildLinks ( const HepMC::GenEvent * mcEvent,
HepMC::GenEvent * outEvt,
const HepMC::GenParticlePtr & mcPart )
protected

Rebuild the links between particles which were connected, eg by a long FSR chain.

Definition at line 421 of file PileupFilterTool.cxx.

424{
425 if ( !mcPart ) {
426 ATH_MSG_WARNING("Null GenParticle: can not rebuildLinks");
427 return StatusCode::FAILURE;
428 }
429
430 if ( mcPart->end_vertex() ) {
431 ATH_MSG_VERBOSE("GenParticle has already a decay vertex : nothing to do");
432 return StatusCode::SUCCESS;
433 }
434
435 if ( !mcEvt ) {
436 ATH_MSG_WARNING("Null input HepMC::GenEvent : can not rebuildLinks");
437 return StatusCode::FAILURE;
438 }
439
440 if ( !outEvt ) {
441 ATH_MSG_WARNING("Null output HepMC::GenEvent: can not rebuildLinks");
442 return StatusCode::FAILURE;
443 }
444
445 // Cache some useful infos
446 const int pdgId = mcPart->pdg_id();
447 const int bc = HepMC::barcode(mcPart);
448#ifdef HEPMC3
450 HepMC::ConstGenVertexPtr dcyVtx = inPart->end_vertex();
451#else
452//AV: Const correctness is broken in HepMC2
454 HepMC::GenVertexPtr dcyVtx = inPart->end_vertex();
455#endif
456
457 if ( !dcyVtx ) {
458 ATH_MSG_VERBOSE("No decay vertex for the particle #" << bc << " : " << "No link to rebuild...");
459 return StatusCode::SUCCESS;
460 }
461
462 std::list<int> bcChildPart;
463 std::list<int> bcChildVert;
464
465 //
466 // Loop over all descendants of the GenParticle
467 // Store the barcode of the GenParticles entering into each GenVertex
468 //
469#ifdef HEPMC3
470 auto descendants=HepMC::descendant_vertices(dcyVtx);
471 for ( const auto& itrVtx: descendants) {
472 bool foundPdgId = false;
473 for ( const auto& itrPart: itrVtx->particles_in()) {
474 // because the vertices are traversed in POST ORDER !!
475 bcChildPart.push_front( HepMC::barcode(itrPart));
476 if ( itrPart->pdg_id() == pdgId ) {
477 foundPdgId = true;
478 }
479 }//> loop over in-going particles of this vertex
480 if ( foundPdgId ) {
481 bcChildVert.push_front( HepMC::barcode(itrVtx));
482 }
483 }//> loop over descendants of decay vertex
484#else
485 const HepMC::GenVertex::vertex_iterator endVtx = dcyVtx->vertices_end(HepMC::descendants);
486 for ( HepMC::GenVertex::vertex_iterator itrVtx = dcyVtx->vertices_begin( HepMC::descendants );
487 itrVtx != endVtx;
488 ++itrVtx ) {
489 bool foundPdgId = false;
490 HepMC::GenVertex::particles_in_const_iterator endPart = (*itrVtx)->particles_in_const_end();
491 for ( HepMC::GenVertex::particles_in_const_iterator itrPart = (*itrVtx)->particles_in_const_begin();
492 itrPart != endPart;
493 ++itrPart ) {
494
495
496
497 // because the vertices are traversed in POST ORDER !!
498 bcChildPart.push_front( (*itrPart)->barcode() );
499
500 if ( (*itrPart)->pdg_id() == pdgId ) {
501 foundPdgId = true;
502 }
503 }//> loop over in-going particles of this vertex
504
505 if ( foundPdgId ) {
506 bcChildVert.push_front( (*itrVtx)->barcode() );
507 }
508
509 }//> loop over descendants of decay vertex
510#endif
511
512 //
513 // Now we loop over the previously stored barcodes and
514 // we connect our GenParticle to the first found barcode
515 //
516#ifdef HEPMC3
517 std::list<int>::const_iterator bcVtxEnd = bcChildVert.end();
518 for ( std::list<int>::const_iterator itrBcVtx = bcChildVert.begin(); itrBcVtx != bcVtxEnd; ++itrBcVtx ) {
519 HepMC::GenVertexPtr childVtx = HepMC::barcode_to_vertex(outEvt,*itrBcVtx);
520 if ( childVtx ) {
521 if ( !childVtx->particles_in().empty() ) {
522 for ( const auto& itrPart: childVtx->particles_in()) {
523 if ( itrPart->pdg_id() == pdgId ) {
524 HepMC::GenVertexPtr prodVtx = itrPart->production_vertex();
525 if ( prodVtx ) {
526 if ( !prodVtx->particles_in().empty() ) {
527 // Humm... This is not what we'd have expected
528 // so we skip it
529 if ( msgLvl(MSG::VERBOSE) ) {
530 msg(MSG::VERBOSE)<< "found a particle = "<< itrPart << ", "<< "but its production vertex has incoming particles !" << endmsg;
531 continue;
532 }
533 // create a GenVertex which will be the decay vertex of our
534 // GenParticle and the production vertex of the GenParticle
535 // we just found
537 outEvt->add_vertex( linkVtx );
538 linkVtx->add_particle_in( mcPart );
539 linkVtx->add_particle_out( itrPart );
540
541 msg(MSG::ERROR)<< "=====================================================" << endmsg << "Created a GenVertex - link !" << std::endl;
542 std::stringstream vtxLink("");
543 HepMC::Print::line(vtxLink,std::move(linkVtx));
544 msg(MSG::ERROR)<< vtxLink.str()<< endmsg<< "====================================================="<< endmsg;
545 }
546 }
547 }
548 }//> loop over incoming particles
549 } else {
550 // no incoming particle : so we just add this particle
551 // a bit odd though : FIXME ?
552 childVtx->add_particle_in(mcPart);
553 msg(MSG::WARNING) << "Odd situation:" << std::endl;
554 std::stringstream vtxDump( "" );
555 HepMC::Print::line(vtxDump,std::move(childVtx));
556 msg(MSG::WARNING) << vtxDump.str() << endmsg;
557 return StatusCode::SUCCESS;
558 }//> end if incoming particles
559 }//> found a child-vertex
560 }
561#else
562 std::list<int>::const_iterator bcVtxEnd = bcChildVert.end();
563 for ( std::list<int>::const_iterator itrBcVtx = bcChildVert.begin();
564 itrBcVtx != bcVtxEnd;
565 ++itrBcVtx ) {
566 HepMC::GenVertex * childVtx = outEvt->barcode_to_vertex(*itrBcVtx);
567 if ( childVtx ) {
568 if ( childVtx->particles_in_size() > 0 ) {
569 HepMC::GenVertex::particles_in_const_iterator endPart = childVtx->particles_in_const_end();
570 for ( HepMC::GenVertex::particles_in_const_iterator itrPart = childVtx->particles_in_const_begin();
571 itrPart != endPart;
572 ++itrPart ) {
573 if ( (*itrPart)->pdg_id() == pdgId ) {
574 HepMC::GenVertex * prodVtx = (*itrPart)->production_vertex();
575 if ( prodVtx ) {
576 if ( prodVtx->particles_in_size() > 0 ) {
577 // Humm... This is not what we'd have expected
578 // so we skip it
579 if ( msgLvl(MSG::VERBOSE) ) {
580 msg(MSG::VERBOSE)<< "found a particle [bc,pdgId]= "<< (*itrPart)->barcode() << ", "<< "but its production vertex has incoming particles !" << endmsg;
581 continue;
582 }
583 // create a GenVertex which will be the decay vertex of our
584 // GenParticle and the production vertex of the GenParticle
585 // we just found
587 outEvt->add_vertex( linkVtx );
588 linkVtx->add_particle_in( mcPart );
589 linkVtx->add_particle_out( *itrPart );
590
591 msg(MSG::ERROR)<< "====================================================="<< endmsg<< "Created a GenVertex - link !"<< std::endl;
592 std::stringstream vtxLink("");
593 linkVtx->print(vtxLink);
594 msg(MSG::ERROR)<< vtxLink.str()<< endmsg<< "=====================================================" << endmsg;
595 }
596 }
597 }
598 }//> loop over incoming particles
599 } else {
600 // no incoming particle : so we just add this particle
601 // a bit odd though : FIXME ?
602 childVtx->add_particle_in(mcPart);
603 msg(MSG::WARNING) << "Odd situation:" << std::endl;
604 std::stringstream vtxDump( "" );
605 childVtx->print(vtxDump);
606 msg(MSG::WARNING) << vtxDump.str() << endmsg;
607 return StatusCode::SUCCESS;
608 }//> end if incoming particles
609 }//> found a child-vertex
610 }//> loop over child-vertex-barcodes
611#endif
612
613 return StatusCode::FAILURE;
614}
bool msgLvl(const MSG::Level lvl) const
void line(std::ostream &os, const GenEvent &e)
Definition GenEvent.h:678
GenParticle * barcode_to_particle(const GenEvent *e, int id)
Definition GenEvent.h:630
int barcode(const T *p)
Definition Barcode.h:16
GenVertex * barcode_to_vertex(const GenEvent *e, int id)
Definition GenEvent.h:629
HepMC::GenVertex * GenVertexPtr
Definition GenVertex.h:59
GenVertexPtr newGenVertexPtr(const HepMC::FourVector &pos=HepMC::FourVector(0.0, 0.0, 0.0, 0.0), const int i=0)
Definition GenVertex.h:64
GenParticle * GenParticlePtr
Definition GenParticle.h:37
const GenParticle * ConstGenParticlePtr
Definition GenParticle.h:38
const HepMC::GenVertex * ConstGenVertexPtr
Definition GenVertex.h:60
MsgStream & msg
Definition testRead.cxx:32

◆ reconnectParticles()

StatusCode PileupFilterTool::reconnectParticles ( const McEventCollection * inEvt,
McEventCollection * out )
protected

Reconnect the particles of the filtered McEventCollection.

We need the original McEventCollection to know if 2 particles were connected

Definition at line 376 of file PileupFilterTool.cxx.

377{
378 if ( nullptr == in || nullptr == out ) {
379 ATH_MSG_ERROR("Invalid pointer to McEventCollection !!" << endmsg << " in: " << in << endmsg << " out: " << out);
380 return StatusCode::FAILURE;
381 }
382
383 for ( unsigned int iEvt = 0; iEvt != in->size(); ++iEvt) {
384 const HepMC::GenEvent * evt = (*in)[iEvt];
385 HepMC::GenEvent * outEvt = (*out)[iEvt];
386
387 // Reconnect the particles
388 ATH_MSG_VERBOSE("Reconnecting particles...");
389 for ( const auto& itrPart: *outEvt) {
390 if ( itrPart->end_vertex() ) {
391 continue;
392 }
393 if ( rebuildLinks( evt, outEvt, itrPart ).isFailure() ) {
394 ATH_MSG_WARNING("Could not rebuild links for this particle [pdgId,particle]= "<< itrPart->pdg_id() << ", " << itrPart);
395 } else if ( msgLvl(MSG::VERBOSE) ) {
396 msg(MSG::VERBOSE)<< "==========================================================="<< endmsg<< "Production vertex for particle " << itrPart << " : ";
397 if ( itrPart->production_vertex() ) {
398 std::stringstream prodVtx("");
399 HepMC::Print::line(prodVtx,itrPart->production_vertex());
400 msg(MSG::VERBOSE) << std::endl<< prodVtx.str()<< endmsg;
401 } else {
402 msg(MSG::VERBOSE) << "[No production vertex]" << endmsg;
403 }
404
405 msg(MSG::VERBOSE) << "Decay vertex for particle " << itrPart << " : ";
406 if ( itrPart->end_vertex() ) {
407 std::stringstream dcyVtx("");
408 HepMC::Print::line(dcyVtx,itrPart->end_vertex());
409 msg(MSG::VERBOSE) << std::endl<< dcyVtx.str() << endmsg;
410 } else {
411 msg(MSG::VERBOSE) << endmsg << "[No decay vertex]" << endmsg;
412 }
413 }//> end VERBOSE messages
414
415 }//> loop over particles
416 }//> loop over GenEvents
417
418 return StatusCode::SUCCESS;
419}
StatusCode rebuildLinks(const HepMC::GenEvent *mcEvent, HepMC::GenEvent *outEvt, const HepMC::GenParticlePtr &mcPart)
Rebuild the links between particles which were connected, eg by a long FSR chain.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ selectSpclMcBarcodes()

StatusCode PileupFilterTool::selectSpclMcBarcodes ( )
protected

Retrieve the GenParticles from the GenEvent object (located into the McEventCollection container), filter them and store their barcode into the list of barcodes of particles to keep.

skip stuff with no end-vertex

stable particles

Definition at line 142 of file PileupFilterTool.cxx.

143{
144 StatusCode sc = StatusCode::SUCCESS;
145
146 // Get all of the generated particles (does not have Geant secondaries)
147
148 std::vector<HepMC::ConstGenParticlePtr> particles;
149 if ( m_includeSimul ) {
150 sc = m_tesIO->getMC(particles, false, m_mcEventsReadHandleKey.key());
151 } else {
152 sc = m_tesIO->getMC(particles, true, m_mcEventsReadHandleKey.key());
153 }
154 if ( sc.isFailure() ) {
155 ATH_MSG_ERROR("Could not get Monte Carlo particles from TDS at : "<< m_mcEventsReadHandleKey.key());
156 return StatusCode::FAILURE;
157 }
158
159 m_particles.clear();
160
161 //+++ Get True Vertices from Storegate
162 const McEventCollection* mcTruth(nullptr);
163 sc = evtStore()->retrieve(mcTruth, m_mcEventsReadHandleKey.key());
164 if( sc.isFailure() ) {
165 ATH_MSG_WARNING("MC Event " << m_mcEventsReadHandleKey.key() << " not found.");
166 return StatusCode::SUCCESS;
167 }
168 ATH_MSG_DEBUG("McEventCollection successfully retrieved" << endmsg << "Number of truth particles: " << mcTruth->size());
169
170 McEventCollection::const_iterator mcEventItr = mcTruth->begin();
171 McEventCollection::const_iterator mcEventItrE = mcTruth->end();
172
173 for ( ; mcEventItr != mcEventItrE; ++mcEventItr ) {
174
175 const HepMC::GenEvent* genEvent = (*mcEventItr);
176
177#ifdef HEPMC3
178 auto vxp = genEvent->vertices().begin();
179#else
180 HepMC::GenEvent::vertex_const_iterator vxp = genEvent->vertices_begin();
181#endif
182 const float xp = (*vxp)->position().x();
183 const float yp = (*vxp)->position().y();
184 const float zp = (*vxp)->position().z();
185
186 // Loop over all particles, selecting special ones
187 // keep track of them using their barcodes
188 for (const auto& part: *genEvent) {
189 const int id = part->pdg_id();
190 const HepMC::FourVector hlv = part->momentum();
191 const double pt = hlv.perp();
192 const HepMC::ConstGenVertexPtr& decayVtx = part->end_vertex();
193 const HepMC::ConstGenVertexPtr& prodVtx = part->production_vertex();
194 bool isSpcl = false;
196 if( !MC::isStable(part) && !decayVtx ) continue;
197
198 float xi = (prodVtx->position()).x();
199 float yi = (prodVtx->position()).y();
200 float zi = (prodVtx->position()).z();
201
202 ATH_MSG_DEBUG("Primary Vertex = " << xp << " " << yp << " " << zp << " " << "Production Vertex = " << xi << " " << yi << " " << zi << " " << "Particle ID = " << id);
203
204 float deltaR = std::sqrt( (xp-xi)*(xp-xi) + (yp-yi)*(yp-yi) );
205
206 const bool accept = (pt > m_ptMin) && (deltaR < m_rRange);
208 // Select special particles
211 if (m_includeSimul ) {
212 if ( MC::isSimStable(part) && accept ) isSpcl = true;
213 } else {
214 if ( MC::isGenStable(part) && accept ) isSpcl = true;
215 }
216
218 // Save special particles and children
220 if( !isSpcl ) continue;
221 m_particles.insert(part); // add it to list
222
223 // Children
224 if( isSpcl && decayVtx ) {
225 for(const auto& child: *(part->end_vertex())) {
227 m_particles.insert(child);// its not there already
228 }
229 }
230 }
231 }
232 }
233 ATH_MSG_DEBUG("Read " << particles.size() << " and selected " << m_particles.size() << " particles");
234
235 return StatusCode::SUCCESS;
236}
Scalar deltaR(const MatrixBase< Derived > &vec) const
static Double_t sc
ServiceHandle< StoreGateSvc > & evtStore()
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
StatusCode accept(const xAOD::Muon *mu)
::StatusCode StatusCode
StatusCode definition for legacy code.
bool is_simulation_particle(const T &p)
Method to establish if a particle (or barcode) was created during the simulation (TODO update to be s...
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
bool isGenStable(const T &p)
Determine if the particle is stable at the generator (not det-sim) level,.
bool isSimStable(const T &p)
Identify if the particle is considered stable at the post-detector-sim stage.

◆ shapeGenEvent()

StatusCode PileupFilterTool::shapeGenEvent ( McEventCollection * outEvt)
protected

Build the out McEventCollection by removing all the GenParticles whose barcode is not in the list of barcodes to keep.

Remove also the dead vertices.

Definition at line 238 of file PileupFilterTool.cxx.

239{
240 //now remove all the particles except those whose barcodes are marked
241 for ( McEventCollection::iterator evt = genAod->begin(); evt != genAod->end();++evt) {
242 std::vector<HepMC::GenParticlePtr> going_out;
243 std::list<int> evtBarcodes;
244#ifdef HEPMC3
245 const auto &barcodes = (*evt)->attribute<HepMC::GenEventBarcodes> ("barcodes");
246 std::map<int,int> id_to_barcode_map;
247 if (barcodes) id_to_barcode_map = barcodes->id_to_barcode_map();
248 for (const auto& keyval: id_to_barcode_map) evtBarcodes.push_back(keyval.second);
249#else
250 for ( const auto& p: **evt) {
251 evtBarcodes.push_back( HepMC::barcode(p) );
252 }
253#endif
254
255 for ( std::list<int>::const_iterator itrBc = evtBarcodes.begin(); itrBc != evtBarcodes.end(); ++itrBc ) {
256//AV: We modify the event!
257 HepMC::GenParticlePtr p = HepMC::barcode_to_particle((HepMC::GenEvent*)(*evt),*itrBc);
258 ATH_MSG_DEBUG("[pdg,particle]= " << p->pdg_id() << ", " << p);
259 if ( m_particles.count(p) == 0) {
260 going_out.push_back(p); // list of useless particles
261 HepMC::GenVertexPtr pvtx = p->production_vertex();
262 HepMC::GenVertexPtr evtx = p->end_vertex();
263
264 std::pair<int,int> bcNext( 0, 0 );
265 if ( msgLvl(MSG::DEBUG) ) {
266 msg(MSG::DEBUG) << "Removing [" <<p << "]" << "\tprod/endVtx: " << pvtx << "/" << evtx << endmsg;
267 std::list<int>::const_iterator pNext = itrBc;
268 ++pNext;
269 if ( pNext != evtBarcodes.end() ) {
270 bcNext.first = HepMC::barcode(HepMC::barcode_to_particle(*evt,*pNext));
271 }
272 }
273#ifdef HEPMC3
274 if (pvtx) pvtx->remove_particle_out(p); //remove from production vertex from useless particle
275#else
276 if (pvtx) pvtx->remove_particle(p); //remove from production vertex from useless particle
277#endif
278 if (evtx) { // if it has end vertex, may need to move the out partilces
279 if(pvtx){ // move the partilces back
280 if ( msgLvl(MSG::DEBUG) ) {
281 msg(MSG::DEBUG) << "\tin endVtx "<< endmsg;
282 }
283#ifdef HEPMC3
284 while ( evtx->particles_out().begin() != evtx->particles_out().end()) {
285 pvtx->add_particle_out(evtx->particles_out().front());
286 }
287 }//> end if [prod vertex]
288 evtx->remove_particle_out(std::move(p)); // disconnect from end vertex
289#else
290 while ( evtx->particles_out_const_begin() != evtx->particles_out_const_end()) {
291 HepMC::GenVertex::particles_out_const_iterator np = evtx->particles_out_const_begin();
292 pvtx->add_particle_out(*np); // note that this really is a MOVE!!! it get taken off evtx by magic
293 }
294 }//> end if [prod vertex]
295 evtx->remove_particle(p); // disconnect from end vertex
296#endif
297 }//> end if [decay vertex]
298
299 if ( msgLvl(MSG::DEBUG) ) {
300 std::list<int>::const_iterator pNext = itrBc;
301 ++pNext;
302 if ( pNext != evtBarcodes.end() ) {
303 bcNext.second = HepMC::barcode(HepMC::barcode_to_particle(*evt,*pNext));
304 }
305
306 if ( bcNext.first != bcNext.second ) {
307 ATH_MSG_WARNING("\tIterator has been CORRUPTED !!" << endmsg << "\tbcNext: " << bcNext.first << " --> " << bcNext.second);
308 } else {
309 ATH_MSG_DEBUG("\tIterator OK:" << endmsg << "\tbcNext: " << bcNext.first << " --> " << bcNext.second);
310 }
311 }
312
313 }//> particle has to be removed
314 }//> loop over particles
315
316
317#ifdef HEPMC3
318 // there may be a bunch of vertices with no particles connected to them:
319 // ==> Get rid of them
320 std::vector<HepMC::ConstGenVertexPtr> going_out_again;
321 for ( auto& v: (*evt)->vertices() ) {
322 if ( v->particles_in().empty() && v->particles_out().empty() ){
323 going_out_again.push_back(v);
324 }
325 }//> loop over vertices
326#else
327 // now get rid of all dead particles
328 for ( std::vector<HepMC::GenParticle*>::iterator d = going_out.begin();
329 d != going_out.end();
330 ++d ){
331 delete *d;
332 }
333
334 // there may be a bunch of vertices with no particles connected to them:
335 // ==> Get rid of them
336 std::vector<HepMC::GenVertex*> going_out_again;
337 for ( HepMC::GenEvent::vertex_const_iterator v = (*evt)->vertices_begin();
338 v != (*evt)->vertices_end(); ++v ) {
339 if ( (*v)->particles_in_size() == 0 && (*v)->particles_out_size() == 0 ){
340 going_out_again.push_back(*v);
341 }
342 }//> loop over vertices
343
344 // now get rid of all dead vertices
345 for ( std::vector<HepMC::GenVertex*>::iterator d = going_out_again.begin();
346 d != going_out_again.end();
347 ++d ){
348 delete *d;
349 }
350#endif
351
352 }//> loop over GenEvents in McEventCollection
353
354 // Set the signal_process_vertex to NULL if not to be recorded
355 for ( McEventCollection::iterator evt = genAod->begin(); evt != genAod->end(); ++evt) {
356 auto sigProcVtx = HepMC::signal_process_vertex(*evt);
357 if ( !sigProcVtx ) continue;
358 const int sigProcBC = HepMC::barcode(sigProcVtx);
359 bool isInColl = false;
360 if (HepMC::barcode_to_vertex(*evt, sigProcBC)) isInColl = true;
361#ifdef HEPMC3
362//AV: We don't set nullptr as signal vertex in HepMC3
363 if ( !isInColl ) {
364 (*evt)->remove_attribute("signal_process_vertex");
365 }
366#else
367 if ( !isInColl ) {
368 (*evt)->set_signal_process_vertex(0);
369 }
370#endif
371 }//> loop over GenEvent's
372
373 return StatusCode::SUCCESS;
374}
DataModel_detail::iterator< DataVector > iterator
Definition DataVector.h:842
GenVertex * signal_process_vertex(const GenEvent *e)
Definition GenEvent.h:627
barcodes(beg, end, sz)
Definition Dumpers.py:2831

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doEtIsolation

BooleanProperty TruthParticleFilterBaseTool::m_doEtIsolation
protectedinherited

Switch to compute or not the Et-isolations for TruthParticle (and their underlying HepMC::GenParticle).

Default is to not compute these Et-isolations (and save CPU)

Definition at line 94 of file TruthParticleFilterBaseTool.h.

◆ m_etaRange

DoubleProperty PileupFilterTool::m_etaRange
protected

Eta acceptance cut applied on all stable particles.

Definition at line 118 of file PileupFilterTool.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_includePartonShowers

BooleanProperty PileupFilterTool::m_includePartonShowers
protected

Switch to include or not parton showers.

Definition at line 130 of file PileupFilterTool.h.

◆ m_includeSimul

BooleanProperty PileupFilterTool::m_includeSimul
protected

Switch to include or not particles from detector simulation (Geant4)

Definition at line 126 of file PileupFilterTool.h.

◆ m_isolationTool

IsolTool_t TruthParticleFilterBaseTool::m_isolationTool
protectedinherited

Pointer to the TruthIsolationTool to be able to compute transverse energy isolations for various isolation cones cuts.

See McParticleEvent/TruthParticleParameters.h for cone cuts.

Definition at line 85 of file TruthParticleFilterBaseTool.h.

◆ m_mcEventsOutputWriteHandleKey

SG::WriteHandleKey<McEventCollection> TruthParticleFilterBaseTool::m_mcEventsOutputWriteHandleKey {this,"McEventsOutput","GEN_AOD","WriteHandleKey for the output McEventCollection which has been filtered"}
protectedinherited

Location of the output McEventCollection which has been filtered.

Definition at line 104 of file TruthParticleFilterBaseTool.h.

104{this,"McEventsOutput","GEN_AOD","WriteHandleKey for the output McEventCollection which has been filtered"};

◆ m_mcEventsReadHandleKey

SG::ReadHandleKey<McEventCollection> TruthParticleFilterBaseTool::m_mcEventsReadHandleKey {this,"McEvents","TruthEvent","ReadHandleKey for input McEventCollection one wants to filter"}
protectedinherited

ReadHandleKey for the input McEventCollection one wants to filter.

Definition at line 100 of file TruthParticleFilterBaseTool.h.

100{this,"McEvents","TruthEvent","ReadHandleKey for input McEventCollection one wants to filter"};

◆ m_mcVtxFilterTool

McVtxFilterTool_t TruthParticleFilterBaseTool::m_mcVtxFilterTool
protectedinherited

Pointer to the McVtxFilterTool to be able to select additional vertices on some decay pattern criterion.

Definition at line 78 of file TruthParticleFilterBaseTool.h.

◆ m_particles

std::set<HepMC::ConstGenParticlePtr> PileupFilterTool::m_particles
protected

List of particles which have been labelled as "special".

Definition at line 101 of file PileupFilterTool.h.

◆ m_ptGamMin

DoubleProperty PileupFilterTool::m_ptGamMin
protected

Minimum threshold for transverse momentum of photons.

Definition at line 109 of file PileupFilterTool.h.

◆ m_ptMin

DoubleProperty PileupFilterTool::m_ptMin
protected

Minimum threshold for transverse momentum for all particles.

Warning: this cut is applied before Pt photon cut !

Definition at line 114 of file PileupFilterTool.h.

◆ m_removeDecayToSelf

BooleanProperty PileupFilterTool::m_removeDecayToSelf
protected

Switch to remove particles which decay into themselves (t->tg) but only for generated particles, not the ones from the Geant4 interactions.

Definition at line 139 of file PileupFilterTool.h.

◆ m_rIsol

DoubleProperty PileupFilterTool::m_rIsol
protected

deltaR isolation energy cut for electrons, muons, taus and photons

Definition at line 105 of file PileupFilterTool.h.

◆ m_rRange

DoubleProperty PileupFilterTool::m_rRange
protected

Radius acceptance cut on all stable particles.

Definition at line 122 of file PileupFilterTool.h.

◆ m_tesIO

TruthHelper::GenAccessIO* PileupFilterTool::m_tesIO
protected

Pointer to a StoreGateSvc helper (Mc particle retrieval with predicates)

Definition at line 134 of file PileupFilterTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: