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 617 of file PileupFilterTool.cxx.

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

◆ 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 422 of file PileupFilterTool.cxx.

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

378{
379 if ( nullptr == in || nullptr == out ) {
380 ATH_MSG_ERROR("Invalid pointer to McEventCollection !!" << endmsg << " in: " << in << endmsg << " out: " << out);
381 return StatusCode::FAILURE;
382 }
383
384 for ( unsigned int iEvt = 0; iEvt != in->size(); ++iEvt) {
385 const HepMC::GenEvent * evt = (*in)[iEvt];
386 HepMC::GenEvent * outEvt = (*out)[iEvt];
387
388 // Reconnect the particles
389 ATH_MSG_VERBOSE("Reconnecting particles...");
390 for ( const auto& itrPart: *outEvt) {
391 if ( itrPart->end_vertex() ) {
392 continue;
393 }
394 if ( rebuildLinks( evt, outEvt, itrPart ).isFailure() ) {
395 ATH_MSG_WARNING("Could not rebuild links for this particle [pdgId,particle]= "<< itrPart->pdg_id() << ", " << itrPart);
396 } else if ( msgLvl(MSG::VERBOSE) ) {
397 msg(MSG::VERBOSE)<< "==========================================================="<< endmsg<< "Production vertex for particle " << itrPart << " : ";
398 if ( itrPart->production_vertex() ) {
399 std::stringstream prodVtx("");
400 HepMC::Print::line(prodVtx,itrPart->production_vertex());
401 msg(MSG::VERBOSE) << std::endl<< prodVtx.str()<< endmsg;
402 } else {
403 msg(MSG::VERBOSE) << "[No production vertex]" << endmsg;
404 }
405
406 msg(MSG::VERBOSE) << "Decay vertex for particle " << itrPart << " : ";
407 if ( itrPart->end_vertex() ) {
408 std::stringstream dcyVtx("");
409 HepMC::Print::line(dcyVtx,itrPart->end_vertex());
410 msg(MSG::VERBOSE) << std::endl<< dcyVtx.str() << endmsg;
411 } else {
412 msg(MSG::VERBOSE) << endmsg << "[No decay vertex]" << endmsg;
413 }
414 }//> end VERBOSE messages
415
416 }//> loop over particles
417 }//> loop over GenEvents
418
419 return StatusCode::SUCCESS;
420}
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 const std::string barcodeStr{"barcodes"};
242 for ( McEventCollection::iterator evt = genAod->begin(); evt != genAod->end();++evt) {
243 std::vector<HepMC::GenParticlePtr> going_out;
244 std::list<int> evtBarcodes;
245#ifdef HEPMC3
246 const auto &barcodes = (*evt)->attribute<HepMC::GenEventBarcodes> (barcodeStr);
247 std::map<int,int> id_to_barcode_map;
248 if (barcodes) id_to_barcode_map = barcodes->id_to_barcode_map();
249 for (const auto& keyval: id_to_barcode_map) evtBarcodes.push_back(keyval.second);
250#else
251 for ( const auto& p: **evt) {
252 evtBarcodes.push_back( HepMC::barcode(p) );
253 }
254#endif
255
256 for ( std::list<int>::const_iterator itrBc = evtBarcodes.begin(); itrBc != evtBarcodes.end(); ++itrBc ) {
257//AV: We modify the event!
258 HepMC::GenParticlePtr p = HepMC::barcode_to_particle((HepMC::GenEvent*)(*evt),*itrBc);
259 ATH_MSG_DEBUG("[pdg,particle]= " << p->pdg_id() << ", " << p);
260 if ( m_particles.count(p) == 0) {
261 going_out.push_back(p); // list of useless particles
262 HepMC::GenVertexPtr pvtx = p->production_vertex();
263 HepMC::GenVertexPtr evtx = p->end_vertex();
264
265 std::pair<int,int> bcNext( 0, 0 );
266 if ( msgLvl(MSG::DEBUG) ) {
267 msg(MSG::DEBUG) << "Removing [" <<p << "]" << "\tprod/endVtx: " << pvtx << "/" << evtx << endmsg;
268 std::list<int>::const_iterator pNext = itrBc;
269 ++pNext;
270 if ( pNext != evtBarcodes.end() ) {
271 bcNext.first = HepMC::barcode(HepMC::barcode_to_particle(*evt,*pNext));
272 }
273 }
274#ifdef HEPMC3
275 if (pvtx) pvtx->remove_particle_out(p); //remove from production vertex from useless particle
276#else
277 if (pvtx) pvtx->remove_particle(p); //remove from production vertex from useless particle
278#endif
279 if (evtx) { // if it has end vertex, may need to move the out partilces
280 if(pvtx){ // move the partilces back
281 if ( msgLvl(MSG::DEBUG) ) {
282 msg(MSG::DEBUG) << "\tin endVtx "<< endmsg;
283 }
284#ifdef HEPMC3
285 while ( evtx->particles_out().begin() != evtx->particles_out().end()) {
286 pvtx->add_particle_out(evtx->particles_out().front());
287 }
288 }//> end if [prod vertex]
289 evtx->remove_particle_out(std::move(p)); // disconnect from end vertex
290#else
291 while ( evtx->particles_out_const_begin() != evtx->particles_out_const_end()) {
292 HepMC::GenVertex::particles_out_const_iterator np = evtx->particles_out_const_begin();
293 pvtx->add_particle_out(*np); // note that this really is a MOVE!!! it get taken off evtx by magic
294 }
295 }//> end if [prod vertex]
296 evtx->remove_particle(p); // disconnect from end vertex
297#endif
298 }//> end if [decay vertex]
299
300 if ( msgLvl(MSG::DEBUG) ) {
301 std::list<int>::const_iterator pNext = itrBc;
302 ++pNext;
303 if ( pNext != evtBarcodes.end() ) {
304 bcNext.second = HepMC::barcode(HepMC::barcode_to_particle(*evt,*pNext));
305 }
306
307 if ( bcNext.first != bcNext.second ) {
308 ATH_MSG_WARNING("\tIterator has been CORRUPTED !!" << endmsg << "\tbcNext: " << bcNext.first << " --> " << bcNext.second);
309 } else {
310 ATH_MSG_DEBUG("\tIterator OK:" << endmsg << "\tbcNext: " << bcNext.first << " --> " << bcNext.second);
311 }
312 }
313
314 }//> particle has to be removed
315 }//> loop over particles
316
317
318#ifdef HEPMC3
319 // there may be a bunch of vertices with no particles connected to them:
320 // ==> Get rid of them
321 std::vector<HepMC::ConstGenVertexPtr> going_out_again;
322 for ( auto& v: (*evt)->vertices() ) {
323 if ( v->particles_in().empty() && v->particles_out().empty() ){
324 going_out_again.push_back(v);
325 }
326 }//> loop over vertices
327#else
328 // now get rid of all dead particles
329 for ( std::vector<HepMC::GenParticle*>::iterator d = going_out.begin();
330 d != going_out.end();
331 ++d ){
332 delete *d;
333 }
334
335 // there may be a bunch of vertices with no particles connected to them:
336 // ==> Get rid of them
337 std::vector<HepMC::GenVertex*> going_out_again;
338 for ( HepMC::GenEvent::vertex_const_iterator v = (*evt)->vertices_begin();
339 v != (*evt)->vertices_end(); ++v ) {
340 if ( (*v)->particles_in_size() == 0 && (*v)->particles_out_size() == 0 ){
341 going_out_again.push_back(*v);
342 }
343 }//> loop over vertices
344
345 // now get rid of all dead vertices
346 for ( std::vector<HepMC::GenVertex*>::iterator d = going_out_again.begin();
347 d != going_out_again.end();
348 ++d ){
349 delete *d;
350 }
351#endif
352
353 }//> loop over GenEvents in McEventCollection
354
355 // Set the signal_process_vertex to NULL if not to be recorded
356 for ( McEventCollection::iterator evt = genAod->begin(); evt != genAod->end(); ++evt) {
357 auto sigProcVtx = HepMC::signal_process_vertex(*evt);
358 if ( !sigProcVtx ) continue;
359 const int sigProcBC = HepMC::barcode(sigProcVtx);
360 bool isInColl = false;
361 if (HepMC::barcode_to_vertex(*evt, sigProcBC)) isInColl = true;
362#ifdef HEPMC3
363//AV: We don't set nullptr as signal vertex in HepMC3
364 if ( !isInColl ) {
365 (*evt)->remove_attribute("signal_process_vertex");
366 }
367#else
368 if ( !isInColl ) {
369 (*evt)->set_signal_process_vertex(0);
370 }
371#endif
372 }//> loop over GenEvent's
373
374 return StatusCode::SUCCESS;
375}
DataModel_detail::iterator< DataVector > iterator
Definition DataVector.h:842
GenVertex * signal_process_vertex(const GenEvent *e)
Definition GenEvent.h:645
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: