38 debug =
pset.getUntrackedParameter<
bool>(
"debug",
false);
41 theRootInputFile =
pset.getUntrackedParameter<
string>(
"rootFileName");
42 theFile =
new TFile(theRootInputFile.c_str(),
"READ");
46 theFitter->setVerbosity(1);
48 double sigmaFit =
pset.getUntrackedParameter<
double>(
"sigmaTTrigFit", 10.);
49 theFitter->setFitSigma(sigmaFit);
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;
79 const vector<const DTSuperLayer*> superLayers = dtGeom->
superLayers();
82 for (
auto sl = superLayers.begin(); sl != superLayers.end(); sl++) {
85 TH1F*
histo = (TH1F*)
theFile->Get((getTBoxName(slId)).c_str());
88 pair<double, double> meanAndSigma = theFitter->fitTimeBox(
histo);
93 cout <<
" SL: " << slId <<
" mean = " << meanAndSigma.first <<
" sigma = " << meanAndSigma.second << endl;
102 cout <<
"[DTTTrigWriter]Writing ttrig object to DB!" << endl;
105 string tTrigRecord =
"DTTtrigRcd";
113 string histoName =
"Ch_" + std::to_string(slId.
wheel()) +
"_" + std::to_string(slId.
station()) +
"_" +
114 std::to_string(slId.
sector()) +
"_SL" + std::to_string(slId.
superlayer()) +
"_hTimeBox";