CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
IntegratedCalibrationBase Class Referenceabstract

#include <IntegratedCalibrationBase.h>

Inheritance diagram for IntegratedCalibrationBase:
SiPixelLorentzAngleCalibration SiStripBackplaneCalibration SiStripLorentzAngleCalibration

Public Types

typedef AlignmentAlgorithmBase::EventInfo EventInfo
 
typedef std::pair< double, double > Values
 
typedef std::pair< Values, unsigned int > ValuesIndexPair
 x- and y-values More...
 

Public Member Functions

virtual void beginOfJob (AlignableTracker *tracker, AlignableMuon *muon, AlignableExtras *extras)
 
virtual void beginRun (const edm::Run &, const edm::EventSetup &)
 
virtual std::vector< Valuesderivatives (const TrackingRecHit &hit, const TrajectoryStateOnSurface &tsos, const edm::EventSetup &setup, const EventInfo &eventInfo) const
 
virtual unsigned int derivatives (std::vector< ValuesIndexPair > &outDerivInds, const TrackingRecHit &hit, const TrajectoryStateOnSurface &tsos, const edm::EventSetup &setup, const EventInfo &eventInfo) const =0
 
virtual void endOfJob ()=0
 
virtual void endOfLoop ()
 
virtual double getParameter (unsigned int index) const =0
 
virtual double getParameterError (unsigned int index) const =0
 
 IntegratedCalibrationBase (const edm::ParameterSet &cfg)
 Values and their parameter index. More...
 
const std::string & name () const
 name of this calibration More...
 
virtual unsigned int numParameters () const =0
 How many parameters does this calibration define? More...
 
virtual bool setParameter (unsigned int index, double value)=0
 
virtual bool setParameterError (unsigned int index, double value)=0
 
virtual void startNewLoop ()
 
virtual ~IntegratedCalibrationBase ()
 Destructor. More...
 

Private Attributes

const std::string name_
 

Detailed Description

Definition at line 40 of file IntegratedCalibrationBase.h.

Member Typedef Documentation

◆ EventInfo

Definition at line 42 of file IntegratedCalibrationBase.h.

◆ Values

typedef std::pair<double, double> IntegratedCalibrationBase::Values

Definition at line 43 of file IntegratedCalibrationBase.h.

◆ ValuesIndexPair

typedef std::pair<Values, unsigned int> IntegratedCalibrationBase::ValuesIndexPair

x- and y-values

Definition at line 44 of file IntegratedCalibrationBase.h.

Constructor & Destructor Documentation

◆ IntegratedCalibrationBase()

IntegratedCalibrationBase::IntegratedCalibrationBase ( const edm::ParameterSet cfg)
explicit

Values and their parameter index.

Constructor

Definition at line 19 of file IntegratedCalibrationBase.cc.

20  : name_(cfg.getParameter<std::string>("calibrationName")) {}

◆ ~IntegratedCalibrationBase()

virtual IntegratedCalibrationBase::~IntegratedCalibrationBase ( )
inlinevirtual

Destructor.

Definition at line 50 of file IntegratedCalibrationBase.h.

50 {};

Member Function Documentation

◆ beginOfJob()

virtual void IntegratedCalibrationBase::beginOfJob ( AlignableTracker tracker,
AlignableMuon muon,
AlignableExtras extras 
)
inlinevirtual

Call at beginning of job: default implementation is dummy, to be overwritten in derived class if useful.

Reimplemented in SiStripBackplaneCalibration, SiPixelLorentzAngleCalibration, and SiStripLorentzAngleCalibration.

Definition at line 91 of file IntegratedCalibrationBase.h.

91 {};

◆ beginRun()

virtual void IntegratedCalibrationBase::beginRun ( const edm::Run ,
const edm::EventSetup  
)
inlinevirtual

Call at beginning of run: default implementation is dummy, to be overwritten in derived class if useful.

Reimplemented in SiPixelLorentzAngleCalibration, and SiStripLorentzAngleCalibration.

Definition at line 95 of file IntegratedCalibrationBase.h.

95 {};

◆ derivatives() [1/2]

std::vector< IntegratedCalibrationBase::Values > IntegratedCalibrationBase::derivatives ( const TrackingRecHit hit,
const TrajectoryStateOnSurface tsos,
const edm::EventSetup setup,
const EventInfo eventInfo 
) const
virtual

Return all derivatives for x- (Values.first) and y-measurement (Values.second), default implementation uses other derivatives(..) method, but can be overwritten in derived class for efficiency.

Definition at line 23 of file IntegratedCalibrationBase.cc.

27  {
28  // Prepare result vector, initialised all with 0.:
29  std::vector<Values> result(this->numParameters(), Values(0., 0.));
30 
31  // Get non-zero derivatives and their index:
32  std::vector<ValuesIndexPair> derivsIndexPairs;
33  const unsigned int numNonZero = this->derivatives(derivsIndexPairs, hit, tsos, setup, eventInfo);
34 
35  // Put non-zero values into result:
36  for (unsigned int i = 0; i < numNonZero; ++i) {
37  const ValuesIndexPair &valuesIndex = derivsIndexPairs[i];
38  result[valuesIndex.second] = valuesIndex.first;
39  }
40 
41  return result;
42 }

References ZMuMuAnalysisNtupler_cff::eventInfo, mps_fire::i, numParameters(), mps_fire::result, and singleTopDQM_cfi::setup.

◆ derivatives() [2/2]

virtual unsigned int IntegratedCalibrationBase::derivatives ( std::vector< ValuesIndexPair > &  outDerivInds,
const TrackingRecHit hit,
const TrajectoryStateOnSurface tsos,
const edm::EventSetup setup,
const EventInfo eventInfo 
) const
pure virtual

Return non-zero derivatives for x- (ValuesIndexPair.first.first) and y-measurement (ValuesIndexPair.first.second) with their indices (ValuesIndexPair.second) by reference. Return value is their number.

◆ endOfJob()

virtual void IntegratedCalibrationBase::endOfJob ( )
pure virtual

Called at end of a the job of the AlignmentProducer. Do here the necessary stuff with the results that should have been passed by the algorithm to the calibration, e.g. write out to database. FIXME: How to deal with single jobs for an iterative algorithm?

Implemented in SiStripBackplaneCalibration, SiPixelLorentzAngleCalibration, and SiStripLorentzAngleCalibration.

◆ endOfLoop()

virtual void IntegratedCalibrationBase::endOfLoop ( )
inlinevirtual

Called at end of a loop of the AlignmentProducer, to be used for iterative algorithms, default does nothing. FIXME: move call to algorithm?

Definition at line 105 of file IntegratedCalibrationBase.h.

105 {};

◆ getParameter()

virtual double IntegratedCalibrationBase::getParameter ( unsigned int  index) const
pure virtual

Return current value of parameter identified by index. Should return 0. if index out-of-bounds.

Implemented in SiStripBackplaneCalibration, SiPixelLorentzAngleCalibration, and SiStripLorentzAngleCalibration.

Referenced by Mixins._Parameterizable::hasParameter().

◆ getParameterError()

virtual double IntegratedCalibrationBase::getParameterError ( unsigned int  index) const
pure virtual

Return current value of parameter identified by index. Should return 0. if index out-of-bounds or if errors not treated/undetermined.

Implemented in SiStripBackplaneCalibration, SiPixelLorentzAngleCalibration, and SiStripLorentzAngleCalibration.

◆ name()

const std::string& IntegratedCalibrationBase::name ( ) const
inline

◆ numParameters()

virtual unsigned int IntegratedCalibrationBase::numParameters ( ) const
pure virtual

How many parameters does this calibration define?

Implemented in SiPixelLorentzAngleCalibration, SiStripBackplaneCalibration, and SiStripLorentzAngleCalibration.

Referenced by derivatives().

◆ setParameter()

virtual bool IntegratedCalibrationBase::setParameter ( unsigned int  index,
double  value 
)
pure virtual

◆ setParameterError()

virtual bool IntegratedCalibrationBase::setParameterError ( unsigned int  index,
double  value 
)
pure virtual

Setting the determined parameter uncertainty identified by index, should return false if out-of-bounds or errors not treated, true otherwise.

Implemented in SiStripBackplaneCalibration, SiPixelLorentzAngleCalibration, and SiStripLorentzAngleCalibration.

◆ startNewLoop()

virtual void IntegratedCalibrationBase::startNewLoop ( void  )
inlinevirtual

Called at beginning of a loop of the AlignmentProducer, to be used for iterative algorithms, default does nothing. FIXME: move call to algorithm?

Definition at line 100 of file IntegratedCalibrationBase.h.

100 {};

Member Data Documentation

◆ name_

const std::string IntegratedCalibrationBase::name_
private

Definition at line 129 of file IntegratedCalibrationBase.h.

Referenced by name().

mps_fire.i
i
Definition: mps_fire.py:355
IntegratedCalibrationBase::ValuesIndexPair
std::pair< Values, unsigned int > ValuesIndexPair
x- and y-values
Definition: IntegratedCalibrationBase.h:44
IntegratedCalibrationBase::derivatives
virtual std::vector< Values > derivatives(const TrackingRecHit &hit, const TrajectoryStateOnSurface &tsos, const edm::EventSetup &setup, const EventInfo &eventInfo) const
Definition: IntegratedCalibrationBase.cc:23
IntegratedCalibrationBase::numParameters
virtual unsigned int numParameters() const =0
How many parameters does this calibration define?
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
IntegratedCalibrationBase::Values
std::pair< double, double > Values
Definition: IntegratedCalibrationBase.h:43
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ZMuMuAnalysisNtupler_cff.eventInfo
eventInfo
Definition: ZMuMuAnalysisNtupler_cff.py:15
IntegratedCalibrationBase::name_
const std::string name_
Definition: IntegratedCalibrationBase.h:129
looper.cfg
cfg
Definition: looper.py:297
mps_fire.result
result
Definition: mps_fire.py:303
hit
Definition: SiStripHitEffFromCalibTree.cc:88