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  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
57 
58 private:
59  //parameters
60  std::vector<align::StructureType> m_theLevels;
61  //std::vector<int> theSubDets;
62 
63  //compare surface deformations
64  void compareSurfaceDeformations(TTree* _inputTree11, TTree* _inputTree12);
65  //compares two geometries
66  void compareGeometries(Alignable* refAli,
67  Alignable* curAli,
68  const TrackerTopology* tTopo,
69  const edm::EventSetup& iSetup);
70  //filling the ROOT file
71  void fillTree(Alignable* refAli,
72  const AlgebraicVector& diff, // typedef CLHEP::HepVector AlgebraicVector;
73  const TrackerTopology* tTopo,
74  const edm::EventSetup& iSetup);
75  //for filling identifiers
76  void fillIdentifiers(int subdetlevel, int rawid, const TrackerTopology* tTopo);
77  //converts surveyRcd into alignmentRcd
78  void surveyToTracker(AlignableTracker* ali, Alignments* alignVals, AlignmentErrorsExtended* alignErrors);
79  //need for conversion for surveyToTracker
80  void addSurveyInfo(Alignable* ali);
81  //void createDBGeometry(const edm::EventSetup& iSetup);
82  void createROOTGeometry(const edm::EventSetup& iSetup);
83 
84  // for common tracker system
86  void diffCommonTrackerSystem(Alignable* refAli, Alignable* curAli);
87  bool passIdCut(uint32_t);
88 
96 
100 
101  unsigned int theSurveyIndex;
104 
105  // configurables
106  const std::vector<std::string> levelStrings_;
120  std::vector<unsigned int> weightByIdVector_;
121 
122  std::vector<uint32_t> detIdFlagVector_;
127 
128  std::ifstream moduleListFile_;
129  std::vector<int> moduleList_;
131 
132  //root configuration
135  TFile* theFile_;
136  TTree* alignTree_;
139  TTree* inputTree01_;
140  TTree* inputTree02_;
141  TTree* inputTree11_;
142  TTree* inputTree12_;
143 
147  // changes in global variables
149  // changes local variables: u, v, w, alpha, beta, gamma
152  uint32_t identifiers_[6];
153  double surRot_[9];
154  int type_;
155  double surfDeform_[13];
156 
157  int m_nBins_;
158  double m_rangeLow_;
159  double m_rangeHigh_;
160 
162 
163  std::vector<TrackerMap> m_vtkmap_;
164 
165  std::map<std::string, TH1D*> m_h1_;
166 };
167 
168 #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)
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_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)