35 : theRecHits4DLabel_(
pset.getParameter<
InputTag>(
"recHits4DLabel")),
37 theCalibChamber_(
pset.getUntrackedParameter<
string>(
"calibChamber",
"All")) {
38 LogVerbatim(
"Calibration") <<
"[DTVDriftSegmentCalibration] Constructor called!";
44 string rootFileName =
pset.getUntrackedParameter<
string>(
"rootFileName",
"DTVDriftHistos.root");
55 LogVerbatim(
"Calibration") <<
"[DTVDriftSegmentCalibration] Destructor called!";
72 int selWheel, selStation, selSector;
74 linestr >> selWheel >> selStation >> selSector;
75 chosenChamberId =
DTChamberId(selWheel, selStation, selSector);
76 LogVerbatim(
"Calibration") <<
" Chosen chamber: " << chosenChamberId << endl;
80 for (chamberIdIt = all4DSegments->id_begin(); chamberIdIt != all4DSegments->id_end(); ++chamberIdIt) {
87 LogTrace(
"Calibration") <<
" Booking histos for Chamber: " << *chamberIdIt;
97 LogTrace(
"Calibration") <<
"Segment local pos (in chamber RF): " << (*segment).localPosition()
98 <<
"\nSegment global pos: " <<
chamber->toGlobal((*segment).localPosition());
104 if ((*segment).hasPhi()) {
106 double segmentVDrift = segment->phiSegment()->vDrift();
107 if (segmentVDrift != 0.00) {
114 if ((*segment).hasZed()) {
116 double segmentVDrift = segment->zSegment()->vDrift();
117 if (segmentVDrift != 0.00) {
128 LogVerbatim(
"Calibration") <<
"[DTVDriftSegmentCalibration] Writing histos to file!" << endl;
133 vector<TH1F*>::const_iterator itHistTH1F = (*itChHistos).second.begin();
134 vector<TH1F*>::const_iterator itHistTH1F_end = (*itChHistos).second.end();
135 for (; itHistTH1F != itHistTH1F_end; ++itHistTH1F)
136 (*itHistTH1F)->Write();
140 for (; itHistTH2F != itHistTH2F_end; ++itHistTH2F)
141 (*itHistTH2F)->Write();
156 string chHistoName =
"_W" +
wheel +
"_St" +
station +
"_Sec" + sector;
158 vector<TH1F*> histosTH1F;
159 histosTH1F.push_back(
160 new TH1F((
"hRPhiVDriftCorr" + chHistoName).c_str(),
"v-drift corr. from Phi segments", 200, -0.4, 0.4));
162 histosTH1F.push_back(
163 new TH1F((
"hRZVDriftCorr" + chHistoName).c_str(),
"v-drift corr. from Z segments", 200, -0.4, 0.4));
165 vector<TH2F*> histosTH2F;
166 histosTH2F.push_back(
new TH2F((
"hRPhiVDriftCorrVsSegmPosX" + chHistoName).c_str(),
167 "v-drift corr. vs. segment x position",
174 histosTH2F.push_back(
new TH2F((
"hRPhiVDriftCorrVsSegmPosY" + chHistoName).c_str(),
175 "v-drift corr. vs. segment y position",