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 
9 #include "Riostream.h"
10 
17 
18 class AlignableNavigator;
19 class TFile;
20 class TTree;
21 
23 {
24 
25  public:
26 
29 
32 
34  void initialize( const edm::EventSetup& setup,
37 
39  void terminate(const edm::EventSetup& setup);
40 
42  void startNewLoop(void);
43 
45  void run(const edm::EventSetup& setup, const EventInfo &eventInfo);
46 
47  private:
48 
49  // private member functions
50 
51  bool processHit1D(const AlignableDetOrUnitPtr& alidet,
52  const Alignable* ali,
53  const TrajectoryStateOnSurface & tsos,
54  const TrackingRecHit* hit,
55  double hitwt);
56 
57  bool processHit2D(const AlignableDetOrUnitPtr& alidet,
58  const Alignable* ali,
59  const TrajectoryStateOnSurface & tsos,
60  const TrackingRecHit* hit,
61  double hitwt);
62 
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(const edm::EventSetup& setup);
69  bool calcParameters(Alignable* ali,int setDet, double start, double step);
70  void collector(void);
71  int fillEventwiseTree(const char *filename, int iter, int ierr);
72  // private data members
73 
74  std::unique_ptr<AlignableObjectId> alignableObjectId_;
76  std::vector<Alignable*> theAlignables;
78 
80  int ioerr;
82 
83  // steering parameters
84 
85  // verbosity flag
86  bool verbose;
87  // names of IO root files
90 
91  // alignment position error parameters
94  std::vector<edm::ParameterSet> theAPEParameterSet;
95  std::vector<unsigned> theIOVrangeSet;
96  std::vector<std::pair<std::vector<Alignable*>, std::vector<double> > > theAPEParameters;
97  // max allowed pull (residual / uncertainty) on a hit used in alignment
99  // min number of hits on alignable to calc parameters
101  // max allowed rel error on parameter (else not used)
103  // collector mode (parallel processing)
111  std::vector<double> SetScanDet;
112 
113  const std::vector<std::string> surveyResiduals_;
114  std::vector<align::StructureType> theLevels; // for survey residuals
115 
116  // root tree variables
117  TFile* theFile;
118  TTree* theTree; // event-wise tree
119  TTree* hitTree; // hit-wise tree
120  TFile* theFile2;
121  TTree* theTree2; // alignable-wise tree
122  TFile* theFile3;
123  TTree* theTree3; // survey tree
124 
125  // variables for event-wise tree
126  static const int MAXREC = 99;
127  //int m_Run,m_Event;
130 
131  // variables for hit-wise tree
134 
135  // variables for alignable-wise tree
140 
141  // variables for survey tree
144  float m3_par[6];
145 };
146 
147 #endif
tuple cfg
Definition: looper.py:293
AlignmentParameterStore * theAlignmentParameterStore
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)
Interface/Base class for alignment algorithms, each alignment algorithm has to be derived from this c...
bool processHit1D(const AlignableDetOrUnitPtr &alidet, const Alignable *ali, const TrajectoryStateOnSurface &tsos, const TrackingRecHit *hit, double hitwt)
define event information passed to algorithms
std::vector< unsigned > theIOVrangeSet
bool calcParameters(Alignable *ali, int setDet, double start, double step)
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
void fillRoot(const edm::EventSetup &setup)
int readIterationFile(std::string filename)
std::vector< double > SetScanDet
std::unique_ptr< AlignableObjectId > alignableObjectId_
bool processHit2D(const AlignableDetOrUnitPtr &alidet, const Alignable *ali, const TrajectoryStateOnSurface &tsos, const TrackingRecHit *hit, double hitwt)
std::vector< edm::ParameterSet > theAPEParameterSet
align::StructureType m3_ObjId
virtual void terminate()
Called at end of job (must be implemented in derived class)
tuple filename
Definition: lut2db_cfg.py:20
const std::vector< std::string > surveyResiduals_
step
Constructor of the full muon geometry.
Definition: AlignableMuon.h:37
std::vector< align::StructureType > theLevels
std::vector< Alignable * > theAlignables
void run(const edm::EventSetup &setup, const EventInfo &eventInfo)
Run the algorithm.