Go to the documentation of this file.00001 #ifndef Alignment_OfflineValidation_TrackerGeometryCompare_h
00002 #define Alignment_OfflineValidation_TrackerGeometryCompare_h
00003
00022 #include "FWCore/Framework/interface/EDAnalyzer.h"
00023 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00024 #include "Alignment/TrackerAlignment/interface/AlignableTracker.h"
00025 #include "CondFormats/Alignment/interface/SurveyErrors.h"
00026 #include "Alignment/CommonAlignment/interface/StructureType.h"
00027
00028 #include "Alignment/CommonAlignment/interface/AlignTools.h"
00029
00030 #include <algorithm>
00031 #include "TTree.h"
00032
00033 class AlignTransform;
00034
00035 class TrackerGeometryCompare:
00036 public edm::EDAnalyzer
00037 {
00038 public:
00039 typedef AlignTransform SurveyValue;
00040 typedef Alignments SurveyValues;
00041 typedef std::vector<Alignable*> Alignables;
00042
00044 TrackerGeometryCompare(
00045 const edm::ParameterSet&
00046 );
00047
00049 virtual void beginJob();
00050
00051 virtual void analyze(
00052 const edm::Event&,
00053 const edm::EventSetup&
00054 );
00055
00056 private:
00057
00058
00059
00060 edm::ParameterSet m_params;
00061 std::vector<align::StructureType> theLevels;
00062
00063
00064
00065 void compareGeometries(Alignable* refAli, Alignable* curAli);
00066
00067 void fillTree(Alignable *refAli, AlgebraicVector diff);
00068
00069 void fillIdentifiers( int subdetlevel, int rawid );
00070
00071 void surveyToTracker(AlignableTracker* ali, Alignments* alignVals, AlignmentErrors* alignErrors);
00072
00073 void addSurveyInfo(Alignable* ali);
00074
00075 void createROOTGeometry(const edm::EventSetup& iSetup);
00076
00077
00078 void setCommonTrackerSystem();
00079 void diffCommonTrackerSystem(Alignable* refAli, Alignable* curAli);
00080 bool passIdCut( uint32_t );
00081
00082 AlignableTracker* referenceTracker;
00083 AlignableTracker* dummyTracker;
00084 AlignableTracker* currentTracker;
00085
00086 unsigned int theSurveyIndex;
00087 const Alignments* theSurveyValues;
00088 const SurveyErrors* theSurveyErrors;
00089
00090
00091 std::string _inputFilename1;
00092 std::string _inputFilename2;
00093 std::string _inputTreename;
00094 bool _writeToDB;
00095 std::string _weightBy;
00096 std::string _setCommonTrackerSystem;
00097 bool _detIdFlag;
00098 std::string _detIdFlagFile;
00099 bool _weightById;
00100 std::string _weightByIdFile;
00101 std::vector< unsigned int > _weightByIdVector;
00102
00103 std::vector< uint32_t > _detIdFlagVector;
00104 align::StructureType _commonTrackerLevel;
00105 align::GlobalVector _TrackerCommonT;
00106 align::GlobalVector _TrackerCommonR;
00107 align::PositionType _TrackerCommonCM;
00108
00109
00110 std::string _filename;
00111 TFile* _theFile;
00112 TTree* _alignTree;
00113 TFile* _inputRootFile1;
00114 TFile* _inputRootFile2;
00115 TTree* _inputTree1;
00116 TTree* _inputTree2;
00117
00118 int _id, _level, _mid, _mlevel, _sublevel, _useDetId, _detDim;
00119 float _xVal, _yVal, _zVal, _rVal, _phiVal, _alphaVal, _betaVal, _gammaVal, _etaVal;
00120
00121 float _dxVal, _dyVal, _dzVal, _drVal, _dphiVal, _dalphaVal, _dbetaVal, _dgammaVal;
00122
00123 float _duVal, _dvVal, _dwVal, _daVal, _dbVal, _dgVal;
00124 float _surWidth, _surLength;
00125 uint32_t _identifiers[6];
00126 double _surRot[9];
00127
00128 bool firstEvent_;
00129
00130 };
00131
00132
00133
00134
00135 #endif