328 std::cout << __FUNCTION__ <<
":" << __LINE__ <<
":pvHandle handle not found!" << std::endl;
331 const int nvtx = pvHandle->size();
346 if ((isTcMET) and !tcMETs.
isValid())
return;
352 if (
isCaloMET) { met = caloMETs->front();}
353 if (isTcMET) { met = tcMETs->front() ;}
355 if (
isPFMET) { met = pfMETs->front() ;}
356 if (
isGenMET) { met = genMETs->front() ;}
358 const double SumET = met.
sumEt();
359 const double METSig = met.
mEtSig();
360 const double MET = met.
pt();
361 const double MEx = met.
px();
362 const double MEy = met.
py();
363 const double METPhi = met.
phi();
379 double genMET = genMetTrue->
pt();
380 double genMETPhi = genMetTrue->
phi();
398 edm::LogInfo(
"OutputInfo") <<
" failed to retrieve data required by MET Task: genMetTrue";
405 const double genMET = genMetCalo->
pt();
406 const double genMETPhi = genMetCalo->
phi();
411 edm::LogInfo(
"OutputInfo") <<
" failed to retrieve data required by MET Task: genMetCalo";
421 const double caloEmEtFraction = calomet->
emEtFraction();
422 const double caloHadEtInHB = calomet->
hadEtInHB();
423 const double caloHadEtInHO = calomet->
hadEtInHO();
424 const double caloHadEtInHE = calomet->
hadEtInHE();
425 const double caloHadEtInHF = calomet->
hadEtInHF();
426 const double caloEmEtInEB = calomet->
emEtInEB();
427 const double caloEmEtInEE = calomet->
emEtInEE();
428 const double caloEmEtInHF = calomet->
emEtInHF();
450 genmet = &(genMETs->front());
509 edm::LogInfo(
"OutputInfo") <<
"falied to retrieve data require by MET Task";
510 edm::LogInfo(
"OutputInfo") <<
"MET Taks cannot continue...!";
516 caloMet = &(caloMetcol->front());
520 edm::LogInfo(
"OutputInfo") <<
"falied to retrieve muon data require by MET Task";
521 edm::LogInfo(
"OutputInfo") <<
"MET Taks cannot continue...!";
526 edm::LogInfo(
"OutputInfo") <<
"falied to retrieve electron data require by MET Task";
527 edm::LogInfo(
"OutputInfo") <<
"MET Taks cannot continue...!";
532 edm::LogInfo(
"OutputInfo") <<
"falied to retrieve beam spot data require by MET Task";
533 edm::LogInfo(
"OutputInfo") <<
"MET Taks cannot continue...!";
547 for(
unsigned int mus = 0; mus < muon_h->size() ; mus++ ) {
550 if( muref->pt() < 20 )
continue;
555 if( type == 1 || type == 2 || type == 5 ) ++nM;
562 if( eleit->p4().pt() < 20 )
continue;
566 if( strcmp(
sample_.c_str() ,
"zmm" ) == 0 && nM != 2 )
return;
568 if( strcmp(
sample_.c_str() ,
"zee" ) == 0 && nE != 2 )
return;
570 if( strcmp(
sample_.c_str() ,
"ttbar" ) == 0 && ( nE + nM ) == 0 )
return;
572 const double caloMET = caloMet->
pt();
573 const double caloMEx = caloMet->
px();
574 const double caloMEy = caloMet->
py();
580 const unsigned int nTracks = track_h->size();
581 unsigned int nCorrTracks = 0;
582 unsigned int trackCount = 0;
583 for( reco::TrackCollection::const_iterator trkit = track_h->begin(); trkit != track_h->end(); trkit++ ) {
589 double d0 = -1 * trkit->dxy( bspot );
603 const float frac = (float)nCorrTracks / (
float)nTracks;
615 unsigned int ele_idx = el_track.
isNonnull() ? el_track.
key() : 99999;
617 if( eleit->hadronicOverEm() < 0.1 && ele_idx < nTracks )
623 for( reco::MuonCollection::const_iterator muonit = muon_h->begin(); muonit != muon_h->end(); muonit++ ) {
632 double d0 = siTrack.
isNonnull() ? -1 * siTrack->dxy( bspot) : -999;
643 const unsigned int nMuons = muon_h->size();
649 for(
unsigned int mus = 0; mus < nMuons; mus++ )
658 int type = muCorrData.
type();
661 if( type == 1 || type == 2 || type == 5 ) {
665 muDx += muonCorrData.
corrX() - muref->globalTrack()->px();
666 muDy += muonCorrData.
corrY() - muref->globalTrack()->py();
668 else if( type == 2 ) {
669 muDx += muonCorrData.
corrX() - muref->innerTrack()->px();
670 muDy += muonCorrData.
corrY() - muref->innerTrack()->py();
672 else if( type == 5 ) {
673 muDx += muonCorrData.
corrX() - muref->px();
674 muDy += muonCorrData.
corrY() - muref->py();
MonitorElement * mChargedEMEtFraction
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
MonitorElement * mMExCorrection
MonitorElement * mMuonEtFraction
tuple met
____________________________________________________________________________||
double HFEMEtFraction() const
MonitorElement * mMETDifference_GenMETTrue
double CaloSETInmHF() const
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
MonitorElement * mtrkPtErr
MonitorElement * mMETDifference_GenMETTrue_MET400to500
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * mPFelectronEtFraction
double maxEtInHadTowers() const
MonitorElement * mtrkNhits
double neutralHadronEtFraction() const
MonitorElement * mCaloMaxEtInEmTowers
MonitorElement * mCaloSETInpHF
MonitorElement * mCaloHadEtInHF
edm::EDGetTokenT< edm::View< reco::GsfElectron > > electronToken_
tuple genMetCalo
____________________________________________________________________________||
double MuonEtFraction() const
MonitorElement * mPFphotonEtFraction
MonitorElement * mPFHFEMEt
double maxEtInEmTowers() const
MonitorElement * mMETDifference_GenMETTrue_MET40to60
MonitorElement * mCaloEmEtFraction
MonitorElement * mCaloEmEtInEE
MonitorElement * mCaloSETInmHF
MonitorElement * mNeutralEMEtFraction
virtual double py() const GCC11_FINAL
y coordinate of momentum vector
MonitorElement * mMETDifference_GenMETTrue_MET20to40
MonitorElement * mMETDifference_GenMETTrue_MET60to80
MonitorElement * mCaloMaxEtInHadTowers
MonitorElement * mfracTrks
MonitorElement * mInvisibleEtFraction
MonitorElement * mCaloEtFractionHadronic
MonitorElement * mtrkChi2
MonitorElement * mPFmuonEt
MonitorElement * mPFelectronEt
bool isNonnull() const
Checks for non-null.
MonitorElement * mnMusPis
MonitorElement * mPFphotonEt
MonitorElement * mCaloEmEtInEB
MonitorElement * mCaloHadEtInHE
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
double HFHadronEtFraction() const
edm::EDGetTokenT< reco::PFMETCollection > pfMETsToken_
edm::EDGetTokenT< reco::CaloMETCollection > caloMETsToken_
MonitorElement * mPFneutralHadronEtFraction
double muonEtFraction() const
MonitorElement * mtrkQuality
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
edm::EDGetTokenT< reco::TrackCollection > trackToken_
double HFHadronEt() const
MonitorElement * mPFHFHadronEt
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
double photonEtFraction() const
edm::EDGetTokenT< std::vector< reco::Vertex > > pvToken_
double ChargedEMEtFraction() const
edm::EDGetTokenT< reco::GenMETCollection > genMETsToken_
virtual double px() const GCC11_FINAL
x coordinate of momentum vector
MonitorElement * mMETDifference_GenMETTrue_MET150to200
MonitorElement * mMETDeltaPhi_GenMETCalo
MonitorElement * mMETDifference_GenMETTrue_MET100to150
MonitorElement * mCaloHadEtInHB
double CaloSETInpHF() const
double InvisibleEtFraction() const
MonitorElement * mMETDifference_GenMETTrue_MET300to400
MonitorElement * mMETDifference_GenMETCalo
MonitorElement * mCaloHadEtInHO
double electronEt() const
edm::EDGetTokenT< reco::METCollection > tcMETsToken_
edm::EDGetTokenT< reco::MuonCollection > muonToken_
MonitorElement * mPFchargedHadronEt
double etFractionHadronic() const
MonitorElement * mChargedHadEtFraction
MonitorElement * mMETDeltaPhi_GenMETTrue
MonitorElement * mPFneutralHadronEt
XYZPointD XYZPoint
point in space with cartesian internal representation
tuple tcMet
____________________________________________________________________________||
key_type key() const
Accessor for product key.
MonitorElement * mmuNhits
edm::EDGetTokenT< reco::GenMETCollection > genMETsCaloToken_
edm::EDGetTokenT< edm::ValueMap< reco::MuonMETCorrectionData > > tcMet_ValueMap_Token_
edm::EDGetTokenT< reco::GenMETCollection > genMETsTrueToken_
MonitorElement * mPFmuonEtFraction
T const * product() const
double NeutralEMEtFraction() const
double electronEtFraction() const
MonitorElement * mMETFine
double chargedHadronEtFraction() const
MonitorElement * mNeutralHadEtFraction
MonitorElement * mPFHFEMEtFraction
MonitorElement * mMuonCorrectionFlag
double NeutralHadEtFraction() const
edm::EDGetTokenT< edm::ValueMap< reco::MuonMETCorrectionData > > met_ValueMap_Token_
MonitorElement * mtrkAlgo
MonitorElement * mNvertex
bool isGoodTrack(const reco::TrackRef, float d0corr)
MonitorElement * mMET_Nvtx
MonitorElement * mPFchargedHadronEtFraction
MonitorElement * mMEyCorrection
MonitorElement * mMETDifference_GenMETTrue_MET0to20
double neutralHadronEt() const
double ChargedHadEtFraction() const
virtual float pt() const GCC11_FINAL
transverse momentum
MonitorElement * mMETDifference_GenMETTrue_MET200to300
MonitorElement * mMETDifference_GenMETTrue_MET80to100
double emEtFraction() const
double chargedHadronEt() const
MonitorElement * mCaloEmEtInHF
MonitorElement * mPFHFHadronEtFraction