Go to the documentation of this file.00001 #ifndef RecoTBCalo_EcalTBHodoscopeReconstructor_EcalTBHodoscopeRecInfoAlgo_HH
00002 #define RecoTBCalo_EcalTBHodoscopeReconstructor_EcalTBHodoscopeRecInfoAlgo_HH
00003
00004 #include "TBDataFormats/EcalTBObjects/interface/EcalTBHodoscopeRawInfo.h"
00005 #include "TBDataFormats/EcalTBObjects/interface/EcalTBHodoscopeRecInfo.h"
00006 #include "Geometry/EcalTestBeam/interface/EcalTBHodoscopeGeometry.h"
00007
00008 #include <vector>
00009 #include <cmath>
00010
00011
00012 class EcalTBHodoscopeRecInfoAlgo {
00013
00014 public:
00015 EcalTBHodoscopeRecInfoAlgo();
00016
00017 explicit EcalTBHodoscopeRecInfoAlgo(int fitMethod, const std::vector<double>& planeShift, const std::vector<double>& zPosition);
00018
00019 ~EcalTBHodoscopeRecInfoAlgo()
00020 {
00021 if (myGeometry_)
00022 delete myGeometry_;
00023 };
00024
00025 EcalTBHodoscopeRecInfo reconstruct(const EcalTBHodoscopeRawInfo& hodoscopeRawInfo) const;
00026
00027 private:
00029 class BeamTrack {
00030 public:
00031 float x;
00032 float xS;
00033 float xQ;
00034
00035 bool operator<(BeamTrack &b2)
00036 {
00037 return ( fabs(xS) < fabs(b2.xS) );
00038 }
00039
00040 BeamTrack(float x0,float xs,float xq):x(x0),xS(xs),xQ(xq) {}
00041
00042 ~BeamTrack() {}
00043 private:
00044 BeamTrack() {}
00045 };
00046
00047
00048
00049 void clusterPos(float &x, float &xQuality,const int& ipl, const int& xclus, const int& wclus) const ;
00050
00051 void fitHodo(float &x, float &xQuality,
00052 const int& ipl, const int& nclus, const std::vector<int>& xclus, const std::vector<int>& wclus) const ;
00053
00054 void fitLine(float &x, float &xSlope, float &xQuality,
00055 const int& ipl1, const int& nclus1, const std::vector<int>& xclus1, const std::vector<int>& wclus1,
00056 const int& ipl2, const int& nclus2, const std::vector<int>& xclus2, const std::vector<int>& wclus2) const;
00057
00058 int fitMethod_;
00059
00060 std::vector<double> planeShift_;
00061 std::vector<double> zPosition_;
00062
00063
00064 EcalTBHodoscopeGeometry* myGeometry_;
00065
00066 };
00067
00068 #endif