00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef ANGCLUSTERANA_H
00015 #define ANGCLUSTERANA_H
00016
00017 #include <deque>
00018 #include <vector>
00019 #include "TObject.h"
00020 #include "TMatrixD.h"
00021 #include "TVector3.h"
00022 #include "NueAna/NueAnaBase.h"
00023 #include "NueAna/AngCluster.h"
00024 #include "Conventions/PlaneView.h"
00025
00026 class NtpSRRecord;
00027 class NtpSREvent;
00028
00029 class AngClusterAna : public NueAnaBase
00030 {
00031
00032 public:
00033
00034
00035 typedef std::deque<Int_t> DeqInt_t;
00036 typedef DeqInt_t::iterator IterDeqInt_t;
00037 typedef DeqInt_t::size_type SizeDeqInt_t;
00038
00039 typedef std::deque<Float_t> DeqFloat_t;
00040 typedef DeqFloat_t::iterator IterDeqFloat_t;
00041
00042 typedef std::vector<Int_t> VecInt_t;
00043 typedef VecInt_t::iterator IterVecInt_t;
00044
00045 typedef std::vector<Float_t> VecFloat_t;
00046 typedef VecFloat_t::iterator IterVecFloat_t;
00047
00048 typedef std::deque< std::deque <Int_t> > DeqDeqInt_t;
00049 typedef DeqDeqInt_t::iterator IterDeqDeqInt_t;
00050 typedef DeqDeqInt_t::size_type SizeDeqDeqInt_t;
00051
00052 typedef std::deque <TMatrixD> DeqTMatrixD;
00053 typedef DeqTMatrixD::iterator IterDeqTMatrixD;
00054
00055
00056
00057 AngClusterAna(AngCluster &ac);
00058 ~AngClusterAna();
00059
00060 void Set3DHit(DeqFloat_t &x, DeqFloat_t &y, DeqFloat_t &z, DeqFloat_t &e);
00061
00062 void Analyze(int evtn, RecRecordImp<RecCandHeader> *srobj);
00063
00064 void WeightedEnergy(int evtn, RecRecordImp<RecCandHeader> *srobj);
00065
00066 void Reset();
00067
00068 void GetAngCluster(Int_t &primShow
00069 , DeqDeqInt_t &clusterMap
00070 , TVector3 &primDir);
00071
00072
00073 VecInt_t fClusterID;
00074 DeqInt_t fClusterSize;
00075
00076 Int_t fNCluster;
00077 Int_t fPrimShow;
00078
00079 DeqDeqInt_t fClusterMap;
00080
00081 TVector3 fPrimDir;
00082
00083 Float_t fTotalEventHitEnergy;
00084
00085 private:
00086
00087 AngCluster &fAngCluster;
00088
00089
00090 AngClusterAna(const AngClusterAna& rhs);
00091 AngClusterAna& operator=(const AngClusterAna& rhs);
00092
00093 DeqFloat_t centroidX;
00094 DeqFloat_t centroidY;
00095
00096
00097 DeqFloat_t fX;
00098 DeqFloat_t fY;
00099 DeqFloat_t fZ;
00100 DeqFloat_t fE;
00101
00102 void FindCluster();
00103
00104 void ClusterVarCalc();
00105
00106
00107 void FindCentroidBlob(TMatrixD & grid
00108 ,const Int_t nBinX
00109 ,const Int_t nBinY
00110 ,Int_t indX
00111 ,Int_t indY
00112 ,TMatrixD & blobCentro);
00113
00114
00115 };
00116
00117 #endif // ANGCLUSTERANA_H