19 virtual void clear()
override final;
60 "HGCalTriggerNtupleGenTau" );
160 for(
const auto& particle : gen_particles)
179 std::vector<float> tau_products_pt;
180 std::vector<float> tau_products_eta;
181 std::vector<float> tau_products_phi;
182 std::vector<float> tau_products_energy;
183 std::vector<float> tau_products_mass;
184 std::vector< int > tau_products_id;
189 for(
const auto& daughter : daughters ){
197 else if(
isMuon( *daughter ) ){
200 tau_p4vis+=(daughter->p4());
206 tau_p4vis+=(daughter->p4());
213 for(
const auto& grandaughter : grandaughters ){
214 if(
isGamma( *grandaughter ) ){
216 tau_p4vis+=(grandaughter->p4());
226 for(
const auto& grandaughter : grandaughters ){
229 tau_p4vis+=(grandaughter->p4());
235 for(
const auto& descendant : descendants ){
238 tau_p4vis+=(descendant->p4());
248 for(
const auto&
prod : finalProds ){
249 tau_products_pt.emplace_back(
prod->pt() );
250 tau_products_eta.emplace_back(
prod->eta() );
251 tau_products_phi.emplace_back(
prod->phi() );
252 tau_products_energy.emplace_back(
prod->energy() );
253 tau_products_mass.emplace_back(
prod->mass() );
254 tau_products_id.emplace_back(
prod->pdgId() );
277 if( n_pi == 0 && n_piZero == 0 && n_ele==1 ){
gentau_decayMode_.emplace_back(11); }
278 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
std::vector< float > gentau_phi_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< std::vector< float > > gentau_products_mass_
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 isChargedPion(const reco::GenParticle &daughter) const
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
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_