CMS 3D CMS Logo

TrackerGeometryCompare.h
Go to the documentation of this file.
1 #ifndef Alignment_OfflineValidation_TrackerGeometryCompare_h
2 #define Alignment_OfflineValidation_TrackerGeometryCompare_h
3 
33 
35 
36 //******** Single include for the TkMap *************
38 //***************************************************
39 
40 #include <algorithm>
41 #include <string>
42 #include "TTree.h"
43 #include "TH1D.h"
44 
45 class AlignTransform;
46 class TrackerTopology;
47 
49 public:
52 
55 
57  void beginJob() override;
58 
59  void endJob() override;
60 
61  void analyze(const edm::Event&, const edm::EventSetup&) override;
62 
63 private:
64  //parameters
65  std::vector<align::StructureType> m_theLevels;
66  //std::vector<int> theSubDets;
67 
68  //compare surface deformations
70  //compares two geometries
71  void compareGeometries(Alignable* refAli,
72  Alignable* curAli,
73  const TrackerTopology* tTopo,
74  const edm::EventSetup& iSetup);
75  //filling the ROOT file
76  void fillTree(Alignable* refAli,
77  const AlgebraicVector& diff, // typedef CLHEP::HepVector AlgebraicVector;
78  const TrackerTopology* tTopo,
79  const edm::EventSetup& iSetup);
80  //for filling identifiers
81  void fillIdentifiers(int subdetlevel, int rawid, const TrackerTopology* tTopo);
82  //converts surveyRcd into alignmentRcd
83  void surveyToTracker(AlignableTracker* ali, Alignments* alignVals, AlignmentErrorsExtended* alignErrors);
84  //need for conversion for surveyToTracker
85  void addSurveyInfo(Alignable* ali);
86  //void createDBGeometry(const edm::EventSetup& iSetup);
87  void createROOTGeometry(const edm::EventSetup& iSetup);
88 
89  // for common tracker system
91  void diffCommonTrackerSystem(Alignable* refAli, Alignable* curAli);
92  bool passIdCut(uint32_t);
93 
97 
98  unsigned int theSurveyIndex;
101 
102  // configurables
103  const std::vector<std::string> _levelStrings;
116  std::vector<unsigned int> _weightByIdVector;
117 
118  std::vector<uint32_t> _detIdFlagVector;
123 
124  std::ifstream _moduleListFile;
125  std::vector<int> _moduleList;
127 
128  //root configuration
130  TFile* _theFile;
131  TTree* _alignTree;
134  TTree* _inputTree01;
135  TTree* _inputTree02;
136  TTree* _inputTree11;
137  TTree* _inputTree12;
138 
142  // changes in global variables
144  // changes local variables: u, v, w, alpha, beta, gamma
147  uint32_t _identifiers[6];
148  double _surRot[9];
149  int _type;
150  double _surfDeform[13];
151 
152  int m_nBins;
153  double m_rangeLow;
154  double m_rangeHigh;
155 
157 
158  std::vector<TrackerMap> m_vtkmap;
159 
160  std::map<std::string, TH1D*> m_h1;
161 };
162 
163 #endif
align::GlobalVector _TrackerCommonR
void compareGeometries(Alignable *refAli, Alignable *curAli, const TrackerTopology *tTopo, const edm::EventSetup &iSetup)
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::vector< uint32_t > _detIdFlagVector
std::vector< int > _moduleList
void beginJob() override
Read from DB and print survey info.
void analyze(const edm::Event &, const edm::EventSetup &) override
TrackerGeometryCompare(const edm::ParameterSet &)
Do nothing. Required by framework.
align::StructureType _commonTrackerLevel
align::PositionType _TrackerCommonCM
void fillTree(Alignable *refAli, const AlgebraicVector &diff, const TrackerTopology *tTopo, const edm::EventSetup &iSetup)
CLHEP::HepVector AlgebraicVector
AlignableTracker * currentTracker
void surveyToTracker(AlignableTracker *ali, Alignments *alignVals, AlignmentErrorsExtended *alignErrors)
const std::vector< std::string > _levelStrings
std::vector< unsigned int > _weightByIdVector
void fillIdentifiers(int subdetlevel, int rawid, const TrackerTopology *tTopo)
AlignableTracker * referenceTracker
void createROOTGeometry(const edm::EventSetup &iSetup)
const SurveyErrors * theSurveyErrors
std::map< std::string, TH1D * > m_h1
void compareSurfaceDeformations(TTree *_inputTree11, TTree *_inputTree12)