14 std::vector<const reco::GenParticle*>::const_iterator thePion =
19 if ((*thePion)->pt() > maxPt) {
20 maxPt = (*thePion)->pt();
29 const std::vector<const reco::GenParticle*>& theCollection)
const {
31 std::vector<const reco::GenParticle*>::const_iterator theObject =
32 theCollection.begin();
33 for (; theObject != theCollection.end(); ++theObject) {
60 int numChargedPions = 0;
61 int numNeutralPions = 0;
63 int numOtherParticles = 0;
66 std::vector<const reco::GenParticle* > pdgDecayProductTypes;
70 for (std::vector<const reco::GenParticle* >::const_iterator decayProduct =
71 pdgDecayProductTypes.begin();
72 decayProduct != pdgDecayProductTypes.end(); ++decayProduct) {
73 int pdg_id =
std::abs( (*decayProduct)->pdgId() );
75 if (pdg_id == 11) numElectrons++;
76 else if (pdg_id == 13) numMuons++;
77 else if (pdg_id == 211) numChargedPions++;
78 else if (pdg_id == 111) numNeutralPions++;
79 else if (pdg_id == 12 ||
81 pdg_id == 16) numNeutrinos++;
82 else if (pdg_id != 22)
88 if ( numOtherParticles == 0 ){
89 if ( numElectrons == 1 ){
92 }
else if ( numMuons == 1 ){
97 switch ( numChargedPions ){
99 switch ( numNeutralPions ){
112 switch ( numNeutralPions ){
137 if (theParticle->
status() == 1 || pdgId == 211 || pdgId == 111 || pdgId == 11 || pdgId == 13)
140 container.push_back(theParticle);
148 for (
size_t dIter = 0; dIter < nDaughters; ++dIter)
165 if (theParticle->
status() == 1)
168 container.push_back(theParticle);
173 for (
size_t dIter = 0; dIter < nDaughters; ++dIter)
212 int pdg_id =
std::abs( (*iter)->pdgId() );
213 if (pdg_id == 16 || pdg_id == 12 || pdg_id == 14)
217 if (pdg_id == 211 || (*iter)->charge() != 0)
219 else if (pdg_id == 22)
230 std::vector<LorentzVector>
232 const std::vector<const reco::GenParticle*>&
theList)
const {
233 std::vector<LorentzVector>
output;
234 std::vector<const reco::GenParticle*>::const_iterator theParticle;
235 for (theParticle = theList.begin();
236 theParticle != theList.end(); ++theParticle) {
237 output.push_back( (*theParticle)->p4() );
242 std::vector<const reco::Candidate*>
244 std::vector<const reco::Candidate*>
output;
245 std::vector<const GenParticle*>::const_iterator
iter;
247 output.push_back(static_cast<const reco::Candidate*>(*iter));
251 std::vector<const reco::Candidate*>
253 std::vector<const reco::Candidate*>
output;
254 std::vector<const GenParticle*>::const_iterator
iter;
256 output.push_back(static_cast<const reco::Candidate*>(*iter));
260 std::vector<const reco::Candidate*>
262 std::vector<const reco::Candidate*>
output;
263 std::vector<const GenParticle*>::const_iterator
iter;
265 output.push_back(static_cast<const reco::Candidate*>(*iter));
269 std::vector<const reco::Candidate*>
271 std::vector<const reco::Candidate*>
output;
272 std::vector<const GenParticle*>::const_iterator
iter;
275 output.push_back(static_cast<const reco::Candidate*>(*iter));
280 std::vector<const reco::Candidate*>
output;
281 std::vector<const GenParticle*>::const_iterator
iter;
283 output.push_back(static_cast<const reco::Candidate*>(*iter));
302 for (std::vector<LorentzVector>::iterator
iter = tempForSum.begin();
tauDecayModeEnum theDecayMode_
std::vector< const reco::Candidate * > getGenGammas() const
std::vector< const reco::GenParticle * > genNus_
virtual int pdgId() const
PDG identifier.
float getChargedOpeningAngle() const
std::vector< const reco::GenParticle * > genNeutralPions_
std::vector< LorentzVector > convertMCVectorToLorentzVectors(const std::vector< const reco::GenParticle * > &theList) const
virtual int status() const
status word
const reco::GenParticle * theLeadTrack_
tauDecayModeEnum computeDecayMode(const reco::GenParticle *)
std::vector< LorentzVector > getChargedPions() const
std::vector< LorentzVector > getVisibleFourVectors() const
LorentzVector getVisibleFourVector() const
float getGammaOpeningAngle() const
virtual size_t numberOfDaughters() const
number of daughters
virtual const Candidate * daughter(size_type) const
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
Abs< T >::type abs(const T &t)
std::vector< const reco::GenParticle * > genGammas_
Angle< LorentzVector > angleFinder
float getVisNuAngle() const
std::vector< const reco::Candidate * > getStableDecayProducts() const
std::vector< LorentzVector > getGammas() const
std::vector< const reco::Candidate * > getGenNeutralPions() const
Candidate()
default constructor
void decayToPDGClassification(const reco::GenParticle *, std::vector< const reco::GenParticle * > &)
Return list of stable & "semi-stable" tau decay products (e.g. decay the rhos)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
const reco::Candidate * getLeadTrack() const
void computeStableDecayProducts(const reco::GenParticle *, std::vector< const reco::GenParticle * > &)
std::vector< const reco::GenParticle * > stableDecayProducts_
std::vector< const reco::Candidate * > getGenChargedPions() const
const reco::GenParticle * findLeadTrack()
std::vector< const reco::Candidate * > getGenNu() const
std::vector< const reco::GenParticle * > genChargedPions_
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
std::vector< const reco::GenParticle * > visibleDecayProducts_
float getOpeningAngle(const std::vector< const reco::GenParticle * > &aCollection) const