34 : theRecHits4DLabel_(
pset.getParameter<
InputTag>(
"recHits4DLabel")),
36 theCalibChamber_(
pset.getUntrackedParameter<
string>(
"calibChamber",
"All")) {
37 LogVerbatim(
"Calibration") <<
"[DTVDriftSegmentCalibration] Constructor called!";
43 string rootFileName =
pset.getUntrackedParameter<
string>(
"rootFileName",
"DTVDriftHistos.root");
54 LogVerbatim(
"Calibration") <<
"[DTVDriftSegmentCalibration] Destructor called!";
71 int selWheel, selStation, selSector;
73 linestr >> selWheel >> selStation >> selSector;
74 chosenChamberId =
DTChamberId(selWheel, selStation, selSector);
75 LogVerbatim(
"Calibration") <<
" Chosen chamber: " << chosenChamberId << endl;
79 for (chamberIdIt = all4DSegments->id_begin(); chamberIdIt != all4DSegments->id_end(); ++chamberIdIt) {
86 LogTrace(
"Calibration") <<
" Booking histos for Chamber: " << *chamberIdIt;
96 LogTrace(
"Calibration") <<
"Segment local pos (in chamber RF): " << (*segment).localPosition()
97 <<
"\nSegment global pos: " <<
chamber->toGlobal((*segment).localPosition());
103 if ((*segment).hasPhi()) {
105 double segmentVDrift = segment->phiSegment()->vDrift();
106 if (segmentVDrift != 0.00) {
113 if ((*segment).hasZed()) {
115 double segmentVDrift = segment->zSegment()->vDrift();
116 if (segmentVDrift != 0.00) {
127 LogVerbatim(
"Calibration") <<
"[DTVDriftSegmentCalibration] Writing histos to file!" << endl;
132 vector<TH1F*>::const_iterator itHistTH1F = (*itChHistos).second.begin();
133 vector<TH1F*>::const_iterator itHistTH1F_end = (*itChHistos).second.end();
134 for (; itHistTH1F != itHistTH1F_end; ++itHistTH1F)
135 (*itHistTH1F)->Write();
139 for (; itHistTH2F != itHistTH2F_end; ++itHistTH2F)
140 (*itHistTH2F)->Write();
155 string chHistoName =
"_W" +
wheel +
"_St" +
station +
"_Sec" + sector;
157 vector<TH1F*> histosTH1F;
158 histosTH1F.push_back(
159 new TH1F((
"hRPhiVDriftCorr" + chHistoName).c_str(),
"v-drift corr. from Phi segments", 200, -0.4, 0.4));
161 histosTH1F.push_back(
162 new TH1F((
"hRZVDriftCorr" + chHistoName).c_str(),
"v-drift corr. from Z segments", 200, -0.4, 0.4));
164 vector<TH2F*> histosTH2F;
165 histosTH2F.push_back(
new TH2F((
"hRPhiVDriftCorrVsSegmPosX" + chHistoName).c_str(),
166 "v-drift corr. vs. segment x position",
173 histosTH2F.push_back(
new TH2F((
"hRPhiVDriftCorrVsSegmPosY" + chHistoName).c_str(),
174 "v-drift corr. vs. segment y position",