19 virtual void clear()
override final;
64 "HGCalTriggerNtupleGenTau" );
161 && candidate.
status() == 2 );
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& grandaughter : grandaughters ){
234 if(
isGamma( *grandaughter ) ){
236 tau_p4vis+=(grandaughter->p4());
243 tau_p4vis+=(daughter->p4());
250 for(
const auto& grandaughter : grandaughters ){
253 tau_p4vis+=(grandaughter->p4());
259 for(
const auto& descendant : descendants ){
262 tau_p4vis+=(descendant->p4());
272 for(
const auto&
prod : finalProds ){
273 tau_products_pt.emplace_back(
prod->pt() );
274 tau_products_eta.emplace_back(
prod->eta() );
275 tau_products_phi.emplace_back(
prod->phi() );
276 tau_products_energy.emplace_back(
prod->energy() );
277 tau_products_mass.emplace_back(
prod->mass() );
278 tau_products_id.emplace_back(
prod->pdgId() );
302 if( n_pi == 0 && n_piZero == 0 && n_ele==1 ){
gentau_decayMode_.emplace_back(11); }
303 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
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_
bool isChargedHadronFromResonance(const reco::GenParticle &daughter) const
std::vector< std::vector< float > > gentau_products_phi_
virtual void clear() override final
std::vector< float > gentau_vis_phi_
edm::EDGetToken gen_token_
virtual int status() const final
status word
HGCalTriggerNtupleGenTau(const edm::ParameterSet &)
bool isGamma(const reco::GenParticle &daughter) const
std::vector< std::vector< float > > gentau_products_pt_
virtual void initialize(TTree &, const edm::ParameterSet &, edm::ConsumesCollector &&) override final
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_
virtual void fill(const edm::Event &, const edm::EventSetup &) override final
std::vector< int > gentau_totNgamma_
std::vector< float > gentau_vis_pt_
virtual int pdgId() const final
PDG identifier.
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_
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
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