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  typedef std::vector<Alignable*> Alignables;
45 
48  const edm::ParameterSet&
49  );
50 
52  virtual void beginJob();
53 
54  virtual void analyze(
55  const edm::Event&,
56  const edm::EventSetup&
57  );
58 // virtual void endJob(void);
59 
60 private:
61 
62 
63  //parameters
65  std::vector<align::StructureType> theLevels;
66  //std::vector<int> theSubDets;
67 
68  //compares two geometries, driver routine
69  void compare(Alignable* refAli, Alignable* curAli,
70  Alignable* curAliCopy2);
71  void endHist();
72  // Map one onto other and compare details
73  void compareGeometries(Alignable* refAli, Alignable* curAli,
74  Alignable* curAliCopy2);
75  //filling the ROOT file
76  void fillTree(Alignable *refAli, const AlgebraicVector& diff);
77  //void createDBGeometry(const edm::EventSetup& iSetup);
78  void createROOTGeometry(const edm::EventSetup& iSetup);
79  void makeGraph(int sizeI, float smi, float sma, float minV,
80  float maxV, TH2F* dxh, TGraph* grx, const char* name,
81  const char* title, const char* titleg, const char* axis,
82  const float* xp, const float* yp, int numEntries);
83 
84  bool passIdCut( uint32_t );
85  bool checkChosen( Alignable* ali ); // Is ali one of wanted CSC?
86  bool passChosen( Alignable* ali ); // Is ali either one of wanted
87  // CSC or does it contain them?
88  bool isMother( Alignable* ali ); // Is ali the container (ring)?
89 
95 
96  unsigned int theSurveyIndex;
99 
100  // configurables
101  const std::vector<std::string> _levelStrings;
105  bool _writeToDB;
112  std::vector< unsigned int > _weightByIdVector;
113  int _endcap;
114  int _station;
115  int _ring;
116 
117  std::vector< uint32_t > _detIdFlagVector;
122 
123  //root configuration
125 
127  int id;
128  int level;
129  int mid;
130  int mlevel;
131  int sublevel;
132  float x,y,z;
133  float r, phi, eta;
134  float alpha, beta, gamma;
135  float dx, dy, dz;
136  float dr, dphi; // no deta?
137  float dalpha, dbeta, dgamma;
138  float ldx, ldy, ldz;
139  float ldr, ldphi; // no deta?
141  float rotx, roty, rotz;
142  float drotx, droty, drotz;
143  float surW, surL; // surWidth and length
144  double surRot[9];
145  int phipos;
146 };
147 
148  std::vector<MGACollection> _mgacollection;
149  // Two sets of alignment inputs
155 
156  TFile* _theFile;
157  TTree* _alignTree;
160  TTree* _inputTree1;
161  TTree* _inputTree2;
162 
171  double _surRot[9];
172 
174 
175 };
176 
177 
178 
179 
180 #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)
MuonAlignment * inputAlign2a
virtual void beginJob()
Read from DB and print survey info.
MuonAlignment * inputAlign2
virtual void analyze(const edm::Event &, const edm::EventSetup &)
AlignTransform SurveyValue
std::vector< Alignable * > Alignables
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
std::vector< MGACollection > _mgacollection