DTTTrigFillWithAverage

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
#ifndef CalibMuon_DTTTrigFillWithAverage_H
#define CalibMuon_DTTTrigFillWithAverage_H

/** \class DTTTrigFillWithAverage
 *  Concrete implementation of a DTTTrigBaseCorrection.
 *  Fills missing tTrig values in DB 
 *
 *  \author A. Vilela Pereira
 */

#include "CalibMuon/DTCalibration/interface/DTTTrigBaseCorrection.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/ConsumesCollector.h"
#include "Geometry/Records/interface/MuonGeometryRecord.h"
#include "CondFormats/DataRecord/interface/DTTtrigRcd.h"

namespace edm {
  class ParameterSet;
}

class DTTtrig;
class DTGeometry;

namespace dtCalibration {

  class DTTTrigFillWithAverage : public DTTTrigBaseCorrection {
  public:
    // Constructor
    DTTTrigFillWithAverage(const edm::ParameterSet&, edm::ConsumesCollector);

    // Destructor
    ~DTTTrigFillWithAverage() override;

    void setES(const edm::EventSetup& setup) override;
    DTTTrigData correction(const DTSuperLayerId&) override;

  private:
    void getAverage();

    const DTTtrig* tTrigMap_;
    edm::ESHandle<DTGeometry> muonGeom_;

    edm::ESGetToken<DTTtrig, DTTtrigRcd> ttrigToken_;
    edm::ESGetToken<DTGeometry, MuonGeometryRecord> dtGeomToken_;

    struct {
      float aveMean;
      float rmsMean;
      float aveSigma;
      float rmsSigma;
      float aveKFactor;
    } initialTTrig_;

    bool foundAverage_;
  };

}  // namespace dtCalibration
#endif