CMS 3D CMS Logo

JanAlignmentAlgorithm.h
Go to the documentation of this file.
1 /****************************************************************************
2 * Authors:
3 * Jan Kašpar (jan.kaspar@gmail.com)
4 ****************************************************************************/
5 
6 #ifndef CalibPPS_AlignmentRelative_JanAlignmentAlgorithm_h
7 #define CalibPPS_AlignmentRelative_JanAlignmentAlgorithm_h
8 
11 
12 #include "TMatrixD.h"
13 #include "TVectorD.h"
14 #include "TH1D.h"
15 #include "TH2D.h"
16 #include "TGraph.h"
17 
18 #include <vector>
19 #include <map>
20 #include <string>
21 
26 public:
28  struct ScatterPlot {
29  TGraph *g;
30  TH2D *h;
31  };
32 
34  struct DetStat {
35  TH1D *m_dist;
36  TH1D *R_dist;
37  std::vector<TH1D *> coefHist;
38  std::vector<TGraph *> resVsCoef;
39  std::map<std::set<unsigned int>, ScatterPlot> resVsCoefRot_perRPSet;
40  };
41 
42 private:
45  TMatrixD **Sc;
46 
49  TVectorD *Mc;
50 
52  TMatrixD S;
53 
55  TVectorD M;
56 
58  TVectorD S_eigVal;
59 
61  TMatrixD S_eigVec;
62 
64  std::vector<SingularMode> singularModes;
65 
68 
70  double weakLimit;
71 
73  unsigned int events;
74 
76  std::map<unsigned int, DetStat> statistics;
77 
80 
81 public:
84 
87 
88  ~JanAlignmentAlgorithm() override;
89 
90  std::string getName() override { return "Jan"; }
91 
92  bool hasErrorEstimate() override { return true; }
93 
94  void begin(const CTPPSGeometry *geometryReal, const CTPPSGeometry *geometryMisaligned) override;
95 
96  void feed(const HitCollection &, const LocalTrackFit &) override;
97 
98  void saveDiagnostics(TDirectory *) override;
99 
100  void analyze() override;
101 
102  unsigned int solve(const std::vector<AlignmentConstraint> &,
103  std::map<unsigned int, AlignmentResult> &results,
104  TDirectory *dir) override;
105 
106  void end() override;
107 };
108 
109 #endif
void feed(const HitCollection &, const LocalTrackFit &) override
process one track
a scatter plot, with graph and histogram representations
void saveDiagnostics(TDirectory *) override
saves diagnostic histograms/plots
JanAlignmentAlgorithm()
dummy constructor (not to be used)
TMatrixD S_eigVec
matrix of S eigenvectors
void begin(const CTPPSGeometry *geometryReal, const CTPPSGeometry *geometryMisaligned) override
prepare for processing
Jan&#39;s alignment algorithm.
TVectorD S_eigVal
eigen values of the S matrix
std::vector< TGraph * > resVsCoef
TMatrixD S
final S matrix
Abstract parent for all (track-based) alignment algorithms.
std::map< std::set< unsigned int >, ScatterPlot > resVsCoefRot_perRPSet
Local (linear) track description (or a fit result). Uses global reference system. ...
Definition: LocalTrackFit.h:15
Represents an alignment task.
Definition: AlignmentTask.h:20
bool stopOnSingularModes
whether to stop when singular modes are identified
bool buildDiagnosticPlots
flag whether to build statistical plots
unsigned int solve(const std::vector< AlignmentConstraint > &, std::map< unsigned int, AlignmentResult > &results, TDirectory *dir) override
structure holding statistical information for one detector
void end() override
cleans up after processing
std::string getName() override
bool hasErrorEstimate() override
returns whether this algorithm is capable of estimating result uncertainties
The manager class for TOTEM RP geometry.
Definition: CTPPSGeometry.h:30
std::vector< Hit > HitCollection
Definition: HitCollection.h:35
results
Definition: mysort.py:8
TVectorD M
final M vector
std::map< unsigned int, DetStat > statistics
statistical data collection
void analyze() override
analyzes the data collected
std::vector< SingularMode > singularModes
a list of the singular modes of the S matrix
unsigned int events
event count
double weakLimit
normalized eigen value below which the (CS) eigen vectors are considered as weak