CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
KalmanAlignmentMetricsCalculator.h
Go to the documentation of this file.
1 #ifndef Alignment_KalmanAlignmentAlgorithm_KalmanAlignmentMetricsCalculator_h
2 #define Alignment_KalmanAlignmentAlgorithm_KalmanAlignmentMetricsCalculator_h
3 
7 
9 
12 
13 #include "TTree.h"
14 #include "TFile.h"
15 
16 
18 {
19 
20 public:
21 
22  typedef std::map< Alignable*, short int > SingleDistancesList;
23  typedef std::map< Alignable*, SingleDistancesList* > FullDistancesList;
24 
27 
29  void updateDistances( const std::vector< Alignable* >& alignables );
30 
34 
37  short int operator() ( Alignable* i, Alignable* j ) const;
38 
40  inline void setMaxDistance( short int maxDistance ) { theMaxDistance = maxDistance; }
41 
43  unsigned int nDistances( void ) const;
44 
46  void clear( void );
47 
49  const std::vector< Alignable* > alignables( void ) const;
50 
51  void writeDistances( std::string filename );
52  void readDistances( std::string filename );
53 
54 private:
55 
56  void clearDistances( FullDistancesList& dist );
57 
60  void updateList( SingleDistancesList* thisList, SingleDistancesList* otherList );
61 
64 
66  void insertPropagatedDistances( FullDistancesList& propagated );
67 
69  void extractPropagatedDistances( FullDistancesList& changes, Alignable* alignable,
71 
74  void connect( FullDistancesList& changes, SingleDistancesList* connection,
75  Alignable* alignable, short int value );
76 
77  void insertDistance( FullDistancesList& dist, Alignable* i, Alignable* j, short int value );
78  void insertDistance( SingleDistancesList* distList, Alignable* j, short int value );
79 
81  short int theMaxDistance;
82 
84 
85  // For reading and writing
86 
87  void createBranches( TTree* tree );
88  void setBranchAddresses( TTree* tree );
89 };
90 
91 
92 #endif
int i
Definition: DBlmapReader.cc:9
const std::vector< Alignable * > alignables(void) const
Return all known alignables.
void connect(FullDistancesList &changes, SingleDistancesList *connection, Alignable *alignable, short int value)
void setMaxDistance(short int maxDistance)
Set maximum distance to be stored.
void insertPropagatedDistances(FullDistancesList &propagated)
Insert the &#39;propagated distances&#39; into the lists of the remaining alignables.
void insertDistance(FullDistancesList &dist, Alignable *i, Alignable *j, short int value)
void updateList(SingleDistancesList *thisList, SingleDistancesList *otherList)
short int operator()(Alignable *i, Alignable *j) const
int j
Definition: DBlmapReader.cc:9
unsigned int nDistances(void) const
Number of stored distances.
void insertUpdatedDistances(FullDistancesList &updated)
Insert changes due to the update of the lists of the current alignables.
void updateDistances(const std::vector< Alignable * > &alignables)
Update list of distances with a set Alignables.
void extractPropagatedDistances(FullDistancesList &changes, Alignable *alignable, SingleDistancesList *oldList, SingleDistancesList *newList)
Extract entries from the updated lists that need to be further propagated.
tuple filename
Definition: lut2db_cfg.py:20
const SingleDistancesList & getDistances(Alignable *i) const
void clear(void)
Clear stored distances.
std::map< Alignable *, SingleDistancesList * > FullDistancesList
std::map< Alignable *, short int > SingleDistancesList