#include <PFTauDecayMode.h>
Public Types | |
enum | hadronicTauDecayModes { tauDecay1ChargedPion0PiZero, tauDecay1ChargedPion1PiZero, tauDecay1ChargedPion2PiZero, tauDecay1ChargedPion3PiZero, tauDecay1ChargedPion4PiZero, tauDecay2ChargedPion0PiZero, tauDecay2ChargedPion1PiZero, tauDecay2ChargedPion2PiZero, tauDecay2ChargedPion3PiZero, tauDecay2ChargedPion4PiZero, tauDecay3ChargedPion0PiZero, tauDecay3ChargedPion1PiZero, tauDecay3ChargedPion2PiZero, tauDecay3ChargedPion3PiZero, tauDecay3ChargedPion4PiZero, tauDecaysElectron, tauDecayMuon, tauDecayOther } |
Public Member Functions | |
PFCandidateRefVector | associatedChargedPFCandidates () const |
returns the PFCandidates associated to the charged signal objects | |
PFCandidateRefVector | associatedNeutralPFCandidates () const |
returns the PFCandidates associated to the PiZero signal objects (i.e., the unmerged photons) | |
std::vector< const Candidate * > | chargedFilteredObjectCandidates () const |
returns only charged filtered objects | |
std::vector< const Candidate * > | chargedPionCandidates () const |
returns pointers to charged pions | |
const VertexCompositeCandidate & | chargedPions () const |
returns collection of charged pions w/ vertex information (tracks are refit) | |
PFTauDecayMode * | clone () const |
returns a clone of the candidate | |
std::vector< const Candidate * > | decayProductCandidates () const |
returns pointers to non-filtered objects | |
std::vector< const Candidate * > | filteredObjectCandidates (int absCharge=-2) const |
returns pointers to filtered objects (i.e. those not included in signal objects) | |
const CompositeCandidate & | filteredObjects () const |
returns references to PF objects that were filtered | |
PFCandidateRefVector | filteredPFCandidates () const |
returns the PFCandidates that were filtered | |
hadronicTauDecayModes | getDecayMode () const |
std::vector< const Candidate * > | neutralFilteredObjectCandidates () const |
returns only netural filtered objects | |
std::vector< const Candidate * > | neutralPionCandidates () const |
returns pointers to neutral pions | |
const CompositeCandidate & | neutralPions () const |
returns a collection of merged Pi0s | |
void | pfMasterClones (const Candidate *input, PFCandidateRefVector &toFill) const |
fills master clones to PF objects (utility function) | |
PFTauDecayMode () | |
PFTauDecayMode (Charge q, const LorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=12, int status=2, bool integerCharge=true) | |
constructor from values | |
PFTauDecayMode (const VertexCompositeCandidate &chargedPions, const CompositeCandidate &piZeroes, const CompositeCandidate &filteredObjects) | |
constructor from candidate content | |
const PFTauRef & | pfTauRef () const |
return reference to associated PFTau object | |
void | setDecayMode (hadronicTauDecayModes theDecayMode) |
void | setPFTauRef (const PFTauRef &theTau) |
virtual | ~PFTauDecayMode () |
Static Public Attributes | |
static const unsigned char | maxNumberOfPiZeroCandidatesAllowed = 4 |
Protected Attributes | |
VertexCompositeCandidate | chargedPions_ |
CompositeCandidate | filteredObjects_ |
PFTauRef | pfTauRef_ |
CompositeCandidate | piZeroes_ |
hadronicTauDecayModes | theDecayMode_ |
Definition at line 28 of file PFTauDecayMode.h.
Definition at line 33 of file PFTauDecayMode.h.
{ tauDecay1ChargedPion0PiZero, tauDecay1ChargedPion1PiZero, // rho (770 MeV) mediated) tauDecay1ChargedPion2PiZero, // a1 (1.2 GeV) mediated tauDecay1ChargedPion3PiZero, // contaminated or unmerged photo tauDecay1ChargedPion4PiZero, // contaminated or unmerged photo tauDecay2ChargedPion0PiZero, // extra track or un-recod track tauDecay2ChargedPion1PiZero, // extra track or un-recod track tauDecay2ChargedPion2PiZero, // extra track or un-recod track tauDecay2ChargedPion3PiZero, // extra track or un-recod track tauDecay2ChargedPion4PiZero, // extra track or un-recod track tauDecay3ChargedPion0PiZero, // a1 (1.2 GeV) mediated tauDecay3ChargedPion1PiZero, // a1 (1.2 GeV) mediated tauDecay3ChargedPion2PiZero, // a1 (1.2 GeV) mediated tauDecay3ChargedPion3PiZero, // a1 (1.2 GeV) mediated tauDecay3ChargedPion4PiZero, // a1 (1.2 GeV) mediated tauDecaysElectron, tauDecayMuon, tauDecayOther // catch-all };
reco::PFTauDecayMode::PFTauDecayMode | ( | ) | [inline] |
reco::PFTauDecayMode::PFTauDecayMode | ( | Charge | q, |
const LorentzVector & | p4, | ||
const Point & | vtx = Point( 0, 0, 0 ) , |
||
int | pdgId = 12 , |
||
int | status = 2 , |
||
bool | integerCharge = true |
||
) | [inline] |
constructor from values
Definition at line 57 of file PFTauDecayMode.h.
:CompositeCandidate(q, p4, vtx, pdgId, status, integerCharge){}
reco::PFTauDecayMode::PFTauDecayMode | ( | const VertexCompositeCandidate & | chargedPions, |
const CompositeCandidate & | piZeroes, | ||
const CompositeCandidate & | filteredObjects | ||
) |
constructor from candidate content
Definition at line 4 of file PFTauDecayMode.cc.
References reco::CompositeCandidate::addDaughter(), reco::LeafCandidate::charge(), chargedPions(), chargedPions_, reco::CompositeCandidate::daughter(), filteredObjects(), filteredObjects_, maxNumberOfPiZeroCandidatesAllowed, reco::tau::helpers::nCharged(), reco::CompositeCandidate::numberOfDaughters(), reco::LeafCandidate::p4(), piZeroes_, reco::LeafCandidate::setCharge(), setDecayMode(), reco::LeafCandidate::setP4(), reco::LeafCandidate::setPdgId(), reco::LeafCandidate::setStatus(), and tauDecayOther.
{ chargedPions_ = chargedPions; piZeroes_ = piZeroes; filteredObjects_ = filteredObjects; // determine decay mode unsigned int nCharged = chargedPions_.numberOfDaughters(); unsigned int nNeutral = piZeroes_.numberOfDaughters(); hadronicTauDecayModes hadronicTauDecayIndex = static_cast<hadronicTauDecayModes>( ((nCharged - 1)*(maxNumberOfPiZeroCandidatesAllowed+1) + nNeutral) ); if ( nNeutral > maxNumberOfPiZeroCandidatesAllowed) hadronicTauDecayIndex = static_cast<hadronicTauDecayModes>( tauDecayOther ); this->setDecayMode(hadronicTauDecayIndex); // setup Particle base for(size_type iCand = 0; iCand < nCharged; ++iCand) { const Candidate* theCandToAdd = chargedPions_.daughter(iCand); this->addDaughter( *theCandToAdd ); } for(size_type iCand = 0; iCand < nNeutral; ++iCand) { const Candidate* theCandToAdd = piZeroes_.daughter(iCand); this->addDaughter( *theCandToAdd ); } this->setCharge(chargedPions_.charge()); this->setP4(chargedPions_.p4() + piZeroes_.p4()); this->setStatus(2); //decayed this->setPdgId(12); //everyone's favorite lepton! }
virtual reco::PFTauDecayMode::~PFTauDecayMode | ( | ) | [inline, virtual] |
Definition at line 65 of file PFTauDecayMode.h.
{}
PFCandidateRefVector reco::PFTauDecayMode::associatedChargedPFCandidates | ( | ) | const |
returns the PFCandidates associated to the charged signal objects
Definition at line 142 of file PFTauDecayMode.cc.
References chargedPions_, LaserDQM_cfg::input, reco::Candidate::numberOfDaughters(), convertSQLitetoXML_cfg::output, and pfMasterClones().
{ PFCandidateRefVector output; const Candidate* input = static_cast<const Candidate*>(&chargedPions_); if (input->numberOfDaughters()) pfMasterClones(input, output); return output; }
PFCandidateRefVector reco::PFTauDecayMode::associatedNeutralPFCandidates | ( | ) | const |
returns the PFCandidates associated to the PiZero signal objects (i.e., the unmerged photons)
Definition at line 152 of file PFTauDecayMode.cc.
References LaserDQM_cfg::input, reco::Candidate::numberOfDaughters(), convertSQLitetoXML_cfg::output, pfMasterClones(), and piZeroes_.
{ PFCandidateRefVector output; const Candidate* input = static_cast<const Candidate*>(&piZeroes_); if (input->numberOfDaughters()) pfMasterClones(input, output); return output; }
std::vector< const Candidate * > reco::PFTauDecayMode::chargedFilteredObjectCandidates | ( | ) | const |
returns only charged filtered objects
Definition at line 107 of file PFTauDecayMode.cc.
References filteredObjectCandidates().
{ return filteredObjectCandidates(1); }
std::vector< const Candidate * > reco::PFTauDecayMode::chargedPionCandidates | ( | ) | const |
returns pointers to charged pions
Definition at line 63 of file PFTauDecayMode.cc.
References chargedPions_, reco::CompositeCandidate::daughter(), reco::CompositeCandidate::numberOfDaughters(), and convertSQLitetoXML_cfg::output.
Referenced by decayProductCandidates().
{ size_type numberOfChargedPions = chargedPions_.numberOfDaughters(); std::vector<const Candidate*> output; for(size_type iterCand = 0; iterCand < numberOfChargedPions; ++iterCand) output.push_back( chargedPions_.daughter(iterCand) ); return output; }
const VertexCompositeCandidate & reco::PFTauDecayMode::chargedPions | ( | ) | const |
returns collection of charged pions w/ vertex information (tracks are refit)
Definition at line 45 of file PFTauDecayMode.cc.
References chargedPions_.
Referenced by TauMVATrainer::analyze(), and PFTauDecayMode().
{ return chargedPions_; }
PFTauDecayMode * reco::PFTauDecayMode::clone | ( | void | ) | const [virtual] |
returns a clone of the candidate
Reimplemented from reco::CompositeCandidate.
Definition at line 39 of file PFTauDecayMode.cc.
References PFTauDecayMode().
{ return new PFTauDecayMode(*this); }
std::vector< const Candidate * > reco::PFTauDecayMode::decayProductCandidates | ( | ) | const |
returns pointers to non-filtered objects
Definition at line 83 of file PFTauDecayMode.cc.
References chargedPionCandidates(), neutralPionCandidates(), and convertSQLitetoXML_cfg::output.
{ std::vector<const Candidate*> output = this->chargedPionCandidates(); std::vector<const Candidate*> neutralObjects = this->neutralPionCandidates(); output.insert(output.end(), neutralObjects.begin(), neutralObjects.end()); return output; }
std::vector< const Candidate * > reco::PFTauDecayMode::filteredObjectCandidates | ( | int | absCharge = -2 | ) | const |
returns pointers to filtered objects (i.e. those not included in signal objects)
Definition at line 93 of file PFTauDecayMode.cc.
References abs, reco::Candidate::charge(), reco::CompositeCandidate::daughter(), filteredObjects_, reco::CompositeCandidate::numberOfDaughters(), and convertSQLitetoXML_cfg::output.
Referenced by chargedFilteredObjectCandidates(), PFTauDiscriminants::FilteredObjectPt::doComputation(), and neutralFilteredObjectCandidates().
{ size_t numberOfFilteredObjects = filteredObjects_.numberOfDaughters(); std::vector<const Candidate*> output; for( size_t iFilteredCand = 0; iFilteredCand < numberOfFilteredObjects; ++iFilteredCand) { const Candidate* myCand = filteredObjects_.daughter(iFilteredCand); if (absCharge < 0 || abs(myCand->charge()) == absCharge) output.push_back(myCand); } return output; }
const CompositeCandidate & reco::PFTauDecayMode::filteredObjects | ( | ) | const |
returns references to PF objects that were filtered
Definition at line 57 of file PFTauDecayMode.cc.
References filteredObjects_.
Referenced by PFTauDiscriminants::InvariantMassOfSignalWithFiltered::doComputation(), and PFTauDecayMode().
{ return filteredObjects_; }
PFCandidateRefVector reco::PFTauDecayMode::filteredPFCandidates | ( | ) | const |
returns the PFCandidates that were filtered
Definition at line 162 of file PFTauDecayMode.cc.
References filteredObjects_, LaserDQM_cfg::input, reco::Candidate::numberOfDaughters(), convertSQLitetoXML_cfg::output, and pfMasterClones().
{ PFCandidateRefVector output; const Candidate* input = static_cast<const Candidate*>(&filteredObjects_); if (input->numberOfDaughters()) pfMasterClones(input, output); return output; }
hadronicTauDecayModes reco::PFTauDecayMode::getDecayMode | ( | ) | const [inline] |
Definition at line 72 of file PFTauDecayMode.h.
References theDecayMode_.
Referenced by PFTauMVADiscriminator::discriminate(), PFRecoTauDecayModeIndexProducer::discriminate(), and PFTauDiscriminants::DecayMode::doComputation().
{ return theDecayMode_; }
std::vector< const Candidate * > reco::PFTauDecayMode::neutralFilteredObjectCandidates | ( | ) | const |
returns only netural filtered objects
Definition at line 113 of file PFTauDecayMode.cc.
References filteredObjectCandidates().
{ return filteredObjectCandidates(0); }
std::vector< const Candidate * > reco::PFTauDecayMode::neutralPionCandidates | ( | ) | const |
returns pointers to neutral pions
Definition at line 73 of file PFTauDecayMode.cc.
References reco::CompositeCandidate::daughter(), reco::CompositeCandidate::numberOfDaughters(), convertSQLitetoXML_cfg::output, and piZeroes_.
Referenced by decayProductCandidates().
const CompositeCandidate & reco::PFTauDecayMode::neutralPions | ( | ) | const |
returns a collection of merged Pi0s
Definition at line 51 of file PFTauDecayMode.cc.
References piZeroes_.
Referenced by TauMVATrainer::analyze().
{ return piZeroes_; }
void reco::PFTauDecayMode::pfMasterClones | ( | const Candidate * | input, |
PFCandidateRefVector & | toFill | ||
) | const |
fills master clones to PF objects (utility function)
Definition at line 119 of file PFTauDecayMode.cc.
References edm::RefToBase< T >::castTo(), reco::Candidate::daughter(), reco::Candidate::hasMasterClone(), reco::Candidate::masterClone(), reco::Candidate::numberOfDaughters(), reco::CompositeCandidate::numberOfDaughters(), and edm::RefVector< C, T, F >::push_back().
Referenced by associatedChargedPFCandidates(), associatedNeutralPFCandidates(), and filteredPFCandidates().
{ if (input->numberOfDaughters() == 0) //we have reached a leaf { if (input->hasMasterClone()) // has a master clone { PFCandidateRef theCandRef = input->masterClone().castTo<PFCandidateRef>(); toFill.push_back(theCandRef); } else edm::LogError("PFTauDecayMode") << "Error in pfMasterClones(...) - found a leaf candidate with no Master clone reference!"; } else // recurse down composite chain { size_type numberOfDaughters = input->numberOfDaughters(); for(size_type iCand = 0; iCand < numberOfDaughters; ++iCand) { const Candidate* currentCand = input->daughter(iCand); pfMasterClones(currentCand, toFill); } } }
const PFTauRef& reco::PFTauDecayMode::pfTauRef | ( | ) | const [inline] |
return reference to associated PFTau object
Definition at line 69 of file PFTauDecayMode.h.
References pfTauRef_.
Referenced by TauMVATrainer::analyze().
{ return pfTauRef_; }
void reco::PFTauDecayMode::setDecayMode | ( | hadronicTauDecayModes | theDecayMode | ) | [inline] |
Definition at line 73 of file PFTauDecayMode.h.
References theDecayMode_.
Referenced by PFTauDecayMode().
{ theDecayMode_ = theDecayMode; }
void reco::PFTauDecayMode::setPFTauRef | ( | const PFTauRef & | theTau | ) | [inline] |
Definition at line 70 of file PFTauDecayMode.h.
References pfTauRef_.
Referenced by PFRecoTauDecayModeDeterminator::produce(), and TruthTauDecayModeProducer::produce().
{ pfTauRef_ = theTau;}
Definition at line 107 of file PFTauDecayMode.h.
Referenced by associatedChargedPFCandidates(), chargedPionCandidates(), chargedPions(), and PFTauDecayMode().
Definition at line 109 of file PFTauDecayMode.h.
Referenced by filteredObjectCandidates(), filteredObjects(), filteredPFCandidates(), and PFTauDecayMode().
const unsigned char reco::PFTauDecayMode::maxNumberOfPiZeroCandidatesAllowed = 4 [static] |
Definition at line 31 of file PFTauDecayMode.h.
Referenced by PFTauDecayMode().
PFTauRef reco::PFTauDecayMode::pfTauRef_ [protected] |
Definition at line 106 of file PFTauDecayMode.h.
Referenced by pfTauRef(), and setPFTauRef().
CompositeCandidate reco::PFTauDecayMode::piZeroes_ [protected] |
Definition at line 108 of file PFTauDecayMode.h.
Referenced by associatedNeutralPFCandidates(), neutralPionCandidates(), neutralPions(), and PFTauDecayMode().
Definition at line 110 of file PFTauDecayMode.h.
Referenced by getDecayMode(), and setDecayMode().