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 
16 
17 class AlignableNavigator;
18 class TFile;
19 class TTree;
20 
22 {
23 
24  public:
25 
28 
31 
33  void initialize( const edm::EventSetup& setup,
36 
38  void terminate(const edm::EventSetup& setup);
39 
41  void startNewLoop(void);
42 
44  void run(const edm::EventSetup& setup, const EventInfo &eventInfo);
45 
46  private:
47 
48  // private member functions
49 
50  bool processHit1D(const AlignableDetOrUnitPtr& alidet,
51  const Alignable* ali,
52  const TrajectoryStateOnSurface & tsos,
53  const TrackingRecHit* hit);
54 
55  bool processHit2D(const AlignableDetOrUnitPtr& alidet,
56  const Alignable* ali,
57  const TrajectoryStateOnSurface & tsos,
58  const TrackingRecHit* hit);
59 
61  void writeIterationFile(std::string filename, int iter);
62  void setAlignmentPositionError(void);
63  double calcAPE(double* par, int iter, double function);
64  void bookRoot(void);
65  void fillRoot(const edm::EventSetup& setup);
66  bool calcParameters(Alignable* ali);
67  void collector(void);
68  int fillEventwiseTree(const char *filename, int iter, int ierr);
69  // private data members
70 
72  std::vector<Alignable*> theAlignables;
74 
76  int ioerr;
78 
79  // steering parameters
80 
81  // verbosity flag
82  bool verbose;
83  // names of IO root files
86 
87  // alignment position error parameters
89  std::vector<edm::ParameterSet> theAPEParameterSet;
90  std::vector<std::pair<std::vector<Alignable*>, std::vector<double> > > theAPEParameters;
91  // max allowed pull (residual / uncertainty) on a hit used in alignment
93  // min number of hits on alignable to calc parameters
95  // max allowed rel error on parameter (else not used)
97  // collector mode (parallel processing)
103 
104  std::vector<align::StructureType> theLevels; // for survey residuals
105 
106  // root tree variables
107  TFile* theFile;
108  TTree* theTree; // event-wise tree
109  TFile* theFile2;
110  TTree* theTree2; // alignable-wise tree
111  TFile* theFile3;
112  TTree* theTree3; // survey tree
113 
114  // variables for event-wise tree
115  static const int MAXREC = 99;
116  //int m_Run,m_Event;
119 
120  // variables for alignable-wise tree
125 
126  // variables for survey tree
129  float m3_par[6];
130 };
131 
132 #endif
tuple cfg
Definition: looper.py:259
void terminate(const edm::EventSetup &setup)
Call at end of job.
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.
bool processHit2D(const AlignableDetOrUnitPtr &alidet, const Alignable *ali, const TrajectoryStateOnSurface &tsos, const TrackingRecHit *hit)
AlignableNavigator * theAlignableDetAccessor
void fillRoot(const edm::EventSetup &setup)
int readIterationFile(std::string filename)
bool processHit1D(const AlignableDetOrUnitPtr &alidet, const Alignable *ali, const TrajectoryStateOnSurface &tsos, const TrackingRecHit *hit)
std::vector< edm::ParameterSet > theAPEParameterSet
align::StructureType m3_ObjId
tuple filename
Definition: lut2db_cfg.py:20
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.