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 
27 
29 
30 #include <algorithm>
31 #include "TTree.h"
32 
33 class AlignTransform;
34 
36 public edm::EDAnalyzer
37 {
38 public:
41  typedef std::vector<Alignable*> Alignables;
42 
45  const edm::ParameterSet&
46  );
47 
49  virtual void beginJob();
50 
51  virtual void analyze(
52  const edm::Event&,
53  const edm::EventSetup&
54  );
55 
56 private:
57 
58 
59  //parameters
61  std::vector<align::StructureType> theLevels;
62  //std::vector<int> theSubDets;
63 
64  //compares two geometries
65  void compareGeometries(Alignable* refAli, Alignable* curAli);
66  //filling the ROOT file
67  void fillTree(Alignable *refAli, AlgebraicVector diff);
68  //for filling identifiers
69  void fillIdentifiers( int subdetlevel, int rawid );
70  //converts surveyRcd into alignmentRcd
71  void surveyToTracker(AlignableTracker* ali, Alignments* alignVals, AlignmentErrors* alignErrors);
72  //need for conversion for surveyToTracker
73  void addSurveyInfo(Alignable* ali);
74  //void createDBGeometry(const edm::EventSetup& iSetup);
75  void createROOTGeometry(const edm::EventSetup& iSetup);
76 
77  // for common tracker system
79  void diffCommonTrackerSystem(Alignable* refAli, Alignable* curAli);
80  bool passIdCut( uint32_t );
81 
85 
86  unsigned int theSurveyIndex;
89 
90  // configurables
91  std::string _inputFilename1;
92  std::string _inputFilename2;
93  std::string _inputTreename;
94  bool _writeToDB;
95  std::string _weightBy;
97  bool _detIdFlag;
98  std::string _detIdFlagFile;
100  std::string _weightByIdFile;
101  std::vector< unsigned int > _weightByIdVector;
102 
103  std::vector< uint32_t > _detIdFlagVector;
108 
109  //root configuration
110  std::string _filename;
111  TFile* _theFile;
112  TTree* _alignTree;
115  TTree* _inputTree1;
116  TTree* _inputTree2;
117 
120  // changes in global variables
122  // changes local variables: u, v, w, alpha, beta, gamma
125  uint32_t _identifiers[6];
126  double _surRot[9];
127 
129 
130 };
131 
132 
133 
134 
135 #endif
void compareGeometries(Alignable *refAli, Alignable *curAli)
align::GlobalVector _TrackerCommonR
std::vector< align::StructureType > theLevels
const Alignments * theSurveyValues
void addSurveyInfo(Alignable *ali)
align::GlobalVector _TrackerCommonT
void diffCommonTrackerSystem(Alignable *refAli, Alignable *curAli)
AlignableTracker * dummyTracker
std::vector< Alignable * > Alignables
virtual void beginJob()
Read from DB and print survey info.
void fillTree(Alignable *refAli, AlgebraicVector diff)
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
CLHEP::HepVector AlgebraicVector
AlignableTracker * currentTracker
AlignableTracker * referenceTracker
void fillIdentifiers(int subdetlevel, int rawid)
void createROOTGeometry(const edm::EventSetup &iSetup)
const SurveyErrors * theSurveyErrors
std::vector< unsigned int > _weightByIdVector
void surveyToTracker(AlignableTracker *ali, Alignments *alignVals, AlignmentErrors *alignErrors)