CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HIPAlignmentAlgorithm.h
Go to the documentation of this file.
1 #ifndef Alignment_HIPAlignmentAlgorithm_HIPAlignmentAlgorithm_h
2 #define Alignment_HIPAlignmentAlgorithm_HIPAlignmentAlgorithm_h
3 
8 #include "Riostream.h"
9 
19 
20 class AlignableNavigator;
21 class TFile;
22 class TTree;
23 
25 {
26 
27  public:
28 
31 
34 
36  void initialize( const edm::EventSetup& setup,
39 
41  void terminate(void);
42 
44  void startNewLoop(void);
45 
47  void run(const edm::EventSetup& setup, const EventInfo &eventInfo);
48 
49  private:
50 
51  // private member functions
52 
53  bool processHit1D(const AlignableDetOrUnitPtr alidet,
54  const Alignable* ali,
55  const TrajectoryStateOnSurface & tsos,
57 
58  bool processHit2D(const AlignableDetOrUnitPtr alidet,
59  const Alignable* ali,
60  const TrajectoryStateOnSurface & tsos,
62 
63  int readIterationFile(std::string filename);
64  void writeIterationFile(std::string filename, int iter);
65  void setAlignmentPositionError(void);
66  double calcAPE(double* par, int iter, double function);
67  void bookRoot(void);
68  void fillRoot(void);
69  bool calcParameters(Alignable* ali);
70  void collector(void);
71  int fillEventwiseTree(const char *filename, int iter, int ierr);
72  // private data members
73 
75  std::vector<Alignable*> theAlignables;
77 
79  int ioerr;
81 
82  // steering parameters
83 
84  // verbosity flag
85  bool verbose;
86  // names of IO root files
89 
90  // alignment position error parameters
92  std::vector<edm::ParameterSet> theAPEParameterSet;
93  std::vector<std::pair<std::vector<Alignable*>, std::vector<double> > > theAPEParameters;
94  // max allowed pull (residual / uncertainty) on a hit used in alignment
96  // min number of hits on alignable to calc parameters
98  // max allowed rel error on parameter (else not used)
100  // collector mode (parallel processing)
103  std::string theCollectorPath;
106 
107  std::vector<align::StructureType> theLevels; // for survey residuals
108 
109  // root tree variables
110  TFile* theFile;
111  TTree* theTree; // event-wise tree
112  TFile* theFile2;
113  TTree* theTree2; // alignable-wise tree
114  TFile* theFile3;
115  TTree* theTree3; // survey tree
116 
117  // variables for event-wise tree
118  static const int MAXREC = 99;
119  //int m_Run,m_Event;
122 
123  // variables for alignable-wise tree
128 
129  // variables for survey tree
132  float m3_par[6];
133 };
134 
135 #endif
AlignmentParameterStore * theAlignmentParameterStore
bool calcParameters(Alignable *ali)
int fillEventwiseTree(const char *filename, int iter, int ierr)
uint32_t ID
Definition: Definitions.h:26
align::StructureType m2_ObjId
void writeIterationFile(std::string filename, int iter)
std::vector< std::pair< std::vector< Alignable * >, std::vector< double > > > theAPEParameters
~HIPAlignmentAlgorithm()
Destructor.
double calcAPE(double *par, int iter, double function)
void startNewLoop(void)
Called at start of new loop.
HIPAlignmentAlgorithm(const edm::ParameterSet &cfg)
Constructor.
void initialize(const edm::EventSetup &setup, AlignableTracker *tracker, AlignableMuon *muon, AlignableExtras *extras, AlignmentParameterStore *store)
Call at beginning of job.
AlignableNavigator * theAlignableDetAccessor
int readIterationFile(std::string filename)
bool processHit1D(const AlignableDetOrUnitPtr alidet, const Alignable *ali, const TrajectoryStateOnSurface &tsos, const TransientTrackingRecHit *hit)
std::vector< edm::ParameterSet > theAPEParameterSet
align::StructureType m3_ObjId
tuple filename
Definition: lut2db_cfg.py:20
bool processHit2D(const AlignableDetOrUnitPtr alidet, const Alignable *ali, const TrajectoryStateOnSurface &tsos, const TransientTrackingRecHit *hit)
void terminate(void)
Call at end of job.
Constructor of the full muon geometry.
Definition: AlignableMuon.h:36
std::vector< align::StructureType > theLevels
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
std::vector< Alignable * > theAlignables
void run(const edm::EventSetup &setup, const EventInfo &eventInfo)
Run the algorithm.