|
|
Go to the documentation of this file.
26 std::string dqmSubDirectoryElecTauChannel = cfgElecTauChannel.getParameter<
std::string>(
"dqmSubDirectory");
27 cfgElecTauChannel.addParameter<
std::string>(
"dqmDirectory",
92 : dqmDirectory_(
cfg.getParameter<
std::
string>(
"dqmDirectory")),
93 numEventsAnalyzed_(0),
94 numEventsSelected_(0),
96 numWarningsTriggerResults_(0),
97 numWarningsHLTpath_(0),
98 numWarningsVertex_(0),
99 numWarningsBeamSpot_(0),
100 numWarningsElectron_(0),
101 numWarningsTauJet_(0),
102 numWarningsTauDiscrByLeadTrackFinding_(0),
103 numWarningsTauDiscrByLeadTrackPtCut_(0),
104 numWarningsTauDiscrByTrackIso_(0),
105 numWarningsTauDiscrByEcalIso_(0),
106 numWarningsTauDiscrAgainstElectrons_(0),
107 numWarningsTauDiscrAgainstMuons_(0),
108 numWarningsCaloMEt_(0),
109 numWarningsPFMEt_(0) {
144 hElectronPt_ = iBooker.book1D(
"ElectronPt",
"P_{T}^{e}", 20, 0., 100.);
145 hElectronEta_ = iBooker.book1D(
"ElectronEta",
"#eta_{e}", 20, -4.0, +4.0);
147 hElectronTrackIsoPt_ = iBooker.book1D(
"ElectronTrackIsoPt",
"Electron Track Iso.", 20, -0.01, 0.5);
148 hElectronEcalIsoPt_ = iBooker.book1D(
"ElectronEcalIsoPt",
"Electron Ecal Iso.", 20, -0.01, 0.5);
149 hTauJetPt_ = iBooker.book1D(
"TauJetPt",
"P_{T}^{#tau-Jet}", 20, 0., 100.);
150 hTauJetEta_ = iBooker.book1D(
"TauJetEta",
"#eta_{#tau-Jet}", 20, -4.0, +4.0);
151 hVisMass_ = iBooker.book1D(
"VisMass",
"e + #tau-Jet visible Mass", 20, 20., 120.);
152 hMtElecPFMEt_ = iBooker.book1D(
"MtElecPFMEt",
"e + E_{T}^{miss} (PF) transverse Mass", 20, 20., 120.);
154 iBooker.book1D(
"ElecTauAcoplanarity",
"#Delta #phi_{e #tau-Jet}", 20, -
TMath::Pi(), +
TMath::Pi());
155 hElecTauCharge_ = iBooker.book1D(
"ElecTauCharge",
"Q_{e * #tau-Jet}", 5, -2.5, +2.5);
156 hVertexZ_ = iBooker.book1D(
"VertexZ",
"Event Vertex z-Position", 20, -25., +25.);
157 hCaloMEtPt_ = iBooker.book1D(
"CaloMEtPt",
"E_{T}^{miss} (Calo)", 20, 0., 100.);
158 hPFMEtPt_ = iBooker.book1D(
"PFMEtPt",
"E_{T}^{miss} (PF)", 20, 0., 100.);
159 hCutFlowSummary_ = iBooker.book1D(
"CutFlowSummary",
"Cut-flow Summary", 11, 0.5, 11.5);
181 bool readError =
false;
191 "Failed to access Trigger results");
197 bool isTriggered =
false;
205 edm::LogWarning(
"EwkElecTauHistManager") <<
" Undefined HLT path = " << (*hltPath) <<
" !!";
222 "Failed to access Vertex collection");
243 "Failed to access Electron collection");
249 double theElectronTrackIsoPt = 1.e+3;
250 double theElectronEcalIsoPt = 1.e+3;
251 double theElectronHcalIsoPt = 1.e+3;
253 theElectronTrackIsoPt = theElectron->
dr03TkSumPt();
258 theElectronTrackIsoPt /= theElectron->
pt();
259 theElectronEcalIsoPt /= theElectron->
pt();
260 theElectronHcalIsoPt /= theElectron->
pt();
272 "Failed to access Tau-jet collection");
284 "Failed to access collection of pf. Tau discriminators by "
285 "leading Track finding");
293 "Failed to access collection of pf. Tau discriminators by "
294 "leading Track Pt cut");
302 "Failed to access collection of pf. Tau discriminators by "
311 "Failed to access collection of pf. Tau discriminators by ECAL "
320 "Failed to access collection of pf. Tau discriminators against "
329 "Failed to access collection of pf. Tau discriminators against Muons");
333 int theTauJetIndex = -1;
336 double theTauDiscrByLeadTrackFinding = -1.;
337 double theTauDiscrByLeadTrackPtCut = -1.;
338 double theTauDiscrByTrackIso = -1.;
339 double theTauDiscrByEcalIso = -1.;
340 double theTauDiscrAgainstElectrons = -1.;
341 double theTauDiscrAgainstMuons = -1.;
342 if (theTauJetIndex != -1) {
344 theTauDiscrByLeadTrackFinding = (*tauDiscrByLeadTrackFinding)[theTauJetRef];
345 theTauDiscrByLeadTrackPtCut = (*tauDiscrByLeadTrackPtCut)[theTauJetRef];
346 theTauDiscrByTrackIso = (*tauDiscrByTrackIso)[theTauJetRef];
347 theTauDiscrByEcalIso = (*tauDiscrByEcalIso)[theTauJetRef];
348 theTauDiscrAgainstElectrons = (*tauDiscrAgainstElectrons)[theTauJetRef];
349 theTauDiscrAgainstMuons = (*tauDiscrAgainstMuons)[theTauJetRef];
361 "Failed to access calo. MET collection");
374 "Failed to access pf. MET collection");
380 if (!(theElectron && theTauJet && theTauJetIndex != -1))
389 double mElecTau = (theElectron->
p4() + theTauJet->
p4()).M();
393 double mtElecPFMEt =
calcMt(theElectron->
px(), theElectron->
py(), pfMEt.
px(), pfMEt.
py());
405 unsigned numIdElectrons = 0;
417 bool isSelected =
false;
418 bool fullSelect =
false;
419 int cutFlowStatus = -1;
465 for (
int iCut = 1; iCut <= cutFlowStatus; ++iCut) {
494 if (theEventVertex) {
512 edm::LogInfo(
"EwkElecTauHistManager") <<
"Filter-Statistics Summary:" << std::endl
517 edm::LogInfo(
"") <<
"Overall efficiency = " << std::setprecision(4) << eff * 100. <<
" +/- " << std::setprecision(4)
554 : dqmDirectory_(
cfg.getParameter<
std::
string>(
"dqmDirectory")),
555 numEventsAnalyzed_(0),
556 numEventsSelected_(0),
558 numWarningsTriggerResults_(0),
559 numWarningsHLTpath_(0),
560 numWarningsVertex_(0),
561 numWarningsBeamSpot_(0),
563 numWarningsTauJet_(0),
564 numWarningsTauDiscrByLeadTrackFinding_(0),
565 numWarningsTauDiscrByLeadTrackPtCut_(0),
566 numWarningsTauDiscrByTrackIso_(0),
567 numWarningsTauDiscrByEcalIso_(0),
568 numWarningsTauDiscrAgainstMuons_(0),
569 numWarningsCaloMEt_(0),
570 numWarningsPFMEt_(0) {
607 hMuonPt_ = iBooker.book1D(
"MuonPt",
"P_{T}^{#mu}", 20, 0., 100.);
608 hMuonEta_ = iBooker.book1D(
"MuonEta",
"#eta_{#mu}", 20, -4.0, +4.0);
610 hMuonTrackIsoPt_ = iBooker.book1D(
"MuonTrackIsoPt",
"Muon Track Iso.", 20, -0.01, 10.);
611 hMuonEcalIsoPt_ = iBooker.book1D(
"MuonEcalIsoPt",
"Muon Ecal Iso.", 20, -0.01, 10.);
612 hMuonCombIsoPt_ = iBooker.book1D(
"MuonCombIsoPt",
"Muon Comb Iso.", 20, -0.01, 1.);
614 hTauJetPt_ = iBooker.book1D(
"TauJetPt",
"P_{T}^{#tau-Jet}", 20, 0., 100.);
615 hTauJetEta_ = iBooker.book1D(
"TauJetEta",
"#eta_{#tau-Jet}", 20, -4.0, +4.0);
617 hTauLeadTrackPt_ = iBooker.book1D(
"TauLeadTrackPt",
"P_{T}^{#tau-Jetldg trk}", 20, 0., 50.);
618 hTauTrackIsoPt_ = iBooker.book1D(
"TauTrackIsoPt",
"Tau Track Iso.", 20, -0.01, 40.);
619 hTauEcalIsoPt_ = iBooker.book1D(
"TauEcalIsoPt",
"Tau Ecal Iso.", 10, -0.01, 10.);
620 hTauDiscrAgainstMuons_ = iBooker.book1D(
"TauDiscrAgainstMuons",
"Tau Discr. against Muons", 2, -0.5, +1.5);
621 hTauJetNumSignalTracks_ = iBooker.book1D(
"TauJetNumSignalTracks",
"Num. Tau signal Cone Tracks", 20, -0.5, +19.5);
622 hTauJetNumIsoTracks_ = iBooker.book1D(
"TauJetNumIsoTracks",
"Num. Tau isolation Cone Tracks", 20, -0.5, +19.5);
624 hVisMass_ = iBooker.book1D(
"VisMass",
"#mu + #tau-Jet visible Mass", 20, 0., 120.);
625 hVisMassFinal_ = iBooker.book1D(
"VisMassFinal",
"#mu + #tau-Jet visible final Mass", 20, 0., 120.);
626 hMtMuPFMEt_ = iBooker.book1D(
"MtMuPFMEt",
"#mu + E_{T}^{miss} (PF) transverse Mass", 20, 0., 120.);
628 iBooker.book1D(
"MuTauAcoplanarity",
"#Delta #phi_{#mu #tau-Jet}", 20, -
TMath::Pi(), +
TMath::Pi());
629 hMuTauDeltaR_ = iBooker.book1D(
"MuTauDeltaR",
"#Delta R_{#mu #tau-Jet}", 20, 0, 5);
630 hVertexZ_ = iBooker.book1D(
"VertexZ",
"Event Vertex z-Position", 20, -25., +25.);
631 hCaloMEtPt_ = iBooker.book1D(
"CaloMEtPt",
"E_{T}^{miss} (Calo)", 20, 0., 100.);
632 hPFMEtPt_ = iBooker.book1D(
"PFMEtPt",
"E_{T}^{miss} (PF)", 20, 0., 100.);
633 hCutFlowSummary_ = iBooker.book1D(
"CutFlowSummary",
"Cut-flow Summary", 11, 0.5, 11.5);
655 bool readError =
false;
665 "Failed to access Trigger results");
671 bool isTriggered =
false;
679 edm::LogWarning(
"EwkMuTauHistManager") <<
" Undefined HLT path = " << (*hltPath) <<
" !!";
696 "Failed to access Vertex collection");
718 double theMuonTrackIsoPt = 1.e+3;
719 double theMuonEcalIsoPt = 1.e+3;
720 double theMuonCombIsoPt = 1.e+3;
729 theMuonTrackIsoPt /= theMuon->
pt();
730 theMuonEcalIsoPt /= theMuon->
pt();
744 "Failed to access Tau-jet collection");
756 "Failed to access collection of pf. Tau discriminators by "
757 "leading Track finding");
765 "Failed to access collection of pf. Tau discriminators by "
766 "leading Track Pt cut");
774 "Failed to access collection of pf. Tau discriminators by "
783 "Failed to access collection of pf. Tau discriminators by ECAL "
792 "Failed to access collection of pf. Tau discriminators against Muons");
796 int theTauJetIndex = -1;
799 double theTauDiscrByLeadTrackFinding = -1.;
800 double theTauDiscrByLeadTrackPtCut = -1.;
801 double theTauDiscrByTrackIso = -1.;
802 double theTauDiscrByEcalIso = -1.;
803 double theTauDiscrAgainstMuons = -1.;
804 if (theTauJetIndex != -1) {
806 theTauDiscrByLeadTrackFinding = (*tauDiscrByLeadTrackFinding)[theTauJetRef];
807 theTauDiscrByLeadTrackPtCut = (*tauDiscrByLeadTrackPtCut)[theTauJetRef];
808 theTauDiscrByTrackIso = (*tauDiscrByTrackIso)[theTauJetRef];
809 theTauDiscrByEcalIso = (*tauDiscrByEcalIso)[theTauJetRef];
810 theTauDiscrAgainstMuons = (*tauDiscrAgainstMuons)[theTauJetRef];
822 "Failed to access calo. MET collection");
835 "Failed to access pf. MET collection");
841 if (!(theMuon && theTauJet && theTauJetIndex != -1))
851 double mMuTau = (theMuon->
p4() + theTauJet->
p4()).M();
855 double mtMuPFMEt =
calcMt(theMuon->
px(), theMuon->
px(), pfMEt.
px(), pfMEt.
py());
867 unsigned numGlobalMuons = 0;
869 if (
muon->isGlobalMuon()) {
878 bool isSelected =
false;
879 int cutFlowStatus = -1;
931 if (theEventVertex) {
977 for (
int iCut = 1; iCut <= cutFlowStatus; ++iCut) {
981 for (
int iCut = 1; iCut <= cutFlowStatus; ++iCut) {
994 edm::LogInfo(
"EwkMuTauHistManager") <<
"Filter-Statistics Summary:" << std::endl
999 edm::LogInfo(
"") <<
"Overall efficiency = " << std::setprecision(4) << eff * 100. <<
" +/- " << std::setprecision(4)
1014 if (isoMode_string ==
"absoluteIso") {
1016 }
else if (isoMode_string ==
"relativeIso") {
1019 edm::LogError(
"getIsoMode") <<
" Failed to decode isoMode string = " << isoMode_string <<
" !!";
1038 double calcMt(
double px1,
double py1,
double px2,
double py2) {
1039 double pt1 = TMath::Sqrt(px1 * px1 + py1 * py1);
1040 double pt2 = TMath::Sqrt(px2 * px2 + py2 * py2);
1042 double p1Dotp2 = px1 * px2 + py1 * py2;
1043 double cosAlpha = p1Dotp2 / (
pt1 *
pt2);
1045 return TMath::Sqrt(2 *
pt1 *
pt2 * (1 - cosAlpha));
1052 double cosPhi1 =
cos(
p1.phi());
1053 double sinPhi1 =
sin(
p1.phi());
1054 double cosPhi2 =
cos(
p2.phi());
1055 double sinPhi2 =
sin(
p2.phi());
1056 double zetaX = cosPhi1 + cosPhi2;
1057 double zetaY = sinPhi1 + sinPhi2;
1058 double zetaR = TMath::Sqrt(zetaX * zetaX + zetaY * zetaY);
1064 double pxVis =
p1.px() +
p2.px();
1065 double pyVis =
p1.py() +
p2.py();
1066 double pZetaVis = pxVis * zetaX + pyVis * zetaY;
1068 double px = pxVis + pxMEt;
1069 double py = pyVis + pyMEt;
1070 double pZeta =
px * zetaX +
py * zetaY;
1072 return pZeta - 1.5 * pZetaVis;
1077 electron.deltaPhiSuperClusterTrackAtVtx() < 0.8 &&
electron.deltaEtaSuperClusterTrackAtVtx() < 0.01 &&
1111 if (theElectron ==
nullptr ||
electron->pt() > theElectron->
pt())
1124 if (theMuon ==
nullptr ||
muon->pt() > theMuon->
pt())
1135 int& theTauJetIndex) {
1137 theTauJetIndex = -1;
1139 int numTauJets = tauJets.
size();
1140 for (
int iTauJet = 0; iTauJet < numTauJets; ++iTauJet) {
1144 if (theTauJet ==
nullptr || tauJet.
pt() > theTauJet->
pt()) {
1145 theTauJet = &tauJet;
1146 theTauJetIndex = iTauJet;
1157 return TMath::Sqrt(dX * dX + dY * dY);
edm::InputTag tauJetSource_
EwkTauDQM(const edm::ParameterSet &)
long numWarningsTauDiscrByLeadTrackPtCut_
unsigned numEventsSelected_
long numWarningsBeamSpot_
edm::InputTag electronSource_
double calcMt(double px1, double py1, double px2, double py2)
void bookHistograms(DQMStore::IBooker &)
float dr03TkSumPt() const
long numWarningsTauDiscrAgainstMuons_
MonitorElement * hTauJetPt_
double getVertexD0(const reco::Vertex &vertex, const reco::BeamSpot &beamSpot)
electronEtaCut
"HLT_Ele10_LW_L1R"
long numWarningsTauDiscrAgainstElectrons_
virtual reco::TrackRef leadTrack() const
edm::InputTag tauDiscrAgainstElectrons_
edm::InputTag tauDiscrByEcalIso_
MonitorElement * hPFMEtPt_
double z() const
z coordinate
long numWarningsTauDiscrByTrackIso_
MonitorElement * hTauEcalIsoPt_
int getIsoMode(const std::string &isoMode_string, int &error)
edm::InputTag tauDiscrByTrackIso_
EwkElecTauHistManager(const edm::ParameterSet &)
void finalizeHistograms()
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * hMuonPt_
edm::InputTag vertexSource_
MonitorElement * hElecTauAcoplanarity_
EwkMuTauHistManager(const edm::ParameterSet &)
long numWarningsTauDiscrAgainstMuons_
MonitorElement * hElectronEta_
MonitorElement * hTauLeadTrackPt_
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
void bookHistograms(DQMStore::IBooker &)
double pt() const final
transverse momentum
MonitorElement * hElectronEcalIsoPt_
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
edm::InputTag pfMEtSource_
unsigned numEventsAnalyzed_
virtual const reco::TrackRefVector & signalTracks() const
void fillHistograms(const edm::Event &, const edm::EventSetup &)
edm::InputTag beamSpotSource_
Sin< T >::type sin(const T &t)
MonitorElement * hMuonCombIsoPt_
EwkElecTauHistManager * elecTauHistManager_
float sumPt
sum-pt of tracks
Cos< T >::type cos(const T &t)
MonitorElement * hVertexZ_
MonitorElement * hMuonTrackIsoPt_
MonitorElement * hTauJetNumSignalTracks_
MonitorElement * hVisMass_
long numWarningsTauDiscrByEcalIso_
long numWarningsTauDiscrByLeadTrackPtCut_
MonitorElement * hPFMEtPt_
double py() const final
y coordinate of momentum vector
double calcPzeta(const reco::Candidate::LorentzVector &p1, const reco::Candidate::LorentzVector &p2, double pxMEt, double pyMEt)
MonitorElement * hElectronPt_
std::string dqmDirectoryName(const std::string &dqmRootDirectory, const std::string &dqmSubDirectory)
const std::string dqmRootDirectory
MonitorElement * hElecTauCharge_
std::vector< Muon > MuonCollection
collection of Muon objects
void finalizeHistograms()
std::vector< PFTau > PFTauCollection
collection of PFTau objects
edm::InputTag triggerResultsSource_
MonitorElement * hMuTauDeltaR_
edm::InputTag tauDiscrByLeadTrackFinding_
MonitorElement * hTauDiscrAgainstMuons_
tauDiscrByLeadTrackFinding
edm::InputTag caloMEtSource_
MonitorElement * hElectronTrackIsoPt_
MonitorElement * hMtElecPFMEt_
MonitorElement * hMuonEta_
bool isGlobalMuon() const override
void readEventData(const edm::Event &evt, const edm::InputTag &src, edm::Handle< T > &handle, long &numWarnings, int maxNumWarnings, bool &error, const char *errorMessage)
std::string dqmDirectory_
std::vector< std::string > vstring
MonitorElement * hVisMass_
MonitorElement * hElectronPhi_
edm::InputTag pfMEtSource_
bool passesElectronId(const reco::GsfElectron &electron)
edm::InputTag tauDiscrAgainstMuons_
double eta() const final
momentum pseudorapidity
MonitorElement * hMuonEcalIsoPt_
std::string dqmDirectory_
MonitorElement * hCutFlowSummary_
MonitorElement * hTauJetPt_
edm::InputTag tauDiscrByEcalIso_
long numWarningsTauDiscrByEcalIso_
long numWarningsTriggerResults_
void addParameter(std::string const &name, T const &value)
edm::InputTag tauDiscrByTrackIso_
const reco::GsfElectron * getTheElectron(const reco::GsfElectronCollection &electrons, double electronEtaCut, double electronPtCut)
const reco::Muon * getTheMuon(const reco::MuonCollection &muons, double muonEtaCut, double muonPtCut)
unsigned numEventsAnalyzed_
std::vector< std::string > vstring
long numWarningsTauDiscrByTrackIso_
edm::InputTag triggerResultsSource_
void fillHistograms(const edm::Event &, const edm::EventSetup &)
float isolationPFChargedHadrCandsPtSum() const
const LorentzVector & p4() const final
four-momentum Lorentz vector
void analyze(const edm::Event &, const edm::EventSetup &) override
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
double electronTrackIsoCut_
const reco::PFTau * getTheTauJet(const reco::PFTauCollection &tauJets, double tauJetEtaCut, double tauJetPtCut, int &theTauJetIndex)
int charge() const final
electric charge
MonitorElement * hTauJetEta_
MonitorElement * hCaloMEtPt_
MonitorElement * hVisMassFinal_
MonitorElement * hMuTauAcoplanarity_
const LorentzVector & p4(P4Kind kind) const
long numWarningsTauDiscrByLeadTrackFinding_
edm::InputTag tauDiscrByLeadTrackPtCut_
std::string dqmDirectory_
edm::InputTag muonSource_
T getParameter(std::string const &) const
MonitorElement * hTauTrackIsoPt_
edm::InputTag vertexSource_
double electronEcalIsoCut_
bool isTrackerMuon() const override
double phi() const final
momentum azimuthal angle
long numWarningsTauDiscrByLeadTrackFinding_
const MuonIsolation & isolationR05() const
edm::InputTag beamSpotSource_
MonitorElement * hMtMuPFMEt_
long numWarningsBeamSpot_
edm::InputTag tauDiscrAgainstMuons_
edm::InputTag caloMEtSource_
MonitorElement * hCutFlowSummary_
float isolationPFGammaCandsEtSum() const
bool accept() const
Has at least one path accepted the event?
EwkMuTauHistManager * muTauHistManager_
unsigned numEventsSelected_
MonitorElement * hCaloMEtPt_
long numWarningsElectron_
edm::InputTag tauDiscrByLeadTrackPtCut_
bool passesElectronPreId(const reco::GsfElectron &electron)
MonitorElement * hTauJetEta_
math::XYZTLorentzVector LorentzVector
Lorentz vector.
long numWarningsTriggerResults_
float dr03HcalTowerSumEt() const
edm::InputTag tauJetSource_
size_type size() const
Size of the RefVector.
virtual const reco::TrackRefVector & isolationTracks() const
void dqmEndRun(const edm::Run &, const edm::EventSetup &) override
MonitorElement * hTauJetNumIsoTracks_
MonitorElement * hTauJetPhi_
double px() const final
x coordinate of momentum vector
MonitorElement * hMuonPhi_
double calcDeltaPhi(double phi1, double phi2)
float dr03EcalRecHitSumEt() const
MonitorElement * hVertexZ_
edm::InputTag tauDiscrByLeadTrackFinding_
const std::string dqmSeparator