CMS 3D CMS Logo

TrackerGeometryCompare.h

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                 const edm::EventSetup&
00051                 );
00052 
00053         virtual void analyze(
00054                 const edm::Event&,
00055                 const edm::EventSetup&
00056                 );
00057         
00058 private:
00059 
00060 
00061         //parameters
00062         edm::ParameterSet m_params;
00063         std::vector<align::StructureType> theLevels;
00064         //std::vector<int> theSubDets;
00065         
00066         //compares two geometries
00067         void compareGeometries(Alignable* refAli, Alignable* curAli);
00068         //filling the ROOT file
00069         void fillTree(Alignable *refAli, AlgebraicVector diff);
00070         //for filling identifiers
00071         void fillIdentifiers( int subdetlevel, int rawid );
00072         //converts surveyRcd into alignmentRcd
00073         void surveyToTracker(AlignableTracker* ali, Alignments* alignVals, AlignmentErrors* alignErrors);
00074         //need for conversion for surveyToTracker
00075         void addSurveyInfo(Alignable* ali);
00076         //void createDBGeometry(const edm::EventSetup& iSetup);
00077         void createROOTGeometry(const edm::EventSetup& iSetup);
00078         
00079         // for common tracker system
00080         void setCommonTrackerSystem();
00081         void diffCommonTrackerSystem(Alignable* refAli, Alignable* curAli);
00082         bool passIdCut( uint32_t );
00083         
00084         AlignableTracker* referenceTracker;
00085         AlignableTracker* dummyTracker;
00086         AlignableTracker* currentTracker;
00087 
00088         unsigned int theSurveyIndex;
00089         const Alignments* theSurveyValues;
00090         const SurveyErrors* theSurveyErrors;
00091         
00092         // configurables
00093         std::string _inputFilename1;
00094         std::string _inputFilename2;
00095         std::string _inputTreename;
00096         bool _writeToDB; 
00097         std::string _weightBy;
00098         std::string _setCommonTrackerSystem;
00099         bool _detIdFlag;
00100         std::string _detIdFlagFile;
00101         bool _weightById;
00102         std::string _weightByIdFile;
00103         std::vector< unsigned int > _weightByIdVector;
00104         
00105         std::vector< uint32_t > _detIdFlagVector;
00106         align::StructureType _commonTrackerLevel;
00107         align::GlobalVector _TrackerCommonT;
00108         align::EulerAngles _TrackerCommonR;
00109         align::PositionType _TrackerCommonCM;
00110         
00111         //root configuration
00112         std::string _filename;
00113         TFile* _theFile;
00114         TTree* _alignTree;
00115         TFile* _inputRootFile1;
00116         TFile* _inputRootFile2;
00117         TTree* _inputTree1;
00118         TTree* _inputTree2;
00119         
00120         int _id, _level, _mid, _mlevel, _sublevel, _useDetId, _detDim;
00121         float _xVal, _yVal, _zVal, _rVal, _phiVal, _alphaVal, _betaVal, _gammaVal, _etaVal;
00122         float _dxVal, _dyVal, _dzVal, _drVal, _dphiVal, _dalphaVal, _dbetaVal, _dgammaVal;
00123         float _surWidth, _surLength;
00124         uint32_t _identifiers[6];
00125         double _surRot[9];
00126         
00127 
00128         
00129 };
00130 
00131 
00132 
00133 
00134 #endif

Generated on Tue Jun 9 17:24:57 2009 for CMSSW by  doxygen 1.5.4