CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
178 
182 
186 
190 };
191 
192 #endif
const edm::ESGetToken< CSCGeometry, MuonGeometryRecord > cscGeomIdealToken_
bool passChosen(Alignable *ali)
std::vector< align::StructureType > theLevels
edm::ParameterSet m_params
align::EulerAngles _MuonCommonR
void compareGeometries(Alignable *refAli, Alignable *curAli, Alignable *curAliCopy2)
bool isMother(Alignable *ali)
const edm::ESGetToken< GEMGeometry, MuonGeometryRecord > gemGeomIdealToken_
std::string _setCommonMuonSystem
MuonGeometryArrange(const edm::ParameterSet &)
Do nothing. Required by framework.
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomIdealToken_
bool checkChosen(Alignable *ali)
const edm::ESGetToken< CSCGeometry, MuonGeometryRecord > cscGeomToken3_
void analyze(const edm::Event &, const edm::EventSetup &) override
MuonAlignment * inputAlign2a
MuonAlignment * inputAlign2
const edm::ESGetToken< GEMGeometry, MuonGeometryRecord > gemGeomToken3_
std::vector< unsigned int > _weightByIdVector
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken2_
AlignTransform SurveyValue
void createROOTGeometry(const edm::EventSetup &iSetup)
const Alignments * theSurveyValues
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken1_
align::StructureType _commonMuonLevel
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)
Long64_t numEntries(TFile *hdl, std::string const &trname)
Definition: CollUtil.cc:50
void compare(Alignable *refAli, Alignable *curAli, Alignable *curAliCopy2)
const edm::ESGetToken< CSCGeometry, MuonGeometryRecord > cscGeomToken2_
align::PositionType _MuonCommonCM
MuonAlignment * inputAlign1
void fillTree(Alignable *refAli, const AlgebraicVector &diff)
CLHEP::HepVector AlgebraicVector
AlgebraicVector EulerAngles
Definition: Definitions.h:34
const std::vector< std::string > _levelStrings
AlignableMuon * referenceMuon
const edm::ESGetToken< CSCGeometry, MuonGeometryRecord > cscGeomToken1_
AlignableMuon * currentMuon
align::GlobalVector _MuonCommonT
AlignableMuon * dummyMuon
const edm::ESGetToken< GEMGeometry, MuonGeometryRecord > gemGeomToken2_
Constructor of the full muon geometry.
Definition: AlignableMuon.h:38
const SurveyErrors * theSurveyErrors
void beginJob() override
Read from DB and print survey info.
const edm::ESGetToken< GEMGeometry, MuonGeometryRecord > gemGeomToken1_
const edm::ESGetToken< DTGeometry, MuonGeometryRecord > dtGeomToken3_
std::vector< uint32_t > _detIdFlagVector
std::vector< MGACollection > _mgacollection