Revision: | 1.1 |
Committed: | Fri Aug 10 09:07:21 2012 UTC (12 years, 8 months ago) by flucke |
Content type: | text/plain |
Branch: | MAIN |
CVS Tags: | CMSSW_6_2_0, CMSSW_6_2_0_pre7_TS133806, CMSSW_6_1_2_SLHC6_patch1, CMSSW_6_2_0_pre8, CMSSW_6_1_2_SLHC6, V04-00-14, V04-00-13, CMSSW_6_1_2_SLHC5, CMSSW_6_2_0_pre7_TS132947, CMSSW_6_2_0_pre7_g496p02, V04-00-09-53X-calib-V01, CMSSW_6_2_0_pre7, V04-00-12, br53-00-09, br53-00-08, br53-00-07, br53-00-06, br53-00-05, CMSSW_6_1_2_SLHC4_patch1, CMSSW_6_1_2_SLHC4, CMSSW_6_1_2_SLHC2_patch3, CMSSW_6_2_0_pre6_patch1, CMSSW_6_1_2_SLHC2_patch2, CMSSW_6_2_0_pre6, CMSSW_6_1_2_SLHC3, CMSSW_6_1_2_SLHC2_patch1, CMSSW_6_1_2_SLHC2, CMSSW_6_2_0_pre5slc6, br53-00-04, br53-00-03, br53-00-02, CMSSW_6_1_2_SLHC1, CMSSW_6_2_0_pre5, CMSSW_6_1_X_2012-12-19-0200, CMSSW_6_1_2, CMSSW_6_2_0_pre4, CMSSW_6_2_0_pre3, CMSSW_6_1_1_SLHCphase2tk1, CMSSW_6_1_1_SLHCphase1tk1, br53-00-01, CMSSW_6_2_0_pre2, CMSSW_6_1_1, CMSSW_6_2_0_pre1, V04-00-11, CMSSW_6_1_0, CMSSW_6_1_0_pre8, V04-00-10, CMSSW_6_1_0_pre7_TS127013, CMSSW_6_1_0_pre7, V04-00-09, V04-00-08, V04-00-07, V04-00-06, V04-00-05, V04-00-04, V04-00-03, V04-00-02, V04-00-01, V04-00-00, HEAD |
Branch point for: | branch53X_calibration |
Log Message: | Add feature of IntegratedCalibration's, i.e. classes that allow to determine calibration parameters in one go with alignment. So far only supported by Millepede II. |
# | User | Rev | Content |
---|---|---|---|
1 | flucke | 1.1 | /** |
2 | * \file IntegratedCalibrationBase.cc | ||
3 | * | ||
4 | * \author Gero Flucke | ||
5 | * \date August 2012 | ||
6 | * $Revision: 1.77 $ | ||
7 | * $Date: 2011/09/06 13:46:08 $ | ||
8 | * (last update by $Author: mussgill $) | ||
9 | */ | ||
10 | |||
11 | #include "Alignment/CommonAlignmentAlgorithm/interface/IntegratedCalibrationBase.h" | ||
12 | #include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
13 | |||
14 | // Already included in header: | ||
15 | //#include <vector> | ||
16 | //#include <utility> | ||
17 | |||
18 | //============================================================================ | ||
19 | IntegratedCalibrationBase::IntegratedCalibrationBase(const edm::ParameterSet &cfg) | ||
20 | : name_(cfg.getParameter<std::string>("calibrationName")) | ||
21 | { | ||
22 | } | ||
23 | |||
24 | //============================================================================ | ||
25 | std::vector<IntegratedCalibrationBase::Values> | ||
26 | IntegratedCalibrationBase::derivatives(const TransientTrackingRecHit &hit, | ||
27 | const TrajectoryStateOnSurface &tsos, | ||
28 | const edm::EventSetup &setup, | ||
29 | const EventInfo &eventInfo) const | ||
30 | { | ||
31 | // Prepare result vector, initialised all with 0.: | ||
32 | std::vector<Values> result(this->numParameters(), Values(0.,0.)); | ||
33 | |||
34 | // Get non-zero derivatives and their index: | ||
35 | std::vector<ValuesIndexPair> derivsIndexPairs; | ||
36 | const unsigned int numNonZero = this->derivatives(derivsIndexPairs, | ||
37 | hit, tsos, setup, | ||
38 | eventInfo); | ||
39 | |||
40 | // Put non-zero values into result: | ||
41 | for (unsigned int i = 0; i < numNonZero; ++i) { | ||
42 | const ValuesIndexPair &valuesIndex = derivsIndexPairs[i]; | ||
43 | result[valuesIndex.second] = valuesIndex.first; | ||
44 | } | ||
45 | |||
46 | return result; | ||
47 | } |