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 
97 
101 
102  unsigned int theSurveyIndex;
105 
106  // configurables
107  const std::vector<std::string> levelStrings_;
121  std::vector<unsigned int> weightByIdVector_;
123 
124  std::vector<uint32_t> detIdFlagVector_;
129 
130  std::ifstream moduleListFile_;
131  std::vector<int> moduleList_;
133 
134  //root configuration
137  TFile* theFile_;
138  TTree* alignTree_;
141  TTree* inputTree01_;
142  TTree* inputTree02_;
143  TTree* inputTree11_;
144  TTree* inputTree12_;
145 
149  // changes in global variables
151  // changes local variables: u, v, w, alpha, beta, gamma
154  uint32_t identifiers_[6];
155  double surRot_[9];
156  int type_;
157  double surfDeform_[13];
158 
159  int m_nBins_;
160  double m_rangeLow_;
161  double m_rangeHigh_;
162 
164 
165  std::vector<TrackerMap> m_vtkmap_;
166 
167  std::map<std::string, TH1D*> m_h1_;
168 };
169 
170 #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_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)