File indexing completed on 2024-04-06 12:09:21
0001
0002 #ifndef DQMOffline_EGamma_ElectronAnalyzer_h
0003 #define DQMOffline_EGamma_ElectronAnalyzer_h
0004
0005 #include "DQMOffline/EGamma/interface/ElectronDqmAnalyzerBase.h"
0006
0007 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0008 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateTransform.h"
0009
0010 #include "DataFormats/VertexReco/interface/VertexFwd.h"
0011 #include "DataFormats/VertexReco/interface/Vertex.h"
0012 #include "DataFormats/GsfTrackReco/interface/GsfTrack.h"
0013 #include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
0014 #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h"
0015 #include "DataFormats/EgammaCandidates/interface/GsfElectronCore.h"
0016 #include "DataFormats/EgammaReco/interface/SuperClusterFwd.h"
0017 #include "DataFormats/EgammaReco/interface/BasicClusterFwd.h"
0018 #include "DataFormats/EgammaReco/interface/ElectronSeed.h"
0019 #include "DataFormats/EgammaReco/interface/ElectronSeedFwd.h"
0020 #include "DataFormats/EcalDetId/interface/EcalSubdetector.h"
0021 #include "DataFormats/HepMCCandidate/interface/GenParticle.h"
0022 #include "DataFormats/HepMCCandidate/interface/GenParticleFwd.h"
0023 #include "DataFormats/BeamSpot/interface/BeamSpot.h"
0024 #include "DataFormats/JetReco/interface/GenJetCollection.h"
0025
0026 #include "DataFormats/Common/interface/Handle.h"
0027 #include "DataFormats/Common/interface/ValueMap.h"
0028
0029 class MagneticField;
0030
0031 #include "FWCore/Framework/interface/Event.h"
0032 #include "FWCore/Framework/interface/ESHandle.h"
0033 #include "FWCore/Framework/interface/EventSetup.h"
0034
0035 class ElectronAnalyzer : public ElectronDqmAnalyzerBase {
0036 public:
0037 explicit ElectronAnalyzer(const edm::ParameterSet &conf);
0038 ~ElectronAnalyzer() override;
0039
0040
0041 void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
0042 void analyze(const edm::Event &e, const edm::EventSetup &c) override;
0043
0044 private:
0045
0046
0047
0048
0049
0050 int Selection_;
0051 edm::EDGetTokenT<reco::GsfElectronCollection> electronCollection_;
0052 edm::EDGetTokenT<reco::SuperClusterCollection> matchingObjectCollection_;
0053 edm::EDGetTokenT<reco::GsfTrackCollection> gsftrackCollection_;
0054 edm::EDGetTokenT<reco::TrackCollection> trackCollection_;
0055 edm::EDGetTokenT<reco::VertexCollection> vertexCollection_;
0056 edm::EDGetTokenT<reco::BeamSpot> beamSpotTag_;
0057 bool readAOD_;
0058
0059 std::string inputFile_;
0060 std::string outputFile_;
0061 std::string inputInternalPath_;
0062 std::string outputInternalPath_;
0063
0064
0065 std::string matchingCondition_;
0066 double maxPtMatchingObject_;
0067 double maxAbsEtaMatchingObject_;
0068 double deltaR_;
0069
0070
0071 double minEt_;
0072 double minPt_;
0073 double maxAbsEta_;
0074 bool isEB_;
0075 bool isEE_;
0076 bool isNotEBEEGap_;
0077 bool isEcalDriven_;
0078 bool isTrackerDriven_;
0079 double eOverPMinBarrel_;
0080 double eOverPMaxBarrel_;
0081 double eOverPMinEndcaps_;
0082 double eOverPMaxEndcaps_;
0083 double dEtaMinBarrel_;
0084 double dEtaMaxBarrel_;
0085 double dEtaMinEndcaps_;
0086 double dEtaMaxEndcaps_;
0087 double dPhiMinBarrel_;
0088 double dPhiMaxBarrel_;
0089 double dPhiMinEndcaps_;
0090 double dPhiMaxEndcaps_;
0091 double sigIetaIetaMinBarrel_;
0092 double sigIetaIetaMaxBarrel_;
0093 double sigIetaIetaMinEndcaps_;
0094 double sigIetaIetaMaxEndcaps_;
0095 double hadronicOverEmMaxBarrel_;
0096 double hadronicOverEmMaxEndcaps_;
0097 double mvaMin_;
0098 double tipMaxBarrel_;
0099 double tipMaxEndcaps_;
0100 double tkIso03Max_;
0101 double hcalIso03Depth1MaxBarrel_;
0102 double hcalIso03Depth1MaxEndcaps_;
0103 double hcalIso03Depth2MaxEndcaps_;
0104 double ecalIso03MaxBarrel_;
0105 double ecalIso03MaxEndcaps_;
0106
0107
0108 edm::InputTag triggerResults_;
0109
0110
0111
0112 int nbineta;
0113 int nbineta2D;
0114 double etamin;
0115 double etamax;
0116 int nbinphi;
0117 int nbinphi2D;
0118 double phimin;
0119 double phimax;
0120 int nbinpt;
0121 int nbinpteff;
0122 int nbinpt2D;
0123 double ptmax;
0124 int nbinp;
0125 int nbinp2D;
0126 double pmax;
0127 int nbineop;
0128 int nbineop2D;
0129 double eopmax;
0130 double eopmaxsht;
0131 int nbindeta;
0132 double detamin;
0133 double detamax;
0134 int nbindphi;
0135 double dphimin;
0136 double dphimax;
0137 int nbindetamatch;
0138 int nbindetamatch2D;
0139 double detamatchmin;
0140 double detamatchmax;
0141 int nbindphimatch;
0142 int nbindphimatch2D;
0143 double dphimatchmin;
0144 double dphimatchmax;
0145 int nbinfhits;
0146 double fhitsmax;
0147 int nbinlhits;
0148 double lhitsmax;
0149 int nbinxyz;
0150 int nbinxyz2D;
0151 int nbinpoptrue;
0152 double poptruemin;
0153 double poptruemax;
0154 int nbinmee;
0155 double meemin;
0156 double meemax;
0157 int nbinhoe;
0158 double hoemin;
0159 double hoemax;
0160
0161
0162
0163
0164
0165
0166 unsigned int nEvents_;
0167
0168 float computeInvMass(const reco::GsfElectron &e1, const reco::GsfElectron &e2);
0169
0170 bool selected(const reco::GsfElectronCollection::const_iterator &gsfIter, double vertexTIP);
0171 bool generalCut(const reco::GsfElectronCollection::const_iterator &gsfIter);
0172 bool etCut(const reco::GsfElectronCollection::const_iterator &gsfIter);
0173 bool isolationCut(const reco::GsfElectronCollection::const_iterator &gsfIter, double vertexTIP);
0174 bool idCut(const reco::GsfElectronCollection::const_iterator &gsfIter);
0175
0176
0177
0178
0179
0180 edm::ESHandle<TrackerGeometry> pDD;
0181 edm::ESHandle<MagneticField> theMagField;
0182
0183 float mcEnergy[10], mcEta[10], mcPhi[10], mcPt[10], mcQ[10];
0184 float superclusterEnergy[10], superclusterEta[10], superclusterPhi[10], superclusterEt[10];
0185 float seedMomentum[10], seedEta[10], seedPhi[10], seedPt[10], seedQ[10];
0186
0187
0188
0189
0190
0191
0192 MonitorElement *h2_beamSpotXvsY;
0193 MonitorElement *py_nElectronsVsLs;
0194 MonitorElement *py_nClustersVsLs;
0195 MonitorElement *py_nGsfTracksVsLs;
0196 MonitorElement *py_nTracksVsLs;
0197 MonitorElement *py_nVerticesVsLs;
0198 MonitorElement *h1_triggers;
0199
0200
0201
0202
0203
0204
0205
0206
0207
0208
0209 MonitorElement *h1_vertexPt_barrel;
0210 MonitorElement *h1_vertexPt_endcaps;
0211 MonitorElement *h1_vertexEta;
0212 MonitorElement *h2_vertexEtaVsPhi;
0213 MonitorElement *h2_vertexXvsY;
0214 MonitorElement *h1_vertexZ;
0215
0216
0217
0218
0219
0220 MonitorElement *h1_sclEt;
0221
0222
0223
0224
0225
0226
0227 MonitorElement *h1_chi2;
0228 MonitorElement *py_chi2VsEta;
0229 MonitorElement *py_chi2VsPhi;
0230
0231 MonitorElement *h1_foundHits;
0232 MonitorElement *py_foundHitsVsEta;
0233 MonitorElement *py_foundHitsVsPhi;
0234
0235 MonitorElement *h1_lostHits;
0236 MonitorElement *py_lostHitsVsEta;
0237 MonitorElement *py_lostHitsVsPhi;
0238
0239
0240
0241
0242
0243
0244
0245
0246 MonitorElement *h1_Eop_barrel;
0247 MonitorElement *h1_Eop_endcaps;
0248 MonitorElement *py_EopVsPhi;
0249
0250
0251
0252 MonitorElement *h1_EeleOPout_barrel;
0253 MonitorElement *h1_EeleOPout_endcaps;
0254
0255
0256
0257
0258 MonitorElement *h1_dEtaSc_propVtx_barrel;
0259 MonitorElement *h1_dEtaSc_propVtx_endcapsPos;
0260 MonitorElement *h1_dEtaSc_propVtx_endcapsNeg;
0261 MonitorElement *py_dEtaSc_propVtxVsPhi;
0262
0263
0264
0265 MonitorElement *h1_dEtaEleCl_propOut_barrel;
0266 MonitorElement *h1_dEtaEleCl_propOut_endcapsPos;
0267 MonitorElement *h1_dEtaEleCl_propOut_endcapsNeg;
0268
0269
0270
0271
0272 MonitorElement *h1_dPhiSc_propVtx_barrel;
0273 MonitorElement *h1_dPhiSc_propVtx_endcapsPos;
0274 MonitorElement *h1_dPhiSc_propVtx_endcapsNeg;
0275 MonitorElement *py_dPhiSc_propVtxVsPhi;
0276
0277
0278
0279 MonitorElement *h1_dPhiEleCl_propOut_barrel;
0280 MonitorElement *h1_dPhiEleCl_propOut_endcapsPos;
0281 MonitorElement *h1_dPhiEleCl_propOut_endcapsNeg;
0282
0283
0284
0285
0286 MonitorElement *h1_Hoe_barrel;
0287 MonitorElement *h1_Hoe_endcaps;
0288 MonitorElement *py_HoeVsPhi;
0289
0290 MonitorElement *h1_sclSigEtaEta_barrel;
0291 MonitorElement *h1_sclSigEtaEta_endcaps;
0292 MonitorElement *h1_sigIEtaIEta5x5_barrel;
0293 MonitorElement *h1_sigIEtaIEta5x5_endcaps;
0294
0295
0296
0297
0298
0299
0300
0301
0302
0303 MonitorElement *h1_fbrem;
0304 MonitorElement *py_fbremVsEta;
0305 MonitorElement *py_fbremVsPhi;
0306
0307 MonitorElement *h1_classes;
0308
0309
0310 MonitorElement *h1_mva;
0311 MonitorElement *h1_provenance;
0312
0313
0314 MonitorElement *h1_tkSumPt_dr03;
0315 MonitorElement *h1_ecalRecHitSumEt_dr03;
0316 MonitorElement *h1_hcalTowerSumEt_dr03;
0317 MonitorElement *h1_PFch_dr03;
0318 MonitorElement *h1_PFem_dr03;
0319 MonitorElement *h1_PFnh_dr03;
0320
0321
0322
0323
0324
0325
0326
0327
0328
0329 MonitorElement *h1_mee;
0330 MonitorElement *h1_mee_os;
0331 MonitorElement *h1_mee_os_bb;
0332 MonitorElement *h1_mee_os_ee;
0333 MonitorElement *h1_mee_os_eb;
0334
0335
0336
0337
0338
0339
0340
0341
0342
0343 MonitorElement *h1_matchedObject_Eta;
0344
0345 MonitorElement *h1_matchedObject_Pt;
0346 MonitorElement *h1_matchedObject_Phi;
0347
0348
0349
0350 MonitorElement *h1_matchingObject_Eta;
0351
0352
0353 MonitorElement *h1_matchingObject_Pt;
0354 MonitorElement *h1_matchingObject_Phi;
0355
0356 };
0357
0358 #endif