CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PhotonValidator.h
Go to the documentation of this file.
1 #ifndef PhotonValidator_H
2 #define PhotonValidator_H
26 //#include "RecoEgamma/EgammaTools/interface/ConversionLikelihoodCalculator.h"
27 //
28 //DQM services
33 
34 
35 //
36 #include <map>
37 #include <vector>
38 #include <memory>
48 // forward declarations
49 namespace edm {class HepMCProduct;}
50 class TFile;
51 class TH1F;
52 class TH2F;
53 class TProfile;
54 class TTree;
55 class SimVertex;
56 class SimTrack;
57 
58 
59 
61 {
62 
63  public:
64 
65  //
66  explicit PhotonValidator( const edm::ParameterSet& ) ;
67  virtual ~PhotonValidator();
68 
69 
70  virtual void analyze( const edm::Event&, const edm::EventSetup& ) override;
71  // virtual void beginJob();
72  virtual void dqmBeginRun( edm::Run const & r, edm::EventSetup const & theEventSetup) override;
73  virtual void endRun (edm::Run const& r, edm::EventSetup const & es) override;
74  virtual void endJob() override;
75  void bookHistograms( DQMStore::IBooker&, edm::Run const &, edm::EventSetup const &) override;
76 
77  private:
78  //
79 
80  float phiNormalization( float& a);
81  float etaTransformation( float a, float b);
82 
83 
86 
88  int nEvt_;
89  int nEntry_;
90  int nSimPho_[2];
91  int nSimConv_[2];
92  int nMatched_;
93  int nRecConv_;
96 
98 
102 
103 
113 
114 
118 
119 
120 
123 
126 
133 
134  std::unique_ptr<PhotonMCTruthFinder> thePhotonMCTruthFinder_;
136 
137  bool fastSim_;
139 
140 
141  double minPhoEtCut_;
146  double trkPtLow_;
147  double lip_;
149  double bcEtLow_;
154  double trkPtSumCut_;
160 
161 
163  double mcPhi_;
164  double mcEta_;
165  double mcConvR_;
166  double mcConvZ_;
167  double mcConvY_;
168  double mcConvX_;
169  double mcConvPhi_;
170  double mcConvEta_;
171  double mcJetEta_;
172  double mcJetPhi_;
173 
175  // std::vector<TrackingParticleRef> theConvTP_;
176 
177  double simMinPt_;
178  double simMaxPt_;
179 
181  double recMinPt_;
182  double recMaxPt_;
184  //
190  //
193  //
196 
199 
200 
217  // Denominators for conversion fake rate
219  // Numerators for conversion fake rate
221 
224 
232 
233 
236 
237 
238 
244 
245 
248 
250 
256  //
262  //
268  //
274  //
280  //
284 
285 
286 
287 
288 
289  //
295  //
301  //
305  //
311  //
317  //
318 
322 
327 
328 
335 
338 
343 
346 
347  // Photon energies as derived from Regression1 (MIT) nd Regression2 (PF/Rishi)
350 
351  //
353 
354  // Information from Particle Flow
355  // Isolation
359  // Identification
376 
377 
384 
386 
391 
393 
397 
400 
405 
410 
411 
414 
420 
426 
428 
429 
430 
436 
437 
439 
440 
441 
447 
452 
457 
462 
465 
466 
474 
476 
479 
480 
481 
487 
488 
503 
505 
511 
513 
514  // ME for bkg efficiencies
518  //
519 
521 
530 
531 
534 
539 
542 
547 
552 
558 
559 
564 
565 
571 
572 
578 
584  //
590  //
602 
603 
604 
606 {
607  public:
608  bool operator () (const reco::PhotonRef& lhs, const reco::PhotonRef & rhs)
609  {
610  return lhs->et() > rhs->et();
611  }
612 };
613 
614 
615 
616 };
617 
618 
619 
620 
621 
622 
623 
624 #endif
MonitorElement * p_DCotTracksVsR_
MonitorElement * p_sigmaEoEVsEta_[3]
MonitorElement * h_convVtxdX_endcap_
MonitorElement * h_SumPtOverPhoPt_NeuHad_unCleaned_[3]
MonitorElement * h_zPVFromTracks_[5]
MonitorElement * p_r1VsEt_[3]
edm::EDGetTokenT< EcalRecHitCollection > barrelEcalHits_
MonitorElement * h_OIinnermostHitR_
MonitorElement * h2_nTrkSolidConeDR04VsEta_[3]
MonitorElement * p_hOverEVsEtBkg_
MonitorElement * h_nSimPho_[2]
MonitorElement * p_DPhiTracksAtEcalVsR_
MonitorElement * h_scBkgPhi_
MonitorElement * h2_Chi2VsR_[3]
MonitorElement * h_sigmaIetaIeta_[3][3]
MonitorElement * p_sceResVsR9_[3]
MonitorElement * h_DPhiTracksAtEcal_[2][3]
MonitorElement * h2_hcalTowerSumEtConeDR04VsEta_[3]
MonitorElement * h_IOinnermostHitR_
MonitorElement * h_phoBkgDPhi_
MonitorElement * p_nHitsVsEtaSL_[2]
MonitorElement * h_DPhiTracksAtVtx_[2][3]
virtual ~PhotonValidator()
MonitorElement * p_EoverEtrueVsEta_[3]
edm::InputTag bcBarrelCollection_
MonitorElement * p_EoverPVsEta_[3]
MonitorElement * h_convVtxdZ_
MonitorElement * h_dRPhoPFcand_Pho_Cleaned_[3]
MonitorElement * h_newhOverE_[3][3]
MonitorElement * h_phoBkgPhi_
MonitorElement * h_chHadIso_[3]
MonitorElement * h_phoPhi_[2]
edm::EDGetTokenT< edm::SimVertexContainer > g4_simVtx_Token_
MonitorElement * h_hcalTowerBcSumEtConeDR04_[3][3]
MonitorElement * h2_PoverPtrueVsEoverP_[3]
MonitorElement * h_mvaOut_[3]
MonitorElement * h_scE_[2][3]
edm::EDGetTokenT< reco::VertexCollection > offline_pvToken_
MonitorElement * h_nRecoVtx_
std::string photonCollectionProducer_
MonitorElement * h_convVtxRvsZ_zoom_[2]
std::string photonCollection_
MonitorElement * h2_hOverEVsEt_[3]
MonitorElement * h_SumPtOverPhoPt_NeuHad_Cleaned_[3]
edm::EDGetTokenT< edm::HepMCProduct > hepMC_Token_
MonitorElement * p_hcalTowerSumEtConeDR04VsEt_[3]
std::string fName_
MonitorElement * p_isoTrkSolidConeDR04VsEtBkg_[3]
MonitorElement * h_DPhiTracksAtVtxBkg_[3]
edm::EDGetTokenT< edm::SimVertexContainer > famos_simVtx_Token_
MonitorElement * h2_EoverPVsR_[3]
MonitorElement * h_phoEt_[2][3]
MonitorElement * h_DEtaTracksAtEcal_[2][3]
edm::EDGetTokenT< reco::PFCandidateCollection > pfCandidates_
MonitorElement * h_phoEResRegr2_[3][3]
MonitorElement * p_convVtxdYVsY_
MonitorElement * h_phoDEta_[2]
MonitorElement * h_SimJet_[3]
MonitorElement * h2_convVtxdRVsEta_
MonitorElement * h_RecoConvTwoMTracks_[5]
MonitorElement * h_convVtxdY_
MonitorElement * h_psE_
MonitorElement * h_scEtaWidth_[2]
MonitorElement * h2_hOverEVsEtaBkg_
MonitorElement * h2_DCotTracksVsEta_
virtual void endRun(edm::Run const &r, edm::EventSetup const &es) override
MonitorElement * h2_etaVsRsim_[3]
MonitorElement * h2_PtRecVsPtSim_[3]
MonitorElement * h2_PoverPtrueVsEta_[3]
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * h_convVtxdZ_endcap_
MonitorElement * h_scEt_[2][3]
edm::EDGetTokenT< edm::View< reco::Track > > conversionIOTrackPr_Token_
MonitorElement * h_dzPVFromTracks_[5]
MonitorElement * p_EoverEtrueVsR_[3]
MonitorElement * h2_sigmaIetaIetaVsEtBkg_[3]
MonitorElement * nHitsVsEtaBkg_
MonitorElement * h_ecalRecHitSumEtConeDR04Bkg_[3]
MonitorElement * h_simConvVtxRvsZ_[4]
MonitorElement * h2_hcalTowerSumEtConeDR04VsEt_[3]
MonitorElement * h_MatchedSimJet_[3]
MonitorElement * p_nHitsVsRSL_[2]
MonitorElement * p_r2VsEtBkg_
edm::InputTag bcEndcapCollection_
MonitorElement * h_dRPhoPFcand_NeuHad_Cleaned_[3]
MonitorElement * h2_isoTrkSolidConeDR04VsEtaBkg_
MonitorElement * h_SimConvTwoMTracksAndVtxPGT0005_[5]
MonitorElement * h2_r1VsEtaBkg_
MonitorElement * h2_isoTrkSolidConeDR04VsEtBkg_[3]
MonitorElement * h_TkD0_[3]
MonitorElement * h_dRPhoPFcand_ChHad_Cleaned_[3]
MonitorElement * h_convVtxdY_endcap_
MonitorElement * h_EoverP_SL_[3]
std::unique_ptr< PhotonMCTruthFinder > thePhotonMCTruthFinder_
MonitorElement * p_eResVsR9_[3]
MonitorElement * h_etOutsideMustache_[3]
MonitorElement * h2_DPhiTracksAtVtxVsEta_
MonitorElement * p_DPhiTracksAtVtxVsR_
MonitorElement * h_SumPtOverPhoPt_ChHad_Cleaned_[3]
MonitorElement * p_sigmaEoEVsEt_[3][3]
MonitorElement * p_sigmaIetaIetaVsEt_[3]
MonitorElement * h_convVtxdR_endcap_
MonitorElement * h_convSLVtxRvsZ_[3]
MonitorElement * p_newhOverEVsEta_[3]
MonitorElement * h2_convVtxRrecVsTrue_
MonitorElement * h2_DCotTracksVsR_
edm::EDGetTokenT< EcalRecHitCollection > endcapEcalHits_
MonitorElement * h_scEtaPhi_[2]
bool operator()(const reco::PhotonRef &lhs, const reco::PhotonRef &rhs)
MonitorElement * h2_PtRecVsPtSimMixProv_
MonitorElement * h_SumPtOverPhoPt_ChHad_unCleaned_[3]
MonitorElement * h_convEtaBkg_
edm::EDGetTokenT< edm::ValueMap< std::vector< reco::PFCandidateRef > > > particleBasedIso_token
MonitorElement * h_scPhi_[2]
MonitorElement * h2_r2VsEtaBkg_
MonitorElement * h_convVtxdPhi_
MonitorElement * h_scBkgE_[3]
MonitorElement * h_convERes_[2][3]
MonitorElement * p_Chi2VsR_[3]
MonitorElement * h_SimPho_[3]
Denominator for efficiencies.
MonitorElement * h2_r2VsEtBkg_
MonitorElement * p_r2VsEtaBkg_
MonitorElement * h_convVtxRvsZ_[3]
MonitorElement * h_convPhi_[2]
MonitorElement * h_nConv_[2][3]
info per conversion
MonitorElement * h2_isoTrkSolidConeDR04VsEt_[3]
MonitorElement * h_SimConvMTotal_[5]
MonitorElement * h_r9_[3][3]
MonitorElement * h2_sigmaIetaIetaVsEta_[3]
MonitorElement * h_dRPhoPFcand_Pho_unCleaned_[3]
MonitorElement * p_EoverPVsR_[3]
MonitorElement * p_r9VsEt_[3]
edm::ESHandle< MagneticField > theMF_
MonitorElement * h2_sceResVsR9_[3]
MonitorElement * h_phoEta_[2]
MonitorElement * h2_Chi2VsEta_[3]
MonitorElement * h_simTkPt_
MonitorElement * h_mvaOutBkg_[3]
MonitorElement * h_trkAlgo_
MonitorElement * h2_dzPVVsR_
edm::EDGetTokenT< edm::SimTrackContainer > g4_simTk_Token_
MonitorElement * h_scEta_[2]
MonitorElement * h_convVtxdX_barrel_
MonitorElement * h2_hOverEVsEta_[3]
MonitorElement * p_eResVsR_
MonitorElement * p_hcalTowerSumEtConeDR04VsEtBkg_[3]
MonitorElement * h_tkChi2Large_[2]
MonitorElement * h2_r1VsEt_[3]
MonitorElement * h_trkProv_[2]
MonitorElement * p_sigmaIetaIetaVsEtaBkg_
edm::ParameterSet parameters_
MonitorElement * p_convVtxdRVsEta_
MonitorElement * h_r1_[3][3]
MonitorElement * h_EoverPTracks_[2][3]
MonitorElement * h_scPhiWidth_[2]
MonitorElement * h2_etaVsRreco_[3]
MonitorElement * h2_r1VsEta_[3]
std::string valueMapPhoPFCandIso_
MonitorElement * p_ecalRecHitSumEtConeDR04VsEtaBkg_
float phiNormalization(float &a)
MonitorElement * p_nTrkSolidConeDR04VsEt_[3]
MonitorElement * h2_r2VsEta_[3]
MonitorElement * h_isoTrkSolidConeDR04_[3][3]
MonitorElement * p_hOverEVsEt_[3]
MonitorElement * h_EtR9Less093_[3][3]
MonitorElement * h_tkChi2SL_[2]
MonitorElement * h2_eResVsEt_[3][3]
MonitorElement * h_r9VsNofTracks_[2][3]
MonitorElement * h_ecalRecHitSumEtConeDR04_[3][3]
MonitorElement * h_phoEResRegr1_[3][3]
MonitorElement * h2_r9VsEtBkg_
MonitorElement * p_hOverEVsEta_[3]
MonitorElement * h2_TkPtPull_[3]
MonitorElement * h_SimConvTwoMTracksAndVtxPGT01_[5]
MonitorElement * h_SumPtOverPhoPt_Pho_Cleaned_[3]
MonitorElement * h_MatchedSimPhoBadCh_[3]
MonitorElement * h_MatchedSimJetBadCh_[3]
MonitorElement * h_convVtxdEta_
MonitorElement * h_r2_[3][3]
MonitorElement * p_nHitsVsEta_[2]
MonitorElement * h_convVtxdY_barrel_
MonitorElement * p_sigmaIetaIetaVsEtBkg_[3]
MonitorElement * h2_EoverEtrueVsEta_[3]
MonitorElement * h_phoBkgDEta_
MonitorElement * h_simTkEta_
MonitorElement * nHitsVsEta_[2]
TH1F * th1f_SimConvMTotal_[5]
MonitorElement * p_nTrkSolidConeDR04VsEtaBkg_
MonitorElement * h2_sigmaIetaIetaVsEtaBkg_
MonitorElement * h_gamgamMassRegr1_[3][3]
MonitorElement * p_convVtxdXVsX_
MonitorElement * p_dzPVVsR_
MonitorElement * hBCEnergyOverTrackPout_[3]
MonitorElement * h_PoverETracksBkg_[3]
MonitorElement * h_invMass_[2][3]
MonitorElement * p_nTrkSolidConeDR04VsEta_[3]
MonitorElement * p_r1VsEta_[3]
edm::EDGetTokenT< TrackingParticleCollection > token_tp_
MonitorElement * h2_EoverEtrueVsEoverP_[3]
MonitorElement * h_phoE_[2][3]
MonitorElement * h_simConvVtxYvsX_
MonitorElement * h_hOverE_[3][3]
MonitorElement * p_TkPtPull_[3]
MonitorElement * h_SimPhoMotherType_[2]
MonitorElement * h_hOverEBkg_[3]
MonitorElement * h_dRPhoPFcand_NeuHad_unCleaned_[3]
MonitorElement * h_SimPhoMotherEt_[2]
MonitorElement * h2_eResVsR9_[3]
MonitorElement * nHitsVsR_[2]
MonitorElement * h_r1Bkg_[3]
MonitorElement * h_convVtxdX_
MonitorElement * p_isoTrkSolidConeDR04VsEtaBkg_
MonitorElement * h2_DPhiTracksAtVtxVsR_
MonitorElement * h_convVtxYvsXBkg_
MonitorElement * h_TkPtPull_[3]
MonitorElement * h2_EoverPVsEta_[3]
edm::ESHandle< CaloGeometry > theCaloGeom_
MonitorElement * h_nTrkSolidConeDR04Bkg_[3]
MonitorElement * p_DCotTracksVsEta_
MonitorElement * h_convPtRes_[2][3]
MonitorElement * h2_nTrkSolidConeDR04VsEtaBkg_
MonitorElement * h_r2Bkg_[3]
MonitorElement * h_MatchedSimPho_[3]
Numerator for efficiencies.
MonitorElement * p_convVtxdRVsR_
MonitorElement * h_VisSimConvLarge_
MonitorElement * h_convVtxRvsZBkg_[2]
MonitorElement * p_Chi2VsEta_[3]
MonitorElement * h_nHadIso_[3]
MonitorElement * h2_hOverEVsEtBkg_
MonitorElement * p_sigmaEoEVsNVtx_[3][3]
MonitorElement * p_eResVsNVtx_[3][3]
MonitorElement * h_SumPtOverPhoPt_Pho_unCleaned_[3]
MonitorElement * h2_ecalRecHitSumEtConeDR04VsEtBkg_[3]
MonitorElement * h_nSimConv_[2]
double recMinPt_
Global variables for reco Photon.
MonitorElement * p_isoTrkSolidConeDR04VsEt_[3]
MonitorElement * p_isoTrkSolidConeDR04VsEta_[3]
MonitorElement * h_nTrkSolidConeDR04_[3][3]
MonitorElement * h_sigmaIetaIetaBkg_[3]
MonitorElement * h2_EoverEtrueVsR_[3]
MonitorElement * p_hcalTowerBcSumEtConeDR04VsEta_[3]
MonitorElement * h_SimConvTwoMTracksAndVtxPGT0_[5]
MonitorElement * h_gamgamMass_[3][3]
MonitorElement * h_distMinAppTracks_[2][3]
MonitorElement * h_nPho_
MonitorElement * p_PoverPtrueVsEta_[3]
MonitorElement * h_r9Bkg_[3]
MonitorElement * h_phoERes_[3][3]
MonitorElement * h_isoTrkSolidConeDR04Bkg_[3]
MonitorElement * h2_r9VsEtaBkg_
MonitorElement * h_convVtxYvsX_zoom_[2]
MonitorElement * h_convAlgo_
MonitorElement * h_nCluOutsideMustache_[3]
edm::EDGetTokenT< reco::GenJetCollection > genjets_Token_
double b
Definition: hdecay.h:120
MonitorElement * h_hcalTowerSumEtConeDR04_[3][3]
MonitorElement * h2_nTrkSolidConeDR04VsEt_[3]
MonitorElement * h2_hcalTowerSumEtConeDR04VsEtBkg_[3]
MonitorElement * h_convQuality_
MonitorElement * h2_r1VsEtBkg_
MonitorElement * h_DCotTracksBkg_[3]
MonitorElement * h_phoIso_[3]
MonitorElement * p_ecalRecHitSumEtConeDR04VsEta_[3]
MonitorElement * p_r1VsEtaBkg_
MonitorElement * h_PoverETracks_[2][3]
float etaTransformation(float a, float b)
MonitorElement * h2_ecalRecHitSumEtConeDR04VsEt_[3]
MonitorElement * h_phoPixSeedSize_[2]
MonitorElement * h_vtxChi2_[3]
MonitorElement * p_nTrkSolidConeDR04VsEtBkg_[3]
MonitorElement * p_hcalTowerBcSumEtConeDR04VsEt_[3]
MonitorElement * h_pfMva_[3]
edm::InputTag conversionOITrackProducer_
edm::EDGetTokenT< reco::PhotonCollection > photonCollectionToken_
MonitorElement * p_ecalRecHitSumEtConeDR04VsEtBkg_[3]
MonitorElement * h_hcalTowerSumEtConeDR04Bkg_[3]
MonitorElement * p_convVtxdZVsZ_
MonitorElement * p_hcalTowerSumEtConeDR04VsEta_[3]
MonitorElement * h_tkChi2Bkg_
MonitorElement * p_r1VsEtBkg_
MonitorElement * h_phoBkgEt_[3]
MonitorElement * h2_isoTrkSolidConeDR04VsEta_[3]
MonitorElement * h_SimPhoMotherEta_[2]
double a
Definition: hdecay.h:121
virtual void endJob() override
MonitorElement * h_EoverPTracksBkg_[3]
MonitorElement * h_convVtxdR_barrel_
MonitorElement * h_VisSimConv_[6]
MonitorElement * h_SimConvTwoMTracks_[5]
MonitorElement * h2_nTrkSolidConeDR04VsEtBkg_[3]
MonitorElement * h2_hcalTowerSumEtConeDR04VsEtaBkg_
MonitorElement * p_eResVsEt_[3][3]
MonitorElement * h_convVtxYvsX_
MonitorElement * h_phoBkgE_[3]
MonitorElement * p_hOverEVsEtaBkg_
MonitorElement * h_phoSigmaEoE_[3][3]
MonitorElement * h_RecoConvTwoTracks_[5]
MonitorElement * p_r9VsEta_[3]
MonitorElement * h_DCotTracks_[2][3]
MonitorElement * h2_DPhiTracksAtEcalVsR_
MonitorElement * p_eResVsEta_[3]
edm::RefVector< TrackingParticleCollection > theConvTP_
virtual void dqmBeginRun(edm::Run const &r, edm::EventSetup const &theEventSetup) override
MonitorElement * h_dRPhoPFcand_ChHad_unCleaned_[3]
MonitorElement * h_AllSimConv_[5]
MonitorElement * h_vtxChi2Prob_[3]
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * h_scBkgEta_
MonitorElement * h_SimPhoEtaSmallR9_
MonitorElement * p_nHitsVsR_[2]
MonitorElement * h2_convVtxdRVsR_
MonitorElement * h_gamgamMassRegr2_[3][3]
MonitorElement * p_newhOverEVsEt_[3]
MonitorElement * p_r2VsEta_[3]
MonitorElement * h2_r2VsEt_[3]
MonitorElement * h_convVtxdR_
MonitorElement * h_convVtxdZ_barrel_
edm::InputTag conversionIOTrackProducer_
MonitorElement * h_SimConvOneTracks_[5]
MonitorElement * h_convEta_[3]
MonitorElement * p_hcalTowerSumEtConeDR04VsEtaBkg_
MonitorElement * p_ecalRecHitSumEtConeDR04VsEt_[3]
double mcPhi_
global variable for the MC photon
MonitorElement * p_sigmaIetaIetaVsEta_[3]
MonitorElement * h_SimConvTwoTracks_[5]
MonitorElement * h2_sigmaIetaIetaVsEt_[3]
MonitorElement * h2_ecalRecHitSumEtConeDR04VsEtaBkg_
MonitorElement * p_r2VsEt_[3]
MonitorElement * h_scBkgEt_[3]
MonitorElement * h2_DPhiTracksAtEcalVsEta_
edm::EDGetTokenT< edm::View< reco::Track > > conversionOITrackPr_Token_
MonitorElement * h2_ecalRecHitSumEtConeDR04VsEta_[3]
MonitorElement * h_SimConvEtaPix_[2]
MonitorElement * h2_eResVsEta_[3]
Definition: Run.h:41
MonitorElement * p_DPhiTracksAtVtxVsEta_
MonitorElement * p_DPhiTracksAtEcalVsEta_
MonitorElement * h_phoDPhi_[2]
const TrackAssociatorBase * theTrackAssociator_
MonitorElement * h_convPhiBkg_
edm::EDGetTokenT< edm::SimTrackContainer > famos_simTk_Token_
MonitorElement * h_phoBkgEta_
MonitorElement * h2_r9VsEt_[3]
edm::ESHandle< CaloTopology > theCaloTopo_
MonitorElement * h_tkChi2_[2]
MonitorElement * p_dzPVVsEta_
PhotonValidator(const edm::ParameterSet &)
MonitorElement * h_SimConvOneMTracks_[5]