CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
HGCalTriggerNtupleGenTau Class Reference
Inheritance diagram for HGCalTriggerNtupleGenTau:
HGCalTriggerNtupleBase

Public Member Functions

void fill (const edm::Event &, const HGCalTriggerNtupleEventSetup &) final
 
 HGCalTriggerNtupleGenTau (const edm::ParameterSet &)
 
void initialize (TTree &, const edm::ParameterSet &, edm::ConsumesCollector &&) final
 
- Public Member Functions inherited from HGCalTriggerNtupleBase
bool accessEventSetup () const
 
virtual void fill (const edm::Event &, const edm::EventSetup &)
 
 HGCalTriggerNtupleBase (const edm::ParameterSet &conf)
 
const std::string & name () const
 
virtual ~HGCalTriggerNtupleBase ()
 

Private Member Functions

void clear () final
 
bool isChargedHadron (const reco::GenParticle &daughter) const
 
bool isChargedHadronFromResonance (const reco::GenParticle &daughter) const
 
bool isElectron (const reco::GenParticle &daughter) const
 
bool isGamma (const reco::GenParticle &daughter) const
 
bool isGoodTau (const reco::GenParticle &candidate) const
 
bool isIntermediateResonance (const reco::GenParticle &daughter) const
 
bool isMuon (const reco::GenParticle &daughter) const
 
bool isNeutralPion (const reco::GenParticle &daughter) const
 
bool isNeutralPionFromResonance (const reco::GenParticle &daughter) const
 
bool isStableLepton (const reco::GenParticle &daughter) const
 
bool isStableNeutralHadron (const reco::GenParticle &daughter) const
 

Private Attributes

edm::EDGetToken gen_token_
 
std::vector< int > gentau_decayMode_
 
std::vector< float > gentau_energy_
 
std::vector< float > gentau_eta_
 
std::vector< float > gentau_mass_
 
std::vector< float > gentau_phi_
 
std::vector< std::vector< float > > gentau_products_energy_
 
std::vector< std::vector< float > > gentau_products_eta_
 
std::vector< std::vector< int > > gentau_products_id_
 
std::vector< std::vector< float > > gentau_products_mass_
 
std::vector< std::vector< float > > gentau_products_phi_
 
std::vector< std::vector< float > > gentau_products_pt_
 
std::vector< float > gentau_pt_
 
std::vector< int > gentau_totNcharged_
 
std::vector< int > gentau_totNgamma_
 
std::vector< int > gentau_totNpiZero_
 
std::vector< int > gentau_totNproducts_
 
std::vector< float > gentau_vis_energy_
 
std::vector< float > gentau_vis_eta_
 
std::vector< float > gentau_vis_mass_
 
std::vector< float > gentau_vis_phi_
 
std::vector< float > gentau_vis_pt_
 
bool isPythia8generator_
 

Additional Inherited Members

- Protected Attributes inherited from HGCalTriggerNtupleBase
bool accessEventSetup_ = true
 
const std::string name_
 

Detailed Description

Definition at line 9 of file HGCalTriggerNtupleGenTau.cc.

Constructor & Destructor Documentation

HGCalTriggerNtupleGenTau::HGCalTriggerNtupleGenTau ( const edm::ParameterSet conf)

Definition at line 61 of file HGCalTriggerNtupleGenTau.cc.

References HGCalTriggerNtupleBase::accessEventSetup_.

61  : HGCalTriggerNtupleBase(conf) {
62  accessEventSetup_ = false;
63 }
HGCalTriggerNtupleBase(const edm::ParameterSet &conf)

Member Function Documentation

void HGCalTriggerNtupleGenTau::clear ( void  )
finalprivatevirtual

Implements HGCalTriggerNtupleBase.

Definition at line 311 of file HGCalTriggerNtupleGenTau.cc.

References gentau_decayMode_, gentau_energy_, gentau_eta_, gentau_mass_, gentau_phi_, gentau_products_energy_, gentau_products_eta_, gentau_products_id_, gentau_products_mass_, gentau_products_phi_, gentau_products_pt_, gentau_pt_, gentau_totNcharged_, gentau_totNgamma_, gentau_totNproducts_, gentau_vis_energy_, gentau_vis_eta_, gentau_vis_mass_, gentau_vis_phi_, and gentau_vis_pt_.

Referenced by fill().

311  {
312  gentau_pt_.clear();
313  gentau_eta_.clear();
314  gentau_phi_.clear();
315  gentau_energy_.clear();
316  gentau_mass_.clear();
317  gentau_decayMode_.clear();
318  gentau_vis_pt_.clear();
319  gentau_vis_eta_.clear();
320  gentau_vis_phi_.clear();
321  gentau_vis_energy_.clear();
322  gentau_vis_mass_.clear();
323  gentau_totNproducts_.clear();
324  gentau_totNgamma_.clear();
325  gentau_totNcharged_.clear();
326  gentau_products_pt_.clear();
327  gentau_products_eta_.clear();
328  gentau_products_phi_.clear();
329  gentau_products_energy_.clear();
330  gentau_products_mass_.clear();
331  gentau_products_id_.clear();
332 }
std::vector< std::vector< float > > gentau_products_mass_
std::vector< std::vector< float > > gentau_products_phi_
std::vector< float > gentau_vis_phi_
std::vector< std::vector< int > > gentau_products_id_
std::vector< std::vector< float > > gentau_products_pt_
std::vector< std::vector< float > > gentau_products_eta_
std::vector< float > gentau_vis_pt_
std::vector< float > gentau_vis_energy_
std::vector< std::vector< float > > gentau_products_energy_
std::vector< float > gentau_vis_mass_
std::vector< float > gentau_vis_eta_
std::vector< int > gentau_totNproducts_
std::vector< int > gentau_totNcharged_
std::vector< float > gentau_energy_
void HGCalTriggerNtupleGenTau::fill ( const edm::Event e,
const HGCalTriggerNtupleEventSetup es 
)
finalvirtual

Reimplemented from HGCalTriggerNtupleBase.

Definition at line 148 of file HGCalTriggerNtupleGenTau.cc.

References clear(), gen_token_, gentau_decayMode_, gentau_energy_, gentau_eta_, gentau_mass_, gentau_phi_, gentau_products_energy_, gentau_products_eta_, gentau_products_id_, gentau_products_mass_, gentau_products_phi_, gentau_products_pt_, gentau_pt_, gentau_totNcharged_, gentau_totNgamma_, gentau_totNpiZero_, gentau_totNproducts_, gentau_vis_energy_, gentau_vis_eta_, gentau_vis_mass_, gentau_vis_phi_, gentau_vis_pt_, edm::Event::getByToken(), isChargedHadron(), isChargedHadronFromResonance(), isElectron(), isGamma(), isGoodTau(), isIntermediateResonance(), isMuon(), isNeutralPion(), isNeutralPionFromResonance(), isPythia8generator_, isStableLepton(), isStableNeutralHadron(), and edm::RefVector< C, T, F >::push_back().

148  {
150  e.getByToken(gen_token_, gen_particles_h);
151  const reco::GenParticleCollection& gen_particles = *gen_particles_h;
152 
153  clear();
154 
155  for (const auto& particle : gen_particles) {
156  /* select good taus */
157  if (isGoodTau(particle)) {
158  LorentzVector tau_p4vis(0., 0., 0., 0.);
159  gentau_pt_.emplace_back(particle.pt());
160  gentau_eta_.emplace_back(particle.eta());
161  gentau_phi_.emplace_back(particle.phi());
162  gentau_energy_.emplace_back(particle.energy());
163  gentau_mass_.emplace_back(particle.mass());
164 
165  int n_pi = 0;
166  int n_piZero = 0;
167  int n_gamma = 0;
168  int n_ele = 0;
169  int n_mu = 0;
170 
171  std::vector<float> tau_products_pt;
172  std::vector<float> tau_products_eta;
173  std::vector<float> tau_products_phi;
174  std::vector<float> tau_products_energy;
175  std::vector<float> tau_products_mass;
176  std::vector<int> tau_products_id;
177 
178  /* loop over tau daughters */
179  const reco::GenParticleRefVector& daughters = particle.daughterRefVector();
180 
181  for (const auto& daughter : daughters) {
182  reco::GenParticleRefVector finalProds;
183 
184  if (isStableLepton(*daughter)) {
185  if (isElectron(*daughter)) {
186  n_ele++;
187  } else if (isMuon(*daughter)) {
188  n_mu++;
189  }
190  tau_p4vis += (daughter->p4());
191  finalProds.push_back(daughter);
192  }
193 
194  else if (isChargedHadron(*daughter)) {
195  n_pi++;
196  tau_p4vis += (daughter->p4());
197  finalProds.push_back(daughter);
198  }
199 
200  else if (isNeutralPion(*daughter)) {
201  n_piZero++;
202  const reco::GenParticleRefVector& granddaughters = daughter->daughterRefVector();
203  for (const auto& granddaughter : granddaughters) {
204  if (isGamma(*granddaughter)) {
205  n_gamma++;
206  tau_p4vis += (granddaughter->p4());
207  finalProds.push_back(granddaughter);
208  }
209  }
210  }
211 
212  else if (isStableNeutralHadron(*daughter)) {
213  tau_p4vis += (daughter->p4());
214  finalProds.push_back(daughter);
215  }
216 
217  else {
218  const reco::GenParticleRefVector& granddaughters = daughter->daughterRefVector();
219 
220  for (const auto& granddaughter : granddaughters) {
221  if (isStableNeutralHadron(*granddaughter)) {
222  tau_p4vis += (granddaughter->p4());
223  finalProds.push_back(granddaughter);
224  }
225  }
226  }
227 
228  /* Here the selection of the decay product according to the Pythia6 decayTree */
229  if (!isPythia8generator_) {
230  if (isIntermediateResonance(*daughter)) {
231  const reco::GenParticleRefVector& grandaughters = daughter->daughterRefVector();
232  for (const auto& grandaughter : grandaughters) {
233  if (isChargedHadron(*grandaughter) || isChargedHadronFromResonance(*grandaughter)) {
234  n_pi++;
235  tau_p4vis += (grandaughter->p4());
236  finalProds.push_back(daughter);
237  } else if (isNeutralPion(*grandaughter) || isNeutralPionFromResonance(*grandaughter)) {
238  n_piZero++;
239  const reco::GenParticleRefVector& descendants = grandaughter->daughterRefVector();
240  for (const auto& descendant : descendants) {
241  if (isGamma(*descendant)) {
242  n_gamma++;
243  tau_p4vis += (descendant->p4());
244  finalProds.push_back(daughter);
245  }
246  }
247  }
248  }
249  }
250  }
251 
252  /* Fill daughter informations */
253  for (const auto& prod : finalProds) {
254  tau_products_pt.emplace_back(prod->pt());
255  tau_products_eta.emplace_back(prod->eta());
256  tau_products_phi.emplace_back(prod->phi());
257  tau_products_energy.emplace_back(prod->energy());
258  tau_products_mass.emplace_back(prod->mass());
259  tau_products_id.emplace_back(prod->pdgId());
260  }
261  }
262 
263  /* assign the tau-variables */
264  gentau_vis_pt_.emplace_back(tau_p4vis.Pt());
265  gentau_vis_eta_.emplace_back(tau_p4vis.Eta());
266  gentau_vis_phi_.emplace_back(tau_p4vis.Phi());
267  gentau_vis_energy_.emplace_back(tau_p4vis.E());
268  gentau_vis_mass_.emplace_back(tau_p4vis.M());
269  gentau_totNproducts_.emplace_back(n_pi + n_gamma);
270  gentau_totNgamma_.emplace_back(n_gamma);
271  gentau_totNpiZero_.emplace_back(n_piZero);
272  gentau_totNcharged_.emplace_back(n_pi);
273 
274  gentau_products_pt_.emplace_back(tau_products_pt);
275  gentau_products_eta_.emplace_back(tau_products_eta);
276  gentau_products_phi_.emplace_back(tau_products_phi);
277  gentau_products_energy_.emplace_back(tau_products_energy);
278  gentau_products_mass_.emplace_back(tau_products_mass);
279  gentau_products_id_.emplace_back(tau_products_id);
280 
281  /* leptonic tau decays */
282  if (n_pi == 0 && n_piZero == 0 && n_ele == 1) {
283  gentau_decayMode_.emplace_back(11);
284  } else if (n_pi == 0 && n_piZero == 0 && n_mu == 1) {
285  gentau_decayMode_.emplace_back(13);
286  }
287  /* 1-prong */
288  else if (n_pi == 1 && n_piZero == 0) {
289  gentau_decayMode_.emplace_back(0);
290  }
291  /* 1-prong + pi0s */
292  else if (n_pi == 1 && n_piZero >= 1) {
293  gentau_decayMode_.emplace_back(1);
294  }
295  /* 3-prongs */
296  else if (n_pi == 3 && n_piZero == 0) {
297  gentau_decayMode_.emplace_back(4);
298  }
299  /* 3-prongs + pi0s */
300  else if (n_pi == 3 && n_piZero >= 1) {
301  gentau_decayMode_.emplace_back(5);
302  }
303  /* other decays */
304  else {
305  gentau_decayMode_.emplace_back(-1);
306  }
307  }
308  }
309 }
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
bool isNeutralPionFromResonance(const reco::GenParticle &daughter) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
std::vector< std::vector< float > > gentau_products_mass_
bool isChargedHadronFromResonance(const reco::GenParticle &daughter) const
std::vector< std::vector< float > > gentau_products_phi_
std::vector< float > gentau_vis_phi_
std::vector< std::vector< int > > gentau_products_id_
bool isGamma(const reco::GenParticle &daughter) const
std::vector< std::vector< float > > gentau_products_pt_
bool isStableLepton(const reco::GenParticle &daughter) const
bool isIntermediateResonance(const reco::GenParticle &daughter) const
bool isGoodTau(const reco::GenParticle &candidate) const
std::vector< std::vector< float > > gentau_products_eta_
std::vector< float > gentau_vis_pt_
math::XYZTLorentzVector LorentzVector
bool isMuon(const reco::GenParticle &daughter) const
std::vector< float > gentau_vis_energy_
bool isElectron(const reco::GenParticle &daughter) const
std::vector< std::vector< float > > gentau_products_energy_
std::vector< float > gentau_vis_mass_
std::vector< float > gentau_vis_eta_
std::vector< int > gentau_totNproducts_
bool isNeutralPion(const reco::GenParticle &daughter) const
std::vector< int > gentau_totNcharged_
bool isStableNeutralHadron(const reco::GenParticle &daughter) const
void push_back(value_type const &ref)
Add a Ref&lt;C, T&gt; to the RefVector.
Definition: RefVector.h:67
std::vector< float > gentau_energy_
bool isChargedHadron(const reco::GenParticle &daughter) const
void HGCalTriggerNtupleGenTau::initialize ( TTree &  tree,
const edm::ParameterSet conf,
edm::ConsumesCollector &&  collector 
)
finalvirtual

Implements HGCalTriggerNtupleBase.

Definition at line 65 of file HGCalTriggerNtupleGenTau.cc.

References gen_token_, gentau_decayMode_, gentau_energy_, gentau_eta_, gentau_mass_, gentau_phi_, gentau_products_energy_, gentau_products_eta_, gentau_products_id_, gentau_products_mass_, gentau_products_phi_, gentau_products_pt_, gentau_pt_, gentau_totNcharged_, gentau_totNgamma_, gentau_totNpiZero_, gentau_totNproducts_, gentau_vis_energy_, gentau_vis_eta_, gentau_vis_mass_, gentau_vis_phi_, gentau_vis_pt_, edm::ParameterSet::getParameter(), and isPythia8generator_.

67  {
68  gen_token_ = collector.consumes<reco::GenParticleCollection>(conf.getParameter<edm::InputTag>("GenParticles"));
69  isPythia8generator_ = conf.getParameter<bool>("isPythia8");
70 
71  tree.Branch("gentau_pt", &gentau_pt_);
72  tree.Branch("gentau_eta", &gentau_eta_);
73  tree.Branch("gentau_phi", &gentau_phi_);
74  tree.Branch("gentau_energy", &gentau_energy_);
75  tree.Branch("gentau_mass", &gentau_mass_);
76  tree.Branch("gentau_vis_pt", &gentau_vis_pt_);
77  tree.Branch("gentau_vis_eta", &gentau_vis_eta_);
78  tree.Branch("gentau_vis_phi", &gentau_vis_phi_);
79  tree.Branch("gentau_vis_energy", &gentau_vis_energy_);
80  tree.Branch("gentau_vis_mass", &gentau_vis_mass_);
81  tree.Branch("gentau_products_pt", &gentau_products_pt_);
82  tree.Branch("gentau_products_eta", &gentau_products_eta_);
83  tree.Branch("gentau_products_phi", &gentau_products_phi_);
84  tree.Branch("gentau_products_energy", &gentau_products_energy_);
85  tree.Branch("gentau_products_mass", &gentau_products_mass_);
86  tree.Branch("gentau_products_id", &gentau_products_id_);
87  tree.Branch("gentau_decayMode", &gentau_decayMode_);
88  tree.Branch("gentau_totNproducts", &gentau_totNproducts_);
89  tree.Branch("gentau_totNgamma", &gentau_totNgamma_);
90  tree.Branch("gentau_totNpiZero", &gentau_totNpiZero_);
91  tree.Branch("gentau_totNcharged", &gentau_totNcharged_);
92 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
std::vector< std::vector< float > > gentau_products_mass_
std::vector< std::vector< float > > gentau_products_phi_
std::vector< float > gentau_vis_phi_
std::vector< std::vector< int > > gentau_products_id_
std::vector< std::vector< float > > gentau_products_pt_
std::vector< std::vector< float > > gentau_products_eta_
std::vector< float > gentau_vis_pt_
std::vector< float > gentau_vis_energy_
std::vector< std::vector< float > > gentau_products_energy_
std::vector< float > gentau_vis_mass_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::vector< float > gentau_vis_eta_
std::vector< int > gentau_totNproducts_
std::vector< int > gentau_totNcharged_
std::vector< float > gentau_energy_
bool HGCalTriggerNtupleGenTau::isChargedHadron ( const reco::GenParticle daughter) const
private

Definition at line 98 of file HGCalTriggerNtupleGenTau.cc.

References funct::abs(), reco::GenParticle::isDirectPromptTauDecayProductFinalState(), reco::GenParticle::isLastCopy(), reco::LeafCandidate::pdgId(), and reco::LeafCandidate::status().

Referenced by fill(), and isStableNeutralHadron().

98  {
99  return ((std::abs(candidate.pdgId()) == 211 || std::abs(candidate.pdgId()) == 321) && candidate.status() == 1 &&
100  candidate.isDirectPromptTauDecayProductFinalState() && candidate.isLastCopy());
101 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool HGCalTriggerNtupleGenTau::isChargedHadronFromResonance ( const reco::GenParticle daughter) const
private

Definition at line 103 of file HGCalTriggerNtupleGenTau.cc.

References funct::abs(), reco::GenParticle::isLastCopy(), reco::LeafCandidate::pdgId(), and reco::LeafCandidate::status().

Referenced by fill().

103  {
104  return ((std::abs(candidate.pdgId()) == 211 || std::abs(candidate.pdgId()) == 321) && candidate.status() == 1 &&
105  candidate.isLastCopy());
106 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool HGCalTriggerNtupleGenTau::isElectron ( const reco::GenParticle daughter) const
private

Definition at line 113 of file HGCalTriggerNtupleGenTau.cc.

References funct::abs(), reco::GenParticle::isDirectPromptTauDecayProductFinalState(), reco::GenParticle::isLastCopy(), and reco::LeafCandidate::pdgId().

Referenced by fill().

113  {
114  return (std::abs(candidate.pdgId()) == 11 && candidate.isDirectPromptTauDecayProductFinalState() &&
115  candidate.isLastCopy());
116 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool HGCalTriggerNtupleGenTau::isGamma ( const reco::GenParticle daughter) const
private

Definition at line 132 of file HGCalTriggerNtupleGenTau.cc.

References funct::abs(), reco::GenParticle::isDirectPromptTauDecayProductFinalState(), reco::GenParticle::isLastCopy(), reco::GenStatusFlags::isTauDecayProduct(), reco::LeafCandidate::pdgId(), reco::LeafCandidate::status(), and reco::GenParticle::statusFlags().

Referenced by fill().

132  {
133  return (std::abs(candidate.pdgId()) == 22 && candidate.status() == 1 && candidate.statusFlags().isTauDecayProduct() &&
134  !candidate.isDirectPromptTauDecayProductFinalState() && candidate.isLastCopy());
135 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool HGCalTriggerNtupleGenTau::isGoodTau ( const reco::GenParticle candidate) const
private

Definition at line 94 of file HGCalTriggerNtupleGenTau.cc.

References funct::abs(), reco::LeafCandidate::pdgId(), and reco::LeafCandidate::status().

Referenced by fill().

94  {
95  return (std::abs(candidate.pdgId()) == 15 && candidate.status() == 2);
96 }
int status() const final
status word
int pdgId() const final
PDG identifier.
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool HGCalTriggerNtupleGenTau::isIntermediateResonance ( const reco::GenParticle daughter) const
private

Definition at line 137 of file HGCalTriggerNtupleGenTau.cc.

References funct::abs(), reco::LeafCandidate::pdgId(), and reco::LeafCandidate::status().

Referenced by fill().

137  {
138  return ((std::abs(candidate.pdgId()) == 213 || std::abs(candidate.pdgId()) == 20213 ||
139  std::abs(candidate.pdgId()) == 24) &&
140  candidate.status() == 2);
141 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool HGCalTriggerNtupleGenTau::isMuon ( const reco::GenParticle daughter) const
private

Definition at line 118 of file HGCalTriggerNtupleGenTau.cc.

References funct::abs(), reco::GenParticle::isDirectPromptTauDecayProductFinalState(), reco::GenParticle::isLastCopy(), and reco::LeafCandidate::pdgId().

Referenced by fill().

118  {
119  return (std::abs(candidate.pdgId()) == 13 && candidate.isDirectPromptTauDecayProductFinalState() &&
120  candidate.isLastCopy());
121 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool HGCalTriggerNtupleGenTau::isNeutralPion ( const reco::GenParticle daughter) const
private

Definition at line 123 of file HGCalTriggerNtupleGenTau.cc.

References funct::abs(), reco::GenParticle::isDirectPromptTauDecayProductFinalState(), reco::GenStatusFlags::isTauDecayProduct(), reco::LeafCandidate::pdgId(), reco::LeafCandidate::status(), and reco::GenParticle::statusFlags().

Referenced by fill().

123  {
124  return (std::abs(candidate.pdgId()) == 111 && candidate.status() == 2 &&
125  candidate.statusFlags().isTauDecayProduct() && !candidate.isDirectPromptTauDecayProductFinalState());
126 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool HGCalTriggerNtupleGenTau::isNeutralPionFromResonance ( const reco::GenParticle daughter) const
private

Definition at line 128 of file HGCalTriggerNtupleGenTau.cc.

References funct::abs(), reco::GenStatusFlags::isTauDecayProduct(), reco::LeafCandidate::pdgId(), reco::LeafCandidate::status(), and reco::GenParticle::statusFlags().

Referenced by fill().

128  {
129  return (std::abs(candidate.pdgId()) == 111 && candidate.status() == 2 && candidate.statusFlags().isTauDecayProduct());
130 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool HGCalTriggerNtupleGenTau::isStableLepton ( const reco::GenParticle daughter) const
private

Definition at line 108 of file HGCalTriggerNtupleGenTau.cc.

References funct::abs(), reco::GenParticle::isDirectPromptTauDecayProductFinalState(), reco::GenParticle::isLastCopy(), reco::LeafCandidate::pdgId(), and reco::LeafCandidate::status().

Referenced by fill().

108  {
109  return ((std::abs(candidate.pdgId()) == 11 || std::abs(candidate.pdgId()) == 13) && candidate.status() == 1 &&
110  candidate.isDirectPromptTauDecayProductFinalState() && candidate.isLastCopy());
111 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool HGCalTriggerNtupleGenTau::isStableNeutralHadron ( const reco::GenParticle daughter) const
private

Definition at line 143 of file HGCalTriggerNtupleGenTau.cc.

References funct::abs(), isChargedHadron(), reco::LeafCandidate::pdgId(), and reco::LeafCandidate::status().

Referenced by fill().

143  {
144  return (!(std::abs(candidate.pdgId()) > 10 && std::abs(candidate.pdgId()) < 17) && !isChargedHadron(candidate) &&
145  candidate.status() == 1);
146 }
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool isChargedHadron(const reco::GenParticle &daughter) const

Member Data Documentation

edm::EDGetToken HGCalTriggerNtupleGenTau::gen_token_
private

Definition at line 31 of file HGCalTriggerNtupleGenTau.cc.

Referenced by fill(), and initialize().

std::vector<int> HGCalTriggerNtupleGenTau::gentau_decayMode_
private

Definition at line 45 of file HGCalTriggerNtupleGenTau.cc.

Referenced by clear(), fill(), and initialize().

std::vector<float> HGCalTriggerNtupleGenTau::gentau_energy_
private

Definition at line 37 of file HGCalTriggerNtupleGenTau.cc.

Referenced by clear(), fill(), and initialize().

std::vector<float> HGCalTriggerNtupleGenTau::gentau_eta_
private

Definition at line 35 of file HGCalTriggerNtupleGenTau.cc.

Referenced by clear(), fill(), and initialize().

std::vector<float> HGCalTriggerNtupleGenTau::gentau_mass_
private

Definition at line 38 of file HGCalTriggerNtupleGenTau.cc.

Referenced by clear(), fill(), and initialize().

std::vector<float> HGCalTriggerNtupleGenTau::gentau_phi_
private

Definition at line 36 of file HGCalTriggerNtupleGenTau.cc.

Referenced by clear(), fill(), and initialize().

std::vector<std::vector<float> > HGCalTriggerNtupleGenTau::gentau_products_energy_
private

Definition at line 54 of file HGCalTriggerNtupleGenTau.cc.

Referenced by clear(), fill(), and initialize().

std::vector<std::vector<float> > HGCalTriggerNtupleGenTau::gentau_products_eta_
private

Definition at line 52 of file HGCalTriggerNtupleGenTau.cc.

Referenced by clear(), fill(), and initialize().

std::vector<std::vector<int> > HGCalTriggerNtupleGenTau::gentau_products_id_
private

Definition at line 56 of file HGCalTriggerNtupleGenTau.cc.

Referenced by clear(), fill(), and initialize().

std::vector<std::vector<float> > HGCalTriggerNtupleGenTau::gentau_products_mass_
private

Definition at line 55 of file HGCalTriggerNtupleGenTau.cc.

Referenced by clear(), fill(), and initialize().

std::vector<std::vector<float> > HGCalTriggerNtupleGenTau::gentau_products_phi_
private

Definition at line 53 of file HGCalTriggerNtupleGenTau.cc.

Referenced by clear(), fill(), and initialize().

std::vector<std::vector<float> > HGCalTriggerNtupleGenTau::gentau_products_pt_
private

Definition at line 51 of file HGCalTriggerNtupleGenTau.cc.

Referenced by clear(), fill(), and initialize().

std::vector<float> HGCalTriggerNtupleGenTau::gentau_pt_
private

Definition at line 34 of file HGCalTriggerNtupleGenTau.cc.

Referenced by clear(), fill(), and initialize().

std::vector<int> HGCalTriggerNtupleGenTau::gentau_totNcharged_
private

Definition at line 49 of file HGCalTriggerNtupleGenTau.cc.

Referenced by clear(), fill(), and initialize().

std::vector<int> HGCalTriggerNtupleGenTau::gentau_totNgamma_
private

Definition at line 47 of file HGCalTriggerNtupleGenTau.cc.

Referenced by clear(), fill(), and initialize().

std::vector<int> HGCalTriggerNtupleGenTau::gentau_totNpiZero_
private

Definition at line 48 of file HGCalTriggerNtupleGenTau.cc.

Referenced by fill(), and initialize().

std::vector<int> HGCalTriggerNtupleGenTau::gentau_totNproducts_
private

Definition at line 46 of file HGCalTriggerNtupleGenTau.cc.

Referenced by clear(), fill(), and initialize().

std::vector<float> HGCalTriggerNtupleGenTau::gentau_vis_energy_
private

Definition at line 43 of file HGCalTriggerNtupleGenTau.cc.

Referenced by clear(), fill(), and initialize().

std::vector<float> HGCalTriggerNtupleGenTau::gentau_vis_eta_
private

Definition at line 41 of file HGCalTriggerNtupleGenTau.cc.

Referenced by clear(), fill(), and initialize().

std::vector<float> HGCalTriggerNtupleGenTau::gentau_vis_mass_
private

Definition at line 44 of file HGCalTriggerNtupleGenTau.cc.

Referenced by clear(), fill(), and initialize().

std::vector<float> HGCalTriggerNtupleGenTau::gentau_vis_phi_
private

Definition at line 42 of file HGCalTriggerNtupleGenTau.cc.

Referenced by clear(), fill(), and initialize().

std::vector<float> HGCalTriggerNtupleGenTau::gentau_vis_pt_
private

Definition at line 40 of file HGCalTriggerNtupleGenTau.cc.

Referenced by clear(), fill(), and initialize().

bool HGCalTriggerNtupleGenTau::isPythia8generator_
private

Definition at line 32 of file HGCalTriggerNtupleGenTau.cc.

Referenced by fill(), and initialize().