41 setConfig(ps,
"DTLocalTriggerSynch");
42 baseFolderTM =
"DT/90-LocalTriggerSynch/";
54 rangeInBX =
parameters.getParameter<
bool>(
"rangeWithinBX");
69 vector<string>::const_iterator iTr = trigSources.begin();
70 vector<string>::const_iterator trEnd = trigSources.end();
71 vector<string>::const_iterator iHw =
hwSources.begin();
72 vector<string>::const_iterator hwEnd =
hwSources.end();
75 if (
parameters.getUntrackedParameter<
bool>(
"staticBooking",
true)) {
76 for (; iTr != trEnd; ++iTr) {
78 for (; iHw != hwEnd; ++iHw) {
80 std::vector<const DTChamber*>::const_iterator chambIt = muonGeom->chambers().begin();
81 std::vector<const DTChamber*>::const_iterator chambEnd = muonGeom->chambers().end();
82 for (; chambIt != chambEnd; ++chambIt) {
92 if (
parameters.getParameter<
bool>(
"fineParamDiff")) {
95 wPhaseMap = (*wPhaseHandle);
103 for (vector<string>::const_iterator iTr = trigSources.begin(); iTr != trigSources.end(); ++iTr) {
105 for (vector<string>::const_iterator iHw =
hwSources.begin(); iHw !=
hwSources.end(); ++iHw) {
107 std::vector<const DTChamber*>::const_iterator chambIt = muonGeom->chambers().begin();
108 std::vector<const DTChamber*>::const_iterator chambEnd = muonGeom->chambers().end();
109 for (; chambIt != chambEnd; ++chambIt) {
111 uint32_t indexCh = chId.
rawId();
115 TH1F* numH = getHisto<TH1F>(igetter.
get(getMEName(
numHistoTag,
"", chId)));
116 TH1F* denH = getHisto<TH1F>(igetter.
get(getMEName(
denHistoTag,
"", chId)));
119 std::map<std::string, MonitorElement*> innerME = chambME[indexCh];
121 makeRatioME(numH, denH, ratioH);
124 TF1 mypol8(
"mypol8",
"pol8");
125 getHisto<TH1F>(ratioH)->Fit(&mypol8,
"CQO");
128 <<
" returned 0" << endl;
131 if (!numH || !denH) {
133 <<
"Test]: At least one of the required Histograms was not found for chamber " << chId
134 <<
". Peaks not computed" << endl;
137 <<
" is less than minEntries=" <<
minEntries <<
". Peaks not computed" << endl;
148 if (
parameters.getParameter<
bool>(
"writeDB")) {
154 std::vector<const DTChamber*>::const_iterator chambIt = muonGeom->chambers().begin();
155 std::vector<const DTChamber*>::const_iterator chambEnd = muonGeom->chambers().end();
156 for (; chambIt != chambEnd; ++chambIt) {
159 int coarseDelay = static_cast<int>(
160 (getFloatFromME(igetter, chId,
"tTrig_SL1") + getFloatFromME(igetter, chId,
"tTrig_SL3")) * 0.5 /
bxTime);
162 bool fineDiff =
parameters.getParameter<
bool>(
"fineParamDiff");
163 bool coarseDiff =
parameters.getParameter<
bool>(
"coarseParamDiff");
165 TH1F* ratioH = getHisto<TH1F>(igetter.
get(getMEName(
ratioHistoTag,
"", chId)));
167 TF1* fitF = ratioH->GetFunction(
"mypol8");
169 fineDelay = fitF->GetMaximumX(0,
bxTime);
173 <<
" is empty. Worst Phase value set to 0." << endl;
176 if (fineDiff || coarseDiff) {
181 fineDelay = wFine - fineDelay;
184 coarseDelay = wCoarse - coarseDelay;
190 std::vector<std::pair<DTTPGParametersId, DTTPGParametersData> >::const_iterator dbIt = delayMap->
begin();
191 std::vector<std::pair<DTTPGParametersId, DTTPGParametersData> >::const_iterator dbEnd = delayMap->
end();
192 for (; dbIt != dbEnd; ++dbIt) {
194 << (*dbIt).first.sectorId <<
" St " << (*dbIt).first.stationId <<
" has coarse "
195 << (*dbIt).second.nClock <<
" and phase " << (*dbIt).second.tPhase << std::endl;
198 string delayRecord =
"DTTPGParametersRcd";
216 string folderName = topFolder() +
"Wheel" +
wheel.str() +
"/Sector" + sector.str() +
"/Station" +
station.str() +
"/";
223 return me->getFloatValue();
241 sector << chambId.
sector();
246 string folder = topFolder() +
"Wheel" +
wheel.str() +
"/Sector" + sector.str() +
"/Station" +
station.str();
247 if (!subfolder.empty()) {
248 folder +=
"7" + subfolder;
255 uint32_t indexChId = chambId.
rawId();
260 chambME[indexChId][fullType] =