CMS 3D CMS Logo

IntegratedCalibrationBase.cc
Go to the documentation of this file.
1 
13 
14 // Already included in header:
15 //#include <vector>
16 //#include <utility>
17 
18 //============================================================================
20  : name_(cfg.getParameter<std::string>("calibrationName")) {}
21 
22 //============================================================================
23 std::vector<IntegratedCalibrationBase::Values> IntegratedCalibrationBase::derivatives(
24  const TrackingRecHit &hit,
25  const TrajectoryStateOnSurface &tsos,
26  const edm::EventSetup &setup,
27  const EventInfo &eventInfo) const {
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 }
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
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
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
edm::ParameterSet
Definition: ParameterSet.h:36
edm::EventSetup
Definition: EventSetup.h:57
looper.cfg
cfg
Definition: looper.py:297
TrackingRecHit
Definition: TrackingRecHit.h:21
std
Definition: JetResolutionObject.h:76
IntegratedCalibrationBase::IntegratedCalibrationBase
IntegratedCalibrationBase(const edm::ParameterSet &cfg)
Values and their parameter index.
Definition: IntegratedCalibrationBase.cc:19
IntegratedCalibrationBase.h
mps_fire.result
result
Definition: mps_fire.py:303
ParameterSet.h
hit
Definition: SiStripHitEffFromCalibTree.cc:88
AlignmentAlgorithmBase::EventInfo
define event information passed to algorithms
Definition: AlignmentAlgorithmBase.h:72