|
ATLAS Offline Software
|
#include <PileupFilterTool.h>
|
| PileupFilterTool (const std::string &type, const std::string &name, const IInterface *parent) |
| Constructor with parameters: More...
|
|
virtual | ~PileupFilterTool () |
| Destructor: More...
|
|
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. More...
|
|
StatusCode | initialize () |
| Athena Algorithm's Hooks. More...
|
|
StatusCode | execute () |
|
StatusCode | finalize () |
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
Definition at line 28 of file PileupFilterTool.h.
◆ IsolTool_t
◆ McVtxFilterTool_t
◆ StoreGateSvc_t
◆ 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.
51 "DeltaR isolation energy cut for electrons, muons, "
56 "Minimum threshold for transverse momentum of photons" );
60 "Minimum threshold for transverse momentum for all particles.\n"
61 "Warning: this cut is applied *before* Pt photon cut !" );
65 "Eta acceptance cut applied on all stable particles" );
69 "radius acceptance - in milimeters - cut applied on all stable "
76 "Switch to include or not particles from detector simulation "
81 "Switch to include or not parton showers" );
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" );
◆ ~PileupFilterTool()
PileupFilterTool::~PileupFilterTool |
( |
| ) |
|
|
virtual |
◆ PileupFilterTool() [2/2]
PileupFilterTool::PileupFilterTool |
( |
| ) |
|
|
protected |
◆ buildMcAod()
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.
106 if (
nullptr == in ||
nullptr ==
out ) {
108 <<
" in: " << in <<
endmsg
110 return StatusCode::FAILURE;
114 out->operator=( *in );
118 ATH_MSG_ERROR(
"Could not select the \"special\" barcodes !!");
119 return StatusCode::FAILURE;
124 ATH_MSG_ERROR(
"Could not remove the not \"special\" particles from the "\
125 "filtered McEventCollection !!");
126 return StatusCode::FAILURE;
131 ATH_MSG_ERROR(
"Could not reconnect the particles in the filtered "\
132 "McEventCollection !!");
133 return StatusCode::FAILURE;
136 return StatusCode::SUCCESS;
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode TruthParticleFilterBaseTool::execute |
( |
| ) |
|
|
virtualinherited |
Implements ITruthParticleFilterTool.
Definition at line 120 of file TruthParticleFilterBaseTool.cxx.
127 if (!mcEventsReadHandle.isValid()){
129 return StatusCode::FAILURE;
134 ATH_CHECK(mcEventsOutputWriteHandle.record(std::make_unique<McEventCollection>()));
136 if (!mcEventsOutputWriteHandle.isValid()){
137 ATH_MSG_ERROR(
"Invalid WriteHamdle for McEventCollection with key ["
139 return StatusCode::FAILURE;
147 return StatusCode::FAILURE;
151 if ( this->
buildMcAod( mcEventsReadHandle.ptr(), mcEventsOutputWriteHandle.ptr() ).isFailure() ) {
153 return StatusCode::FAILURE;
164 "isolation energies !");
167 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
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 |
◆ finalizeTool()
StatusCode TruthParticleFilterBaseTool::finalizeTool |
( |
| ) |
|
|
inlineprotectedvirtualinherited |
◆ initialize()
StatusCode TruthParticleFilterBaseTool::initialize |
( |
| ) |
|
|
virtualinherited |
◆ initializeTool()
StatusCode PileupFilterTool::initializeTool |
( |
| ) |
|
|
protectedvirtual |
◆ inputHandles()
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 |
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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()
Rebuild the links between particles which were connected, eg by a long FSR chain.
Definition at line 421 of file PileupFilterTool.cxx.
427 return StatusCode::FAILURE;
430 if ( mcPart->end_vertex() ) {
431 ATH_MSG_VERBOSE(
"GenParticle has already a decay vertex : nothing to do");
432 return StatusCode::SUCCESS;
437 return StatusCode::FAILURE;
442 return StatusCode::FAILURE;
446 const int pdgId = mcPart->pdg_id();
458 ATH_MSG_VERBOSE(
"No decay vertex for the particle #" << bc <<
" : " <<
"No link to rebuild...");
459 return StatusCode::SUCCESS;
462 std::list<int> bcChildPart;
463 std::list<int> bcChildVert;
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()) {
476 if ( itrPart->pdg_id() == pdgId ) {
485 const HepMC::GenVertex::vertex_iterator endVtx = dcyVtx->vertices_end(HepMC::descendants);
486 for ( HepMC::GenVertex::vertex_iterator itrVtx = dcyVtx->vertices_begin( HepMC::descendants );
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();
498 bcChildPart.push_front( (*itrPart)->barcode() );
500 if ( (*itrPart)->pdg_id() == pdgId ) {
506 bcChildVert.push_front( (*itrVtx)->barcode() );
517 std::list<int>::const_iterator bcVtxEnd = bcChildVert.end();
518 for ( std::list<int>::const_iterator itrBcVtx = bcChildVert.begin(); itrBcVtx != bcVtxEnd; ++itrBcVtx ) {
521 if ( !childVtx->particles_in().empty() ) {
522 for (
const auto& itrPart: childVtx->particles_in()) {
523 if ( itrPart->pdg_id() == pdgId ) {
526 if ( !prodVtx->particles_in().empty() ) {
530 msg(
MSG::VERBOSE)<<
"found a particle = "<< itrPart <<
", "<<
"but its production vertex has incoming particles !" <<
endmsg;
537 outEvt->add_vertex( linkVtx );
538 linkVtx->add_particle_in( mcPart );
539 linkVtx->add_particle_out( itrPart );
541 msg(MSG::ERROR)<<
"=====================================================" <<
endmsg <<
"Created a GenVertex - link !" << std::endl;
542 std::stringstream vtxLink(
"");
544 msg(MSG::ERROR)<< vtxLink.str()<<
endmsg<<
"====================================================="<<
endmsg;
552 childVtx->add_particle_in(mcPart);
553 msg(MSG::WARNING) <<
"Odd situation:" << std::endl;
554 std::stringstream vtxDump(
"" );
556 msg(MSG::WARNING) << vtxDump.str() <<
endmsg;
557 return StatusCode::SUCCESS;
562 std::list<int>::const_iterator bcVtxEnd = bcChildVert.end();
563 for ( std::list<int>::const_iterator itrBcVtx = bcChildVert.begin();
564 itrBcVtx != bcVtxEnd;
566 HepMC::GenVertex * childVtx = outEvt->barcode_to_vertex(*itrBcVtx);
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();
573 if ( (*itrPart)->pdg_id() == pdgId ) {
574 HepMC::GenVertex * prodVtx = (*itrPart)->production_vertex();
576 if ( prodVtx->particles_in_size() > 0 ) {
580 msg(
MSG::VERBOSE)<<
"found a particle [bc,pdgId]= "<< (*itrPart)->barcode() <<
", "<<
"but its production vertex has incoming particles !" <<
endmsg;
587 outEvt->add_vertex( linkVtx );
588 linkVtx->add_particle_in( mcPart );
589 linkVtx->add_particle_out( *itrPart );
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;
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;
613 return StatusCode::FAILURE;
◆ reconnectParticles()
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.
378 if (
nullptr == in ||
nullptr ==
out ) {
380 return StatusCode::FAILURE;
383 for (
unsigned int iEvt = 0; iEvt != in->size(); ++iEvt) {
384 const HepMC::GenEvent *
evt = (*in)[iEvt];
385 HepMC::GenEvent * outEvt = (*out)[iEvt];
389 for (
const auto& itrPart: *outEvt) {
390 if ( itrPart->end_vertex() ) {
394 ATH_MSG_WARNING(
"Could not rebuild links for this particle [pdgId,particle]= "<< itrPart->pdg_id() <<
", " << itrPart);
396 msg(
MSG::VERBOSE)<<
"==========================================================="<<
endmsg<<
"Production vertex for particle " << itrPart <<
" : ";
397 if ( itrPart->production_vertex() ) {
398 std::stringstream prodVtx(
"");
406 if ( itrPart->end_vertex() ) {
407 std::stringstream dcyVtx(
"");
418 return StatusCode::SUCCESS;
◆ renounce()
◆ renounceArray()
◆ 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.
148 std::vector<HepMC::ConstGenParticlePtr>
particles;
154 if (
sc.isFailure() ) {
156 return StatusCode::FAILURE;
164 if(
sc.isFailure() ) {
166 return StatusCode::SUCCESS;
173 for ( ; mcEventItr != mcEventItrE; ++mcEventItr ) {
175 const HepMC::GenEvent* genEvent = (*mcEventItr);
178 auto vxp = genEvent->vertices().begin();
180 HepMC::GenEvent::vertex_const_iterator vxp = genEvent->vertices_begin();
182 const float xp = (*vxp)->position().x();
183 const float yp = (*vxp)->position().y();
184 const float zp = (*vxp)->position().z();
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();
198 float xi = (prodVtx->position()).
x();
199 float yi = (prodVtx->position()).
y();
200 float zi = (prodVtx->position()).
z();
202 ATH_MSG_DEBUG(
"Primary Vertex = " << xp <<
" " << yp <<
" " << zp <<
" " <<
"Production Vertex = " << xi <<
" " << yi <<
" " << zi <<
" " <<
"Particle ID = " <<
id);
204 float deltaR = std::sqrt( (xp-xi)*(xp-xi) + (yp-yi)*(yp-yi) );
220 if( !isSpcl )
continue;
224 if( isSpcl && decayVtx ) {
225 for(
const auto& child: *(
part->end_vertex())) {
235 return StatusCode::SUCCESS;
◆ shapeGenEvent()
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.
242 std::vector<HepMC::GenParticlePtr> going_out;
243 std::list<int> evtBarcodes;
245 const auto &
barcodes = (*evt)->attribute<HepMC::GenEventBarcodes> (
"barcodes");
246 std::map<int,int> id_to_barcode_map;
248 for (
const auto& keyval: id_to_barcode_map) evtBarcodes.push_back(keyval.second);
250 for (
const auto&
p: **
evt) {
255 for ( std::list<int>::const_iterator itrBc = evtBarcodes.begin(); itrBc != evtBarcodes.end(); ++itrBc ) {
260 going_out.push_back(
p);
264 std::pair<int,int> bcNext( 0, 0 );
266 msg(
MSG::DEBUG) <<
"Removing [" <<
p <<
"]" <<
"\tprod/endVtx: " << pvtx <<
"/" << evtx <<
endmsg;
267 std::list<int>::const_iterator pNext = itrBc;
269 if ( pNext != evtBarcodes.end() ) {
274 if (pvtx) pvtx->remove_particle_out(
p);
276 if (pvtx) pvtx->remove_particle(
p);
284 while ( evtx->particles_out().begin() != evtx->particles_out().end()) {
285 pvtx->add_particle_out(evtx->particles_out().front());
288 evtx->remove_particle_out(
p);
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);
295 evtx->remove_particle(
p);
300 std::list<int>::const_iterator pNext = itrBc;
302 if ( pNext != evtBarcodes.end() ) {
306 if ( bcNext.first != bcNext.second ) {
307 ATH_MSG_WARNING(
"\tIterator has been CORRUPTED !!" <<
endmsg <<
"\tbcNext: " << bcNext.first <<
" --> " << bcNext.second);
309 ATH_MSG_DEBUG(
"\tIterator OK:" <<
endmsg <<
"\tbcNext: " << bcNext.first <<
" --> " << bcNext.second);
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);
329 d != going_out.end();
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);
346 d != going_out_again.end();
357 if ( !sigProcVtx )
continue;
359 bool isInColl =
false;
364 (*evt)->remove_attribute(
"signal_process_vertex");
368 (*evt)->set_signal_process_vertex(0);
373 return StatusCode::SUCCESS;
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_detStore
◆ m_doEtIsolation
BooleanProperty TruthParticleFilterBaseTool::m_doEtIsolation |
|
protectedinherited |
◆ m_etaRange
DoubleProperty PileupFilterTool::m_etaRange |
|
protected |
◆ m_evtStore
◆ m_includePartonShowers
BooleanProperty PileupFilterTool::m_includePartonShowers |
|
protected |
◆ 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 |
◆ m_mcEventsOutputWriteHandleKey
◆ m_mcEventsReadHandleKey
◆ m_mcVtxFilterTool
◆ m_particles
List of particles which have been labelled as "special".
Definition at line 101 of file PileupFilterTool.h.
◆ m_ptGamMin
DoubleProperty PileupFilterTool::m_ptGamMin |
|
protected |
◆ 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 |
◆ m_tesIO
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
HepMC::GenVertex * GenVertexPtr
JetConstituentVector::iterator iterator
BooleanProperty m_doEtIsolation
Switch to compute or not the Et-isolations for TruthParticle (and their underlying HepMC::GenParticle...
Const iterator class for DataVector/DataList.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
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 ...
StatusCode accept(const xAOD::Muon *mu)
GenParticle * GenParticlePtr
virtual StatusCode finalizeTool()
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool msgLvl(const MSG::Level lvl) const
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
void line(std::ostream &os, const GenEvent &e)
bool isGenStable(const T &p)
Determine if the particle is stable at the generator (not det-sim) level,.
virtual StatusCode initializeTool()
I/O operators.
virtual void setOwner(IDataHandleHolder *o)=0
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
GenParticle * barcode_to_particle(const GenEvent *e, int id)
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...
(Non-const) Iterator class for DataVector/DataList.
GenVertexPtr newGenVertexPtr(const HepMC::FourVector &pos=HepMC::FourVector(0.0, 0.0, 0.0, 0.0), const int i=0)
def barcodes(beg, end, sz)
SG::ReadHandleKey< McEventCollection > m_mcEventsReadHandleKey
ReadHandleKey for the input McEventCollection one wants to filter.
::StatusCode StatusCode
StatusCode definition for legacy code.
McVtxFilterTool_t m_mcVtxFilterTool
Pointer to the McVtxFilterTool to be able to select additional vertices on some decay pattern criteri...
IsolTool_t m_isolationTool
Pointer to the TruthIsolationTool to be able to compute transverse energy isolations for various isol...
StatusCode getMC(MCParticleCollection &mcParticles, const bool ifgen=false, const std::string &key="GEN_EVENT") const
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
const GenParticle * ConstGenParticlePtr
TruthParticleFilterBaseTool()
Default constructor:
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
GenVertex * barcode_to_vertex(const GenEvent *e, int id)
const HepMC::GenVertex * ConstGenVertexPtr
bool isSimStable(const T &p)
Identify if the particle is considered stable at the post-detector-sim stage.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
SG::WriteHandleKey< McEventCollection > m_mcEventsOutputWriteHandleKey
Location of the output McEventCollection which has been filtered.
GenVertex * signal_process_vertex(const GenEvent *e)