Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:58:28

0001 #ifndef CalibMuon_DTTTrigResidualCorrection_H
0002 #define CalibMuon_DTTTrigResidualCorrection_H
0003 
0004 /** \class DTTTrigResidualCorrection
0005  *  Concrete implementation of a DTTTrigBaseCorrection.
0006  *  Computes residual correction for tTrig
0007  *
0008  *  \author A. Vilela Pereira
0009  */
0010 
0011 #include "CalibMuon/DTCalibration/interface/DTTTrigBaseCorrection.h"
0012 #include "CondFormats/DataRecord/interface/DTTtrigRcd.h"
0013 #include "CondFormats/DataRecord/interface/DTMtimeRcd.h"
0014 #include "CondFormats/DataRecord/interface/DTRecoConditionsVdriftRcd.h"
0015 #include "FWCore/Framework/interface/ConsumesCollector.h"
0016 
0017 #include <string>
0018 
0019 namespace edm {
0020   class ParameterSet;
0021 }
0022 
0023 class DTTtrig;
0024 class DTMtime;
0025 class DTRecoConditions;
0026 class DTResidualFitter;
0027 
0028 class TH1F;
0029 class TFile;
0030 
0031 namespace dtCalibration {
0032 
0033   class DTTTrigResidualCorrection : public DTTTrigBaseCorrection {
0034   public:
0035     // Constructor
0036     DTTTrigResidualCorrection(const edm::ParameterSet&, edm::ConsumesCollector cc);
0037 
0038     // Destructor
0039     ~DTTTrigResidualCorrection() override;
0040 
0041     void setES(const edm::EventSetup& setup) override;
0042     DTTTrigData correction(const DTSuperLayerId&) override;
0043 
0044   private:
0045     const TH1F* getHisto(const DTSuperLayerId&);
0046     std::string getHistoName(const DTSuperLayerId& slID);
0047 
0048     TFile* rootFile_;
0049 
0050     std::string rootBaseDir_;
0051     bool useFit_;
0052     bool useSlopesCalib_;
0053 
0054     double vDriftEff_[5][14][4][3];
0055 
0056     const DTTtrig* tTrigMap_;
0057     const DTMtime* mTimeMap_;            // legacy vdrift DB object
0058     const DTRecoConditions* vDriftMap_;  // vdrift DB object in new format
0059     bool readLegacyVDriftDB;             // which one to use
0060 
0061     DTResidualFitter* fitter_;
0062 
0063     edm::ESGetToken<DTTtrig, DTTtrigRcd> ttrigToken_;
0064     edm::ESGetToken<DTMtime, DTMtimeRcd> mTimeMapToken_;
0065     edm::ESGetToken<DTRecoConditions, DTRecoConditionsVdriftRcd> vDriftMapToken_;
0066   };
0067 
0068 }  // namespace dtCalibration
0069 #endif