42 theFile =
new TFile(theRootInputFile.c_str(),
"READ");
58 cout <<
"[DTTTrigWriter]Constructor called!" << endl;
64 cout <<
"[DTTTrigWriter]Destructor called!" << endl;
72 cout <<
"[DTTTrigWriter]Analyzer called!" << endl;
78 const vector<const DTSuperLayer*> superLayers =
dtGeom->superLayers();
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";
112 string histoName =
"Ch_" + std::to_string(slId.
wheel()) +
"_" + std::to_string(slId.
station()) +
"_" +
113 std::to_string(slId.
sector()) +
"_SL" + std::to_string(slId.
superlayer()) +
"_hTimeBox";
DTTimeBoxFitter * theFitter
T getUntrackedParameter(std::string const &, T const &) const
std::string theRootInputFile
int set(int wheelId, int stationId, int sectorId, int slId, float tTrig, float tTrms, float kFact, DTTimeUnits::type unit)
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.
std::string getTBoxName(const DTSuperLayerId &slId) const
edm::ESHandle< DTGeometry > dtGeom
void setFitSigma(double sigma)
int superlayer() const
Return the superlayer number (deprecated method name)
std::pair< double, double > fitTimeBox(TH1F *hTimeBox)
Fit the rising edge of the time box returning mean value and sigma (first and second respectively) ...
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
int station() const
Return the station number.
int wheel() const
Return the wheel number.
static void writeToDB(std::string record, T *payload)
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken_
void endJob() override
Write ttrig in the DB.
~DTTTrigWriter() override
Destructor.