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
Vector3DBase< Scalar, GlobalTag >
TrackerGeometryCompare
Definition: TrackerGeometryCompare.h:41
TrackerGeometryCompare::dbetaVal_
float dbetaVal_
Definition: TrackerGeometryCompare.h:146
TrackerGeometryCompare::TrackerCommonT_
align::GlobalVector TrackerCommonT_
Definition: TrackerGeometryCompare.h:123
change_name.diff
diff
Definition: change_name.py:13
TrackerGeometryCompare::theFile_
TFile * theFile_
Definition: TrackerGeometryCompare.h:133
TrackerGeometryCompare::surveyToTracker
void surveyToTracker(AlignableTracker *ali, Alignments *alignVals, AlignmentErrorsExtended *alignErrors)
Definition: TrackerGeometryCompare.cc:906
TrackerGeometryCompare::filename_
std::string filename_
Definition: TrackerGeometryCompare.h:132
EDAnalyzer.h
TrackerGeometryCompare::detIdFlagVector_
std::vector< uint32_t > detIdFlagVector_
Definition: TrackerGeometryCompare.h:121
TrackerGeometryCompare::betaVal_
float betaVal_
Definition: TrackerGeometryCompare.h:144
TrackerGeometryCompare::inputTreenameAlign_
std::string inputTreenameAlign_
Definition: TrackerGeometryCompare.h:109
TrackerGeometryCompare::fillTree
void fillTree(Alignable *refAli, const AlgebraicVector &diff, const TrackerTopology *tTopo, const edm::EventSetup &iSetup)
Definition: TrackerGeometryCompare.cc:794
TrackerGeometryCompare::setCommonTrackerSystem
void setCommonTrackerSystem()
Definition: TrackerGeometryCompare.cc:715
TrackerGeometryCompare::setCommonTrackerSystem_
std::string setCommonTrackerSystem_
Definition: TrackerGeometryCompare.h:114
TrackerGeometryCompare::beginJob
void beginJob() override
Read from DB and print survey info.
Definition: TrackerGeometryCompare.cc:204
TrackerGeometryCompare::inputRootFile1_
TFile * inputRootFile1_
Definition: TrackerGeometryCompare.h:135
TrackerGeometryCompare::inputFilename1_
std::string inputFilename1_
Definition: TrackerGeometryCompare.h:107
TrackerGeometryCompare::inModuleList_
int inModuleList_
Definition: TrackerGeometryCompare.h:143
StructureType.h
TrackerGeometryCompare::inputTree12_
TTree * inputTree12_
Definition: TrackerGeometryCompare.h:140
SurveyErrors.h
TrackerGeometryCompare::cpvTokenDDD_
const edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvTokenDDD_
Definition: TrackerGeometryCompare.h:87
TrackerGeometryCompare::sublevel_
int sublevel_
Definition: TrackerGeometryCompare.h:143
TrackerGeometryCompare::dgammaVal_
float dgammaVal_
Definition: TrackerGeometryCompare.h:146
TrackerTopology
Definition: TrackerTopology.h:16
TrackerGeometryCompare::id_
int id_
Definition: TrackerGeometryCompare.h:143
TrackerGeometryCompare::weightById_
bool weightById_
Definition: TrackerGeometryCompare.h:117
TrackerGeometryCompare::detIdFlagFile_
std::string detIdFlagFile_
Definition: TrackerGeometryCompare.h:116
Alignable
Definition: Alignable.h:27
TrackerGeometryCompare::dvVal_
float dvVal_
Definition: TrackerGeometryCompare.h:148
TrackerGeometryCompare::etaVal_
float etaVal_
Definition: TrackerGeometryCompare.h:144
TrackerGeometryCompare::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: TrackerGeometryCompare.cc:224
TrackerGeometryCompare::fillIdentifiers
void fillIdentifiers(int subdetlevel, int rawid, const TrackerTopology *tTopo)
Definition: TrackerGeometryCompare.cc:997
TrackerGeometryCompare::inputRootFile2_
TFile * inputRootFile2_
Definition: TrackerGeometryCompare.h:136
TrackerGeometryCompare::currentTracker
AlignableTracker * currentTracker
Definition: TrackerGeometryCompare.h:98
TrackerGeometryCompare::weightBy_
std::string weightBy_
Definition: TrackerGeometryCompare.h:113
TrackerGeometryCompare::dalphaVal_
float dalphaVal_
Definition: TrackerGeometryCompare.h:146
edm::one::EDAnalyzer
Definition: EDAnalyzer.h:30
TrackerGeometryCompare::dwVal_
float dwVal_
Definition: TrackerGeometryCompare.h:148
TrackerGeometryCompare::zVal_
float zVal_
Definition: TrackerGeometryCompare.h:144
TrackerGeometryCompare::m_rangeHigh_
double m_rangeHigh_
Definition: TrackerGeometryCompare.h:157
DDCompactView.h
TrackerGeometryCompare::cpvTokenDD4Hep_
const edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > cpvTokenDD4Hep_
Definition: TrackerGeometryCompare.h:88
TrackerGeometryCompare::inputTreenameDeform_
std::string inputTreenameDeform_
Definition: TrackerGeometryCompare.h:110
TrackerGeometryCompare::theSurveyErrors
const SurveyErrors * theSurveyErrors
Definition: TrackerGeometryCompare.h:102
TrackerGeometryCompare::passIdCut
bool passIdCut(uint32_t)
Definition: TrackerGeometryCompare.cc:985
SurveyErrors
Definition: SurveyErrors.h:19
TrackerGeometryCompare::moduleListName_
std::string moduleListName_
Definition: TrackerGeometryCompare.h:106
TrackerGeometryCompare::surRot_
double surRot_[9]
Definition: TrackerGeometryCompare.h:151
TrackerGeometryCompare::duVal_
float duVal_
Definition: TrackerGeometryCompare.h:148
TrackerGeometryCompare::dphiVal_
float dphiVal_
Definition: TrackerGeometryCompare.h:146
TrackerGeometryCompare::moduleInList_
int moduleInList_
Definition: TrackerGeometryCompare.h:129
TrackerGeometryCompare::commonTrackerLevel_
align::StructureType commonTrackerLevel_
Definition: TrackerGeometryCompare.h:122
TrackerGeometryCompare::SurveyValues
Alignments SurveyValues
Definition: TrackerGeometryCompare.h:44
TrackerGeometryCompare::TrackerCommonCM_
align::PositionType TrackerCommonCM_
Definition: TrackerGeometryCompare.h:125
AlgebraicVector
CLHEP::HepVector AlgebraicVector
Definition: AlgebraicObjects.h:13
TrackerGeometryCompare::identifiers_
uint32_t identifiers_[6]
Definition: TrackerGeometryCompare.h:150
TrackerGeometryCompare::weightByIdFile_
std::string weightByIdFile_
Definition: TrackerGeometryCompare.h:118
TrackerGeometryCompare::daVal_
float daVal_
Definition: TrackerGeometryCompare.h:148
TrackerGeometryCompare::drVal_
float drVal_
Definition: TrackerGeometryCompare.h:146
TrackerGeometryCompare::yVal_
float yVal_
Definition: TrackerGeometryCompare.h:144
TrackerGeometryCompare::theSurveyIndex
unsigned int theSurveyIndex
Definition: TrackerGeometryCompare.h:100
TrackerGeometryCompare::referenceTracker
AlignableTracker * referenceTracker
Definition: TrackerGeometryCompare.h:96
TrackerGeometryCompare::m_rangeLow_
double m_rangeLow_
Definition: TrackerGeometryCompare.h:156
TrackerGeometryCompare::compareSurfaceDeformations
void compareSurfaceDeformations(TTree *_inputTree11, TTree *_inputTree12)
Definition: TrackerGeometryCompare.cc:451
TrackerGeometryCompare::endJob
void endJob() override
Definition: TrackerGeometryCompare.cc:206
AlignableTracker
Definition: AlignableTracker.h:17
TrackerGeometryCompare::badModuleQuality_
int badModuleQuality_
Definition: TrackerGeometryCompare.h:143
TrackerGeometryCompare::createROOTGeometry
void createROOTGeometry(const edm::EventSetup &iSetup)
Definition: TrackerGeometryCompare.cc:273
DDCompactView.h
Point3DBase< Scalar, GlobalTag >
TrackerGeometryCompare::xVal_
float xVal_
Definition: TrackerGeometryCompare.h:144
TrackerGeometryCompare::surfDeform_
double surfDeform_[13]
Definition: TrackerGeometryCompare.h:153
TrackerGeometryCompare::compareGeometries
void compareGeometries(Alignable *refAli, Alignable *curAli, const TrackerTopology *tTopo, const edm::EventSetup &iSetup)
Definition: TrackerGeometryCompare.cc:603
AlignTransform
Definition: AlignTransform.h:15
align::StructureType
StructureType
Definition: StructureType.h:16
TrackerGeometryCompare::alignTree_
TTree * alignTree_
Definition: TrackerGeometryCompare.h:134
TrackerGeometryCompare::ptpToken_
const edm::ESGetToken< PTrackerParameters, PTrackerParametersRcd > ptpToken_
Definition: TrackerGeometryCompare.h:91
TrackerGeometryCompare::addSurveyInfo
void addSurveyInfo(Alignable *ali)
Definition: TrackerGeometryCompare.cc:956
TrackerGeometryCompare::m_theLevels
std::vector< align::StructureType > m_theLevels
Definition: TrackerGeometryCompare.h:58
edm::ParameterSet
Definition: ParameterSet.h:47
AlignTools.h
TrackerGeometryCompare::TrackerCommonR_
align::GlobalVector TrackerCommonR_
Definition: TrackerGeometryCompare.h:124
TrackerGeometryCompare::SurveyValue
AlignTransform SurveyValue
Definition: TrackerGeometryCompare.h:43
TrackerGeometryCompare::dyVal_
float dyVal_
Definition: TrackerGeometryCompare.h:146
TrackerGeometryCompare::inputFilename2_
std::string inputFilename2_
Definition: TrackerGeometryCompare.h:108
TrackerGeometryCompare::useDetId_
int useDetId_
Definition: TrackerGeometryCompare.h:143
TrackerGeometryCompare::alphaVal_
float alphaVal_
Definition: TrackerGeometryCompare.h:144
TrackerGeometryCompare::m_nBins_
int m_nBins_
Definition: TrackerGeometryCompare.h:155
TrackerGeometryCompare::levelStrings_
const std::vector< std::string > levelStrings_
Definition: TrackerGeometryCompare.h:105
TrackerGeometryCompare::pixQualityToken_
const edm::ESGetToken< SiPixelQuality, SiPixelQualityRcd > pixQualityToken_
Definition: TrackerGeometryCompare.h:93
TrackerGeometryCompare::mlevel_
int mlevel_
Definition: TrackerGeometryCompare.h:143
TrackerGeometryCompare::m_h1_
std::map< std::string, TH1D * > m_h1_
Definition: TrackerGeometryCompare.h:163
edm::EventSetup
Definition: EventSetup.h:58
TrackerGeometryCompare::moduleListFile_
std::ifstream moduleListFile_
Definition: TrackerGeometryCompare.h:127
TrackerGeometryCompare::detIdFlag_
bool detIdFlag_
Definition: TrackerGeometryCompare.h:115
AlignmentErrorsExtended
Definition: AlignmentErrorsExtended.h:10
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ESGetToken< DDCompactView, IdealGeometryRecord >
TrackerGeometryCompare::geomDetToken_
const edm::ESGetToken< GeometricDet, IdealGeometryRecord > geomDetToken_
Definition: TrackerGeometryCompare.h:90
TrackerGeometryCompare::diffCommonTrackerSystem
void diffCommonTrackerSystem(Alignable *refAli, Alignable *curAli)
Definition: TrackerGeometryCompare.cc:759
TrackerMap.h
TrackerGeometryCompare::theSurveyValues
const Alignments * theSurveyValues
Definition: TrackerGeometryCompare.h:101
TrackerGeometryCompare::surWidth_
float surWidth_
Definition: TrackerGeometryCompare.h:149
TrackerGeometryCompare::dummyTracker
AlignableTracker * dummyTracker
Definition: TrackerGeometryCompare.h:97
TrackerGeometryCompare::topoToken_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
Definition: TrackerGeometryCompare.h:89
TrackerGeometryCompare::mid_
int mid_
Definition: TrackerGeometryCompare.h:143
TrackerGeometryCompare::stripQualityToken_
const edm::ESGetToken< SiStripQuality, SiStripQualityRcd > stripQualityToken_
Definition: TrackerGeometryCompare.h:94
TrackerGeometryCompare::detDim_
int detDim_
Definition: TrackerGeometryCompare.h:143
TrackerGeometryCompare::rVal_
float rVal_
Definition: TrackerGeometryCompare.h:144
TrackerGeometryCompare::dgVal_
float dgVal_
Definition: TrackerGeometryCompare.h:148
TrackerGeometryCompare::writeToDB_
bool writeToDB_
Definition: TrackerGeometryCompare.h:112
TrackerGeometryCompare::dzVal_
float dzVal_
Definition: TrackerGeometryCompare.h:146
TrackerGeometryCompare::weightByIdVector_
std::vector< unsigned int > weightByIdVector_
Definition: TrackerGeometryCompare.h:119
TrackerGeometryCompare::level_
int level_
Definition: TrackerGeometryCompare.h:143
TrackerGeometryCompare::moduleList_
std::vector< int > moduleList_
Definition: TrackerGeometryCompare.h:128
TrackerGeometryCompare::ptitpToken_
const edm::ESGetToken< PTrackerAdditionalParametersPerDet, PTrackerAdditionalParametersPerDetRcd > ptitpToken_
Definition: TrackerGeometryCompare.h:92
TrackerGeometryCompare::type_
int type_
Definition: TrackerGeometryCompare.h:152
TrackerGeometryCompare::dbVal_
float dbVal_
Definition: TrackerGeometryCompare.h:148
AlignableTracker.h
TrackerGeometryCompare::m_vtkmap_
std::vector< TrackerMap > m_vtkmap_
Definition: TrackerGeometryCompare.h:161
ParameterSet.h
TrackerGeometryCompare::gammaVal_
float gammaVal_
Definition: TrackerGeometryCompare.h:144
TrackerGeometryCompare::firstEvent_
bool firstEvent_
Definition: TrackerGeometryCompare.h:159
TrackerGeometryCompare::inputTree11_
TTree * inputTree11_
Definition: TrackerGeometryCompare.h:139
edm::Event
Definition: Event.h:73
TrackerGeometryCompare::surLength_
float surLength_
Definition: TrackerGeometryCompare.h:149
Alignments
Definition: Alignments.h:10
TrackerGeometryCompare::dxVal_
float dxVal_
Definition: TrackerGeometryCompare.h:146
TrackerGeometryCompare::inputTree02_
TTree * inputTree02_
Definition: TrackerGeometryCompare.h:138
TrackerGeometryCompare::inputTree01_
TTree * inputTree01_
Definition: TrackerGeometryCompare.h:137
TrackerGeometryCompare::TrackerGeometryCompare
TrackerGeometryCompare(const edm::ParameterSet &)
Do nothing. Required by framework.
Definition: TrackerGeometryCompare.cc:55
TrackerGeometryCompare::fromDD4hep_
bool fromDD4hep_
Definition: TrackerGeometryCompare.h:111
TrackerGeometryCompare::phiVal_
float phiVal_
Definition: TrackerGeometryCompare.h:144