CMS 3D CMS Logo

DTVDriftCalibration.cc
Go to the documentation of this file.
1 
2 /*
3  * See header file for a description of this class.
4  *
5  * \author M. Giunta
6  */
7 
11 
15 
18 
21 
23 
26 
27 /* C++ Headers */
28 #include <map>
29 #include <iostream>
30 #include <fstream>
31 #include <string>
32 #include <sstream>
33 #include "TFile.h"
34 #include "TH1.h"
35 #include "TF1.h"
36 #include "TROOT.h"
37 
38 using namespace std;
39 using namespace edm;
40 using namespace dttmaxenums;
41 
43  : // Get the synchronizer
44  theSync{DTTTrigSyncFactory::get()->create(pset.getParameter<string>("tTrigMode"),
45  pset.getParameter<ParameterSet>("tTrigModeConfig"))}
46 
47 {
48  edm::ConsumesCollector collector(consumesCollector());
49  select_ = std::make_unique<DTSegmentSelector>(pset, collector);
50 
51  // The name of the 4D rec hits collection
52  theRecHits4DToken = (consumes<DTRecSegment4DCollection>(pset.getParameter<InputTag>("recHits4DLabel")));
53 
54  // The root file which will contain the histos
55  string rootFileName = pset.getUntrackedParameter<string>("rootFileName");
56  theFile = new TFile(rootFileName.c_str(), "RECREATE");
57  theFile->cd();
58 
59  debug = pset.getUntrackedParameter<bool>("debug", false);
60 
61  theFitter = std::make_unique<DTMeanTimerFitter>(theFile);
62  if (debug)
63  theFitter->setVerbosity(1);
64 
65  hChi2 = new TH1F("hChi2", "Chi squared tracks", 100, 0, 100);
66  h2DSegmRPhi = new h2DSegm("SLRPhi");
67  h2DSegmRZ = new h2DSegm("SLRZ");
68  h4DSegmAllCh = new h4DSegm("AllCh");
69  histograms_.bookHistos();
70 
71  findVDriftAndT0 = pset.getUntrackedParameter<bool>("fitAndWrite", false);
72 
73  // Chamber/s to calibrate
74  theCalibChamber = pset.getUntrackedParameter<string>("calibChamber", "All");
75 
76  // the txt file which will contain the calibrated constants
77  theVDriftOutputFile = pset.getUntrackedParameter<string>("vDriftFileName");
78 
79  // get parameter set for DTCalibrationMap constructor
80  theCalibFilePar = pset.getUntrackedParameter<ParameterSet>("calibFileConfig");
81 
82  // the granularity to be used for tMax
83  string tMaxGranularity = pset.getUntrackedParameter<string>("tMaxGranularity", "bySL");
84 
85  // Enforce it to be by SL since rest is not implemented
86  if (tMaxGranularity != "bySL") {
87  LogError("Calibration") << "[DTVDriftCalibration] tMaxGranularity will be fixed to bySL.";
88  tMaxGranularity = "bySL";
89  }
90  // Initialize correctly the enum which specify the granularity for the calibration
91  if (tMaxGranularity == "bySL") {
92  theGranularity = bySL;
93  } else if (tMaxGranularity == "byChamber") {
94  theGranularity = byChamber;
95  } else if (tMaxGranularity == "byPartition") {
96  theGranularity = byPartition;
97  } else
98  throw cms::Exception("Configuration")
99  << "[DTVDriftCalibration] Check parameter tMaxGranularity: " << tMaxGranularity << " option not available";
100 
101  LogVerbatim("Calibration") << "[DTVDriftCalibration]Constructor called!";
102 }
103 
105  theFile->Close();
106  LogVerbatim("Calibration") << "[DTVDriftCalibration]Destructor called!";
107 }
108 
109 void DTVDriftCalibration::analyze(const Event& event, const EventSetup& eventSetup) {
110  LogTrace("Calibration") << "--- [DTVDriftCalibration] Event analysed #Run: " << event.id().run()
111  << " #Event: " << event.id().event();
112  theFile->cd();
113  DTChamberId chosenChamberId;
114 
115  if (theCalibChamber != "All") {
116  stringstream linestr;
117  int selWheel, selStation, selSector;
118  linestr << theCalibChamber;
119  linestr >> selWheel >> selStation >> selSector;
120  chosenChamberId = DTChamberId(selWheel, selStation, selSector);
121  LogTrace("Calibration") << "chosen chamber " << chosenChamberId;
122  }
123 
124  // Get the DT Geometry
125  ESHandle<DTGeometry> dtGeom;
126  eventSetup.get<MuonGeometryRecord>().get(dtGeom);
127 
128  // Get the rechit collection from the event
129  Handle<DTRecSegment4DCollection> all4DSegments;
130  event.getByToken(theRecHits4DToken, all4DSegments);
131 
132  // Get the map of noisy channels
133  /*ESHandle<DTStatusFlag> statusMap;
134  if(checkNoisyChannels) {
135  eventSetup.get<DTStatusFlagRcd>().get(statusMap);
136  }*/
137 
138  // Set the event setup in the Synchronizer
139  theSync->setES(eventSetup);
140 
141  // Loop over segments by chamber
143  for (chamberIdIt = all4DSegments->id_begin(); chamberIdIt != all4DSegments->id_end(); ++chamberIdIt) {
144  // Get the chamber from the setup
145  const DTChamber* chamber = dtGeom->chamber(*chamberIdIt);
146  LogTrace("Calibration") << "Chamber Id: " << *chamberIdIt;
147 
148  // Calibrate just the chosen chamber/s
149  if ((theCalibChamber != "All") && ((*chamberIdIt) != chosenChamberId))
150  continue;
151 
152  // Get the range for the corresponding ChamberId
153  DTRecSegment4DCollection::range range = all4DSegments->get((*chamberIdIt));
154 
155  // Loop over the rechits of this DetUnit
156  for (DTRecSegment4DCollection::const_iterator segment = range.first; segment != range.second; ++segment) {
157  if (!(*segment).hasZed() && !(*segment).hasPhi()) {
158  LogError("Calibration") << "4D segment without Z and Phi segments";
159  continue;
160  }
161 
162  LogTrace("Calibration") << "Segment local pos (in chamber RF): " << (*segment).localPosition()
163  << "\nSegment global pos: " << chamber->toGlobal((*segment).localPosition());
164 
165  if (!((*select_)(*segment, event, eventSetup)))
166  continue;
167 
168  LocalPoint phiSeg2DPosInCham;
169  LocalVector phiSeg2DDirInCham;
170  map<DTSuperLayerId, vector<DTRecHit1D> > hitsBySLMap;
171  if ((*segment).hasPhi()) {
172  const DTChamberRecSegment2D* phiSeg = (*segment).phiSegment(); // phiSeg lives in the chamber RF
173  phiSeg2DPosInCham = phiSeg->localPosition();
174  phiSeg2DDirInCham = phiSeg->localDirection();
175  vector<DTRecHit1D> phiHits = phiSeg->specificRecHits();
176  for (vector<DTRecHit1D>::const_iterator hit = phiHits.begin(); hit != phiHits.end(); ++hit) {
177  DTWireId wireId = (*hit).wireId();
178  DTSuperLayerId slId = wireId.superlayerId();
179  hitsBySLMap[slId].push_back(*hit);
180  }
181  }
182  // Get the Theta 2D segment and plot the angle in the chamber RF
183  LocalVector zSeg2DDirInCham;
184  LocalPoint zSeg2DPosInCham;
185  if ((*segment).hasZed()) {
186  const DTSLRecSegment2D* zSeg = (*segment).zSegment(); // zSeg lives in the SL RF
187  const DTSuperLayer* sl = chamber->superLayer(zSeg->superLayerId());
188  zSeg2DPosInCham = chamber->toLocal(sl->toGlobal((*zSeg).localPosition()));
189  zSeg2DDirInCham = chamber->toLocal(sl->toGlobal((*zSeg).localDirection()));
190  hitsBySLMap[zSeg->superLayerId()] = zSeg->specificRecHits();
191  }
192 
193  LocalPoint segment4DLocalPos = (*segment).localPosition();
194  LocalVector segment4DLocalDir = (*segment).localDirection();
195  double chiSquare = ((*segment).chi2() / (*segment).degreesOfFreedom());
196 
197  hChi2->Fill(chiSquare);
198  if ((*segment).hasPhi())
199  h2DSegmRPhi->Fill(phiSeg2DPosInCham.x(), phiSeg2DDirInCham.x() / phiSeg2DDirInCham.z());
200  if ((*segment).hasZed())
201  h2DSegmRZ->Fill(zSeg2DPosInCham.y(), zSeg2DDirInCham.y() / zSeg2DDirInCham.z());
202 
203  if ((*segment).hasZed() && (*segment).hasPhi())
204  h4DSegmAllCh->Fill(segment4DLocalPos.x(),
205  segment4DLocalPos.y(),
206  atan(segment4DLocalDir.x() / segment4DLocalDir.z()) * 180. / Geom::pi(),
207  atan(segment4DLocalDir.y() / segment4DLocalDir.z()) * 180. / Geom::pi(),
208  180 - segment4DLocalDir.theta() * 180. / Geom::pi());
209  else if ((*segment).hasPhi())
210  h4DSegmAllCh->Fill(segment4DLocalPos.x(),
211  atan(segment4DLocalDir.x() / segment4DLocalDir.z()) * 180. / Geom::pi());
212  else if ((*segment).hasZed())
213  LogWarning("Calibration") << "4d segment with only Z";
214 
215  //loop over the segments
216  for (map<DTSuperLayerId, vector<DTRecHit1D> >::const_iterator slIdAndHits = hitsBySLMap.begin();
217  slIdAndHits != hitsBySLMap.end();
218  ++slIdAndHits) {
219  if (slIdAndHits->second.size() < 3)
220  continue;
221  DTSuperLayerId slId = slIdAndHits->first;
222 
223  // Create the DTTMax, that computes the 4 TMax
224  DTTMax slSeg(slIdAndHits->second,
225  *(chamber->superLayer(slIdAndHits->first)),
226  chamber->toGlobal((*segment).localDirection()),
227  chamber->toGlobal((*segment).localPosition()),
228  *theSync,
229  histograms_);
230 
231  if (theGranularity == bySL) {
232  vector<const TMax*> tMaxes = slSeg.getTMax(slId);
233  DTWireId wireId(slId, 0, 0);
234  theFile->cd();
235  cellInfo* cell = theWireIdAndCellMap[wireId];
236  if (cell == nullptr) {
237  TString name = (((((TString) "TMax" + (long)slId.wheel()) + (long)slId.station()) + (long)slId.sector()) +
238  (long)slId.superLayer());
239  cell = new cellInfo(name);
240  theWireIdAndCellMap[wireId] = cell;
241  }
242  cell->add(tMaxes);
243  cell->update(); // FIXME to reset the counter to avoid triple counting, which actually is not used...
244  } else {
245  LogWarning("Calibration") << "[DTVDriftCalibration] ###Warning: the chosen granularity is not implemented "
246  "yet, only bySL available!";
247  }
248  // to be implemented: granularity different from bySL
249 
250  // else if (theGranularity == byPartition) {
251  // // Use the custom granularity defined by partition();
252  // // in this case, add() should be called once for each Tmax of each layer
253  // // and triple counting should be avoided within add()
254  // vector<cellInfo*> cells;
255  // for (int i=1; i<=4; i++) {
256  // const DTTMax::InfoLayer* iLayer = slSeg.getInfoLayer(i);
257  // if(iLayer == 0) continue;
258  // cellInfo * cell = partition(iLayer->idWire);
259  // cells.push_back(cell);
260  // vector<const TMax*> tMaxes = slSeg.getTMax(iLayer->idWire);
261  // cell->add(tMaxes);
262  // }
263  // //reset the counter to avoid triple counting
264  // for (vector<cellInfo*>::const_iterator i = cells.begin();
265  // i!= cells.end(); i++) {
266  // (*i)->update();
267  // }
268  // }
269  }
270  }
271  }
272 }
273 
275  theFile->cd();
276  gROOT->GetList()->Write();
277  h2DSegmRPhi->Write();
278  h2DSegmRZ->Write();
279  h4DSegmAllCh->Write();
280  hChi2->Write();
281  // Instantiate a DTCalibrationMap object if you want to calculate the calibration constants
282  DTCalibrationMap calibValuesFile(theCalibFilePar);
283  // Create the object to be written to DB
284  DTMtime* mTime = new DTMtime();
285 
286  // write the TMax histograms of each SL to the root file
287  if (theGranularity == bySL) {
288  for (map<DTWireId, cellInfo*>::const_iterator wireCell = theWireIdAndCellMap.begin();
289  wireCell != theWireIdAndCellMap.end();
290  ++wireCell) {
291  cellInfo* cell = theWireIdAndCellMap[(*wireCell).first];
292  hTMaxCell* cellHists = cell->getHists();
293  theFile->cd();
294  cellHists->Write();
295  if (findVDriftAndT0) { // if TRUE: evaluate calibration constants from TMax hists filled in this job
296  // evaluate v_drift and sigma from the TMax histograms
297  DTWireId wireId = (*wireCell).first;
298  vector<float> newConstants;
299  TString N = (((((TString) "TMax" + (long)wireId.wheel()) + (long)wireId.station()) + (long)wireId.sector()) +
300  (long)wireId.superLayer());
301  vector<float> vDriftAndReso = theFitter->evaluateVDriftAndReso(N);
302 
303  // Don't write the constants for the SL if the vdrift was not computed
304  if (vDriftAndReso.front() == -1)
305  continue;
306  const DTCalibrationMap::CalibConsts* oldConstants = calibValuesFile.getConsts(wireId);
307  if (oldConstants != nullptr) {
308  newConstants.push_back((*oldConstants)[0]);
309  newConstants.push_back((*oldConstants)[1]);
310  newConstants.push_back((*oldConstants)[2]);
311  } else {
312  newConstants.push_back(-1);
313  newConstants.push_back(-1);
314  newConstants.push_back(-1);
315  }
316  for (int ivd = 0; ivd <= 5; ivd++) {
317  // 0=vdrift, 1=reso, 2=(3deltat0-2deltat0), 3=(2deltat0-1deltat0),
318  // 4=(1deltat0-0deltat0), 5=deltat0 from hists with max entries,
319  newConstants.push_back(vDriftAndReso[ivd]);
320  }
321 
322  calibValuesFile.addCell(calibValuesFile.getKey(wireId), newConstants);
323 
324  // vdrift is cm/ns , resolution is cm
325  mTime->set((wireId.layerId()).superlayerId(), vDriftAndReso[0], vDriftAndReso[1], DTVelocityUnits::cm_per_ns);
326  LogTrace("Calibration") << " SL: " << (wireId.layerId()).superlayerId() << " vDrift = " << vDriftAndReso[0]
327  << " reso = " << vDriftAndReso[1];
328  }
329  }
330  }
331 
332  // to be implemented: granularity different from bySL
333 
334  // if(theGranularity == "byChamber") {
335  // const vector<DTChamber*> chambers = dMap.chambers();
336 
337  // // Loop over all chambers
338  // for(vector<MuBarChamber*>::const_iterator chamber = chambers.begin();
339  // chamber != chambers.end(); chamber ++) {
340  // MuBarChamberId chamber_id = (*chamber)->id();
341  // MuBarDigiParameters::Key wire_id(chamber_id, 0, 0, 0);
342  // vector<float> newConstants;
343  // vector<float> vDriftAndReso = evaluateVDriftAndReso(wire_id, f);
344  // const CalibConsts* oldConstants = digiParams.getConsts(wire_id);
345  // if(oldConstants !=0) {
346  // newConstants = *oldConstants;
347  // newConstants.push_back(vDriftAndReso[0]);
348  // newConstants.push_back(vDriftAndReso[1]);
349  // newConstants.push_back(vDriftAndReso[2]);
350  // newConstants.push_back(vDriftAndReso[3]);
351  // } else {
352  // newConstants.push_back(-1);
353  // newConstants.push_back(-1);
354  // newConstants.push_back(vDriftAndReso[0]);
355  // newConstants.push_back(vDriftAndReso[1]);
356  // newConstants.push_back(vDriftAndReso[2]);
357  // newConstants.push_back(vDriftAndReso[3]);
358  // }
359  // digiParams.addCell(wire_id, newConstants);
360  // }
361  // }
362 
363  // Write values to a table
364  calibValuesFile.writeConsts(theVDriftOutputFile);
365 
366  LogVerbatim("Calibration") << "[DTVDriftCalibration]Writing vdrift object to DB!";
367 
368  // Write the vdrift object to DB
369  string record = "DTMtimeRcd";
370  DTCalibDBUtils::writeToDB<DTMtime>(record, mTime);
371 }
372 
373 // to be implemented: granularity different from bySL
374 
375 // // Create partitions
376 // DTVDriftCalibration::cellInfo* DTVDriftCalibration::partition(const DTWireId& wireId) {
377 // for( map<MuBarWireId, cellInfo*>::const_iterator iter =
378 // mapCellTmaxPart.begin(); iter != mapCellTmaxPart.end(); iter++) {
379 // // Divide wires per SL (with phi symmetry)
380 // if(iter->first.wheel() == wireId.wheel() &&
381 // iter->first.station() == wireId.station() &&
382 // // iter->first.sector() == wireId.sector() && // phi symmetry!
383 // iter->first.superlayer() == wireId.superlayer()) {
384 // return iter->second;
385 // }
386 // }
387 // cellInfo * result = new cellInfo("dummy string"); // FIXME: change constructor; create tree?
388 // mapCellTmaxPart.insert(make_pair(wireId, result));
389 // return result;
390 //}
391 
392 void DTVDriftCalibration::cellInfo::add(const vector<const TMax*>& _tMaxes) {
393  vector<const TMax*> tMaxes = _tMaxes;
394  float tmax123 = -1.;
395  float tmax124 = -1.;
396  float tmax134 = -1.;
397  float tmax234 = -1.;
398  SigmaFactor s124 = noR;
399  SigmaFactor s134 = noR;
400  unsigned t0_123 = 0;
401  unsigned t0_124 = 0;
402  unsigned t0_134 = 0;
403  unsigned t0_234 = 0;
404  unsigned hSubGroup = 0;
405  for (vector<const TMax*>::const_iterator it = tMaxes.begin(); it != tMaxes.end(); ++it) {
406  if (*it == nullptr) {
407  continue;
408  } else {
409  //FIXME check cached,
410  if (addedCells.size() == 4 || find(addedCells.begin(), addedCells.end(), (*it)->cells) != addedCells.end()) {
411  continue;
412  }
413  addedCells.push_back((*it)->cells);
414  SigmaFactor sigma = (*it)->sigma;
415  float t = (*it)->t;
416  TMaxCells cells = (*it)->cells;
417  unsigned t0Factor = (*it)->t0Factor;
418  hSubGroup = (*it)->hSubGroup;
419  if (t < 0.)
420  continue;
421  switch (cells) {
422  case notInit:
423  cout << "Error: no cell type assigned to TMax" << endl;
424  break;
425  case c123:
426  tmax123 = t;
427  t0_123 = t0Factor;
428  break;
429  case c124:
430  tmax124 = t;
431  s124 = sigma;
432  t0_124 = t0Factor;
433  break;
434  case c134:
435  tmax134 = t;
436  s134 = sigma;
437  t0_134 = t0Factor;
438  break;
439  case c234:
440  tmax234 = t;
441  t0_234 = t0Factor;
442  break;
443  }
444  }
445  }
446  //add entries to the TMax histograms
447  histos->Fill(tmax123, tmax124, tmax134, tmax234, s124, s134, t0_123, t0_124, t0_134, t0_234, hSubGroup);
448 }
DTVDriftCalibration::theFile
TFile * theFile
Definition: DTVDriftCalibration.h:97
Vector3DBase< float, LocalTag >
DTSLRecSegment2D
Definition: DTSLRecSegment2D.h:15
DTSuperLayerId
Definition: DTSuperLayerId.h:12
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
dttmaxenums::c134
Definition: DTTMax.h:27
MessageLogger.h
DTMtime.h
hTMaxCell::Write
void Write()
Definition: vDriftHistos.h:463
ESHandle.h
simKBmtfDigis_cfi.chiSquare
chiSquare
Definition: simKBmtfDigis_cfi.py:21
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
DTVDriftCalibration::cellInfo::add
void add(const std::vector< const TMax * > &tMaxes)
Definition: DTVDriftCalibration.cc:392
DTTMax::getTMax
std::vector< const TMax * > getTMax(const DTWireId &idWire)
Definition: DTTMax.cc:303
hTMaxCell::Fill
void Fill(float tmax123, float tmax124, float tmax134, float tmax234, dttmaxenums::SigmaFactor s124, dttmaxenums::SigmaFactor s134, unsigned t0_123, unsigned t0_124, unsigned t0_134, unsigned t0_234, unsigned hSubGroup)
Definition: vDriftHistos.h:209
edm
HLT enums.
Definition: AlignableModifier.h:19
DTSLRecSegment2D::superLayerId
DTSuperLayerId superLayerId() const
The id of the superlayer on which reside the segment.
Definition: DTSLRecSegment2D.cc:24
PV3DBase::theta
Geom::Theta< T > theta() const
Definition: PV3DBase.h:72
gather_cfg.cout
cout
Definition: gather_cfg.py:144
DTChamber
Definition: DTChamber.h:24
dttmaxenums::noR
Definition: DTTMax.h:28
DTVDriftCalibration::analyze
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup) override
Definition: DTVDriftCalibration.cc:109
DTVDriftCalibration::findVDriftAndT0
bool findVDriftAndT0
Definition: DTVDriftCalibration.h:104
DTVDriftCalibration::histograms_
dtcalibration::Histograms histograms_
Definition: DTVDriftCalibration.h:54
GlobalPosition_Frontier_DevDB_cff.record
record
Definition: GlobalPosition_Frontier_DevDB_cff.py:10
cells
const caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple cms::cuda::AtomicPairCounter const GPUCACell *__restrict__ cells
Definition: CAHitNtupletGeneratorKernelsImpl.h:33
h4DSegm
Definition: vDriftHistos.h:11
h2DSegm::Write
void Write()
Definition: vDriftHistos.h:96
DTVDriftCalibration::theRecHits4DToken
edm::EDGetTokenT< DTRecSegment4DCollection > theRecHits4DToken
Definition: DTVDriftCalibration.h:88
DTStatusFlagRcd.h
DTMtime
Definition: DTMtime.h:68
DTSuperLayer
Definition: DTSuperLayer.h:24
DTSuperLayerId::superLayer
int superLayer() const
Return the superlayer number.
Definition: DTSuperLayerId.h:39
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
edm::Handle< DTRecSegment4DCollection >
edm::RangeMap::id_iterator
identifier iterator
Definition: RangeMap.h:130
DTMtime::set
int set(int wheelId, int stationId, int sectorId, int slId, float mTime, float mTrms, DTTimeUnits::type unit)
Definition: DTMtime.cc:168
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
dttmaxenums::TMaxCells
TMaxCells
Definition: DTTMax.h:27
h2DSegm
Definition: vDriftHistos.h:70
DTVDriftCalibration::theCalibChamber
std::string theCalibChamber
Definition: DTVDriftCalibration.h:131
DTGeometry::chamber
const DTChamber * chamber(const DTChamberId &id) const
Return a DTChamber given its id.
Definition: DTGeometry.cc:90
DTTMax
Definition: DTTMax.h:32
DTVDriftCalibration::theSync
std::unique_ptr< DTTTrigBaseSync > theSync
Definition: DTVDriftCalibration.h:116
DTVDriftCalibration::cellInfo::addedCells
std::vector< dttmaxenums::TMaxCells > addedCells
Definition: DTVDriftCalibration.h:69
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
DTVDriftCalibration::h2DSegmRZ
h2DSegm * h2DSegmRZ
Definition: DTVDriftCalibration.h:76
debug
#define debug
Definition: HDRShower.cc:19
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
interactiveExample.theFile
theFile
Definition: interactiveExample.py:17
DTCalibrationMap::CalibConsts
std::vector< float > CalibConsts
Definition: DTCalibrationMap.h:62
dttmaxenums::SigmaFactor
SigmaFactor
Definition: DTTMax.h:28
DTWireId
Definition: DTWireId.h:12
DTVDriftCalibration::h4DSegmAllCh
h4DSegm * h4DSegmAllCh
Definition: DTVDriftCalibration.h:78
edm::ESHandle< DTGeometry >
N
#define N
Definition: blowfish.cc:9
DTVDriftCalibration::cellInfo::getHists
hTMaxCell * getHists()
Definition: DTVDriftCalibration.h:65
Geom::pi
constexpr double pi()
Definition: Pi.h:31
DTCalibrationMap::getKey
Key getKey(DTWireId wireId) const
Definition: DTCalibrationMap.cc:64
Point3DBase< float, LocalTag >
dttmaxenums
Definition: DTTMax.h:26
DTVDriftCalibration::h2DSegmRPhi
h2DSegm * h2DSegmRPhi
Definition: DTVDriftCalibration.h:77
DTStatusFlag.h
dttmaxenums::c123
Definition: DTTMax.h:27
dttmaxenums::notInit
Definition: DTTMax.h:27
DTGeometry.h
DTVDriftCalibration::hChi2
TH1F * hChi2
Definition: DTVDriftCalibration.h:75
DTVDriftCalibration::cellInfo
Definition: DTVDriftCalibration.h:57
GeomDet::toGlobal
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
h2DSegm::Fill
void Fill(float pos, float localAngle)
Definition: vDriftHistos.h:91
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
DTVelocityUnits::cm_per_ns
Definition: DTVelocityUnits.h:32
edm::RangeMap::const_iterator
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:43
DTVDriftCalibration::cellInfo::histos
hTMaxCell * histos
Definition: DTVDriftCalibration.h:72
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
DTCalibrationMap::writeConsts
void writeConsts(const std::string &outputFileName) const
Definition: DTCalibrationMap.cc:169
DTRecSegment2D::localPosition
LocalPoint localPosition() const override
local position in SL frame
Definition: DTRecSegment2D.h:84
DTChamberRecSegment2D
Definition: DTChamberRecSegment2D.h:31
DTCalibDBUtils.h
DTVDriftCalibration::theGranularity
TMaxGranularity theGranularity
Definition: DTVDriftCalibration.h:85
DTTTrigBaseSync.h
hTMaxCell
Definition: vDriftHistos.h:111
edm::EventSetup
Definition: EventSetup.h:58
h4DSegm::Write
void Write()
Definition: vDriftHistos.h:51
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
get
#define get
DTCalibrationMap::getConsts
const CalibConsts * getConsts(DTWireId wireId) const
Definition: DTCalibrationMap.cc:77
dttmaxenums::c234
Definition: DTTMax.h:27
DTChamberId::sector
int sector() const
Definition: DTChamberId.h:49
DTVDriftCalibration::~DTVDriftCalibration
~DTVDriftCalibration() override
Destructor.
Definition: DTVDriftCalibration.cc:104
edm::RangeMap::range
std::pair< const_iterator, const_iterator > range
iterator range
Definition: RangeMap.h:50
std
Definition: JetResolutionObject.h:76
h4DSegm::Fill
void Fill(float x, float y, float phi, float theta, float impact)
Definition: vDriftHistos.h:40
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
Exception
Definition: hltDiff.cc:245
DTLayerId::superlayerId
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
Definition: DTLayerId.h:45
DTTTrigSyncFactory.h
DTVDriftCalibration.h
DTRecSegment2D::specificRecHits
std::vector< DTRecHit1D > specificRecHits() const
Access to specific components.
Definition: DTRecSegment2D.cc:104
relativeConstraints.chamber
chamber
Definition: relativeConstraints.py:53
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
DTCalibrationMap
Definition: DTCalibrationMap.h:37
CSCSkim_cfi.rootFileName
rootFileName
Definition: CSCSkim_cfi.py:9
DTVDriftCalibration::bySL
Definition: DTVDriftCalibration.h:84
DTVDriftCalibration::endJob
void endJob() override
Definition: DTVDriftCalibration.cc:274
DTWireId::layerId
DTLayerId layerId() const
Return the corresponding LayerId.
Definition: DTWireId.h:45
dttmaxenums::c124
Definition: DTTMax.h:27
DTRecSegment2D::localDirection
LocalVector localDirection() const override
the local direction in SL frame
Definition: DTRecSegment2D.h:90
DTCalibrationMap::addCell
void addCell(Key wireId, const CalibConsts &calibConst)
Definition: DTCalibrationMap.cc:160
genParticles_cff.map
map
Definition: genParticles_cff.py:11
DTChamberId
Definition: DTChamberId.h:14
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234
DTVDriftCalibration::cellInfo::update
void update()
Definition: DTVDriftCalibration.h:64
DTVDriftCalibration::theWireIdAndCellMap
std::map< DTWireId, cellInfo * > theWireIdAndCellMap
Definition: DTVDriftCalibration.h:110
MuonGeometryRecord.h
DTVDriftCalibration::theCalibFilePar
edm::ParameterSet theCalibFilePar
Definition: DTVDriftCalibration.h:119
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
DTVDriftCalibration::theFitter
std::unique_ptr< DTMeanTimerFitter > theFitter
Definition: DTVDriftCalibration.h:100
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
MuonGeometryRecord
Definition: MuonGeometryRecord.h:34
DTChamberId::wheel
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:39
edm::InputTag
Definition: InputTag.h:15
DTVDriftCalibration::DTVDriftCalibration
DTVDriftCalibration(const edm::ParameterSet &pset)
Constructor.
Definition: DTVDriftCalibration.cc:42
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
DTMeanTimerFitter.h
DTChamberId::station
int station() const
Return the station number.
Definition: DTChamberId.h:42
hit
Definition: SiStripHitEffFromCalibTree.cc:88
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
DTVDriftCalibration::select_
std::unique_ptr< DTSegmentSelector > select_
Definition: DTVDriftCalibration.h:49
DTVDriftCalibration::theVDriftOutputFile
std::string theVDriftOutputFile
Definition: DTVDriftCalibration.h:107