CMS 3D CMS Logo

PedeLabelerBase.h
Go to the documentation of this file.
1 #ifndef Alignment_MillePedeAlignmentAlgorithm_PedeLabelerBase_h
2 #define Alignment_MillePedeAlignmentAlgorithm_PedeLabelerBase_h
3 
16 
21 
23 
24 #include <vector>
25 
26 class Alignable;
27 class AlignableTracker;
28 class AlignableMuon;
29 class AlignableExtras;
31 
32 /***************************************
33 ****************************************/
35 public:
39 
41  public:
43  : aliTracker_(aliTracker), aliMuon_(aliMuon), aliExtras_(extras) {}
47  };
48 
51  virtual ~PedeLabelerBase() {}
53  virtual void addCalibrations(const std::vector<IntegratedCalibrationBase *> &iCals);
54 
58  virtual unsigned int alignableLabel(const Alignable *alignable) const = 0;
63  virtual unsigned int alignableLabelFromParamAndInstance(const Alignable *alignable,
64  unsigned int param,
65  unsigned int instance) const = 0;
66  virtual unsigned int lasBeamLabel(unsigned int lasBeamId) const = 0;
68  virtual unsigned int parameterLabel(unsigned int aliLabel, unsigned int parNum) const = 0;
71  virtual unsigned int parameterLabel(Alignable *alignable,
72  unsigned int parNum,
74  const TrajectoryStateOnSurface &tsos) const = 0;
76  virtual bool hasSplitParameters(Alignable *alignable) const = 0;
78  virtual unsigned int numberOfParameterInstances(Alignable *alignable, int param = -1) const = 0;
80  virtual unsigned int maxNumberOfParameterInstances() const = 0;
82  unsigned int parameterInstanceOffset() const { return theParamInstanceOffset; }
83 
85  virtual unsigned int paramNumFromLabel(unsigned int paramLabel) const = 0;
87  virtual unsigned int alignableLabelFromLabel(unsigned int label) const = 0;
90  virtual Alignable *alignableFromLabel(unsigned int label) const = 0;
93  virtual unsigned int lasBeamIdFromLabel(unsigned int label) const = 0;
96  virtual std::pair<IntegratedCalibrationBase *, unsigned int> calibrationParamFromLabel(unsigned int label) const;
97 
98  virtual const RunRange &runRangeFromLabel(unsigned int label) const { return theOpenRunRange; }
101  virtual unsigned int firstFreeLabel() const;
102 
104  virtual unsigned int calibrationLabel(const IntegratedCalibrationBase *calib, unsigned int paramNum) const;
108 
109  static const unsigned int theMaxNumParam;
110  static const unsigned int theParamInstanceOffset;
111  static const unsigned int theMinLabel;
112 
113 protected:
116  virtual unsigned int firstNonAlignableLabel() const;
117 
120 
122 
123 private:
126 
128  std::vector<std::pair<IntegratedCalibrationBase *, unsigned int> > theCalibrationLabels;
129 };
130 
132  using is_transparent = void; // needs to be defined, actual type is not relevant
133  bool operator()(Alignable *a, Alignable *b) const { return a < b; }
134  bool operator()(Alignable *a, const Alignable *b) const { return a < b; }
135  bool operator()(const Alignable *a, Alignable *b) const { return a < b; }
136 };
137 
138 #endif
virtual Alignable * alignableFromLabel(unsigned int label) const =0
virtual std::pair< IntegratedCalibrationBase *, unsigned int > calibrationParamFromLabel(unsigned int label) const
const AlignableExtras * alignableExtras() const
const TopLevelAlignables topLevelAlignables_
virtual unsigned int alignableLabelFromLabel(unsigned int label) const =0
alignable label from parameter label (works also for alignable label...)
static PFTauRenderPlugin instance
std::vector< RunRange > RunRanges
Definition: Utilities.h:39
virtual unsigned int firstNonAlignableLabel() const
virtual ~PedeLabelerBase()
bool operator()(Alignable *a, const Alignable *b) const
static const unsigned int theMinLabel
virtual unsigned int paramNumFromLabel(unsigned int paramLabel) const =0
parameter number, 0 <= .. < theMaxNumParam, belonging to unique parameter label
Definition: config.py:1
virtual unsigned int lasBeamLabel(unsigned int lasBeamId) const =0
Interface/Base class for alignment algorithms, each alignment algorithm has to be derived from this c...
virtual unsigned int firstFreeLabel() const
const RunRange theOpenRunRange
TEMPL(T2) struct Divides void
Definition: Factorize.h:24
define event information passed to algorithms
static const unsigned int theMaxNumParam
virtual void addCalibrations(const std::vector< IntegratedCalibrationBase *> &iCals)
tell labeler to treat also integrated calibrations
virtual unsigned int parameterLabel(unsigned int aliLabel, unsigned int parNum) const =0
returns the label for a given alignable parameter number combination
PedeLabelerBase(const TopLevelAlignables &alignables, const edm::ParameterSet &config)
constructor from three Alignables (null pointers allowed )
bool operator()(const Alignable *a, Alignable *b) const
char const * label
align::RunNumber RunNumber
TopLevelAlignables(AlignableTracker *aliTracker, AlignableMuon *aliMuon, AlignableExtras *extras)
virtual unsigned int calibrationLabel(const IntegratedCalibrationBase *calib, unsigned int paramNum) const
label for parameter &#39;paramNum&#39; (counted from 0) of an integrated calibration
Allows conversion between type and name, and vice-versa.
std::pair< RunNumber, RunNumber > RunRange
Definition: Utilities.h:38
align::RunRange RunRange
const AlignableObjectId alignableObjectId_
const AlignableObjectId & objectIdProvider() const
Return tracker alignable object ID provider derived from the tracker&#39;s geometry.
virtual unsigned int alignableLabelFromParamAndInstance(const Alignable *alignable, unsigned int param, unsigned int instance) const =0
virtual unsigned int alignableLabel(const Alignable *alignable) const =0
double b
Definition: hdecay.h:120
static const unsigned int theParamInstanceOffset
bool operator()(Alignable *a, Alignable *b) const
const AlignableTracker * alignableTracker() const
std::vector< std::pair< IntegratedCalibrationBase *, unsigned int > > theCalibrationLabels
pairs of calibrations and their first label
double a
Definition: hdecay.h:121
virtual const RunRange & runRangeFromLabel(unsigned int label) const
unsigned int parameterInstanceOffset() const
offset in labels between consecutive parameter instances of Alignable*s
eventInfo
add run, event number and lumi section
align::RunRanges RunRanges
Constructor of the full muon geometry.
Definition: AlignableMuon.h:38
const AlignableMuon * alignableMuon() const
virtual unsigned int numberOfParameterInstances(Alignable *alignable, int param=-1) const =0
returns the number of instances for a given parameter
virtual unsigned int maxNumberOfParameterInstances() const =0
returns the maximum number of instances for any parameter of an Alignable*
cond::RealTimeType< cond::runnumber >::type RunNumber
Definition: Utilities.h:37
virtual bool hasSplitParameters(Alignable *alignable) const =0
returns true if the alignable has parameters that are split into various bins
virtual unsigned int lasBeamIdFromLabel(unsigned int label) const =0