ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
|
#include <coresoftware/blob/master/generators/decayFinder/DecayFinder.h>
Public Types | |
typedef std::vector< std::pair < int, int > > | Decay |
Public Member Functions | |
DecayFinder () | |
DecayFinder (const std::string &name) | |
virtual | ~DecayFinder () |
int | Init (PHCompositeNode *topNode) |
int | process_event (PHCompositeNode *topNode) |
int | End (PHCompositeNode *topNode) |
Called at the end of all processing. | |
int | parseDecayDescriptor () |
bool | findDecay (PHCompositeNode *topNode) |
bool | findParticle (std::string particle) |
int | checkIfCorrectParticle (HepMC::GenParticle *particle, bool &trackFailedPT, bool &trackFailedETA) |
int | deleteElement (int arr[], int n, int x) |
void | multiplyVectorByScalarAndSort (std::vector< int > &v, int k) |
int | get_pdgcode (std::string name) |
int | get_charge (std::string name) |
int | createDecayNode (PHCompositeNode *topNode) |
void | fillDecayNode (PHCompositeNode *topNode, Decay decay) |
void | printInfo () |
void | printNode (PHCompositeNode *topNode) |
void | setDecayDescriptor (const std::string &decayDescriptor) |
You define a particle decaying with "->", the mother on the left, the decay products on the right. | |
void | triggerOnDecay (bool trigger) |
void | allowPhotons (bool allow) |
void | allowPi0 (bool allow) |
void | saveDST (bool save) |
void | setNodeName (const std::string &name) |
Public Member Functions inherited from SubsysReco | |
~SubsysReco () override | |
virtual int | EndRun (const int) |
Called at the end of each run. | |
virtual int | InitRun (PHCompositeNode *) |
virtual int | Reset (PHCompositeNode *) |
Reset. | |
virtual int | ResetEvent (PHCompositeNode *) |
Clean up after each event. | |
void | Print (const std::string &="ALL") const override |
Public Member Functions inherited from Fun4AllBase | |
virtual | ~Fun4AllBase () |
virtual const std::string | Name () const |
Returns the name of this module. | |
virtual void | Name (const std::string &name) |
Sets the name of this module. | |
virtual void | Verbosity (const int ival) |
Sets the verbosity of this module (0 by default=quiet). | |
virtual void | Verbosity (enu_Verbosity ival) |
Sets the verbosity of this module (0 by default=quiet). | |
virtual int | Verbosity () const |
Gets the verbosity of this module. | |
Private Attributes | |
PHHepMCGenEventMap * | m_geneventmap = nullptr |
PHHepMCGenEvent * | m_genevt = nullptr |
int | m_counter = 0 |
int | m_nCandFail_pT = 0 |
int | m_nCandFail_eta = 0 |
int | m_nCandFail_pT_and_eta = 0 |
int | m_nCandReconstructable = 0 |
bool | m_getChargeConjugate = false |
std::string | m_decayDescriptor |
bool | m_triggerOnDecay = false |
bool | m_allowPi0 = false |
bool | m_allowPhotons = false |
int | m_mother_ID = 0 |
std::vector< int > | m_intermediates_ID |
std::vector< int > | m_daughters_ID |
int | m_nTracksFromMother = 0 |
std::vector< int > | m_nTracksFromIntermediates |
std::vector< int > | m_motherDecayProducts |
bool | m_save_dst |
DecayFinderContainer_v1 * | m_decayMap = nullptr |
Decay | decayChain |
std::string | m_nodeName |
std::string | m_container_name |
Additional Inherited Members | |
Protected Member Functions inherited from SubsysReco | |
SubsysReco (const std::string &name="NONAME") | |
Definition at line 18 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 18 of file DecayFinder.h
typedef std::vector<std::pair<int, int> > DecayFinder::Decay |
Definition at line 21 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 21 of file DecayFinder.h
DecayFinder::DecayFinder | ( | ) |
Definition at line 57 of file DecayFinder.cc.
View newest version in sPHENIX GitHub at line 57 of file DecayFinder.cc
|
explicit |
Definition at line 62 of file DecayFinder.cc.
View newest version in sPHENIX GitHub at line 62 of file DecayFinder.cc
|
inlinevirtual |
Definition at line 27 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 27 of file DecayFinder.h
|
inline |
[in] | allow | Set to true to allow photons to be associated to your decay |
Definition at line 91 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 91 of file DecayFinder.h
References m_allowPhotons.
|
inline |
[in] | allow | Set to true to allow pi zero to be associated to your decay |
Definition at line 95 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 95 of file DecayFinder.h
References m_allowPi0.
int DecayFinder::checkIfCorrectParticle | ( | HepMC::GenParticle * | particle, |
bool & | trackFailedPT, | ||
bool & | trackFailedETA | ||
) |
Definition at line 400 of file DecayFinder.cc.
View newest version in sPHENIX GitHub at line 400 of file DecayFinder.cc
References kdfinder::abs(), it, listOfResonantPIDs, m_allowPhotons, m_allowPi0, m_daughters_ID, m_getChargeConjugate, m_intermediates_ID, m_nTracksFromIntermediates, multiplyVectorByScalarAndSort(), Fun4AllBase::Verbosity(), and Fun4AllBase::VERBOSITY_MAX.
Referenced by findDecay().
int DecayFinder::createDecayNode | ( | PHCompositeNode * | topNode | ) |
Definition at line 603 of file DecayFinder.cc.
View newest version in sPHENIX GitHub at line 603 of file DecayFinder.cc
References PHCompositeNode::addNode(), Fun4AllReturnCodes::EVENT_OK, PHNodeIterator::findFirst(), m_container_name, m_decayMap, m_nodeName, and pos().
Referenced by Init().
Definition at line 542 of file DecayFinder.cc.
View newest version in sPHENIX GitHub at line 542 of file DecayFinder.cc
References n.
Referenced by findDecay().
|
virtual |
Called at the end of all processing.
Reimplemented from SubsysReco.
Definition at line 103 of file DecayFinder.cc.
View newest version in sPHENIX GitHub at line 103 of file DecayFinder.cc
References printInfo(), Fun4AllBase::Verbosity(), and Fun4AllBase::VERBOSITY_SOME.
void DecayFinder::fillDecayNode | ( | PHCompositeNode * | topNode, |
Decay | decay | ||
) |
Definition at line 649 of file DecayFinder.cc.
View newest version in sPHENIX GitHub at line 649 of file DecayFinder.cc
References DecayFinderContainer_v1::insert(), m_decayMap, and m_nodeName.
Referenced by findDecay().
bool DecayFinder::findDecay | ( | PHCompositeNode * | topNode | ) |
Definition at line 251 of file DecayFinder.cc.
View newest version in sPHENIX GitHub at line 251 of file DecayFinder.cc
References kdfinder::abs(), checkIfCorrectParticle(), decayChain, deleteElement(), fillDecayNode(), PHHepMCGenEventMap::get(), PHHepMCGenEvent::getEvent(), listOfResonantPIDs, m_allowPhotons, m_allowPi0, m_geneventmap, m_genevt, m_getChargeConjugate, m_intermediates_ID, m_mother_ID, m_motherDecayProducts, m_nCandFail_eta, m_nCandFail_pT, m_nCandFail_pT_and_eta, m_nCandReconstructable, m_save_dst, multiplyVectorByScalarAndSort(), n, Fun4AllBase::Verbosity(), and Fun4AllBase::VERBOSITY_MAX.
Referenced by process_event().
bool DecayFinder::findParticle | ( | std::string | particle | ) |
Definition at line 564 of file DecayFinder.cc.
View newest version in sPHENIX GitHub at line 564 of file DecayFinder.cc
References Fun4AllBase::Verbosity(), and Fun4AllBase::VERBOSITY_SOME.
Referenced by get_charge(), get_pdgcode(), and parseDecayDescriptor().
int DecayFinder::get_charge | ( | std::string | name | ) |
Definition at line 594 of file DecayFinder.cc.
View newest version in sPHENIX GitHub at line 594 of file DecayFinder.cc
References findParticle().
Referenced by parseDecayDescriptor().
int DecayFinder::get_pdgcode | ( | std::string | name | ) |
Definition at line 586 of file DecayFinder.cc.
View newest version in sPHENIX GitHub at line 586 of file DecayFinder.cc
References findParticle().
Referenced by parseDecayDescriptor().
|
virtual |
Called during initialization. Typically this is where you can book histograms, and e.g. register them to Fun4AllServer (so they can be output to file using Fun4AllServer::dumpHistos() method).
Reimplemented from SubsysReco.
Definition at line 67 of file DecayFinder.cc.
View newest version in sPHENIX GitHub at line 67 of file DecayFinder.cc
References createDecayNode(), m_decayDescriptor, m_save_dst, Fun4AllBase::Name(), parseDecayDescriptor(), Fun4AllBase::Verbosity(), and Fun4AllBase::VERBOSITY_SOME.
Definition at line 579 of file DecayFinder.cc.
View newest version in sPHENIX GitHub at line 579 of file DecayFinder.cc
References c, k, and Acts::Test::transform.
Referenced by checkIfCorrectParticle(), and findDecay().
int DecayFinder::parseDecayDescriptor | ( | ) |
Definition at line 110 of file DecayFinder.cc.
View newest version in sPHENIX GitHub at line 110 of file DecayFinder.cc
References kdfinder::abs(), c, Fun4AllReturnCodes::DONOTREGISTERSUBSYSTEM, findParticle(), get_charge(), get_pdgcode(), m_daughters_ID, m_decayDescriptor, m_getChargeConjugate, m_intermediates_ID, m_mother_ID, m_motherDecayProducts, m_nTracksFromIntermediates, m_nTracksFromMother, Fun4AllBase::Name(), pos(), Fun4AllBase::Verbosity(), Fun4AllBase::VERBOSITY_MORE, and Fun4AllBase::VERBOSITY_SOME.
Referenced by Init().
void DecayFinder::printInfo | ( | ) |
Definition at line 655 of file DecayFinder.cc.
View newest version in sPHENIX GitHub at line 655 of file DecayFinder.cc
References m_counter, m_decayDescriptor, m_nCandFail_eta, m_nCandFail_pT, m_nCandFail_pT_and_eta, m_nCandReconstructable, and Fun4AllBase::Name().
Referenced by End().
void DecayFinder::printNode | ( | PHCompositeNode * | topNode | ) |
Definition at line 669 of file DecayFinder.cc.
View newest version in sPHENIX GitHub at line 669 of file DecayFinder.cc
References DecayFinderContainer_v1::begin(), G4INCL::ClusterDecay::decay(), DecayFinderContainer_v1::end(), and m_nodeName.
Referenced by process_event().
|
virtual |
Called for each event. This is where you do the real work.
Reimplemented from SubsysReco.
Definition at line 82 of file DecayFinder.cc.
View newest version in sPHENIX GitHub at line 82 of file DecayFinder.cc
References Fun4AllReturnCodes::ABORTEVENT, Fun4AllReturnCodes::EVENT_OK, findDecay(), m_counter, m_decayDescriptor, m_triggerOnDecay, printNode(), Fun4AllBase::Verbosity(), and Fun4AllBase::VERBOSITY_MORE.
|
inline |
[in] | allow | Set to true to save any of your decays that are found back to the node tree in a DecayFinderContainer The default name is "decay" and will automatically have "_DecayMap" added to the end |
Definition at line 100 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 100 of file DecayFinder.h
References m_save_dst.
|
inline |
You define a particle decaying with "->", the mother on the left, the decay products on the right.
Use this function to define the decay you want to find in the HepMC record
[in] | decayDescriptor | the description of the decay chain, this is a string You define the decay with these rules: Set the charge of final state tracks with "^", the particle name on the left and the charge on the right. Accepted charges are +, - and 0 Use the same rules as above for any intermediatee decays but contain the entire decay within curled brackets, "{}" If you also want to find the charge conjugate decay, contain the entire decay descriptor within "[]cc" for charge-conjugate. The "cc" is NOT case sensitive The particle names you use must be kept in the TDatabasePDG class from root (https://root.cern.ch/doc/master/classTDatabasePDG.html). Print this table to see available particles with TDatabasePDG::Instance()->Print() An example of a decay would be: "[B+ -> {D0_bar -> kaon^+ pion^-} pion^+]cc" |
Definition at line 81 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 81 of file DecayFinder.h
References m_decayDescriptor.
|
inline |
[in] | name | Change the default name of the DecayFinderContainer. |
Definition at line 105 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 105 of file DecayFinder.h
References m_container_name.
|
inline |
[in] | trigger | Set to true to allow further processing of events in which your decay appears, if your decay does not appear, all further processing of this event is skipped. This defaults to false so every event is proccessed in F4A |
Definition at line 87 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 87 of file DecayFinder.h
References m_triggerOnDecay.
|
private |
Definition at line 135 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 135 of file DecayFinder.h
Referenced by findDecay().
|
private |
Definition at line 122 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 122 of file DecayFinder.h
Referenced by allowPhotons(), checkIfCorrectParticle(), and findDecay().
|
private |
Definition at line 121 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 121 of file DecayFinder.h
Referenced by allowPi0(), checkIfCorrectParticle(), and findDecay().
|
private |
Definition at line 137 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 137 of file DecayFinder.h
Referenced by createDecayNode(), and setNodeName().
|
private |
Definition at line 111 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 111 of file DecayFinder.h
Referenced by printInfo(), and process_event().
|
private |
Definition at line 126 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 126 of file DecayFinder.h
Referenced by checkIfCorrectParticle(), and parseDecayDescriptor().
|
private |
Definition at line 119 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 119 of file DecayFinder.h
Referenced by Init(), parseDecayDescriptor(), printInfo(), process_event(), and setDecayDescriptor().
|
private |
Definition at line 134 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 134 of file DecayFinder.h
Referenced by createDecayNode(), and fillDecayNode().
|
private |
Definition at line 108 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 108 of file DecayFinder.h
Referenced by findDecay().
|
private |
Definition at line 109 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 109 of file DecayFinder.h
Referenced by findDecay().
|
private |
Definition at line 117 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 117 of file DecayFinder.h
Referenced by checkIfCorrectParticle(), findDecay(), and parseDecayDescriptor().
|
private |
Definition at line 125 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 125 of file DecayFinder.h
Referenced by checkIfCorrectParticle(), findDecay(), and parseDecayDescriptor().
|
private |
Definition at line 124 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 124 of file DecayFinder.h
Referenced by findDecay(), and parseDecayDescriptor().
|
private |
Definition at line 131 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 131 of file DecayFinder.h
Referenced by findDecay(), and parseDecayDescriptor().
|
private |
Definition at line 113 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 113 of file DecayFinder.h
Referenced by findDecay(), and printInfo().
|
private |
Definition at line 112 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 112 of file DecayFinder.h
Referenced by findDecay(), and printInfo().
|
private |
Definition at line 114 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 114 of file DecayFinder.h
Referenced by findDecay(), and printInfo().
|
private |
Definition at line 115 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 115 of file DecayFinder.h
Referenced by findDecay(), and printInfo().
|
private |
Definition at line 136 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 136 of file DecayFinder.h
Referenced by createDecayNode(), fillDecayNode(), and printNode().
|
private |
Definition at line 129 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 129 of file DecayFinder.h
Referenced by checkIfCorrectParticle(), and parseDecayDescriptor().
|
private |
Definition at line 128 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 128 of file DecayFinder.h
Referenced by parseDecayDescriptor().
|
private |
Definition at line 133 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 133 of file DecayFinder.h
Referenced by findDecay(), Init(), and saveDST().
|
private |
Definition at line 120 of file DecayFinder.h.
View newest version in sPHENIX GitHub at line 120 of file DecayFinder.h
Referenced by process_event(), and triggerOnDecay().