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 
37 //******** 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 class TrackerTopology;
48 
50 public:
53 
56  const edm::ParameterSet&
57  );
58 
60  void beginJob() override;
61 
62  void endJob() override;
63 
64  void analyze(
65  const edm::Event&,
66  const edm::EventSetup&
67  ) override;
68 
69 private:
70 
71 
72  //parameters
73  std::vector<align::StructureType> m_theLevels;
74  //std::vector<int> theSubDets;
75 
76  //compare surface deformations
78  //compares two geometries
79  void compareGeometries(Alignable* refAli, Alignable* curAli, const TrackerTopology* tTopo, const edm::EventSetup& iSetup);
80  //filling the ROOT file
81  void fillTree(Alignable *refAli, const AlgebraicVector& diff, // typedef CLHEP::HepVector AlgebraicVector;
82  const TrackerTopology* tTopo, const edm::EventSetup& iSetup);
83  //for filling identifiers
84  void fillIdentifiers( int subdetlevel, int rawid, const TrackerTopology* tTopo);
85  //converts surveyRcd into alignmentRcd
86  void surveyToTracker(AlignableTracker* ali, Alignments* alignVals, AlignmentErrorsExtended* 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  const std::vector<std::string> _levelStrings;
112  bool _writeToDB;
119  std::vector< unsigned int > _weightByIdVector;
120 
121  std::vector< uint32_t > _detIdFlagVector;
126 
127  std::ifstream _moduleListFile;
128  std::vector< int > _moduleList;
130 
131  //root configuration
133  TFile* _theFile;
134  TTree* _alignTree;
137  TTree* _inputTree01;
138  TTree* _inputTree02;
139  TTree* _inputTree11;
140  TTree* _inputTree12;
141 
145  // changes in global variables
147  // changes local variables: u, v, w, alpha, beta, gamma
150  uint32_t _identifiers[6];
151  double _surRot[9];
152  int _type;
153  double _surfDeform[13];
154 
155  int m_nBins ;
156  double m_rangeLow ;
157  double m_rangeHigh ;
158 
160 
161  std::vector<TrackerMap> m_vtkmap;
162 
163  std::map<std::string,TH1D*> m_h1 ;
164 
165 
166 };
167 
168 
169 
170 
171 #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::map< std::string, TH1D * > m_h1
std::vector< uint32_t > _detIdFlagVector
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
void fillIdentifiers(int subdetlevel, int rawid, const TrackerTopology *tTopo)
AlignableTracker * referenceTracker
void createROOTGeometry(const edm::EventSetup &iSetup)
const SurveyErrors * theSurveyErrors
std::vector< unsigned int > _weightByIdVector
std::vector< int > _moduleList
void compareSurfaceDeformations(TTree *_inputTree11, TTree *_inputTree12)