Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-10-19 10:28:04

0001 #ifndef CalibMuon_DTTTrigFillWithAverage_H
0002 #define CalibMuon_DTTTrigFillWithAverage_H
0003 
0004 /** \class DTTTrigFillWithAverage
0005  *  Concrete implementation of a DTTTrigBaseCorrection.
0006  *  Fills missing tTrig values in DB 
0007  *
0008  *  \author A. Vilela Pereira
0009  */
0010 
0011 #include "CalibMuon/DTCalibration/interface/DTTTrigBaseCorrection.h"
0012 #include "FWCore/Framework/interface/ESHandle.h"
0013 #include "FWCore/Framework/interface/ConsumesCollector.h"
0014 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0015 #include "CondFormats/DataRecord/interface/DTTtrigRcd.h"
0016 
0017 namespace edm {
0018   class ParameterSet;
0019 }
0020 
0021 class DTTtrig;
0022 class DTGeometry;
0023 
0024 namespace dtCalibration {
0025 
0026   class DTTTrigFillWithAverage : public DTTTrigBaseCorrection {
0027   public:
0028     // Constructor
0029     DTTTrigFillWithAverage(const edm::ParameterSet&, edm::ConsumesCollector);
0030 
0031     // Destructor
0032     ~DTTTrigFillWithAverage() override;
0033 
0034     void setES(const edm::EventSetup& setup) override;
0035     DTTTrigData correction(const DTSuperLayerId&) override;
0036 
0037   private:
0038     void getAverage();
0039 
0040     const DTTtrig* tTrigMap_;
0041     edm::ESHandle<DTGeometry> muonGeom_;
0042 
0043     edm::ESGetToken<DTTtrig, DTTtrigRcd> ttrigToken_;
0044     edm::ESGetToken<DTGeometry, MuonGeometryRecord> dtGeomToken_;
0045 
0046     struct {
0047       float aveMean;
0048       float rmsMean;
0049       float aveSigma;
0050       float rmsSigma;
0051       float aveKFactor;
0052     } initialTTrig_;
0053 
0054     bool foundAverage_;
0055   };
0056 
0057 }  // namespace dtCalibration
0058 #endif