CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrackerGeometryCompare.h
Go to the documentation of this file.
1 #ifndef Alignment_OfflineValidation_TrackerGeometryCompare_h
2 #define Alignment_OfflineValidation_TrackerGeometryCompare_h
3 
33 
35 
36 
37 //******** Single include for the TkMap *************
40 //***************************************************
41 
42 #include <algorithm>
43 #include <string>
44 #include "TTree.h"
45 #include "TH1D.h"
46 
47 class AlignTransform;
48 class TrackerTopology;
49 
51 public:
54  typedef std::vector<Alignable*> Alignables;
55 
58  const edm::ParameterSet&
59  );
60 
62  virtual void beginJob();
63 
64  virtual void endJob();
65 
66  virtual void analyze(
67  const edm::Event&,
68  const edm::EventSetup&
69  );
70 
71 private:
72 
73 
74  //parameters
76  std::vector<align::StructureType> m_theLevels;
77  //std::vector<int> theSubDets;
78 
79  //compare surface deformations
81  //compares two geometries
82  void compareGeometries(Alignable* refAli, Alignable* curAli, const TrackerTopology* tTopo);
83  //filling the ROOT file
84  void fillTree(Alignable *refAli, const AlgebraicVector& diff, // typedef CLHEP::HepVector AlgebraicVector;
85  const TrackerTopology* tTopo);
86  //for filling identifiers
87  void fillIdentifiers( int subdetlevel, int rawid, const TrackerTopology* tTopo);
88  //converts surveyRcd into alignmentRcd
89  void surveyToTracker(AlignableTracker* ali, Alignments* alignVals, AlignmentErrors* alignErrors);
90  //need for conversion for surveyToTracker
91  void addSurveyInfo(Alignable* ali);
92  //void createDBGeometry(const edm::EventSetup& iSetup);
93  void createROOTGeometry(const edm::EventSetup& iSetup);
94 
95  // for common tracker system
97  void diffCommonTrackerSystem(Alignable* refAli, Alignable* curAli);
98  bool passIdCut( uint32_t );
99 
103 
104  unsigned int theSurveyIndex;
107 
108  // configurables
113  bool _writeToDB;
120  std::vector< unsigned int > _weightByIdVector;
121 
122  std::vector< uint32_t > _detIdFlagVector;
127 
128  //root configuration
130  TFile* _theFile;
131  TTree* _alignTree;
134  TTree* _inputTree01;
135  TTree* _inputTree02;
136  TTree* _inputTree11;
137  TTree* _inputTree12;
138 
142  // changes in global variables
144  // changes local variables: u, v, w, alpha, beta, gamma
147  uint32_t _identifiers[6];
148  double _surRot[9];
149  int _type;
150  double _surfDeform[13];
151 
152  int m_nBins ;
153  double m_rangeLow ;
154  double m_rangeHigh ;
155 
157 
158  std::vector<TrackerMap> m_vtkmap;
159 
160  std::map<std::string,TH1D*> m_h1 ;
161 
162 
163 };
164 
165 
166 
167 
168 #endif
void compareGeometries(Alignable *refAli, Alignable *curAli, const TrackerTopology *tTopo)
align::GlobalVector _TrackerCommonR
std::vector< align::StructureType > m_theLevels
const Alignments * theSurveyValues
void addSurveyInfo(Alignable *ali)
align::GlobalVector _TrackerCommonT
void diffCommonTrackerSystem(Alignable *refAli, Alignable *curAli)
std::vector< TrackerMap > m_vtkmap
AlignableTracker * dummyTracker
std::map< std::string, TH1D * > m_h1
std::vector< Alignable * > Alignables
virtual void beginJob()
Read from DB and print survey info.
std::vector< uint32_t > _detIdFlagVector
TrackerGeometryCompare(const edm::ParameterSet &)
Do nothing. Required by framework.
virtual void analyze(const edm::Event &, const edm::EventSetup &)
align::StructureType _commonTrackerLevel
align::PositionType _TrackerCommonCM
void fillTree(Alignable *refAli, const AlgebraicVector &diff, const TrackerTopology *tTopo)
CLHEP::HepVector AlgebraicVector
AlignableTracker * currentTracker
void fillIdentifiers(int subdetlevel, int rawid, const TrackerTopology *tTopo)
AlignableTracker * referenceTracker
void createROOTGeometry(const edm::EventSetup &iSetup)
const SurveyErrors * theSurveyErrors
std::vector< unsigned int > _weightByIdVector
void surveyToTracker(AlignableTracker *ali, Alignments *alignVals, AlignmentErrors *alignErrors)
void compareSurfaceDeformations(TTree *_inputTree11, TTree *_inputTree12)