CMS 3D CMS Logo

IntegratedCalibrationBase.cc
Go to the documentation of this file.
1 
14 
15 // Already included in header:
16 //#include <vector>
17 //#include <utility>
18 
19 //============================================================================
21  : name_(cfg.getParameter<std::string>("calibrationName")) {}
22 
23 //============================================================================
24 std::vector<IntegratedCalibrationBase::Values> IntegratedCalibrationBase::derivatives(
25  const TrackingRecHit &hit,
26  const TrajectoryStateOnSurface &tsos,
27  const edm::EventSetup &setup,
28  const EventInfo &eventInfo) const {
29  // Prepare result vector, initialised all with 0.:
30  std::vector<Values> result(this->numParameters(), Values(0., 0.));
31 
32  // Get non-zero derivatives and their index:
33  std::vector<ValuesIndexPair> derivsIndexPairs;
34  const unsigned int numNonZero = this->derivatives(derivsIndexPairs, hit, tsos, setup, eventInfo);
35 
36  // Put non-zero values into result:
37  for (unsigned int i = 0; i < numNonZero; ++i) {
38  const ValuesIndexPair &valuesIndex = derivsIndexPairs[i];
39  result[valuesIndex.second] = valuesIndex.first;
40  }
41 
42  return result;
43 }
mps_fire.i
i
Definition: mps_fire.py:428
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:24
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
TrackingRecHit.h
IntegratedCalibrationBase::Values
std::pair< double, double > Values
Definition: IntegratedCalibrationBase.h:43
edm::ParameterSet
Definition: ParameterSet.h:47
edm::EventSetup
Definition: EventSetup.h:58
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
looper.cfg
cfg
Definition: looper.py:296
TrackingRecHit
Definition: TrackingRecHit.h:21
dumpTauVariables_cfi.eventInfo
eventInfo
add run, event number and lumi section
Definition: dumpTauVariables_cfi.py:12
std
Definition: JetResolutionObject.h:76
IntegratedCalibrationBase::IntegratedCalibrationBase
IntegratedCalibrationBase(const edm::ParameterSet &cfg)
Values and their parameter index.
Definition: IntegratedCalibrationBase.cc:20
IntegratedCalibrationBase.h
mps_fire.result
result
Definition: mps_fire.py:311
ParameterSet.h
hit
Definition: SiStripHitEffFromCalibTree.cc:88
AlignmentAlgorithmBase::EventInfo
define event information passed to algorithms
Definition: AlignmentAlgorithmBase.h:73