00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00016
00017 #ifndef ALIGNHISTS_H
00018 #define ALIGNHISTS_H
00019
00020 #include "UgliGeometry/UgliGeomHandle.h"
00021 #include "Conventions/PlaneView.h"
00022
00023 class TH2D;
00024
00025 class AlignHists
00026 {
00027
00028 public:
00029
00030 AlignHists(int nplanes, int nmdlperplane, const char* histname=0);
00031 AlignHists(const char* filename);
00032
00033 virtual ~AlignHists();
00034 void ApplyTrack(PlaneView::PlaneView_t the_view,
00035 std::vector<int>& strip,
00036 std::vector<int>& plane, std::vector<int>& mdl,
00037 std::vector<double>& resid);
00038 void IncrementIteration() { ++fIteration; }
00039
00040
00041 void ReadHists(const char* filename);
00042
00043
00044 void LoadFromFile(const char* histfilename);
00045
00046 TH2D* GetResidHist(int view, int iter) { return fResidHist[view][iter]; }
00047 TH2D* GetResidSqrHist(int view, int iter) { return fResidSqrHist[view][iter]; }
00048 TH2D* GetNumberOfTracksHist(int view) { return fNumberOfTracks[view]; }
00049
00050 private:
00051
00052
00053 AlignHists(const AlignHists& rhs);
00054 AlignHists& operator=(const AlignHists& rhs);
00055
00056 TH2D *fResidHist[2][20];
00057 TH2D *fResidSqrHist[2][20];
00058 TH2D *fNumberOfTracks[2];
00059 TH2D *fNumberOfTracksStrips[2];
00060 int fIteration;
00061 const char* fHistName;
00062 ClassDef(AlignHists,0)
00063 };
00064
00065 #endif // ALIGNHISTS_H