#include <DTVDriftMeanTimer.h>
Public Member Functions | |
virtual DTVDriftData | compute (const DTSuperLayerId &) |
DTVDriftMeanTimer (edm::ParameterSet const &) | |
virtual void | setES (const edm::EventSetup &setup) |
virtual | ~DTVDriftMeanTimer () |
Private Attributes | |
DTMeanTimerFitter * | fitter_ |
TFile * | rootFile_ |
Concrete implementation of a DTVDriftBaseAlgo. Computes vDrift using the Mean Timer algorithm.
Definition at line 18 of file DTVDriftMeanTimer.h.
DTVDriftMeanTimer::DTVDriftMeanTimer | ( | edm::ParameterSet const & | pset | ) |
Definition at line 32 of file DTVDriftMeanTimer.cc.
References debug, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), and dtTPAnalyzer_cfg::rootFileName.
{ string rootFileName = pset.getParameter<string>("rootFileName"); rootFile_ = new TFile(rootFileName.c_str(), "READ"); fitter_ = new DTMeanTimerFitter(rootFile_); bool debug = pset.getUntrackedParameter<bool>("debug", false); if(debug) fitter_->setVerbosity(1); }
DTVDriftMeanTimer::~DTVDriftMeanTimer | ( | ) | [virtual] |
Definition at line 40 of file DTVDriftMeanTimer.cc.
DTVDriftData DTVDriftMeanTimer::compute | ( | const DTSuperLayerId & | slId | ) | [virtual] |
Implements DTVDriftBaseAlgo.
Definition at line 47 of file DTVDriftMeanTimer.cc.
References N, DTChamberId::sector(), DTChamberId::station(), DTSuperLayerId::superLayer(), and DTChamberId::wheel().
{ // Evaluate v_drift and sigma from the TMax histograms DTWireId wireId(slId, 0, 0); TString N = ( ( ( ( (TString)"TMax" + (long)wireId.wheel() ) + (long)wireId.station() ) + (long)wireId.sector() ) + (long)wireId.superLayer() ); vector<float> vDriftAndReso = fitter_->evaluateVDriftAndReso(N); // Don't write the constants for the SL if the vdrift was not computed if(vDriftAndReso.front() == -1) throw cms::Exception("DTCalibration") << "Could not compute valid vDrift value for SL " << slId << endl; return DTVDriftData(vDriftAndReso[0],vDriftAndReso[1]); }
void DTVDriftMeanTimer::setES | ( | const edm::EventSetup & | setup | ) | [virtual] |
DTMeanTimerFitter* DTVDriftMeanTimer::fitter_ [private] |
Definition at line 27 of file DTVDriftMeanTimer.h.
TFile* DTVDriftMeanTimer::rootFile_ [private] |
Definition at line 26 of file DTVDriftMeanTimer.h.