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 numNeutrinos = 0;
122 int numOtherParticles = 0;
137 Neutrino.SetPxPyPzE((*pit)->px(), (*pit)->py(), (*pit)->pz(), (*pit)->energy());
146 TauDecayProduct.SetPxPyPzE((*pit)->px(), (*pit)->py(), (*pit)->pz(), (*pit)->energy());
147 Visible_Taus += TauDecayProduct;
154 int tauDecayMode =
kOther;
156 if (numOtherParticles == 0) {
157 if (numElectrons == 1) {
162 tauDecayMode =
kMuon;
165 switch (numChargedPions) {
167 if (numNeutralPions != 0) {
171 switch (numPhotons) {
187 if (numNeutralPions != 0) {
191 switch (numPhotons) {
210 Visible_Taus.phi() <
phiMax_) &&
212 product_Electrons->push_back(Visible_Taus);
213 product_Leptons->push_back(Visible_Taus);
215 }
else if (tauDecayMode ==
kMuon) {
217 Visible_Taus.phi() <
phiMax_) &&
219 product_Muons->push_back(Visible_Taus);
220 product_Leptons->push_back(Visible_Taus);
224 Visible_Taus.phi() <
phiMax_) &&
226 product_OneProng->push_back(Visible_Taus);
227 product_OneAndThreeProng->push_back(Visible_Taus);
228 product_Neutrina->push_back(Neutrino);
232 Visible_Taus.phi() <
phiMax_) &&
234 product_ThreeProng->push_back(Visible_Taus);
235 product_OneAndThreeProng->push_back(Visible_Taus);
236 product_Neutrina->push_back(Neutrino);
238 }
else if (tauDecayMode ==
kOther) {
240 Visible_Taus.phi() <
phiMax_) &&
242 product_Other->push_back(Visible_Taus);
253 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_