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
75  std::vector<align::StructureType> m_theLevels;
76  //std::vector<int> theSubDets;
77 
78  //compare surface deformations
80  //compares two geometries
81  void compareGeometries(Alignable* refAli, Alignable* curAli, const TrackerTopology* tTopo);
82  //filling the ROOT file
83  void fillTree(Alignable *refAli, const AlgebraicVector& diff, // typedef CLHEP::HepVector AlgebraicVector;
84  const TrackerTopology* tTopo);
85  //for filling identifiers
86  void fillIdentifiers( int subdetlevel, int rawid, const TrackerTopology* tTopo);
87  //converts surveyRcd into alignmentRcd
88  void surveyToTracker(AlignableTracker* ali, Alignments* alignVals, AlignmentErrorsExtended* alignErrors);
89  //need for conversion for surveyToTracker
90  void addSurveyInfo(Alignable* ali);
91  //void createDBGeometry(const edm::EventSetup& iSetup);
92  void createROOTGeometry(const edm::EventSetup& iSetup);
93 
94  // for common tracker system
96  void diffCommonTrackerSystem(Alignable* refAli, Alignable* curAli);
97  bool passIdCut( uint32_t );
98 
102 
103  unsigned int theSurveyIndex;
106 
107  // configurables
112  bool _writeToDB;
119  std::vector< unsigned int > _weightByIdVector;
120 
121  std::vector< uint32_t > _detIdFlagVector;
126 
127  //root configuration
129  TFile* _theFile;
130  TTree* _alignTree;
133  TTree* _inputTree01;
134  TTree* _inputTree02;
135  TTree* _inputTree11;
136  TTree* _inputTree12;
137 
141  // changes in global variables
143  // changes local variables: u, v, w, alpha, beta, gamma
146  uint32_t _identifiers[6];
147  double _surRot[9];
148  int _type;
149  double _surfDeform[13];
150 
151  int m_nBins ;
152  double m_rangeLow ;
153  double m_rangeHigh ;
154 
156 
157  std::vector<TrackerMap> m_vtkmap;
158 
159  std::map<std::string,TH1D*> m_h1 ;
160 
161 
162 };
163 
164 
165 
166 
167 #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 surveyToTracker(AlignableTracker *ali, Alignments *alignVals, AlignmentErrorsExtended *alignErrors)
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 compareSurfaceDeformations(TTree *_inputTree11, TTree *_inputTree12)