CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

IntegratedCalibrationBase Class Reference

#include <IntegratedCalibrationBase.h>

Inheritance diagram for IntegratedCalibrationBase:
SiPixelLorentzAngleCalibration SiStripLorentzAngleCalibration

List of all members.

Public Types

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

Public Member Functions

virtual void beginOfJob (const AlignableTracker *tracker, const AlignableMuon *muon, const AlignableExtras *extras)
virtual std::vector< Valuesderivatives (const TransientTrackingRecHit &hit, const TrajectoryStateOnSurface &tsos, const edm::EventSetup &setup, const EventInfo &eventInfo) const
virtual unsigned int derivatives (std::vector< ValuesIndexPair > &outDerivInds, const TransientTrackingRecHit &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.
const std::string & name () const
 name of this calibration
virtual unsigned int numParameters () const =0
 How many parameters does this calibration define?
virtual bool setParameter (unsigned int index, double value)=0
virtual bool setParameterError (unsigned int index, double value)=0
virtual void startNewLoop ()
virtual ~IntegratedCalibrationBase ()
 Destructor.

Private Attributes

const std::string name_

Detailed Description

Definition at line 38 of file IntegratedCalibrationBase.h.


Member Typedef Documentation

Definition at line 42 of file IntegratedCalibrationBase.h.

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

Definition at line 43 of file IntegratedCalibrationBase.h.

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 ( const edm::ParameterSet cfg) [explicit]

Values and their parameter index.

Constructor

Definition at line 19 of file IntegratedCalibrationBase.cc.

  : name_(cfg.getParameter<std::string>("calibrationName"))
{
}
virtual IntegratedCalibrationBase::~IntegratedCalibrationBase ( ) [inline, virtual]

Destructor.

Definition at line 50 of file IntegratedCalibrationBase.h.

{};

Member Function Documentation

virtual void IntegratedCalibrationBase::beginOfJob ( const AlignableTracker tracker,
const AlignableMuon muon,
const AlignableExtras extras 
) [inline, virtual]

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

Definition at line 91 of file IntegratedCalibrationBase.h.

                                                         {};
std::vector< IntegratedCalibrationBase::Values > IntegratedCalibrationBase::derivatives ( const TransientTrackingRecHit 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 26 of file IntegratedCalibrationBase.cc.

References i, numParameters(), and query::result.

{
  // Prepare result vector, initialised all with 0.:
  std::vector<Values> result(this->numParameters(), Values(0.,0.));

  // Get non-zero derivatives and their index:
  std::vector<ValuesIndexPair> derivsIndexPairs;
  const unsigned int numNonZero = this->derivatives(derivsIndexPairs,
                                                    hit, tsos, setup,
                                                    eventInfo);

  // Put non-zero values into result:
  for (unsigned int i = 0; i < numNonZero; ++i) {
    const ValuesIndexPair &valuesIndex = derivsIndexPairs[i];
    result[valuesIndex.second] = valuesIndex.first;
  }

  return result;
}
virtual unsigned int IntegratedCalibrationBase::derivatives ( std::vector< ValuesIndexPair > &  outDerivInds,
const TransientTrackingRecHit 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.

Implemented in SiPixelLorentzAngleCalibration, and SiStripLorentzAngleCalibration.

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 SiPixelLorentzAngleCalibration, and SiStripLorentzAngleCalibration.

virtual void IntegratedCalibrationBase::endOfLoop ( ) [inline, virtual]

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 103 of file IntegratedCalibrationBase.h.

{};
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 SiPixelLorentzAngleCalibration, and SiStripLorentzAngleCalibration.

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 SiPixelLorentzAngleCalibration, and SiStripLorentzAngleCalibration.

const std::string& IntegratedCalibrationBase::name ( ) const [inline]
virtual unsigned int IntegratedCalibrationBase::numParameters ( ) const [pure virtual]

How many parameters does this calibration define?

Implemented in SiPixelLorentzAngleCalibration, and SiStripLorentzAngleCalibration.

Referenced by derivatives().

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

Setting the determined parameter identified by index, should return false if out-of-bounds, true otherwise.

Implemented in SiPixelLorentzAngleCalibration, and SiStripLorentzAngleCalibration.

Referenced by PedeReader::setCalibrationParameter().

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 SiPixelLorentzAngleCalibration, and SiStripLorentzAngleCalibration.

Referenced by PedeReader::setCalibrationParameter().

virtual void IntegratedCalibrationBase::startNewLoop ( void  ) [inline, virtual]

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 98 of file IntegratedCalibrationBase.h.

{};

Member Data Documentation

const std::string IntegratedCalibrationBase::name_ [private]

Definition at line 127 of file IntegratedCalibrationBase.h.

Referenced by name().