CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
dtCalibration::DTVDriftMeanTimer Class Reference

#include <DTVDriftMeanTimer.h>

Inheritance diagram for dtCalibration::DTVDriftMeanTimer:
dtCalibration::DTVDriftBaseAlgo

Public Member Functions

DTVDriftData compute (const DTSuperLayerId &) override
 
 DTVDriftMeanTimer (edm::ParameterSet const &)
 
void setES (const edm::EventSetup &setup) override
 
 ~DTVDriftMeanTimer () override
 
- Public Member Functions inherited from dtCalibration::DTVDriftBaseAlgo
 DTVDriftBaseAlgo ()
 
virtual ~DTVDriftBaseAlgo ()
 

Private Attributes

DTMeanTimerFitterfitter_
 
TFile * rootFile_
 

Detailed Description

Definition at line 19 of file DTVDriftMeanTimer.h.

Constructor & Destructor Documentation

DTVDriftMeanTimer::DTVDriftMeanTimer ( edm::ParameterSet const &  )

Definition at line 32 of file DTVDriftMeanTimer.cc.

References debug, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), and CSCSkim_cfi::rootFileName.

32  {
33  string rootFileName = pset.getParameter<string>("rootFileName");
34  rootFile_ = new TFile(rootFileName.c_str(), "READ");
35  fitter_ = new DTMeanTimerFitter(rootFile_);
36  bool debug = pset.getUntrackedParameter<bool>("debug", false);
37  if (debug)
38  fitter_->setVerbosity(1);
39  }
#define debug
Definition: HDRShower.cc:19
DTVDriftMeanTimer::~DTVDriftMeanTimer ( )
override

Definition at line 41 of file DTVDriftMeanTimer.cc.

41  {
42  rootFile_->Close();
43  delete fitter_;
44  }

Member Function Documentation

DTVDriftData DTVDriftMeanTimer::compute ( const DTSuperLayerId )
overridevirtual

Implements dtCalibration::DTVDriftBaseAlgo.

Definition at line 48 of file DTVDriftMeanTimer.cc.

References N, DTChamberId::sector(), DTChamberId::station(), DTSuperLayerId::superLayer(), and DTChamberId::wheel().

48  {
49  // Evaluate v_drift and sigma from the TMax histograms
50  DTWireId wireId(slId, 0, 0);
51  TString N = (((((TString) "TMax" + (long)wireId.wheel()) + (long)wireId.station()) + (long)wireId.sector()) +
52  (long)wireId.superLayer());
53  vector<float> vDriftAndReso = fitter_->evaluateVDriftAndReso(N);
54 
55  // Don't write the constants for the SL if the vdrift was not computed
56  if (vDriftAndReso.front() == -1)
57  throw cms::Exception("DTCalibration") << "Could not compute valid vDrift value for SL " << slId << endl;
58 
59  return DTVDriftData(vDriftAndReso[0], vDriftAndReso[1]);
60  }
#define N
Definition: blowfish.cc:9
std::vector< float > evaluateVDriftAndReso(const TString &N)
Fit the TMax histos and evaluate VDrift and resolution.
void DTVDriftMeanTimer::setES ( const edm::EventSetup setup)
overridevirtual

Implements dtCalibration::DTVDriftBaseAlgo.

Definition at line 46 of file DTVDriftMeanTimer.cc.

46 {}

Member Data Documentation

DTMeanTimerFitter* dtCalibration::DTVDriftMeanTimer::fitter_
private

Definition at line 29 of file DTVDriftMeanTimer.h.

TFile* dtCalibration::DTVDriftMeanTimer::rootFile_
private

Definition at line 28 of file DTVDriftMeanTimer.h.