Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-02-28 01:32:07

0001 // -*- C++ -*-
0002 //
0003 // Package:    Calibration/HcalCalibAlgos/plugins
0004 // Class:      ValidationHcalIsoTrackAlCaReco
0005 //
0006 /**\class ValidationHcalIsoTrackAlCaReco ValidationHcalIsoTrackAlCaReco.cc Calibration/HcalCalibAlgos/plugins/ValidationHcalIsoTrackAlCaReco.cc
0007 
0008  Description: <one line class summary>
0009 
0010  Implementation:
0011      <Notes on implementation>
0012 */
0013 //
0014 // Original Author:  Grigory SAFRONOV, Sergey PETRUSHANKO
0015 //         Created:  Tue Oct  14 16:10:31 CEST 2008
0016 //
0017 //
0018 
0019 // system include files
0020 #include <memory>
0021 
0022 // user include files
0023 
0024 #include "FWCore/Framework/interface/Frameworkfwd.h"
0025 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0026 
0027 #include "FWCore/Framework/interface/Event.h"
0028 #include "FWCore/Framework/interface/MakerMacros.h"
0029 
0030 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0031 
0032 #include "DataFormats/HLTReco/interface/TriggerEvent.h"
0033 #include "DataFormats/L1Trigger/interface/L1JetParticle.h"
0034 #include "DataFormats/L1Trigger/interface/L1JetParticleFwd.h"
0035 
0036 #include "CondFormats/L1TObjects/interface/L1GtTriggerMenu.h"
0037 #include "CondFormats/DataRecord/interface/L1GtTriggerMenuRcd.h"
0038 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetupFwd.h"
0039 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetup.h"
0040 #include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutRecord.h"
0041 
0042 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0043 #include "DataFormats/TrackReco/interface/Track.h"
0044 
0045 #include "CondFormats/L1TObjects/interface/L1GtPrescaleFactors.h"
0046 #include "CondFormats/DataRecord/interface/L1GtPrescaleFactorsAlgoTrigRcd.h"
0047 #include "CondFormats/DataRecord/interface/L1GtPrescaleFactorsTechTrigRcd.h"
0048 
0049 #include "DQMServices/Core/interface/DQMStore.h"
0050 #include "FWCore/ServiceRegistry/interface/Service.h"
0051 #include "FWCore/Utilities/interface/InputTag.h"
0052 
0053 #include "DataFormats/HcalIsolatedTrack/interface/IsolatedPixelTrackCandidate.h"
0054 #include "DataFormats/HcalIsolatedTrack/interface/IsolatedPixelTrackCandidateFwd.h"
0055 
0056 // Sergey +
0057 
0058 #include "SimDataFormats/Track/interface/SimTrack.h"
0059 #include "SimDataFormats/Track/interface/SimTrackContainer.h"
0060 
0061 // Sergey -
0062 
0063 #include <fstream>
0064 
0065 #include "TH1F.h"
0066 
0067 class ValidationHcalIsoTrackAlCaReco : public edm::one::EDAnalyzer<> {
0068 public:
0069   typedef dqm::legacy::MonitorElement MonitorElement;
0070   typedef dqm::legacy::DQMStore DQMStore;
0071   explicit ValidationHcalIsoTrackAlCaReco(const edm::ParameterSet&);
0072   ~ValidationHcalIsoTrackAlCaReco();
0073 
0074 private:
0075   DQMStore* dbe_;
0076 
0077   virtual void beginJob();
0078   virtual void analyze(const edm::Event&, const edm::EventSetup&);
0079   virtual void endJob();
0080 
0081   const std::string folderName_;
0082   const bool saveToFile_;
0083   const std::string outRootFileName_;
0084   const edm::InputTag hltFilterTag_;
0085   const edm::InputTag recoTrLabel_;
0086 
0087   const double pThr_;
0088   const double heLow_;
0089   const double heUp_;
0090 
0091   const edm::EDGetTokenT<trigger::TriggerEvent> tok_hlt_;
0092   const edm::EDGetTokenT<reco::IsolatedPixelTrackCandidateCollection> tok_arITr_;
0093   const edm::EDGetTokenT<edm::SimTrackContainer> tok_simTrack_;
0094 
0095   MonitorElement* hl3Pt;
0096   MonitorElement* hl3eta;
0097   MonitorElement* hl3AbsEta;
0098   MonitorElement* hl3phi;
0099   MonitorElement* hOffL3TrackMatch;
0100   MonitorElement* hOffL3TrackPtRat;
0101 
0102   MonitorElement* hOffP_0005;
0103   MonitorElement* hOffP_0510;
0104   MonitorElement* hOffP_1015;
0105   MonitorElement* hOffP_1520;
0106 
0107   MonitorElement* hOffP;
0108 
0109   MonitorElement* hTracksSumP;
0110   MonitorElement* hTracksMaxP;
0111 
0112   MonitorElement* hDeposEcalInner;
0113   MonitorElement* hDeposEcalOuter;
0114 
0115   MonitorElement* hOffEtaFP;
0116   MonitorElement* hOffAbsEta;
0117   MonitorElement* hOffPhiFP;
0118 
0119   MonitorElement* hOffEta;
0120   MonitorElement* hOffPhi;
0121 
0122   MonitorElement* hOccupancyFull;
0123   MonitorElement* hOccupancyHighEn;
0124 
0125   MonitorElement* hPurityEta;
0126   MonitorElement* hPurityPhi;
0127 
0128   // Sergey +
0129 
0130   MonitorElement* hSimPt;
0131   MonitorElement* hSimPhi;
0132   MonitorElement* hSimEta;
0133   MonitorElement* hSimAbsEta;
0134   MonitorElement* hSimDist;
0135   MonitorElement* hSimPtRatOff;
0136   MonitorElement* hSimP;
0137   MonitorElement* hSimN;
0138   MonitorElement* hSimNN;
0139   MonitorElement* hSimNE;
0140   MonitorElement* hSimNM;
0141 
0142   // Sergey -
0143 
0144   int nTotal;
0145   int nHLTL3accepts;
0146 
0147   double getDist(double, double, double, double);
0148 
0149   // Sergey +
0150 
0151   double getDistInCM(double eta1, double phi1, double eta2, double phi2);
0152 
0153   // Sergey -
0154 
0155   std::pair<int, int> towerIndex(double eta, double phi);
0156 };