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

ClusterSaver.h

Go to the documentation of this file.
00001 #ifndef ClusterSaver_H
00002 #define ClusterSaver_H
00003 #include "NueAna/ParticlePID/ParticleFinder/Managed/ClusterManager.h"
00004 #include "NueAna/ParticlePID/ParticleFinder/Managed/HitManager.h"
00005 #include "NueAna/ParticlePID/ParticleFinder/Managed/ManagedHit.h"
00006 #include "NueAna/ParticlePID/ParticleFinder/Managed/ManagedCluster.h"
00007 
00008 
00009 #include <vector>
00010 #include <map>
00011 
00012 #include "TObject.h"
00013 
00014 namespace Managed
00015 {
00016 
00017 class ClusterSaver :public TObject
00018 {
00019         public:
00020                 ClusterSaver();
00021                 ~ClusterSaver();
00022                 
00023 
00024 
00025                 void Reset();
00026                         
00027                 
00028                 Managed::ManagedCluster * GetCluster(int cid);
00029                 
00030                 void FillClusterMap(std::map<double, std::map<double, std::pair<double, int> > > * cluster_map  );
00031 
00032                 std::map<double, std::map<double, int>  > cluster_map;  //loc_z, sum_e_t_, cluster_id
00033                 std::map<double, std::map<double, int>  > cluster_map_u;        //loc_z, sum_e_t_, cluster_id
00034                 std::map<double, std::map<double, int>  > cluster_map_v;        //loc_z, sum_e_t_, cluster_id
00035 
00036                 std::vector<Managed::ManagedCluster> clusters;
00037                 
00038                 int SaveCluster(Managed::ManagedCluster *cluster);
00039 
00040                 std::map<double, std::map<double, int>  > * GetClusterMap(int view=0);
00041 
00042                 
00043                 double maxz;
00044                 double minz;
00045                 double maxt;
00046                 double mint;
00047                 double minu;
00048                 double maxu;
00049                 double minv;
00050                 double maxv;            
00051                 int nClusters;
00052                 
00053                 void DumpClusters();
00054                 
00055                 int save_id; //holds the next cluster save id;
00056 
00057                 //get a map of plane, strip, energy for all strips in use
00058                 //split strips in clusters are merged here...
00059                 std::map<std::pair<int,int>, double> GetStripEnergy();
00060                 void recomputeBounds();
00061         
00062         private:
00063 
00064                 int needMapRebuild;
00065                 void RebuildClusterMaps();
00066                 std::vector<int>clusters_to_delete;
00067                 
00068                         
00069         ClassDef(ClusterSaver,1);
00070 
00071 };
00072 
00073 }
00074 
00075 #endif
00076 

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