24 const Point vtx( 0.0, 0.0, 0.0 );
40 if( (onlyFiducial &&
TMath::Abs(iParticle->eta()) >= 5.0))
continue;
42 if( iParticle->et() <= globalThreshold )
continue;
46 double phi = iParticle->phi();
47 double et = iParticle->pt();
48 sum_ez += iParticle->pz();
50 sum_ex += et*
cos(phi);
51 sum_ey += et*
sin(phi);
55 double phi = iParticle->phi();
56 double theta = iParticle->theta();
57 double e = iParticle->energy();
58 double et = e*
sin(theta);
59 sum_ez += e*
cos(theta);
61 sum_ex += et*
cos(phi);
62 sum_ey += et*
sin(phi);
69 met->
met =
sqrt( sum_ex*sum_ex + sum_ey*sum_ey );
76 const static int neutralEMpdgId[] = { 22 };
77 const static std::set<int> neutralEMpdgIdSet(neutralEMpdgId, neutralEMpdgId +
sizeof(neutralEMpdgId)/
sizeof(
int));
79 const static int chargedEMpdgId[] = { 11 };
80 const static std::set<int> chargedEMpdgIdSet(chargedEMpdgId, chargedEMpdgId +
sizeof(chargedEMpdgId)/
sizeof(
int));
82 const static int muonpdgId[] = { 13 };
83 const static std::set<int> muonpdgIdSet(muonpdgId, muonpdgId +
sizeof(muonpdgId)/
sizeof(
int));
85 const static int neutralHADpdgId[] = {
92 const static std::set<int> neutralHADpdgIdSet(neutralHADpdgId, neutralHADpdgId +
sizeof(neutralHADpdgId)/
sizeof(
int));
94 const static int chargedHADpdgId[] = {
103 const static std::set<int> chargedHADpdgIdSet(chargedHADpdgId, chargedHADpdgId +
sizeof(chargedHADpdgId)/
sizeof(
int));
105 const static int invisiblepdgId[] = {
126 const static std::set<int> invisiblepdgIdSet(invisiblepdgId, invisiblepdgId +
sizeof(invisiblepdgId)/
sizeof(
int));
129 double Et_unclassified = 0.0;
133 if(applyFiducialThresholdForFractions)
if( onlyFiducial && (
TMath::Abs(iParticle->eta()) >= 5.0) )
continue;
134 if(applyFiducialThresholdForFractions)
if( iParticle->et() <= globalThreshold )
continue;
137 double pt = (usePt) ? iParticle->pt() : iParticle->et();
144 else Et_unclassified += pt;
float InvisibleEtFraction
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
reco::GenMET addInfo(edm::Handle< edm::View< reco::Candidate > > particles, CommonMETData *met, double globalThreshold=0, bool onlyFiducial=false, bool applyFiducialThresholdForFractions=false, bool usePt=false)
tuple met
____________________________________________________________________________||
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
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.
TLorentzVector genMet(const HepMC::GenEvent *all, double etamin=-9999., double etamax=9999.)
float ChargedEMEtFraction
SpecificGenMETData mkSpecificGenMETData(edm::Handle< edm::View< reco::Candidate > > &particles, double globalThreshold, bool onlyFiducial, bool applyFiducialThresholdForFractions, bool usePt)
float NeutralEMEtFraction
float ChargedHadEtFraction
math::XYZTLorentzVector LorentzVector
float NeutralHadEtFraction