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 
94 
98 
99  unsigned int theSurveyIndex;
102 
103  // configurables
104  const std::vector<std::string> levelStrings_;
118  std::vector<unsigned int> weightByIdVector_;
119 
120  std::vector<uint32_t> detIdFlagVector_;
125 
126  std::ifstream moduleListFile_;
127  std::vector<int> moduleList_;
129 
130  //root configuration
132  TFile* theFile_;
133  TTree* alignTree_;
136  TTree* inputTree01_;
137  TTree* inputTree02_;
138  TTree* inputTree11_;
139  TTree* inputTree12_;
140 
144  // changes in global variables
146  // changes local variables: u, v, w, alpha, beta, gamma
149  uint32_t identifiers_[6];
150  double surRot_[9];
151  int type_;
152  double surfDeform_[13];
153 
154  int m_nBins_;
155  double m_rangeLow_;
156  double m_rangeHigh_;
157 
159 
160  std::vector<TrackerMap> m_vtkmap_;
161 
162  std::map<std::string, TH1D*> m_h1_;
163 };
164 
165 #endif
Vector3DBase< Scalar, GlobalTag >
TrackerGeometryCompare
Definition: TrackerGeometryCompare.h:41
TrackerGeometryCompare::dbetaVal_
float dbetaVal_
Definition: TrackerGeometryCompare.h:145
TrackerGeometryCompare::TrackerCommonT_
align::GlobalVector TrackerCommonT_
Definition: TrackerGeometryCompare.h:122
change_name.diff
diff
Definition: change_name.py:13
TrackerGeometryCompare::theFile_
TFile * theFile_
Definition: TrackerGeometryCompare.h:132
TrackerGeometryCompare::surveyToTracker
void surveyToTracker(AlignableTracker *ali, Alignments *alignVals, AlignmentErrorsExtended *alignErrors)
Definition: TrackerGeometryCompare.cc:904
TrackerGeometryCompare::filename_
std::string filename_
Definition: TrackerGeometryCompare.h:131
EDAnalyzer.h
TrackerGeometryCompare::detIdFlagVector_
std::vector< uint32_t > detIdFlagVector_
Definition: TrackerGeometryCompare.h:120
TrackerGeometryCompare::betaVal_
float betaVal_
Definition: TrackerGeometryCompare.h:143
TrackerGeometryCompare::inputTreenameAlign_
std::string inputTreenameAlign_
Definition: TrackerGeometryCompare.h:108
TrackerGeometryCompare::fillTree
void fillTree(Alignable *refAli, const AlgebraicVector &diff, const TrackerTopology *tTopo, const edm::EventSetup &iSetup)
Definition: TrackerGeometryCompare.cc:792
TrackerGeometryCompare::setCommonTrackerSystem
void setCommonTrackerSystem()
Definition: TrackerGeometryCompare.cc:713
TrackerGeometryCompare::setCommonTrackerSystem_
std::string setCommonTrackerSystem_
Definition: TrackerGeometryCompare.h:113
TrackerGeometryCompare::beginJob
void beginJob() override
Read from DB and print survey info.
Definition: TrackerGeometryCompare.cc:203
TrackerGeometryCompare::inputRootFile1_
TFile * inputRootFile1_
Definition: TrackerGeometryCompare.h:134
TrackerGeometryCompare::inputFilename1_
std::string inputFilename1_
Definition: TrackerGeometryCompare.h:106
TrackerGeometryCompare::inModuleList_
int inModuleList_
Definition: TrackerGeometryCompare.h:142
StructureType.h
TrackerGeometryCompare::inputTree12_
TTree * inputTree12_
Definition: TrackerGeometryCompare.h:139
SurveyErrors.h
TrackerGeometryCompare::cpvTokenDDD_
const edm::ESGetToken< DDCompactView, IdealGeometryRecord > cpvTokenDDD_
Definition: TrackerGeometryCompare.h:87
TrackerGeometryCompare::sublevel_
int sublevel_
Definition: TrackerGeometryCompare.h:142
TrackerGeometryCompare::dgammaVal_
float dgammaVal_
Definition: TrackerGeometryCompare.h:145
TrackerTopology
Definition: TrackerTopology.h:16
TrackerGeometryCompare::id_
int id_
Definition: TrackerGeometryCompare.h:142
TrackerGeometryCompare::weightById_
bool weightById_
Definition: TrackerGeometryCompare.h:116
TrackerGeometryCompare::detIdFlagFile_
std::string detIdFlagFile_
Definition: TrackerGeometryCompare.h:115
Alignable
Definition: Alignable.h:27
TrackerGeometryCompare::dvVal_
float dvVal_
Definition: TrackerGeometryCompare.h:147
TrackerGeometryCompare::etaVal_
float etaVal_
Definition: TrackerGeometryCompare.h:143
TrackerGeometryCompare::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: TrackerGeometryCompare.cc:223
TrackerGeometryCompare::fillIdentifiers
void fillIdentifiers(int subdetlevel, int rawid, const TrackerTopology *tTopo)
Definition: TrackerGeometryCompare.cc:995
TrackerGeometryCompare::inputRootFile2_
TFile * inputRootFile2_
Definition: TrackerGeometryCompare.h:135
TrackerGeometryCompare::currentTracker
AlignableTracker * currentTracker
Definition: TrackerGeometryCompare.h:97
TrackerGeometryCompare::weightBy_
std::string weightBy_
Definition: TrackerGeometryCompare.h:112
TrackerGeometryCompare::dalphaVal_
float dalphaVal_
Definition: TrackerGeometryCompare.h:145
edm::one::EDAnalyzer
Definition: EDAnalyzer.h:30
TrackerGeometryCompare::dwVal_
float dwVal_
Definition: TrackerGeometryCompare.h:147
TrackerGeometryCompare::zVal_
float zVal_
Definition: TrackerGeometryCompare.h:143
TrackerGeometryCompare::m_rangeHigh_
double m_rangeHigh_
Definition: TrackerGeometryCompare.h:156
DDCompactView.h
TrackerGeometryCompare::cpvTokenDD4Hep_
const edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > cpvTokenDD4Hep_
Definition: TrackerGeometryCompare.h:88
TrackerGeometryCompare::inputTreenameDeform_
std::string inputTreenameDeform_
Definition: TrackerGeometryCompare.h:109
TrackerGeometryCompare::theSurveyErrors
const SurveyErrors * theSurveyErrors
Definition: TrackerGeometryCompare.h:101
TrackerGeometryCompare::passIdCut
bool passIdCut(uint32_t)
Definition: TrackerGeometryCompare.cc:983
SurveyErrors
Definition: SurveyErrors.h:19
TrackerGeometryCompare::moduleListName_
std::string moduleListName_
Definition: TrackerGeometryCompare.h:105
TrackerGeometryCompare::surRot_
double surRot_[9]
Definition: TrackerGeometryCompare.h:150
TrackerGeometryCompare::duVal_
float duVal_
Definition: TrackerGeometryCompare.h:147
TrackerGeometryCompare::dphiVal_
float dphiVal_
Definition: TrackerGeometryCompare.h:145
TrackerGeometryCompare::moduleInList_
int moduleInList_
Definition: TrackerGeometryCompare.h:128
TrackerGeometryCompare::commonTrackerLevel_
align::StructureType commonTrackerLevel_
Definition: TrackerGeometryCompare.h:121
TrackerGeometryCompare::SurveyValues
Alignments SurveyValues
Definition: TrackerGeometryCompare.h:44
TrackerGeometryCompare::TrackerCommonCM_
align::PositionType TrackerCommonCM_
Definition: TrackerGeometryCompare.h:124
AlgebraicVector
CLHEP::HepVector AlgebraicVector
Definition: AlgebraicObjects.h:13
TrackerGeometryCompare::identifiers_
uint32_t identifiers_[6]
Definition: TrackerGeometryCompare.h:149
TrackerGeometryCompare::weightByIdFile_
std::string weightByIdFile_
Definition: TrackerGeometryCompare.h:117
TrackerGeometryCompare::daVal_
float daVal_
Definition: TrackerGeometryCompare.h:147
TrackerGeometryCompare::drVal_
float drVal_
Definition: TrackerGeometryCompare.h:145
TrackerGeometryCompare::yVal_
float yVal_
Definition: TrackerGeometryCompare.h:143
TrackerGeometryCompare::theSurveyIndex
unsigned int theSurveyIndex
Definition: TrackerGeometryCompare.h:99
TrackerGeometryCompare::referenceTracker
AlignableTracker * referenceTracker
Definition: TrackerGeometryCompare.h:95
TrackerGeometryCompare::m_rangeLow_
double m_rangeLow_
Definition: TrackerGeometryCompare.h:155
TrackerGeometryCompare::compareSurfaceDeformations
void compareSurfaceDeformations(TTree *_inputTree11, TTree *_inputTree12)
Definition: TrackerGeometryCompare.cc:449
TrackerGeometryCompare::endJob
void endJob() override
Definition: TrackerGeometryCompare.cc:205
AlignableTracker
Definition: AlignableTracker.h:17
TrackerGeometryCompare::badModuleQuality_
int badModuleQuality_
Definition: TrackerGeometryCompare.h:142
TrackerGeometryCompare::createROOTGeometry
void createROOTGeometry(const edm::EventSetup &iSetup)
Definition: TrackerGeometryCompare.cc:272
DDCompactView.h
Point3DBase< Scalar, GlobalTag >
TrackerGeometryCompare::xVal_
float xVal_
Definition: TrackerGeometryCompare.h:143
TrackerGeometryCompare::surfDeform_
double surfDeform_[13]
Definition: TrackerGeometryCompare.h:152
TrackerGeometryCompare::compareGeometries
void compareGeometries(Alignable *refAli, Alignable *curAli, const TrackerTopology *tTopo, const edm::EventSetup &iSetup)
Definition: TrackerGeometryCompare.cc:601
AlignTransform
Definition: AlignTransform.h:15
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
align::StructureType
StructureType
Definition: StructureType.h:16
TrackerGeometryCompare::alignTree_
TTree * alignTree_
Definition: TrackerGeometryCompare.h:133
TrackerGeometryCompare::ptpToken_
const edm::ESGetToken< PTrackerParameters, PTrackerParametersRcd > ptpToken_
Definition: TrackerGeometryCompare.h:91
TrackerGeometryCompare::addSurveyInfo
void addSurveyInfo(Alignable *ali)
Definition: TrackerGeometryCompare.cc:954
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:123
TrackerGeometryCompare::SurveyValue
AlignTransform SurveyValue
Definition: TrackerGeometryCompare.h:43
TrackerGeometryCompare::dyVal_
float dyVal_
Definition: TrackerGeometryCompare.h:145
TrackerGeometryCompare::inputFilename2_
std::string inputFilename2_
Definition: TrackerGeometryCompare.h:107
TrackerGeometryCompare::useDetId_
int useDetId_
Definition: TrackerGeometryCompare.h:142
TrackerGeometryCompare::alphaVal_
float alphaVal_
Definition: TrackerGeometryCompare.h:143
TrackerGeometryCompare::m_nBins_
int m_nBins_
Definition: TrackerGeometryCompare.h:154
TrackerGeometryCompare::levelStrings_
const std::vector< std::string > levelStrings_
Definition: TrackerGeometryCompare.h:104
TrackerGeometryCompare::pixQualityToken_
const edm::ESGetToken< SiPixelQuality, SiPixelQualityRcd > pixQualityToken_
Definition: TrackerGeometryCompare.h:92
TrackerGeometryCompare::mlevel_
int mlevel_
Definition: TrackerGeometryCompare.h:142
TrackerGeometryCompare::m_h1_
std::map< std::string, TH1D * > m_h1_
Definition: TrackerGeometryCompare.h:162
edm::EventSetup
Definition: EventSetup.h:58
TrackerGeometryCompare::moduleListFile_
std::ifstream moduleListFile_
Definition: TrackerGeometryCompare.h:126
TrackerGeometryCompare::detIdFlag_
bool detIdFlag_
Definition: TrackerGeometryCompare.h:114
AlignmentErrorsExtended
Definition: AlignmentErrorsExtended.h:10
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:757
TrackerMap.h
TrackerGeometryCompare::theSurveyValues
const Alignments * theSurveyValues
Definition: TrackerGeometryCompare.h:100
TrackerGeometryCompare::surWidth_
float surWidth_
Definition: TrackerGeometryCompare.h:148
TrackerGeometryCompare::dummyTracker
AlignableTracker * dummyTracker
Definition: TrackerGeometryCompare.h:96
TrackerGeometryCompare::topoToken_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
Definition: TrackerGeometryCompare.h:89
TrackerGeometryCompare::mid_
int mid_
Definition: TrackerGeometryCompare.h:142
TrackerGeometryCompare::stripQualityToken_
const edm::ESGetToken< SiStripQuality, SiStripQualityRcd > stripQualityToken_
Definition: TrackerGeometryCompare.h:93
TrackerGeometryCompare::detDim_
int detDim_
Definition: TrackerGeometryCompare.h:142
TrackerGeometryCompare::rVal_
float rVal_
Definition: TrackerGeometryCompare.h:143
TrackerGeometryCompare::dgVal_
float dgVal_
Definition: TrackerGeometryCompare.h:147
TrackerGeometryCompare::writeToDB_
bool writeToDB_
Definition: TrackerGeometryCompare.h:111
TrackerGeometryCompare::dzVal_
float dzVal_
Definition: TrackerGeometryCompare.h:145
TrackerGeometryCompare::weightByIdVector_
std::vector< unsigned int > weightByIdVector_
Definition: TrackerGeometryCompare.h:118
TrackerGeometryCompare::level_
int level_
Definition: TrackerGeometryCompare.h:142
TrackerGeometryCompare::moduleList_
std::vector< int > moduleList_
Definition: TrackerGeometryCompare.h:127
TrackerGeometryCompare::type_
int type_
Definition: TrackerGeometryCompare.h:151
TrackerGeometryCompare::dbVal_
float dbVal_
Definition: TrackerGeometryCompare.h:147
AlignableTracker.h
TrackerGeometryCompare::m_vtkmap_
std::vector< TrackerMap > m_vtkmap_
Definition: TrackerGeometryCompare.h:160
ParameterSet.h
TrackerGeometryCompare::gammaVal_
float gammaVal_
Definition: TrackerGeometryCompare.h:143
TrackerGeometryCompare::firstEvent_
bool firstEvent_
Definition: TrackerGeometryCompare.h:158
TrackerGeometryCompare::inputTree11_
TTree * inputTree11_
Definition: TrackerGeometryCompare.h:138
edm::Event
Definition: Event.h:73
TrackerGeometryCompare::surLength_
float surLength_
Definition: TrackerGeometryCompare.h:148
Alignments
Definition: Alignments.h:10
TrackerGeometryCompare::dxVal_
float dxVal_
Definition: TrackerGeometryCompare.h:145
TrackerGeometryCompare::inputTree02_
TTree * inputTree02_
Definition: TrackerGeometryCompare.h:137
TrackerGeometryCompare::inputTree01_
TTree * inputTree01_
Definition: TrackerGeometryCompare.h:136
TrackerGeometryCompare::TrackerGeometryCompare
TrackerGeometryCompare(const edm::ParameterSet &)
Do nothing. Required by framework.
Definition: TrackerGeometryCompare.cc:55
TrackerGeometryCompare::fromDD4hep_
bool fromDD4hep_
Definition: TrackerGeometryCompare.h:110
TrackerGeometryCompare::phiVal_
float phiVal_
Definition: TrackerGeometryCompare.h:143