49 if ((onlyFiducial && TMath::Abs(iParticle->eta()) >= 5.0))
56 double phi = iParticle->phi();
57 double et = iParticle->pt();
58 sum_ez += iParticle->pz();
63 double phi = iParticle->phi();
64 double theta = iParticle->theta();
65 double e = iParticle->energy();
77 met->met =
sqrt(sum_ex * sum_ex + sum_ey * sum_ey);
87 const static int neutralEMpdgId[] = {22 };
88 const static std::set<int> neutralEMpdgIdSet(neutralEMpdgId, neutralEMpdgId +
sizeof(neutralEMpdgId) /
sizeof(
int));
90 const static int chargedEMpdgId[] = {11 };
91 const static std::set<int> chargedEMpdgIdSet(chargedEMpdgId, chargedEMpdgId +
sizeof(chargedEMpdgId) /
sizeof(
int));
93 const static int muonpdgId[] = {13 };
94 const static std::set<int> muonpdgIdSet(muonpdgId, muonpdgId +
sizeof(muonpdgId) /
sizeof(
int));
96 const static int neutralHADpdgId[] = {
103 const static std::set<int> neutralHADpdgIdSet(neutralHADpdgId,
104 neutralHADpdgId +
sizeof(neutralHADpdgId) /
sizeof(
int));
106 const static int chargedHADpdgId[] = {
115 const static std::set<int> chargedHADpdgIdSet(chargedHADpdgId,
116 chargedHADpdgId +
sizeof(chargedHADpdgId) /
sizeof(
int));
118 const static int invisiblepdgId[] = {
120 1000022 , 1000012 , 1000014 ,
121 1000016 , 2000012 , 2000014 ,
122 2000016 , 39 , 1000039 ,
123 5100039 , 4000012 , 4000014 ,
124 4000016 , 9900012 , 9900014 ,
127 const static std::set<int> invisiblepdgIdSet(invisiblepdgId, invisiblepdgId +
sizeof(invisiblepdgId) /
sizeof(
int));
130 double Et_unclassified = 0.0;
136 if (onlyFiducial && (TMath::Abs(iParticle->eta()) >= 5.0))
142 int pdgId = TMath::Abs(iParticle->pdgId());
143 double pt = (
usePt) ? iParticle->pt() : iParticle->et();
144 if (neutralEMpdgIdSet.count(
pdgId))
146 else if (chargedEMpdgIdSet.count(
pdgId))
148 else if (muonpdgIdSet.count(
pdgId))
150 else if (neutralHADpdgIdSet.count(
pdgId))
152 else if (chargedHADpdgIdSet.count(
pdgId))
154 else if (invisiblepdgIdSet.count(
pdgId))
157 Et_unclassified +=
pt;
165 specific.NeutralEMEtFraction /= Et_Total;
166 specific.NeutralHadEtFraction /= Et_Total;
167 specific.ChargedEMEtFraction /= Et_Total;
168 specific.ChargedHadEtFraction /= Et_Total;
169 specific.MuonEtFraction /= Et_Total;
170 specific.InvisibleEtFraction /= Et_Total;
reco::GenMET addInfo(edm::Handle< edm::View< reco::Candidate > > particles, CommonMETData *met, double globalThreshold=0, bool onlyFiducial=false, bool applyFiducialThresholdForFractions=false, bool usePt=false)
Sin< T >::type sin(const T &t)
void fillCommonMETData(CommonMETData *met, edm::Handle< edm::View< reco::Candidate > > &particles, double globalThreshold, bool onlyFiducial, bool usePt)
Cos< T >::type cos(const T &t)
Structure containing data common to all types of MET.
applyFiducialThresholdForFractions
using Pt instead Et
TLorentzVector genMet(const HepMC::GenEvent *all, double etamin=-9999., double etamax=9999.)
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
SpecificGenMETData mkSpecificGenMETData(edm::Handle< edm::View< reco::Candidate > > &particles, double globalThreshold, bool onlyFiducial, bool applyFiducialThresholdForFractions, bool usePt)
Structure Point Contains parameters of Gaussian fits to DMRs.
math::XYZTLorentzVector LorentzVector
Geom::Theta< T > theta() const