38 debug =
pset.getUntrackedParameter<
bool>(
"debug",
false);
48 double sigmaFit =
pset.getUntrackedParameter<
double>(
"sigmaTTrigFit", 10.);
52 kFactor =
pset.getUntrackedParameter<
double>(
"kFactor", -0.7);
58 cout <<
"[DTTTrigWriter]Constructor called!" << endl;
64 cout <<
"[DTTTrigWriter]Destructor called!" << endl;
72 cout <<
"[DTTTrigWriter]Analyzer called!" << endl;
81 for (
auto sl = superLayers.begin(); sl != superLayers.end(); sl++) {
92 cout <<
" SL: " << slId <<
" mean = " << meanAndSigma.first <<
" sigma = " << meanAndSigma.second << endl;
101 cout <<
"[DTTTrigWriter]Writing ttrig object to DB!" << endl;
104 string tTrigRecord =
"DTTtrigRcd";
DTTimeBoxFitter * theFitter
int station() const
Return the station number.
static void writeToDB(std::string record, const T &payload)
std::string theRootInputFile
int set(int wheelId, int stationId, int sectorId, int slId, float tTrig, float tTrms, float kFact, DTTimeUnits::type unit)
std::string to_string(const V &value)
void setVerbosity(unsigned int lvl)
Set the verbosity of the output: 0 = silent, 1 = info, 2 = debug.
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override
Compute the ttrig by fiting the TB rising edge.
DTTTrigWriter(const edm::ParameterSet &pset)
Constructor.
edm::ESHandle< DTGeometry > dtGeom
std::string getTBoxName(const DTSuperLayerId &slId) const
void setFitSigma(double sigma)
int superlayer() const
Return the superlayer number (deprecated method name)
int wheel() const
Return the wheel number.
std::pair< double, double > fitTimeBox(TH1F *hTimeBox)
Fit the rising edge of the time box returning mean value and sigma (first and second respectively) ...
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken_
const std::vector< const DTSuperLayer * > & superLayers() const
Return a vector of all SuperLayer.
void endJob() override
Write ttrig in the DB.
~DTTTrigWriter() override
Destructor.