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 &, edm::ConsumesCollector)
 
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 20 of file DTVDriftMeanTimer.h.

Constructor & Destructor Documentation

◆ DTVDriftMeanTimer()

DTVDriftMeanTimer::DTVDriftMeanTimer ( edm::ParameterSet const &  pset,
edm::ConsumesCollector  cc 
)

Definition at line 32 of file DTVDriftMeanTimer.cc.

References debug, muonDTDigis_cfi::pset, and dtNoiseCalibration_cfi::rootFileName.

32  {
33  string rootFileName = pset.getParameter<string>("rootFileName");
34  rootFile_ = new TFile(rootFileName.c_str(), "READ");
36  bool debug = pset.getUntrackedParameter<bool>("debug", false);
37  if (debug)
39  }
void setVerbosity(unsigned int lvl)
Set the verbosity of the output: 0 = silent, 1 = info, 2 = debug.
#define debug
Definition: HDRShower.cc:19

◆ ~DTVDriftMeanTimer()

DTVDriftMeanTimer::~DTVDriftMeanTimer ( )
override

Definition at line 41 of file DTVDriftMeanTimer.cc.

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

Member Function Documentation

◆ compute()

DTVDriftData DTVDriftMeanTimer::compute ( const DTSuperLayerId slId)
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.

◆ setES()

void DTVDriftMeanTimer::setES ( const edm::EventSetup setup)
overridevirtual

Implements dtCalibration::DTVDriftBaseAlgo.

Definition at line 46 of file DTVDriftMeanTimer.cc.

46 {}

Member Data Documentation

◆ fitter_

DTMeanTimerFitter* dtCalibration::DTVDriftMeanTimer::fitter_
private

Definition at line 30 of file DTVDriftMeanTimer.h.

◆ rootFile_

TFile* dtCalibration::DTVDriftMeanTimer::rootFile_
private

Definition at line 29 of file DTVDriftMeanTimer.h.