CMS 3D CMS Logo

MuonGeometryArrange.h
Go to the documentation of this file.
1 #ifndef Alignment_OfflineValidation_MuonGeometryArrange_h
2 #define Alignment_OfflineValidation_MuonGeometryArrange_h
3 
27 
29 
30 #include <algorithm>
31 #include "TTree.h"
32 
33 class AlignTransform;
34 class MuonAlignment;
35 class TGraph;
36 class TH2F;
37 
39 public:
42 
45 
47  void beginJob() override;
48 
49  void analyze(const edm::Event&, const edm::EventSetup&) override;
50  // virtual void endJob(void);
51 
52 private:
53  //parameters
55  std::vector<align::StructureType> theLevels;
56  //std::vector<int> theSubDets;
57 
58  //compares two geometries, driver routine
59  void compare(Alignable* refAli, Alignable* curAli, Alignable* curAliCopy2);
60  void endHist();
61  // Map one onto other and compare details
62  void compareGeometries(Alignable* refAli, Alignable* curAli, Alignable* curAliCopy2);
63  //filling the ROOT file
64  void fillTree(Alignable* refAli, const AlgebraicVector& diff);
65  //void createDBGeometry(const edm::EventSetup& iSetup);
66  void createROOTGeometry(const edm::EventSetup& iSetup);
67  void makeGraph(int sizeI,
68  float smi,
69  float sma,
70  float minV,
71  float maxV,
72  TH2F* dxh,
73  TGraph* grx,
74  const char* name,
75  const char* title,
76  const char* titleg,
77  const char* axis,
78  const float* xp,
79  const float* yp,
80  int numEntries);
81 
82  bool passIdCut(uint32_t);
83  bool checkChosen(Alignable* ali); // Is ali one of wanted CSC?
84  bool passChosen(Alignable* ali); // Is ali either one of wanted
85  // CSC or does it contain them?
86  bool isMother(Alignable* ali); // Is ali the container (ring)?
87 
93 
94  unsigned int theSurveyIndex;
97 
98  // configurables
99  const std::vector<std::string> _levelStrings;
110  std::vector<unsigned int> _weightByIdVector;
111  int _endcap;
112  int _station;
113  int _ring;
114 
115  std::vector<uint32_t> _detIdFlagVector;
120 
121  //root configuration
123 
124  struct MGACollection {
125  int id;
126  int level;
127  int mid;
128  int mlevel;
129  int sublevel;
130  float x, y, z;
131  float r, phi, eta;
132  float alpha, beta, gamma;
133  float dx, dy, dz;
134  float dr, dphi; // no deta?
135  float dalpha, dbeta, dgamma;
136  float ldx, ldy, ldz;
137  float ldr, ldphi; // no deta?
139  float rotx, roty, rotz;
140  float drotx, droty, drotz;
141  float surW, surL; // surWidth and length
142  double surRot[9];
143  int phipos;
144  };
145 
146  std::vector<MGACollection> _mgacollection;
147  // Two sets of alignment inputs
153 
154  TFile* _theFile;
155  TTree* _alignTree;
158  TTree* _inputTree1;
159  TTree* _inputTree2;
160 
169  double _surRot[9];
170 
172 
174 };
175 
176 #endif
Vector3DBase< Scalar, GlobalTag >
MuonGeometryArrange::_dzVal
float _dzVal
Definition: MuonGeometryArrange.h:163
change_name.diff
diff
Definition: change_name.py:13
MuonGeometryArrange::_inputRootFile2
TFile * _inputRootFile2
Definition: MuonGeometryArrange.h:157
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
MuonGeometryArrange::_useDetId
int _useDetId
Definition: MuonGeometryArrange.h:161
MuonGeometryArrange::_MuonCommonT
align::GlobalVector _MuonCommonT
Definition: MuonGeometryArrange.h:117
MuonGeometryArrange::_inputTreename
std::string _inputTreename
Definition: MuonGeometryArrange.h:102
MuonGeometryArrange::MGACollection::mid
int mid
Definition: MuonGeometryArrange.h:127
MuonGeometryArrange::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: MuonGeometryArrange.cc:623
MuonGeometryArrange::MGACollection::sublevel
int sublevel
Definition: MuonGeometryArrange.h:129
MuonGeometryArrange::compareGeometries
void compareGeometries(Alignable *refAli, Alignable *curAli, Alignable *curAliCopy2)
Definition: MuonGeometryArrange.cc:684
MuonGeometryArrange::MGACollection::dz
float dz
Definition: MuonGeometryArrange.h:133
MuonGeometryArrange::MGACollection::beta
float beta
Definition: MuonGeometryArrange.h:132
MuonGeometryArrange::inputAlign2
MuonAlignment * inputAlign2
Definition: MuonGeometryArrange.h:151
StructureType.h
MuonGeometryArrange::MGACollection::dr
float dr
Definition: MuonGeometryArrange.h:134
MuonGeometryArrange::_weightByIdVector
std::vector< unsigned int > _weightByIdVector
Definition: MuonGeometryArrange.h:110
SurveyErrors.h
MuonGeometryArrange::MGACollection::surL
float surL
Definition: MuonGeometryArrange.h:141
MuonGeometryArrange::_ldxVal
float _ldxVal
Definition: MuonGeometryArrange.h:164
MuonGeometryArrange::SurveyValue
AlignTransform SurveyValue
Definition: MuonGeometryArrange.h:40
MuonGeometryArrange::theSurveyValues
const Alignments * theSurveyValues
Definition: MuonGeometryArrange.h:95
MuonGeometryArrange::_inputXMLReference
std::string _inputXMLReference
Definition: MuonGeometryArrange.h:149
MuonGeometryArrange::MGACollection::drotz
float drotz
Definition: MuonGeometryArrange.h:140
MuonGeometryArrange::MGACollection::x
float x
Definition: MuonGeometryArrange.h:130
Alignable
Definition: Alignable.h:27
MuonGeometryArrange::_filename
std::string _filename
Definition: MuonGeometryArrange.h:122
MuonGeometryArrange::MGACollection::ldx
float ldx
Definition: MuonGeometryArrange.h:136
MuonGeometryArrange::MGACollection::mlevel
int mlevel
Definition: MuonGeometryArrange.h:128
MuonGeometryArrange::theSurveyErrors
const SurveyErrors * theSurveyErrors
Definition: MuonGeometryArrange.h:96
MuonGeometryArrange::_writeToDB
bool _writeToDB
Definition: MuonGeometryArrange.h:103
MuonGeometryArrange::_surRot
double _surRot[9]
Definition: MuonGeometryArrange.h:169
MuonGeometryArrange::MGACollection::y
float y
Definition: MuonGeometryArrange.h:130
MuonGeometryArrange::MGACollection::roty
float roty
Definition: MuonGeometryArrange.h:139
MuonGeometryArrange::_theFile
TFile * _theFile
Definition: MuonGeometryArrange.h:154
MuonGeometryArrange::MGACollection::ldr
float ldr
Definition: MuonGeometryArrange.h:137
EDAnalyzer.h
MuonGeometryArrange::_rVal
float _rVal
Definition: MuonGeometryArrange.h:162
MuonGeometryArrange::_MuonCommonCM
align::PositionType _MuonCommonCM
Definition: MuonGeometryArrange.h:119
MuonGeometryArrange::MGACollection::dy
float dy
Definition: MuonGeometryArrange.h:133
MuonGeometryArrange::MGACollection::dx
float dx
Definition: MuonGeometryArrange.h:133
MuonGeometryArrange::_zVal
float _zVal
Definition: MuonGeometryArrange.h:162
MuonGeometryArrange::checkChosen
bool checkChosen(Alignable *ali)
Definition: MuonGeometryArrange.cc:1114
MuonGeometryArrange::MGACollection::dalpha
float dalpha
Definition: MuonGeometryArrange.h:135
edm::EDAnalyzer
Definition: EDAnalyzer.h:28
MuonGeometryArrange::_xVal
float _xVal
Definition: MuonGeometryArrange.h:162
SurveyErrors
Definition: SurveyErrors.h:19
MuonGeometryArrange::_betaVal
float _betaVal
Definition: MuonGeometryArrange.h:162
MuonGeometryArrange::_surWidth
float _surWidth
Definition: MuonGeometryArrange.h:168
MuonAlignment
Definition: MuonAlignment.h:20
MuonGeometryArrange::MGACollection::surRot
double surRot[9]
Definition: MuonGeometryArrange.h:142
MuonGeometryArrange::_rotxVal
float _rotxVal
Definition: MuonGeometryArrange.h:166
MuonGeometryArrange::_drotxVal
float _drotxVal
Definition: MuonGeometryArrange.h:167
MuonGeometryArrange::passIdCut
bool passIdCut(uint32_t)
Definition: MuonGeometryArrange.cc:1169
MuonGeometryArrange::MGACollection::level
int level
Definition: MuonGeometryArrange.h:126
MuonGeometryArrange::m_params
edm::ParameterSet m_params
Definition: MuonGeometryArrange.h:54
MuonGeometryArrange::_mlevel
int _mlevel
Definition: MuonGeometryArrange.h:161
MuonGeometryArrange::inputAlign1
MuonAlignment * inputAlign1
Definition: MuonGeometryArrange.h:150
MuonGeometryArrange::inputAlign2a
MuonAlignment * inputAlign2a
Definition: MuonGeometryArrange.h:152
MuonGeometryArrange::MGACollection::rotz
float rotz
Definition: MuonGeometryArrange.h:139
AlgebraicVector
CLHEP::HepVector AlgebraicVector
Definition: AlgebraicObjects.h:13
MuonGeometryArrange::MGACollection::ldphi
float ldphi
Definition: MuonGeometryArrange.h:137
MuonGeometryArrange::_inputTree1
TTree * _inputTree1
Definition: MuonGeometryArrange.h:158
MuonGeometryArrange::MGACollection::phi
float phi
Definition: MuonGeometryArrange.h:131
MuonGeometryArrange::_dxVal
float _dxVal
Definition: MuonGeometryArrange.h:163
MuonGeometryArrange::_dyVal
float _dyVal
Definition: MuonGeometryArrange.h:163
MuonGeometryArrange::MGACollection
Definition: MuonGeometryArrange.h:124
MuonGeometryArrange::MGACollection::droty
float droty
Definition: MuonGeometryArrange.h:140
MuonGeometryArrange::_inputFilename2
std::string _inputFilename2
Definition: MuonGeometryArrange.h:101
MuonGeometryArrange::MGACollection::useDetId
int useDetId
Definition: MuonGeometryArrange.h:138
MuonGeometryArrange::MGACollection::dbeta
float dbeta
Definition: MuonGeometryArrange.h:135
MuonGeometryArrange::_setCommonMuonSystem
std::string _setCommonMuonSystem
Definition: MuonGeometryArrange.h:105
MuonGeometryArrange::_dphiVal
float _dphiVal
Definition: MuonGeometryArrange.h:163
MuonGeometryArrange::_MuonCommonR
align::EulerAngles _MuonCommonR
Definition: MuonGeometryArrange.h:118
MuonGeometryArrange::MGACollection::dphi
float dphi
Definition: MuonGeometryArrange.h:134
MuonGeometryArrange::_surLength
float _surLength
Definition: MuonGeometryArrange.h:168
Point3DBase< Scalar, GlobalTag >
MuonGeometryArrange::MGACollection::dgamma
float dgamma
Definition: MuonGeometryArrange.h:135
AlignTransform
Definition: AlignTransform.h:15
MuonGeometryArrange::beginJob
void beginJob() override
Read from DB and print survey info.
Definition: MuonGeometryArrange.cc:618
MuonGeometryArrange::_ldphiVal
float _ldphiVal
Definition: MuonGeometryArrange.h:165
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::numEntries
Long64_t numEntries(TFile *hdl, std::string const &trname)
Definition: CollUtil.cc:50
align::StructureType
StructureType
Definition: StructureType.h:16
MuonGeometryArrange::_detIdFlagFile
std::string _detIdFlagFile
Definition: MuonGeometryArrange.h:107
MuonGeometryArrange::inputGeometry2
Alignable * inputGeometry2
Definition: MuonGeometryArrange.h:92
MuonGeometryArrange::MGACollection::gamma
float gamma
Definition: MuonGeometryArrange.h:132
edm::ParameterSet
Definition: ParameterSet.h:47
AlignTools.h
MuonGeometryArrange::MGACollection::id
int id
Definition: MuonGeometryArrange.h:125
MuonGeometryArrange::_ring
int _ring
Definition: MuonGeometryArrange.h:113
AlignableMuon.h
MuonGeometryArrange::_inputRootFile1
TFile * _inputRootFile1
Definition: MuonGeometryArrange.h:156
MuonGeometryArrange::_weightByIdFile
std::string _weightByIdFile
Definition: MuonGeometryArrange.h:109
MuonGeometryArrange::_drotzVal
float _drotzVal
Definition: MuonGeometryArrange.h:167
MuonGeometryArrange::_rotyVal
float _rotyVal
Definition: MuonGeometryArrange.h:166
MuonGeometryArrange::_inputXMLCurrent
std::string _inputXMLCurrent
Definition: MuonGeometryArrange.h:148
AlignableMuon
Constructor of the full muon geometry.
Definition: AlignableMuon.h:33
MuonGeometryArrange::idealInputLabel2a
std::string idealInputLabel2a
Definition: MuonGeometryArrange.h:173
MuonGeometryArrange::inputGeometry1
Alignable * inputGeometry1
Definition: MuonGeometryArrange.h:91
MuonGeometryArrange::MGACollection::r
float r
Definition: MuonGeometryArrange.h:131
MuonGeometryArrange::MGACollection::ldy
float ldy
Definition: MuonGeometryArrange.h:136
MuonGeometryArrange::isMother
bool isMother(Alignable *ali)
Definition: MuonGeometryArrange.cc:1096
MuonGeometryArrange::passChosen
bool passChosen(Alignable *ali)
Definition: MuonGeometryArrange.cc:1139
MuonGeometryArrange::theSurveyIndex
unsigned int theSurveyIndex
Definition: MuonGeometryArrange.h:94
MuonGeometryArrange::_gammaVal
float _gammaVal
Definition: MuonGeometryArrange.h:162
MuonGeometryArrange::_level
int _level
Definition: MuonGeometryArrange.h:161
MuonGeometryArrange::_dgammaVal
float _dgammaVal
Definition: MuonGeometryArrange.h:164
MuonGeometryArrange::_phiVal
float _phiVal
Definition: MuonGeometryArrange.h:162
MuonGeometryArrange::SurveyValues
Alignments SurveyValues
Definition: MuonGeometryArrange.h:41
MuonGeometryArrange::MGACollection::rotx
float rotx
Definition: MuonGeometryArrange.h:139
edm::EventSetup
Definition: EventSetup.h:57
MuonGeometryArrange::MGACollection::phipos
int phipos
Definition: MuonGeometryArrange.h:143
align::EulerAngles
AlgebraicVector EulerAngles
Definition: Definitions.h:34
MuonGeometryArrange::MGACollection::alpha
float alpha
Definition: MuonGeometryArrange.h:132
MuonGeometryArrange::_detDim
int _detDim
Definition: MuonGeometryArrange.h:161
MuonGeometryArrange::_endcap
int _endcap
Definition: MuonGeometryArrange.h:111
MuonGeometryArrange::_dbetaVal
float _dbetaVal
Definition: MuonGeometryArrange.h:164
MuonGeometryArrange::dummyMuon
AlignableMuon * dummyMuon
Definition: MuonGeometryArrange.h:89
MuonGeometryArrange::_etaVal
float _etaVal
Definition: MuonGeometryArrange.h:162
MuonGeometryArrange::_weightBy
std::string _weightBy
Definition: MuonGeometryArrange.h:104
MuonGeometryArrange::_drVal
float _drVal
Definition: MuonGeometryArrange.h:163
MuonGeometryArrange::idealInputLabel1
std::string idealInputLabel1
Definition: MuonGeometryArrange.h:173
MuonGeometryArrange::makeGraph
void makeGraph(int sizeI, float smi, float sma, float minV, float maxV, TH2F *dxh, TGraph *grx, const char *name, const char *title, const char *titleg, const char *axis, const float *xp, const float *yp, int numEntries)
Definition: MuonGeometryArrange.cc:575
MuonGeometryArrange::MuonGeometryArrange
MuonGeometryArrange(const edm::ParameterSet &)
Do nothing. Required by framework.
Definition: MuonGeometryArrange.cc:42
MuonGeometryArrange::compare
void compare(Alignable *refAli, Alignable *curAli, Alignable *curAliCopy2)
Definition: MuonGeometryArrange.cc:662
MuonGeometryArrange::_ldrVal
float _ldrVal
Definition: MuonGeometryArrange.h:165
MuonGeometryArrange::currentMuon
AlignableMuon * currentMuon
Definition: MuonGeometryArrange.h:90
MuonGeometryArrange::_inputTree2
TTree * _inputTree2
Definition: MuonGeometryArrange.h:159
MuonGeometryArrange::createROOTGeometry
void createROOTGeometry(const edm::EventSetup &iSetup)
Definition: MuonGeometryArrange.cc:621
MuonGeometryArrange::_station
int _station
Definition: MuonGeometryArrange.h:112
MuonGeometryArrange::_ldyVal
float _ldyVal
Definition: MuonGeometryArrange.h:164
MuonGeometryArrange::_weightById
bool _weightById
Definition: MuonGeometryArrange.h:108
MuonGeometryArrange::_commonMuonLevel
align::StructureType _commonMuonLevel
Definition: MuonGeometryArrange.h:116
MuonGeometryArrange::MGACollection::ldz
float ldz
Definition: MuonGeometryArrange.h:136
MuonGeometryArrange::_mgacollection
std::vector< MGACollection > _mgacollection
Definition: MuonGeometryArrange.h:146
MuonGeometryArrange::_detIdFlag
bool _detIdFlag
Definition: MuonGeometryArrange.h:106
MuonGeometryArrange::idealInputLabel2
std::string idealInputLabel2
Definition: MuonGeometryArrange.h:173
MuonGeometryArrange::_alignTree
TTree * _alignTree
Definition: MuonGeometryArrange.h:155
MuonGeometryArrange::_alphaVal
float _alphaVal
Definition: MuonGeometryArrange.h:162
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
MuonGeometryArrange::MGACollection::surW
float surW
Definition: MuonGeometryArrange.h:141
MuonGeometryArrange::_mid
int _mid
Definition: MuonGeometryArrange.h:161
MuonGeometryArrange::_inputFilename1
std::string _inputFilename1
Definition: MuonGeometryArrange.h:100
MuonGeometryArrange::_sublevel
int _sublevel
Definition: MuonGeometryArrange.h:161
MuonGeometryArrange::endHist
void endHist()
Definition: MuonGeometryArrange.cc:151
MuonGeometryArrange::_ldzVal
float _ldzVal
Definition: MuonGeometryArrange.h:164
MuonGeometryArrange::MGACollection::z
float z
Definition: MuonGeometryArrange.h:130
MuonGeometryArrange::theLevels
std::vector< align::StructureType > theLevels
Definition: MuonGeometryArrange.h:55
ParameterSet.h
MuonGeometryArrange::MGACollection::detDim
int detDim
Definition: MuonGeometryArrange.h:138
MuonGeometryArrange::_levelStrings
const std::vector< std::string > _levelStrings
Definition: MuonGeometryArrange.h:99
MuonGeometryArrange::fillTree
void fillTree(Alignable *refAli, const AlgebraicVector &diff)
Definition: MuonGeometryArrange.cc:891
edm::Event
Definition: Event.h:73
MuonGeometryArrange::referenceMuon
AlignableMuon * referenceMuon
Definition: MuonGeometryArrange.h:88
MuonGeometryArrange::_drotyVal
float _drotyVal
Definition: MuonGeometryArrange.h:167
MuonGeometryArrange
Definition: MuonGeometryArrange.h:38
MuonGeometryArrange::_yVal
float _yVal
Definition: MuonGeometryArrange.h:162
Alignments
Definition: Alignments.h:10
MuonGeometryArrange::_detIdFlagVector
std::vector< uint32_t > _detIdFlagVector
Definition: MuonGeometryArrange.h:115
MuonGeometryArrange::_dalphaVal
float _dalphaVal
Definition: MuonGeometryArrange.h:163
MuonGeometryArrange::_id
int _id
Definition: MuonGeometryArrange.h:161
MuonGeometryArrange::MGACollection::drotx
float drotx
Definition: MuonGeometryArrange.h:140
MuonGeometryArrange::firstEvent_
bool firstEvent_
Definition: MuonGeometryArrange.h:171
MuonGeometryArrange::MGACollection::eta
float eta
Definition: MuonGeometryArrange.h:131
MuonGeometryArrange::_rotzVal
float _rotzVal
Definition: MuonGeometryArrange.h:166