155 for (
const auto& particle : gen_particles) {
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;
181 for (
const auto& daughter : daughters) {
187 }
else if (
isMuon(*daughter)) {
190 tau_p4vis += (daughter->p4());
196 tau_p4vis += (daughter->p4());
203 for (
const auto& granddaughter : granddaughters) {
206 tau_p4vis += (granddaughter->p4());
213 tau_p4vis += (daughter->p4());
220 for (
const auto& granddaughter : granddaughters) {
222 tau_p4vis += (granddaughter->p4());
232 for (
const auto& grandaughter : grandaughters) {
235 tau_p4vis += (grandaughter->p4());
240 for (
const auto& descendant : descendants) {
243 tau_p4vis += (descendant->p4());
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());
282 if (n_pi == 0 && n_piZero == 0 && n_ele == 1) {
284 }
else if (n_pi == 0 && n_piZero == 0 && n_mu == 1) {
288 else if (n_pi == 1 && n_piZero == 0) {
292 else if (n_pi == 1 && n_piZero >= 1) {
296 else if (n_pi == 3 && n_piZero == 0) {
300 else if (n_pi == 3 && n_piZero >= 1) {
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
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_
int status() const final
status word
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_
int pdgId() const final
PDG identifier.
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_
T getParameter(std::string const &) const
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_
void fill(const edm::Event &, const HGCalTriggerNtupleEventSetup &) final
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
math::PtEtaPhiELorentzVectorF LorentzVector