test
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  double hitwt);
55 
56  bool processHit2D(const AlignableDetOrUnitPtr& alidet,
57  const Alignable* ali,
58  const TrajectoryStateOnSurface & tsos,
59  const TrackingRecHit* hit,
60  double hitwt);
61 
63  void writeIterationFile(std::string filename, int iter);
64  void setAlignmentPositionError(void);
65  double calcAPE(double* par, int iter, double function);
66  void bookRoot(void);
67  void fillRoot(const edm::EventSetup& setup);
68  bool calcParameters(Alignable* ali,int setDet, double start, double step);
69  void collector(void);
70  int fillEventwiseTree(const char *filename, int iter, int ierr);
71  // private data members
72 
74  std::vector<Alignable*> theAlignables;
76 
78  int ioerr;
80 
81  // steering parameters
82 
83  // verbosity flag
84  bool verbose;
85  // names of IO root files
88 
89  // alignment position error parameters
92  std::vector<edm::ParameterSet> theAPEParameterSet;
93  std::vector<unsigned> theIOVrangeSet;
94  std::vector<std::pair<std::vector<Alignable*>, std::vector<double> > > theAPEParameters;
95  // max allowed pull (residual / uncertainty) on a hit used in alignment
97  // min number of hits on alignable to calc parameters
99  // max allowed rel error on parameter (else not used)
101  // collector mode (parallel processing)
109  std::vector<double> SetScanDet;
110 
111  std::vector<align::StructureType> theLevels; // for survey residuals
112 
113  // root tree variables
114  TFile* theFile;
115  TTree* theTree; // event-wise tree
116  TTree* hitTree; // hit-wise tree
117  TFile* theFile2;
118  TTree* theTree2; // alignable-wise tree
119  TFile* theFile3;
120  TTree* theTree3; // survey tree
121 
122  // variables for event-wise tree
123  static const int MAXREC = 99;
124  //int m_Run,m_Event;
127 
128  // variables for hit-wise tree
131 
132  // variables for alignable-wise tree
137 
138  // variables for survey tree
141  float m3_par[6];
142 };
143 
144 #endif
tuple start
Check for commandline option errors.
Definition: dqm_diff.py:58
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
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
Constructor of the full muon geometry.
Definition: AlignableMuon.h:36
std::vector< align::StructureType > theLevels
std::vector< Alignable * > theAlignables
void run(const edm::EventSetup &setup, const EventInfo &eventInfo)
Run the algorithm.