153 for (
const auto& particle : gen_particles) {
169 std::vector<float> tau_products_pt;
170 std::vector<float> tau_products_eta;
171 std::vector<float> tau_products_phi;
172 std::vector<float> tau_products_energy;
173 std::vector<float> tau_products_mass;
174 std::vector<int> tau_products_id;
179 for (
const auto& daughter : daughters) {
185 }
else if (
isMuon(*daughter)) {
188 tau_p4vis += (daughter->p4());
194 tau_p4vis += (daughter->p4());
201 for (
const auto& granddaughter : granddaughters) {
204 tau_p4vis += (granddaughter->p4());
211 tau_p4vis += (daughter->p4());
218 for (
const auto& granddaughter : granddaughters) {
220 tau_p4vis += (granddaughter->p4());
230 for (
const auto& grandaughter : grandaughters) {
233 tau_p4vis += (grandaughter->p4());
238 for (
const auto& descendant : descendants) {
241 tau_p4vis += (descendant->p4());
251 for (
const auto&
prod : finalProds) {
252 tau_products_pt.emplace_back(
prod->pt());
253 tau_products_eta.emplace_back(
prod->eta());
254 tau_products_phi.emplace_back(
prod->phi());
255 tau_products_energy.emplace_back(
prod->energy());
256 tau_products_mass.emplace_back(
prod->mass());
257 tau_products_id.emplace_back(
prod->pdgId());
280 if (n_pi == 0 && n_piZero == 0 && n_ele == 1) {
282 }
else if (n_pi == 0 && n_piZero == 0 && n_mu == 1) {
286 else if (n_pi == 1 && n_piZero == 0) {
290 else if (n_pi == 1 && n_piZero >= 1) {
294 else if (n_pi == 3 && n_piZero == 0) {
298 else if (n_pi == 3 && n_piZero >= 1) {
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_
std::vector< std::vector< int > > gentau_products_id_
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
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