64 "HGCalTriggerNtupleGenTau" );
161 && candidate.
status() == 2 );
168 && candidate.
status() == 1 );
182 for(
const auto& particle : gen_particles)
199 std::vector<float> tau_products_pt;
200 std::vector<float> tau_products_eta;
201 std::vector<float> tau_products_phi;
202 std::vector<float> tau_products_energy;
203 std::vector<float> tau_products_mass;
204 std::vector< int > tau_products_id;
209 for(
const auto& daughter : daughters ){
217 else if(
isMuon( *daughter ) ){
220 tau_p4vis+=(daughter->p4());
226 tau_p4vis+=(daughter->p4());
233 for(
const auto& granddaughter : granddaughters ){
234 if(
isGamma( *granddaughter ) ){
236 tau_p4vis+=(granddaughter->p4());
243 tau_p4vis+=(daughter->p4());
251 for(
const auto& granddaughter : granddaughters ){
253 tau_p4vis+=(granddaughter->p4());
264 for(
const auto& grandaughter : grandaughters ){
267 tau_p4vis+=(grandaughter->p4());
273 for(
const auto& descendant : descendants ){
276 tau_p4vis+=(descendant->p4());
286 for(
const auto&
prod : finalProds ){
287 tau_products_pt.emplace_back(
prod->pt() );
288 tau_products_eta.emplace_back(
prod->eta() );
289 tau_products_phi.emplace_back(
prod->phi() );
290 tau_products_energy.emplace_back(
prod->energy() );
291 tau_products_mass.emplace_back(
prod->mass() );
292 tau_products_id.emplace_back(
prod->pdgId() );
316 if( n_pi == 0 && n_piZero == 0 && n_ele==1 ){
gentau_decayMode_.emplace_back(11); }
317 else if( n_pi == 0 && n_piZero == 0 && n_mu==1 ){
gentau_decayMode_.emplace_back(13); }
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
T getParameter(std::string const &) const
int pdgId() const final
PDG identifier.
bool isNeutralPionFromResonance(const reco::GenParticle &daughter) const
std::vector< float > gentau_phi_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< std::vector< float > > gentau_products_mass_
void fill(const edm::Event &, const edm::EventSetup &) final
bool isChargedHadronFromResonance(const reco::GenParticle &daughter) const
std::vector< std::vector< float > > gentau_products_phi_
std::vector< float > gentau_vis_phi_
edm::EDGetToken gen_token_
HGCalTriggerNtupleGenTau(const edm::ParameterSet &)
bool isGamma(const reco::GenParticle &daughter) const
std::vector< std::vector< float > > gentau_products_pt_
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
std::vector< float > gentau_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< int > gentau_totNgamma_
std::vector< float > gentau_vis_pt_
Abs< T >::type abs(const T &t)
math::XYZTLorentzVector LorentzVector
std::vector< float > gentau_eta_
bool isMuon(const reco::GenParticle &daughter) const
std::vector< float > gentau_vis_energy_
bool isElectron(const reco::GenParticle &daughter) const
bool isTauDecayProduct() const
const GenStatusFlags & statusFlags() const
std::vector< float > gentau_mass_
std::vector< std::vector< float > > gentau_products_energy_
std::vector< float > gentau_vis_mass_
math::XYZTLorentzVector LorentzVector
std::vector< std::vector< int > > gentau_products_id_
void initialize(TTree &, const edm::ParameterSet &, edm::ConsumesCollector &&) final
std::vector< float > gentau_vis_eta_
std::vector< int > gentau_totNproducts_
bool isNeutralPion(const reco::GenParticle &daughter) const
std::vector< int > gentau_decayMode_
std::vector< int > gentau_totNcharged_
bool isDirectPromptTauDecayProductFinalState() const
int status() const final
status word
bool isStableNeutralHadron(const reco::GenParticle &daughter) const
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
#define DEFINE_EDM_PLUGIN(factory, type, name)
std::vector< float > gentau_energy_
std::vector< int > gentau_totNpiZero_
bool isChargedHadron(const reco::GenParticle &daughter) const