8 : MC_{consumes<GenParticleCollection>(
mc.getUntrackedParameter<
edm::InputTag>(
"GenParticles"))},
9 MCMET_{consumes<GenMETCollection>(
mc.getUntrackedParameter<
edm::InputTag>(
"GenMET"))},
10 ptMinMCTau_{
mc.getUntrackedParameter<
double>(
"ptMinTau", 5.)},
11 ptMinMCElectron_{
mc.getUntrackedParameter<
double>(
"ptMinElectron", 5.)},
12 ptMinMCMuon_{
mc.getUntrackedParameter<
double>(
"ptMinMuon", 2.)},
13 m_PDG_{
mc.getUntrackedParameter<std::vector<int>>(
"BosonID")},
14 etaMin_{
mc.getUntrackedParameter<
double>(
"EtaMin", -2.5)},
15 etaMax_{
mc.getUntrackedParameter<
double>(
"EtaMax", 2.5)},
16 phiMin_{
mc.getUntrackedParameter<
double>(
"PhiMin", -3.15)},
17 phiMax_{
mc.getUntrackedParameter<
double>(
"PhiMax", 3.15)} {
20 produces<LorentzVectorCollection>(
"LeptonicTauLeptons");
21 produces<LorentzVectorCollection>(
"LeptonicTauElectrons");
22 produces<LorentzVectorCollection>(
"LeptonicTauMuons");
23 produces<LorentzVectorCollection>(
"HadronicTauOneProng");
24 produces<LorentzVectorCollection>(
"HadronicTauThreeProng");
25 produces<LorentzVectorCollection>(
"HadronicTauOneAndThreeProng");
26 produces<LorentzVectorCollection>(
"TauOther");
27 produces<LorentzVectorCollection>(
"Neutrina");
28 produces<LorentzVectorCollection>(
"MET");
29 produces<std::vector<int>>(
"Mothers");
44 unique_ptr<std::vector<int>> product_Mothers(
new std::vector<int>);
59 product_MET->push_back(
MET);
69 if (
abs((*p).pdgId()) ==
m_PDG_[
pi] && ((*p).isHardProcess() || (*p).status() == 3)) {
79 product_Mothers->push_back((*p).pdgId());
81 TLorentzVector Boson((*p).px(), (*p).py(), (*p).pz(), (*p).energy());
111 if (!decayProducts.
empty()) {
116 int numElectrons = 0;
118 int numChargedPions = 0;
119 int numNeutralPions = 0;
121 int numOtherParticles = 0;
135 Neutrino.SetPxPyPzE((*pit)->px(), (*pit)->py(), (*pit)->pz(), (*pit)->energy());
144 TauDecayProduct.SetPxPyPzE((*pit)->px(), (*pit)->py(), (*pit)->pz(), (*pit)->energy());
145 Visible_Taus += TauDecayProduct;
152 int tauDecayMode =
kOther;
154 if (numOtherParticles == 0) {
155 if (numElectrons == 1) {
160 tauDecayMode =
kMuon;
163 switch (numChargedPions) {
165 if (numNeutralPions != 0) {
169 switch (numPhotons) {
185 if (numNeutralPions != 0) {
189 switch (numPhotons) {
208 Visible_Taus.phi() <
phiMax_) &&
210 product_Electrons->push_back(Visible_Taus);
211 product_Leptons->push_back(Visible_Taus);
213 }
else if (tauDecayMode ==
kMuon) {
215 Visible_Taus.phi() <
phiMax_) &&
217 product_Muons->push_back(Visible_Taus);
218 product_Leptons->push_back(Visible_Taus);
222 Visible_Taus.phi() <
phiMax_) &&
224 product_OneProng->push_back(Visible_Taus);
225 product_OneAndThreeProng->push_back(Visible_Taus);
226 product_Neutrina->push_back(Neutrino);
230 Visible_Taus.phi() <
phiMax_) &&
232 product_ThreeProng->push_back(Visible_Taus);
233 product_OneAndThreeProng->push_back(Visible_Taus);
234 product_Neutrina->push_back(Neutrino);
236 }
else if (tauDecayMode ==
kOther) {
238 Visible_Taus.phi() <
phiMax_) &&
240 product_Other->push_back(Visible_Taus);
251 iEvent.put(
std::move(product_OneAndThreeProng),
"HadronicTauOneAndThreeProng");
bool empty() const
Is the RefVector empty.
const edm::EDGetTokenT< reco::GenMETCollection > MCMET_
ESProducts< std::remove_reference_t< TArgs >... > products(TArgs &&... args)
bool isPromptDecayed() const
const double ptMinMCElectron_
int pdgId() const final
PDG identifier.
HLTTauMCProducer(const edm::ParameterSet &)
const double ptMinMCMuon_
Abs< T >::type abs(const T &t)
math::XYZTLorentzVector LorentzVector
void getGenDecayProducts(const reco::GenParticleRef &, reco::GenParticleRefVector &, int status=1, int pdgId=0) const
std::vector< LorentzVector > LorentzVectorCollection
const edm::EDGetTokenT< reco::GenParticleCollection > MC_
const_iterator end() const
Termination of iteration.
TLorentzVector genMet(const HepMC::GenEvent *all, double etamin=-9999., double etamax=9999.)
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
const_iterator begin() const
Initialize an iterator over the RefVector.
math::PtEtaPhiELorentzVectorF LorentzVector
const std::vector< int > m_PDG_