test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 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, const char* title,
81  const char* titleg, const char* axis, float* xp, 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
103  bool _writeToDB;
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 
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 
173 };
174 
175 
176 
177 
178 #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 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, float *xp, float *yp, int numEntries)
MuonAlignment * inputAlign2a
virtual void beginJob()
Read from DB and print survey info.
list diff
Definition: mps_update.py:85
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
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
AlignableMuon * referenceMuon
AlignableMuon * currentMuon
align::GlobalVector _MuonCommonT
AlignableMuon * dummyMuon
Constructor of the full muon geometry.
Definition: AlignableMuon.h:36
const SurveyErrors * theSurveyErrors
std::vector< MGACollection > _mgacollection