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 ****************************************/
26 class PedeLabeler : public PedeLabelerBase {
27 public:
31  ~PedeLabeler() override;
32 
36  unsigned int alignableLabel(Alignable *alignable) const override;
37  unsigned int alignableLabelFromParamAndInstance(Alignable *alignable,
38  unsigned int param,
39  unsigned int instance) const override;
40  unsigned int lasBeamLabel(unsigned int lasBeamId) const override;
41  unsigned int parameterLabel(unsigned int aliLabel, unsigned int parNum) const override;
42  unsigned int parameterLabel(Alignable *alignable,
43  unsigned int parNum,
45  const TrajectoryStateOnSurface &tsos) const override {
46  return parameterLabel(alignableLabel(alignable), parNum);
47  }
48  bool hasSplitParameters(Alignable *alignable) const override { return false; }
49  unsigned int numberOfParameterInstances(Alignable *alignable, int param = -1) const override { return 1; }
50  unsigned int maxNumberOfParameterInstances() const override { return 1; }
51 
53  unsigned int paramNumFromLabel(unsigned int paramLabel) const override;
55  unsigned int alignableLabelFromLabel(unsigned int label) const override;
58  Alignable *alignableFromLabel(unsigned int label) const override;
61  unsigned int lasBeamIdFromLabel(unsigned int label) const override;
62 
63 private:
64  typedef std::map<Alignable *, unsigned int> AlignableToIdMap;
66  typedef std::map<unsigned int, Alignable *> IdToAlignableMap;
67  typedef std::map<unsigned int, unsigned int> UintUintMap;
68 
70  unsigned int buildMap(const align::Alignables &);
72  unsigned int buildReverseMap();
73 
74  // data members
79 };
80 
81 #endif
PedeLabeler::PedeLabeler
PedeLabeler(const PedeLabelerBase::TopLevelAlignables &alignables, const edm::ParameterSet &config)
constructor from three Alignables (null pointers allowed )
Definition: PedeLabeler.cc:22
PedeLabeler::numberOfParameterInstances
unsigned int numberOfParameterInstances(Alignable *alignable, int param=-1) const override
returns the number of instances for a given parameter
Definition: PedeLabeler.h:48
Alignable
Definition: Alignable.h:27
PedeLabeler::UintUintMap
std::map< unsigned int, unsigned int > UintUintMap
Definition: PedeLabeler.h:66
PedeLabeler::maxNumberOfParameterInstances
unsigned int maxNumberOfParameterInstances() const override
returns the maximum number of instances for any parameter of an Alignable*
Definition: PedeLabeler.h:49
PedeLabelerBase.h
PedeLabeler
Definition: PedeLabeler.h:25
config
Definition: config.py:1
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
PedeLabeler::buildReverseMap
unsigned int buildReverseMap()
returns size of map
Definition: PedeLabeler.cc:183
PedeLabeler::parameterLabel
unsigned int parameterLabel(Alignable *alignable, unsigned int parNum, const AlignmentAlgorithmBase::EventInfo &eventInfo, const TrajectoryStateOnSurface &tsos) const override
Definition: PedeLabeler.h:41
PedeLabeler::alignableLabelFromParamAndInstance
unsigned int alignableLabelFromParamAndInstance(Alignable *alignable, unsigned int param, unsigned int instance) const override
Definition: PedeLabeler.cc:63
PedeLabeler::alignableFromLabel
Alignable * alignableFromLabel(unsigned int label) const override
Definition: PedeLabeler.cc:107
PedeLabeler::theIdToAlignableMap
IdToAlignableMap theIdToAlignableMap
providing unique ID for alignable, space for param IDs
Definition: PedeLabeler.h:75
PedeLabelerBase::TopLevelAlignables
Definition: PedeLabelerBase.h:39
PedeLabeler::buildMap
unsigned int buildMap(const align::Alignables &)
returns size of map
Definition: PedeLabeler.cc:143
PedeLabeler::alignableLabelFromLabel
unsigned int alignableLabelFromLabel(unsigned int label) const override
alignable label from parameter label (works also for alignable label...)
Definition: PedeLabeler.cc:102
PedeLabeler::theLabelToLasBeamMap
UintUintMap theLabelToLasBeamMap
labels for las beams
Definition: PedeLabeler.h:77
PedeLabeler::AlignableToIdPair
AlignableToIdMap::value_type AlignableToIdPair
Definition: PedeLabeler.h:64
edm::ParameterSet
Definition: ParameterSet.h:47
PedeLabeler::theAlignableToIdMap
AlignableToIdMap theAlignableToIdMap
Definition: PedeLabeler.h:74
PedeLabeler::paramNumFromLabel
unsigned int paramNumFromLabel(unsigned int paramLabel) const override
parameter number, 0 <= .. < theMaxNumParam, belonging to unique parameter label
Definition: PedeLabeler.cc:92
PedeLabelerBase
Definition: PedeLabelerBase.h:33
PedeLabeler::parameterLabel
unsigned int parameterLabel(unsigned int aliLabel, unsigned int parNum) const override
returns the label for a given alignable parameter number combination
Definition: PedeLabeler.cc:83
PedeLabeler::~PedeLabeler
~PedeLabeler() override
destructor
Definition: PedeLabeler.cc:39
Utilities.h
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition: JetExtendedAssociation.h:30
PedeLabeler::lasBeamLabel
unsigned int lasBeamLabel(unsigned int lasBeamId) const override
Definition: PedeLabeler.cc:70
volumeBasedMagneticField_160812_cfi.paramLabel
paramLabel
Definition: volumeBasedMagneticField_160812_cfi.py:37
instance
static PFTauRenderPlugin instance
Definition: PFTauRenderPlugin.cc:70
PedeLabeler::IdToAlignableMap
std::map< unsigned int, Alignable * > IdToAlignableMap
Definition: PedeLabeler.h:65
dumpTauVariables_cfi.eventInfo
eventInfo
add run, event number and lumi section
Definition: dumpTauVariables_cfi.py:12
align::Alignables
std::vector< Alignable * > Alignables
Definition: Utilities.h:31
PedeLabeler::theLasBeamToLabelMap
UintUintMap theLasBeamToLabelMap
reverse map
Definition: PedeLabeler.h:76
PedeLabeler::lasBeamIdFromLabel
unsigned int lasBeamIdFromLabel(unsigned int label) const override
Definition: PedeLabeler.cc:127
PedeLabeler::alignableLabel
unsigned int alignableLabel(Alignable *alignable) const override
Return 32-bit unique label for alignable, 0 indicates failure.
Definition: PedeLabeler.cc:43
ParameterSet.h
PedeLabeler::AlignableToIdMap
std::map< Alignable *, unsigned int > AlignableToIdMap
Definition: PedeLabeler.h:63
label
const char * label
Definition: PFTauDecayModeTools.cc:11
PedeLabeler::hasSplitParameters
bool hasSplitParameters(Alignable *alignable) const override
returns true if the alignable has parameters that are split into various bins
Definition: PedeLabeler.h:47
AlignmentAlgorithmBase::EventInfo
define event information passed to algorithms
Definition: AlignmentAlgorithmBase.h:73