CMS 3D CMS Logo

PedeLabeler.h
Go to the documentation of this file.
1 #ifndef PEDELABELER_H
2 #define PEDELABELER_H
3 
16 #include <vector>
17 #include <map>
18 
20 
23 
24 /***************************************
25 ****************************************/
27 {
28  public:
29 
32  const edm::ParameterSet &config);
34  ~PedeLabeler() override;
35 
39  unsigned int alignableLabel(Alignable *alignable) const override;
40  unsigned int alignableLabelFromParamAndInstance(Alignable *alignable,
41  unsigned int param,
42  unsigned int instance) const override;
43  unsigned int lasBeamLabel(unsigned int lasBeamId) const override;
44  unsigned int parameterLabel(unsigned int aliLabel, unsigned int parNum) const override;
45  unsigned int parameterLabel(Alignable *alignable, unsigned int parNum,
47  const TrajectoryStateOnSurface &tsos) const override {
48  return parameterLabel(alignableLabel(alignable), parNum);
49  }
50  bool hasSplitParameters(Alignable *alignable) const override { return false; }
51  unsigned int numberOfParameterInstances(Alignable *alignable,
52  int param=-1) const override { return 1; }
53  unsigned int maxNumberOfParameterInstances() const override { return 1; }
54 
56  unsigned int paramNumFromLabel(unsigned int paramLabel) const override;
58  unsigned int alignableLabelFromLabel(unsigned int label) const override;
61  Alignable* alignableFromLabel(unsigned int label) const override;
64  unsigned int lasBeamIdFromLabel(unsigned int label) const override;
65 
66  private:
67  typedef std::map <Alignable*, unsigned int> AlignableToIdMap;
69  typedef std::map <unsigned int, Alignable*> IdToAlignableMap;
70  typedef std::map <unsigned int, unsigned int> UintUintMap;
71 
73  unsigned int buildMap(const align::Alignables&);
75  unsigned int buildReverseMap();
76 
77  // data members
78  AlignableToIdMap theAlignableToIdMap;
79  IdToAlignableMap theIdToAlignableMap;
80  UintUintMap theLasBeamToLabelMap;
81  UintUintMap theLabelToLasBeamMap;
82 };
83 
84 #endif
unsigned int parameterLabel(Alignable *alignable, unsigned int parNum, const AlignmentAlgorithmBase::EventInfo &eventInfo, const TrajectoryStateOnSurface &tsos) const override
Definition: PedeLabeler.h:45
std::map< unsigned int, Alignable * > IdToAlignableMap
Definition: PedeLabeler.h:69
static PFTauRenderPlugin instance
Alignable * alignableFromLabel(unsigned int label) const override
Definition: PedeLabeler.cc:117
std::map< unsigned int, unsigned int > UintUintMap
Definition: PedeLabeler.h:70
unsigned int numberOfParameterInstances(Alignable *alignable, int param=-1) const override
returns the number of instances for a given parameter
Definition: PedeLabeler.h:51
std::map< Alignable *, unsigned int > AlignableToIdMap
Definition: PedeLabeler.h:67
unsigned int alignableLabelFromParamAndInstance(Alignable *alignable, unsigned int param, unsigned int instance) const override
Definition: PedeLabeler.cc:67
PedeLabeler(const PedeLabelerBase::TopLevelAlignables &alignables, const edm::ParameterSet &config)
constructor from three Alignables (null pointers allowed )
Definition: PedeLabeler.cc:22
unsigned int maxNumberOfParameterInstances() const override
returns the maximum number of instances for any parameter of an Alignable*
Definition: PedeLabeler.h:53
Definition: config.py:1
unsigned int lasBeamLabel(unsigned int lasBeamId) const override
Definition: PedeLabeler.cc:75
unsigned int buildReverseMap()
returns size of map
Definition: PedeLabeler.cc:194
define event information passed to algorithms
UintUintMap theLabelToLasBeamMap
labels for las beams
Definition: PedeLabeler.h:81
char const * label
unsigned int paramNumFromLabel(unsigned int paramLabel) const override
parameter number, 0 <= .. < theMaxNumParam, belonging to unique parameter label
Definition: PedeLabeler.cc:100
AlignableToIdMap::value_type AlignableToIdPair
Definition: PedeLabeler.h:68
~PedeLabeler() override
destructor
Definition: PedeLabeler.cc:41
IdToAlignableMap theIdToAlignableMap
providing unique ID for alignable, space for param IDs
Definition: PedeLabeler.h:79
unsigned int buildMap(const align::Alignables &)
returns size of map
Definition: PedeLabeler.cc:153
AlignableToIdMap theAlignableToIdMap
Definition: PedeLabeler.h:78
unsigned int alignableLabelFromLabel(unsigned int label) const override
alignable label from parameter label (works also for alignable label...)
Definition: PedeLabeler.cc:111
UintUintMap theLasBeamToLabelMap
reverse map
Definition: PedeLabeler.h:80
unsigned int lasBeamIdFromLabel(unsigned int label) const override
Definition: PedeLabeler.cc:137
unsigned int alignableLabel(Alignable *alignable) const override
Return 32-bit unique label for alignable, 0 indicates failure.
Definition: PedeLabeler.cc:47
bool hasSplitParameters(Alignable *alignable) const override
returns true if the alignable has parameters that are split into various bins
Definition: PedeLabeler.h:50
std::vector< Alignable * > Alignables
Definition: Utilities.h:32
unsigned int parameterLabel(unsigned int aliLabel, unsigned int parNum) const override
returns the label for a given alignable parameter number combination
Definition: PedeLabeler.cc:89
eventInfo
add run, event number and lumi section