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

Finder.h

Go to the documentation of this file.
00001 #ifndef FINDER_H
00002 #define FINDER_H
00003 
00004 
00005 #include <vector>
00006 #include "NueAna/ParticlePID/ParticleFinder/ParticleObject.h"
00007 #include "NueAna/ParticlePID/ParticleFinder/ParticleObjectHolder.h"
00008 #include "NueAna/ParticlePID/ParticleFinder/Particle.h"
00009 #include "NueAna/ParticlePID/ParticleFinder/Particle3D.h"
00010 #include "NueAna/ParticlePID/ParticleFinder/ChainHelper.h"
00011 
00012 //#include "NueAna/ParticlePID/ParticleFinder/ClusterHelper.h"
00013 #include <map>
00014 #include <string>
00015 
00016 #include "TH2F.h"
00017 #include "TCanvas.h"
00018 
00019 #include "ShareHolder.h"
00020 
00021 #include "NueAna/ParticlePID/ParticleFinder/Managed/ClusterManager.h"
00022 
00023 class Finder
00024 {
00025         public:
00026 
00027                 Finder();       
00028                 ~Finder();
00029 
00030                 void Reset();
00031                 
00032                 void AddStrip(int myplane, int mystrip, double myenergy, double st, double sz, int view);
00033 
00034                 int GetStrips(){return plane.size();};
00035 
00036                 void RecordLostHits(std::vector<Particle3D*> p3d);
00037 
00038 
00039                 void SetPOH(ParticleObjectHolder *p){mypoh = p;};
00040 
00041                 void Process(ParticleObjectHolder &p);
00042 
00043                 void FindIsolatedHits();                
00044 
00045 
00046                 void FindMuons(ChainHelper *ch);
00047                 
00048                 void FindNeutrons(std::vector<Particle3D*> & pout);
00049 
00050                 void MergeChains(ChainHelper *ch);
00051 
00052                 void SetTrueVertex(double myu, double myv, double myz){true_vtx_u = myu;true_vtx_v = myv;true_vtx_z = myz;};
00053 
00054                 void FindVertex(ChainHelper * cu, ChainHelper * cv);
00055 
00056                 void MakeChains(Managed::ClusterManager *cl, ChainHelper * ch, int view);
00057                 
00058                 void RemoveNonVertexPointingChains(ChainHelper *ch, int view);
00059 
00060                 void Weave(ChainHelper * chu, ChainHelper * chv);
00061         
00062                 void ClearXTalk();
00063 
00064 
00065                 std::vector<Particle3D*> ProcessParticle3D(Particle3D * p3d);
00066 
00067                 std::vector<Particle3D*> ProcessParticle3D1(Particle3D * p3d, int check_unique_muon=1);
00068                 std::pair<Particle3D*,Particle3D*> StripMuon1(Particle3D * p3d);
00069                 void RemoveSharedHits(std::vector<Particle3D*> pv);
00070 
00071 
00072 
00073                 std::vector<Particle3D*> SetShared(std::vector<Particle3D*> p3v);
00074 
00075                 void ShareHit(int view, int chain, int chainhit, std::vector<Particle3D*> shared);
00076 
00077                 std::vector<std::pair<int,int> > matchViews(std::vector<foundpath> pu, std::vector<foundpath> pv);
00078                 std::vector<Particle3D> shareEnergy(std::vector<Particle3D> p3v);
00079         
00080                 std::pair<Particle3D*,Particle3D*> StripMuon(Particle3D * p3d);
00081                 
00082                 void FinalizeParticles3D(std::vector<Particle3D*>pout);
00083                 
00084                 double vtx_u;
00085                 double vtx_v;
00086                 double vtx_z;
00087                 
00088                 Managed::ClusterManager clustermanager_u;
00089                 Managed::ClusterManager clustermanager_v;
00090                 
00091                 void SetClusterManagerU(Managed::ClusterManager &m){clustermanager_u=m;};
00092                 void SetClusterManagerV(Managed::ClusterManager &m){clustermanager_v=m;};
00093         
00094                 void SetMRCC(int i){DoMRCC=i;};
00095 
00096                 void SetMEUperGeV(double d){meupergev=d;};
00097                 
00098 
00099         
00100         private:
00101 
00102                 ParticleObjectHolder *  mypoh;
00103 
00104 
00105                 std::vector<int> view;
00106                 std::vector<int> plane;
00107                 std::vector<int> strip;
00108                 std::vector<double> t;
00109                 std::vector<double> z;
00110 
00111                 std::vector<double> energy;
00112 
00113 
00114 
00115                 std::vector<Particle> particles;
00116 
00117                 std::multimap<double,int> sorter_map;
00118 
00119                 std::map<int, std::map<int, int> > loc_map;  //plane, strip, index in vectors
00120                 
00121 
00122                 double maxz;
00123                 double minz;
00124                 double maxu;
00125                 double minu;
00126                 double maxv;
00127                 double minv;
00128                 
00129                 double true_vtx_u;
00130                 double true_vtx_v;
00131                 double true_vtx_z;
00132                 
00133 
00134                 
00135                 std::vector<foundpath> GetPaths(ChainHelper*ch);
00136                 void DumpPaths(std::vector<foundpath> a);
00137                 
00138                 Particle3D Make3DParticle(std::vector<int>upath, std::vector<int>vpath, ChainHelper * chu, ChainHelper * chv,int multu, int multv);
00139                 
00140                 void DumpParticle3D(std::vector<Particle3D*> p3d);
00141                 
00142                 double meupergev;
00143                 
00144                 ShareHolder shareholder;
00145                 int DoMRCC;
00146                 
00147                 void SetStatus(Chain *c, int status);
00148                 
00149 };
00150 
00151 #endif
00152 

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