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