CMS 3D CMS Logo

MomentumDependentPedeLabeler.h
Go to the documentation of this file.
1 #ifndef MomentumDEPENDENTPEDELABELER_H
2 #define MomentumDEPENDENTPEDELABELER_H
3 
16 #include <vector>
17 #include <map>
18 
20 
22 
23 /***************************************
24 ****************************************/
26 {
27  public:
28 
31  const edm::ParameterSet& config);
34 
38  unsigned int alignableLabel(Alignable *alignable) const override;
43  unsigned int alignableLabelFromParamAndInstance(Alignable *alignable,
44  unsigned int param,
45  unsigned int instance) const override;
46  unsigned int lasBeamLabel(unsigned int lasBeamId) const override;
48  unsigned int parameterLabel(unsigned int aliLabel, unsigned int parNum) const override;
51  unsigned int parameterLabel(Alignable *alignable, unsigned int parNum,
53  const TrajectoryStateOnSurface &tsos) const override;
55  bool hasSplitParameters(Alignable *alignable) const override;
57  unsigned int numberOfParameterInstances(Alignable *alignable, int param=-1) const override;
58  unsigned int maxNumberOfParameterInstances() const override { return theMaxNumberOfParameterInstances; }
59 
61  unsigned int paramNumFromLabel(unsigned int paramLabel) const override;
63  unsigned int alignableLabelFromLabel(unsigned int label) const override;
66  Alignable* alignableFromLabel(unsigned int label) const override;
69  unsigned int lasBeamIdFromLabel(unsigned int label) const override;
70 
71  private:
72  typedef std::map <Alignable*, unsigned int> AlignableToIdMap;
74  typedef std::pair <float,float> MomentumRange;
75  typedef std::vector <MomentumRange> MomentumRangeVector;
76  typedef std::map <unsigned int, MomentumRangeVector> MomentumRangeParamMap;
77  typedef std::map <Alignable*, MomentumRangeParamMap> AlignableToMomentumRangeMap;
79  typedef std::map <unsigned int, Alignable*> IdToAlignableMap;
80  typedef std::map <unsigned int, unsigned int> UintUintMap;
81 
82  std::vector<std::string> decompose(const std::string &s, std::string::value_type delimiter) const;
83  std::vector<unsigned int> convertParamSel(const std::string &selString) const;
84  unsigned int buildMomentumDependencyMap(AlignableTracker *aliTracker, AlignableMuon* aliMuon,
85  AlignableExtras *extras,
86  const edm::ParameterSet &config);
87 
89  unsigned int buildMap(const std::vector<Alignable*> &alis);
91  unsigned int buildReverseMap();
92 
93  // data members
94  AlignableToIdMap theAlignableToIdMap;
95  AlignableToMomentumRangeMap theAlignableToMomentumRangeMap;
96  IdToAlignableMap theIdToAlignableMap;
97  UintUintMap theLasBeamToLabelMap;
98  UintUintMap theLabelToLasBeamMap;
99  const MomentumRange theOpenMomentumRange;
101 };
102 
103 #endif
unsigned int parameterLabel(unsigned int aliLabel, unsigned int parNum) const override
returns the label for a given alignable parameter number combination
unsigned int alignableLabelFromParamAndInstance(Alignable *alignable, unsigned int param, unsigned int instance) const override
std::map< Alignable *, MomentumRangeParamMap > AlignableToMomentumRangeMap
std::map< Alignable *, unsigned int > AlignableToIdMap
static PFTauRenderPlugin instance
std::vector< std::string > decompose(const std::string &s, std::string::value_type delimiter) const
UintUintMap theLabelToLasBeamMap
labels for las beams
unsigned int paramNumFromLabel(unsigned int paramLabel) const override
parameter number, 0 <= .. < theMaxNumParam, belonging to unique parameter label
std::pair< float, float > MomentumRange
Definition: config.py:1
unsigned int buildMap(const std::vector< Alignable * > &alis)
returns size of map
MomentumDependentPedeLabeler(const PedeLabelerBase::TopLevelAlignables &alignables, const edm::ParameterSet &config)
constructor from three Alignables (null pointers allowed )
define event information passed to algorithms
AlignableToMomentumRangeMap::value_type AlignableToMomentumRangePair
unsigned int lasBeamLabel(unsigned int lasBeamId) const override
std::map< unsigned int, unsigned int > UintUintMap
std::map< unsigned int, Alignable * > IdToAlignableMap
unsigned int alignableLabel(Alignable *alignable) const override
Return 32-bit unique label for alignable, 0 indicates failure.
unsigned int lasBeamIdFromLabel(unsigned int label) const override
UintUintMap theLasBeamToLabelMap
reverse map
unsigned int buildReverseMap()
returns size of map
bool hasSplitParameters(Alignable *alignable) const override
returns true if the alignable has parameters that are split into various bins
Alignable * alignableFromLabel(unsigned int label) const override
std::map< unsigned int, MomentumRangeVector > MomentumRangeParamMap
std::vector< MomentumRange > MomentumRangeVector
unsigned int numberOfParameterInstances(Alignable *alignable, int param=-1) const override
returns the number of instances for a given parameter
unsigned int buildMomentumDependencyMap(AlignableTracker *aliTracker, AlignableMuon *aliMuon, AlignableExtras *extras, const edm::ParameterSet &config)
const MomentumRange theOpenMomentumRange
reverse of the above
eventInfo
add run, event number and lumi section
std::vector< unsigned int > convertParamSel(const std::string &selString) const
Constructor of the full muon geometry.
Definition: AlignableMuon.h:37
unsigned int alignableLabelFromLabel(unsigned int label) const override
alignable label from parameter label (works also for alignable label...)
AlignableToMomentumRangeMap theAlignableToMomentumRangeMap
providing unique ID for alignable, space for param IDs
unsigned int maxNumberOfParameterInstances() const override
returns the maximum number of instances for any parameter of an Alignable*
AlignableToIdMap::value_type AlignableToIdPair
IdToAlignableMap theIdToAlignableMap
providing unique ID for alignable, space for param IDs