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 edm::EDAnalyzer
40 {
41 public:
44 
47  const edm::ParameterSet&
48  );
49 
51  void beginJob() override;
52 
53  void analyze(
54  const edm::Event&,
55  const edm::EventSetup&
56  ) override;
57 // virtual void endJob(void);
58 
59 private:
60 
61 
62  //parameters
64  std::vector<align::StructureType> theLevels;
65  //std::vector<int> theSubDets;
66 
67  //compares two geometries, driver routine
68  void compare(Alignable* refAli, Alignable* curAli,
69  Alignable* curAliCopy2);
70  void endHist();
71  // Map one onto other and compare details
72  void compareGeometries(Alignable* refAli, Alignable* curAli,
73  Alignable* curAliCopy2);
74  //filling the ROOT file
75  void fillTree(Alignable *refAli, const AlgebraicVector& diff);
76  //void createDBGeometry(const edm::EventSetup& iSetup);
77  void createROOTGeometry(const edm::EventSetup& iSetup);
78  void makeGraph(int sizeI, float smi, float sma, float minV,
79  float maxV, TH2F* dxh, TGraph* grx, const char* name,
80  const char* title, const char* titleg, const char* axis,
81  const float* xp, const float* yp, int numEntries);
82 
83  bool passIdCut( uint32_t );
84  bool checkChosen( Alignable* ali ); // Is ali one of wanted CSC?
85  bool passChosen( Alignable* ali ); // Is ali either one of wanted
86  // CSC or does it contain them?
87  bool isMother( Alignable* ali ); // Is ali the container (ring)?
88 
94 
95  unsigned int theSurveyIndex;
98 
99  // configurables
100  const std::vector<std::string> _levelStrings;
104  bool _writeToDB;
111  std::vector< unsigned int > _weightByIdVector;
112  int _endcap;
113  int _station;
114  int _ring;
115 
116  std::vector< uint32_t > _detIdFlagVector;
121 
122  //root configuration
124 
126  int id;
127  int level;
128  int mid;
129  int mlevel;
130  int sublevel;
131  float x,y,z;
132  float r, phi, eta;
133  float alpha, beta, gamma;
134  float dx, dy, dz;
135  float dr, dphi; // no deta?
136  float dalpha, dbeta, dgamma;
137  float ldx, ldy, ldz;
138  float ldr, ldphi; // no deta?
140  float rotx, roty, rotz;
141  float drotx, droty, drotz;
142  float surW, surL; // surWidth and length
143  double surRot[9];
144  int phipos;
145 };
146 
147  std::vector<MGACollection> _mgacollection;
148  // Two sets of alignment inputs
154 
155  TFile* _theFile;
156  TTree* _alignTree;
159  TTree* _inputTree1;
160  TTree* _inputTree2;
161 
170  double _surRot[9];
171 
173 
174 };
175 
176 
177 
178 
179 #endif
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)
std::string _setCommonMuonSystem
MuonGeometryArrange(const edm::ParameterSet &)
Do nothing. Required by framework.
std::vector< unsigned int > _weightByIdVector
bool checkChosen(Alignable *ali)
void analyze(const edm::Event &, const edm::EventSetup &) override
MuonAlignment * inputAlign2a
MuonAlignment * inputAlign2
AlignTransform SurveyValue
void createROOTGeometry(const edm::EventSetup &iSetup)
const Alignments * theSurveyValues
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)
align::PositionType _MuonCommonCM
std::vector< uint32_t > _detIdFlagVector
MuonAlignment * inputAlign1
void fillTree(Alignable *refAli, const AlgebraicVector &diff)
CLHEP::HepVector AlgebraicVector
AlgebraicVector EulerAngles
Definition: Definitions.h:36
const std::vector< std::string > _levelStrings
AlignableMuon * referenceMuon
AlignableMuon * currentMuon
align::GlobalVector _MuonCommonT
AlignableMuon * dummyMuon
Constructor of the full muon geometry.
Definition: AlignableMuon.h:37
const SurveyErrors * theSurveyErrors
void beginJob() override
Read from DB and print survey info.
std::vector< MGACollection > _mgacollection