Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

AngClusterAna.h

Go to the documentation of this file.
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     // Typedefs an enumerations:
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     // Con/de-structors:
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     //Member Variables
00073     VecInt_t fClusterID; //Vector that assigns each hit to a cluster
00074     DeqInt_t fClusterSize; //Contains number of hits in each cluster
00075 
00076     Int_t fNCluster; //Total number of clusters
00077     Int_t fPrimShow; //Largest cluster index
00078 
00079     DeqDeqInt_t fClusterMap; // Contains list of hits for each cluster
00080 
00081     TVector3 fPrimDir;  //Primary Shower Direction
00082 
00083     Float_t fTotalEventHitEnergy; //Total event hit energy
00084 
00085 private:
00086 
00087     AngCluster &fAngCluster;
00088 
00089     // copy constructor, assignment:
00090     AngClusterAna(const AngClusterAna& rhs); // copy constructor
00091     AngClusterAna& operator=(const AngClusterAna& rhs); // assignment
00092 
00093     DeqFloat_t centroidX;
00094     DeqFloat_t centroidY;
00095 
00096     //To be set to the referenced HitCalcAna Hit member vectors.
00097     DeqFloat_t fX; 
00098     DeqFloat_t fY; 
00099     DeqFloat_t fZ; 
00100     DeqFloat_t fE; 
00101 
00102     void FindCluster();    // Find Clusters in hit views
00103     
00104     void ClusterVarCalc(); // Calculate cluster 
00105                                            //related variables
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); //Find accumulations 
00113                                                    //in Centroid Histo. 
00114     
00115 };                              // end of class AngClusterAna
00116 
00117 #endif  // ANGCLUSTERANA_H

Generated on Mon Feb 15 11:06:22 2010 for loon by  doxygen 1.3.9.1