Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef CalibMuon_DTCalibration_DTVDriftSegment_h
0002 #define CalibMuon_DTCalibration_DTVDriftSegment_h
0003 
0004 /** \class DTVDriftSegment
0005  *  Concrete implementation of a DTVDriftBaseAlgo.
0006  *  Computes vDrift using fit result segment by segment.
0007  *
0008  *  \author A. Vilela Pereira
0009  */
0010 
0011 #include "CalibMuon/DTCalibration/interface/DTVDriftBaseAlgo.h"
0012 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0013 #include "FWCore/Framework/interface/ConsumesCollector.h"
0014 #include "FWCore/Framework/interface/EventSetup.h"
0015 #include "FWCore/Framework/interface/ESHandle.h"
0016 #include "CondFormats/DataRecord/interface/DTMtimeRcd.h"
0017 #include "CondFormats/DataRecord/interface/DTRecoConditionsVdriftRcd.h"
0018 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0019 
0020 #include <string>
0021 
0022 class DTMtime;
0023 class DTRecoConditions;
0024 class DTResidualFitter;
0025 class TH1F;
0026 class TFile;
0027 
0028 namespace dtCalibration {
0029 
0030   class DTVDriftSegment : public DTVDriftBaseAlgo {
0031   public:
0032     DTVDriftSegment(edm::ParameterSet const&, edm::ConsumesCollector);
0033     ~DTVDriftSegment() override;
0034 
0035     void setES(const edm::EventSetup& setup) override;
0036     DTVDriftData compute(const DTSuperLayerId&) override;
0037 
0038   private:
0039     TH1F* getHisto(const DTSuperLayerId&);
0040     std::string getHistoName(const DTSuperLayerId&);
0041 
0042     unsigned int nSigmas_;
0043 
0044     const DTMtime* mTimeMap_;            // legacy DB object
0045     const DTRecoConditions* vDriftMap_;  // DB object in new format
0046     bool readLegacyVDriftDB;             // which one to use
0047     TFile* rootFile_;
0048     DTResidualFitter* fitter_;
0049 
0050     edm::ESGetToken<DTMtime, DTMtimeRcd> mTimeMapToken_;
0051     edm::ESGetToken<DTRecoConditions, DTRecoConditionsVdriftRcd> vDriftMapToken_;
0052   };
0053 
0054 }  // namespace dtCalibration
0055 #endif