37 double Et_unclassified = 0.;
44 if(!onlyFiducial || (onlyFiducial && TMath::Abs(iParticle->eta()) < 5.0))
48 if( iParticle->et() > globalThreshold )
50 double phi = iParticle->phi();
51 double theta = iParticle->theta();
52 double e = iParticle->energy();
53 double et = e*
sin(theta);
54 sum_ez += e*
cos(theta);
56 sum_ex += et*
cos(phi);
57 sum_ey += et*
sin(phi);
63 if( iParticle->pt() > globalThreshold )
65 double phi = iParticle->phi();
66 double et = iParticle->pt();
67 sum_ez += iParticle->pz();
69 sum_ex += et*
cos(phi);
70 sum_ey += et*
sin(phi);
77 int pdgId = TMath::Abs( iParticle->pdgId() ) ;
153 Et_unclassified += iParticle->pt();
155 Et_unclassified += iParticle->et();
166 met->
met =
sqrt( sum_ex*sum_ex + sum_ey*sum_ey );
169 met->
phi = atan2( -sum_ey, -sum_ex );
188 const Point vtx( 0.0, 0.0, 0.0 );
191 GenMET specificmet( specific, met->
sumet, p4, vtx );
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
double InvisibleEtFraction
double NeutralHadEtFraction
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
reco::GenMET addInfo(edm::Handle< edm::View< reco::Candidate > > particles, CommonMETData *met, double globalThreshold, bool onlyFiducial=false, bool usePt=false)
Make GenMET. Assumes MET is made from MCCandidates.
double NeutralEMEtFraction
Cos< T >::type cos(const T &t)
MET made from CaloTowers.
Structure containing data common to all types of MET.
double ChargedHadEtFraction
double ChargedEMEtFraction
math::XYZTLorentzVector LorentzVector