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 
23 
25 
26 //******** Single include for the TkMap *************
28 //***************************************************
29 
32 
33 #include <algorithm>
34 #include <string>
35 #include "TTree.h"
36 #include "TH1D.h"
37 
38 class AlignTransform;
39 class TrackerTopology;
40 
42 public:
45 
48 
50  void beginJob() override;
51 
52  void endJob() override;
53 
54  void analyze(const edm::Event&, const edm::EventSetup&) override;
55 
56 private:
57  //parameters
58  std::vector<align::StructureType> m_theLevels;
59  //std::vector<int> theSubDets;
60 
61  //compare surface deformations
62  void compareSurfaceDeformations(TTree* _inputTree11, TTree* _inputTree12);
63  //compares two geometries
64  void compareGeometries(Alignable* refAli,
65  Alignable* curAli,
66  const TrackerTopology* tTopo,
67  const edm::EventSetup& iSetup);
68  //filling the ROOT file
69  void fillTree(Alignable* refAli,
70  const AlgebraicVector& diff, // typedef CLHEP::HepVector AlgebraicVector;
71  const TrackerTopology* tTopo,
72  const edm::EventSetup& iSetup);
73  //for filling identifiers
74  void fillIdentifiers(int subdetlevel, int rawid, const TrackerTopology* tTopo);
75  //converts surveyRcd into alignmentRcd
76  void surveyToTracker(AlignableTracker* ali, Alignments* alignVals, AlignmentErrorsExtended* alignErrors);
77  //need for conversion for surveyToTracker
78  void addSurveyInfo(Alignable* ali);
79  //void createDBGeometry(const edm::EventSetup& iSetup);
80  void createROOTGeometry(const edm::EventSetup& iSetup);
81 
82  // for common tracker system
84  void diffCommonTrackerSystem(Alignable* refAli, Alignable* curAli);
85  bool passIdCut(uint32_t);
86 
95 
99 
100  unsigned int theSurveyIndex;
103 
104  // configurables
105  const std::vector<std::string> levelStrings_;
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 #endif
const edm::ESGetToken< PTrackerParameters, PTrackerParametersRcd > ptpToken_
align::GlobalVector TrackerCommonR_
void compareGeometries(Alignable *refAli, Alignable *curAli, const TrackerTopology *tTopo, const edm::EventSetup &iSetup)
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
std::vector< align::StructureType > m_theLevels
const std::vector< std::string > levelStrings_
const Alignments * theSurveyValues
void addSurveyInfo(Alignable *ali)
const edm::ESGetToken< PTrackerAdditionalParametersPerDet, PTrackerAdditionalParametersPerDetRcd > ptitpToken_
std::vector< TrackerMap > m_vtkmap_
void diffCommonTrackerSystem(Alignable *refAli, Alignable *curAli)
const edm::ESGetToken< GeometricDet, IdealGeometryRecord > geomDetToken_
AlignableTracker * dummyTracker
std::map< std::string, TH1D * > m_h1_
std::vector< int > moduleList_
const edm::ESGetToken< SiStripQuality, SiStripQualityRcd > stripQualityToken_
std::vector< uint32_t > detIdFlagVector_
const edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvTokenDDD_
std::vector< unsigned int > weightByIdVector_
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::GlobalVector TrackerCommonT_
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 edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > cpvTokenDD4hep_
align::StructureType commonTrackerLevel_
void fillIdentifiers(int subdetlevel, int rawid, const TrackerTopology *tTopo)
AlignableTracker * referenceTracker
void createROOTGeometry(const edm::EventSetup &iSetup)
align::PositionType TrackerCommonCM_
const SurveyErrors * theSurveyErrors
void compareSurfaceDeformations(TTree *_inputTree11, TTree *_inputTree12)
const edm::ESGetToken< SiPixelQuality, SiPixelQualityRcd > pixQualityToken_