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  void bookHistograms( DQMStore::IBooker&, edm::Run const &, edm::EventSetup const &) override;
75 
76  private:
77  //
78 
79  float phiNormalization( float& a);
80  float etaTransformation( float a, float b);
81 
82 
85 
87  int nEvt_;
88  int nEntry_;
89  int nSimPho_[2];
90  int nSimConv_[2];
91  int nMatched_;
92  int nRecConv_;
95 
97 
101 
102 
112 
113 
117 
118 
119 
122 
125 
132 
133  std::unique_ptr<PhotonMCTruthFinder> thePhotonMCTruthFinder_;
134 
135  bool fastSim_;
137 
138 
139  double minPhoEtCut_;
144  double trkPtLow_;
145  double lip_;
147  double bcEtLow_;
152  double trkPtSumCut_;
158 
159 
161  double mcPhi_;
162  double mcEta_;
163  double mcConvR_;
164  double mcConvZ_;
165  double mcConvY_;
166  double mcConvX_;
167  double mcConvPhi_;
168  double mcConvEta_;
169  double mcJetEta_;
170  double mcJetPhi_;
171 
173  // std::vector<TrackingParticleRef> theConvTP_;
174 
175  double simMinPt_;
176  double simMaxPt_;
177 
179  double recMinPt_;
180  double recMaxPt_;
182  //
188  //
191  //
194 
197 
198 
215  // Denominators for conversion fake rate
217  // Numerators for conversion fake rate
219 
222 
230 
231 
234 
235 
236 
242 
243 
246 
248 
254  //
260  //
266  //
272  //
278  //
282 
283 
284 
285 
286 
287  //
293  //
299  //
303  //
309  //
315  //
316 
320 
325 
326 
333 
336 
341 
344 
345  // Photon energies as derived from Regression1 (MIT) nd Regression2 (PF/Rishi)
348 
349  //
351 
352  // Information from Particle Flow
353  // Isolation
357  // Identification
374 
375 
382 
384 
389 
391 
395 
398 
403 
408 
409 
412 
418 
424 
426 
427 
428 
434 
435 
437 
438 
439 
445 
450 
455 
460 
463 
464 
472 
474 
477 
478 
479 
485 
486 
501 
503 
509 
511 
512  // ME for bkg efficiencies
516  //
517 
519 
528 
529 
532 
537 
540 
545 
550 
556 
557 
562 
563 
569 
570 
576 
582  //
588  //
600 
601 
602 
604 {
605  public:
606  bool operator () (const reco::PhotonRef& lhs, const reco::PhotonRef & rhs)
607  {
608  return lhs->et() > rhs->et();
609  }
610 };
611 
612 
613 
614 };
615 
616 
617 
618 
619 
620 
621 
622 #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
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:43
MonitorElement * p_DPhiTracksAtVtxVsEta_
MonitorElement * p_DPhiTracksAtEcalVsEta_
MonitorElement * h_phoDPhi_[2]
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]