CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrackerGeometryCompare.h
Go to the documentation of this file.
1 #ifndef Alignment_OfflineValidation_TrackerGeometryCompare_h
2 #define Alignment_OfflineValidation_TrackerGeometryCompare_h
3 
32 
34 
35 
36 //******** Single include for the TkMap *************
39 //***************************************************
40 
41 #include <algorithm>
42 #include <string>
43 #include "TTree.h"
44 #include "TH1D.h"
45 
46 class AlignTransform;
47 
49 public:
52  typedef std::vector<Alignable*> Alignables;
53 
56  const edm::ParameterSet&
57  );
58 
60  virtual void beginJob();
61 
62  virtual void endJob();
63 
64  virtual void analyze(
65  const edm::Event&,
66  const edm::EventSetup&
67  );
68 
69 private:
70 
71 
72  //parameters
74  std::vector<align::StructureType> m_theLevels;
75  //std::vector<int> theSubDets;
76 
77  //compare surface deformations
79  //compares two geometries
80  void compareGeometries(Alignable* refAli, Alignable* curAli);
81  //filling the ROOT file
82  void fillTree(Alignable *refAli, AlgebraicVector diff); // typedef CLHEP::HepVector AlgebraicVector;
83  //for filling identifiers
84  void fillIdentifiers( int subdetlevel, int rawid );
85  //converts surveyRcd into alignmentRcd
86  void surveyToTracker(AlignableTracker* ali, Alignments* alignVals, AlignmentErrors* alignErrors);
87  //need for conversion for surveyToTracker
88  void addSurveyInfo(Alignable* ali);
89  //void createDBGeometry(const edm::EventSetup& iSetup);
90  void createROOTGeometry(const edm::EventSetup& iSetup);
91 
92  // for common tracker system
94  void diffCommonTrackerSystem(Alignable* refAli, Alignable* curAli);
95  bool passIdCut( uint32_t );
96 
100 
101  unsigned int theSurveyIndex;
104 
105  // configurables
106  std::string _inputFilename1;
107  std::string _inputFilename2;
108  std::string _inputTreenameAlign;
109  std::string _inputTreenameDeform;
110  bool _writeToDB;
111  std::string _weightBy;
114  std::string _detIdFlagFile;
116  std::string _weightByIdFile;
117  std::vector< unsigned int > _weightByIdVector;
118 
119  std::vector< uint32_t > _detIdFlagVector;
124 
125  //root configuration
126  std::string _filename;
127  TFile* _theFile;
128  TTree* _alignTree;
131  TTree* _inputTree01;
132  TTree* _inputTree02;
133  TTree* _inputTree11;
134  TTree* _inputTree12;
135 
139  // changes in global variables
141  // changes local variables: u, v, w, alpha, beta, gamma
144  uint32_t _identifiers[6];
145  double _surRot[9];
146  int _type;
147  double _surfDeform[13];
148 
149  int m_nBins ;
150  double m_rangeLow ;
151  double m_rangeHigh ;
152 
154 
155  std::vector<TrackerMap> m_vtkmap;
156 
157  std::map<std::string,TH1D*> m_h1 ;
158 
159 
160 };
161 
162 
163 
164 
165 #endif
void compareGeometries(Alignable *refAli, Alignable *curAli)
align::GlobalVector _TrackerCommonR
std::vector< align::StructureType > m_theLevels
const Alignments * theSurveyValues
void addSurveyInfo(Alignable *ali)
align::GlobalVector _TrackerCommonT
void diffCommonTrackerSystem(Alignable *refAli, Alignable *curAli)
std::vector< TrackerMap > m_vtkmap
AlignableTracker * dummyTracker
std::map< std::string, TH1D * > m_h1
std::vector< Alignable * > Alignables
virtual void beginJob()
Read from DB and print survey info.
void fillTree(Alignable *refAli, AlgebraicVector diff)
std::vector< uint32_t > _detIdFlagVector
TrackerGeometryCompare(const edm::ParameterSet &)
Do nothing. Required by framework.
virtual void analyze(const edm::Event &, const edm::EventSetup &)
align::StructureType _commonTrackerLevel
align::PositionType _TrackerCommonCM
CLHEP::HepVector AlgebraicVector
AlignableTracker * currentTracker
AlignableTracker * referenceTracker
void fillIdentifiers(int subdetlevel, int rawid)
void createROOTGeometry(const edm::EventSetup &iSetup)
const SurveyErrors * theSurveyErrors
std::vector< unsigned int > _weightByIdVector
void surveyToTracker(AlignableTracker *ali, Alignments *alignVals, AlignmentErrors *alignErrors)
void compareSurfaceDeformations(TTree *_inputTree11, TTree *_inputTree12)