|
|
Go to the documentation of this file.
25 produces<reco::GenParticleCollection>();
38 auto genVisTaus = std::make_unique<reco::GenParticleCollection>();
40 for (
const auto& genTauJet : *genTauJets) {
43 if (decayMode_string ==
"electron" || decayMode_string ==
"muon")
46 if (decayMode_string ==
"oneProng0Pi0")
48 else if (decayMode_string ==
"oneProng1Pi0")
50 else if (decayMode_string ==
"oneProng2Pi0")
52 else if (decayMode_string ==
"threeProng0Pi0")
54 else if (decayMode_string ==
"threeProng1Pi0")
59 int pdgId = (genTauJet.charge() > 0) ? -15 : +15;
65 for (
size_t idxGenParticle = 0; idxGenParticle < numGenParticles; ++idxGenParticle) {
70 int abs_pdgId =
abs(daughter->pdgId());
72 if (abs_pdgId == 12 || abs_pdgId == 14 || abs_pdgId == 16)
74 daughterVisP4 += daughter->p4();
76 double dR2 =
deltaR2(daughterVisP4, genVisTau);
93 desc.
add<
edm::InputTag>(
"src")->setComment(
"collection of visible gen taus (as reco::GenJetCollection)");
94 desc.
add<
edm::InputTag>(
"srcGenParticles")->setComment(
"collections of gen particles");
95 descriptions.
add(
"genVisTaus", desc);
ParameterDescriptionBase * add(U const &iLabel, T const &value)
int status() const final
status word
std::vector< GenJet > GenJetCollection
collection of GenJet objects
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
void produce(edm::StreamID id, edm::Event &evt, const edm::EventSetup &es) const override
#define DEFINE_FWK_MODULE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
GenVisTauProducer(const edm::ParameterSet ¶ms)
const edm::EDGetTokenT< reco::GenParticleCollection > srcGenParticles_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
int pdgId() const final
PDG identifier.
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const daughters & daughterRefVector() const
references to daughtes
const edm::EDGetTokenT< reco::GenJetCollection > src_
const GreaterByPt< reco::GenParticle > pTComparator_
Abs< T >::type abs(const T &t)
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
math::XYZTLorentzVector LorentzVector
Lorentz vector.
~GenVisTauProducer() override
std::string genTauDecayMode(const reco::CompositePtrCandidate &c)