35 theCalibChamber_(
pset.getUntrackedParameter<
string>(
"calibChamber",
"All")),
37 LogVerbatim(
"Calibration") <<
"[DTVDriftSegmentCalibration] Constructor called!";
42 string rootFileName =
pset.getUntrackedParameter<
string>(
"rootFileName",
"DTVDriftHistos.root");
53 LogVerbatim(
"Calibration") <<
"[DTVDriftSegmentCalibration] Destructor called!";
69 int selWheel, selStation, selSector;
71 linestr >> selWheel >> selStation >> selSector;
72 chosenChamberId =
DTChamberId(selWheel, selStation, selSector);
73 LogVerbatim(
"Calibration") <<
" Chosen chamber: " << chosenChamberId << endl;
77 for (chamberIdIt = all4DSegments->id_begin(); chamberIdIt != all4DSegments->id_end(); ++chamberIdIt) {
84 LogTrace(
"Calibration") <<
" Booking histos for Chamber: " << *chamberIdIt;
94 LogTrace(
"Calibration") <<
"Segment local pos (in chamber RF): " << (*segment).localPosition()
95 <<
"\nSegment global pos: " <<
chamber->toGlobal((*segment).localPosition());
101 if ((*segment).hasPhi()) {
103 double segmentVDrift = segment->phiSegment()->vDrift();
104 if (segmentVDrift != 0.00) {
111 if ((*segment).hasZed()) {
113 double segmentVDrift = segment->zSegment()->vDrift();
114 if (segmentVDrift != 0.00) {
125 LogVerbatim(
"Calibration") <<
"[DTVDriftSegmentCalibration] Writing histos to file!" << endl;
130 vector<TH1F*>::const_iterator itHistTH1F = (*itChHistos).second.begin();
131 vector<TH1F*>::const_iterator itHistTH1F_end = (*itChHistos).second.end();
132 for (; itHistTH1F != itHistTH1F_end; ++itHistTH1F)
133 (*itHistTH1F)->Write();
137 for (; itHistTH2F != itHistTH2F_end; ++itHistTH2F)
138 (*itHistTH2F)->Write();
153 string chHistoName =
"_W" +
wheel +
"_St" +
station +
"_Sec" + sector;
155 vector<TH1F*> histosTH1F;
156 histosTH1F.push_back(
157 new TH1F((
"hRPhiVDriftCorr" + chHistoName).c_str(),
"v-drift corr. from Phi segments", 200, -0.4, 0.4));
159 histosTH1F.push_back(
160 new TH1F((
"hRZVDriftCorr" + chHistoName).c_str(),
"v-drift corr. from Z segments", 200, -0.4, 0.4));
162 vector<TH2F*> histosTH2F;
163 histosTH2F.push_back(
new TH2F((
"hRPhiVDriftCorrVsSegmPosX" + chHistoName).c_str(),
164 "v-drift corr. vs. segment x position",
171 histosTH2F.push_back(
new TH2F((
"hRPhiVDriftCorrVsSegmPosY" + chHistoName).c_str(),
172 "v-drift corr. vs. segment y position",
Log< level::Info, true > LogVerbatim
int station() const
Return the station number.
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override
DTSegmentSelector * select_
std::pair< const_iterator, const_iterator > range
iterator range
const std::string theCalibChamber_
std::string to_string(const V &value)
~DTVDriftSegmentCalibration() override
C::const_iterator const_iterator
constant access iterator type
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
const edm::EDGetTokenT< DTRecSegment4DCollection > theRecHits4DToken_
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
ChamberHistosMapTH1F theVDriftHistoMapTH1F_
ChamberHistosMapTH2F theVDriftHistoMapTH2F_
void bookHistos(DTChamberId)
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken_
void beginRun(const edm::Run &run, const edm::EventSetup &setup) override
int wheel() const
Return the wheel number.
const DTChamber * chamber(const DTChamberId &id) const
Return a DTChamber given its id.
DTVDriftSegmentCalibration(const edm::ParameterSet &pset)