Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

GFparticle.h

Go to the documentation of this file.
00001 
00002 #ifndef __GFPARTICLE_H
00003 #define __GFPARTICLE_H 1
00004 
00005 #include "GaudiKernel/MsgStream.h"
00006 #include "TkrRecon/GFsegment.h"
00007 
00008 //##############################################
00009 class GFtrack: public GFbase, public KalTrack
00010 //##############################################
00011 {    
00012 public:
00013     
00014     GFtrack(enum SiCluster::view axis, double sigmaCut,
00015                double energy, 
00016                int ist, 
00017                const Ray& testRay, bool doit = true);
00018         ~GFtrack() {
00019                 delete _mGFsegment;
00020         }
00021         
00023         void flagAllHits(int iflag=1);
00024         void unFlagAllHits();
00025         
00026         bool empty() const;
00027         bool accept() const;
00028         void clear();
00029         void writeOut(MsgStream& log) const; 
00030         //--
00031 
00033     SiCluster::view getAxis() const {return m_axis;}
00034     int numGaps ()  const {return m_gaps;}
00035     int numFirstGaps () const {return m_istGaps;}
00036     int numNoise() const {return m_noisyHits;}
00037         int numFirstNoise() const {return m_istNoisyHits;}
00038     int lastLayer() const { return m_lstLayer;}
00039 
00040         // operations
00041         bool veto(int& indexhit, double& sigma) const;
00042         double Qbest() const {return m_qbest;};
00043         
00044         double computeQuality() const;
00045 
00046         void draw(gui::DisplayRep& v);
00047 
00048 protected:      
00049 
00050         friend class GFsegment;
00051 
00052         friend class GFparticle;
00053         friend class GFpair;
00054         friend class GFgamma;
00055 
00056         //-- from GFbase
00057         void ini();
00058 //      void doit(); // do a full pattern Regonition
00060         void step(int kplane); 
00062         void anastep(int kplane); 
00064         void fit(); 
00066         bool end() const; 
00067         void kill();    
00068         void setAlive();
00069 
00070         void contability(int kplane); // contability of the anaStep
00071         void loadGFdata();   // after the fit load the data
00072         // ---
00073 
00074         // creation
00075         void setIniEnergy(double ene);
00076         void setStatus(StatusHit status) {m_status = status;}
00077 
00078         // access to the Step Plane 
00079         StatusHit status() const {return m_status;}
00080         KalPlane firstKPlane() const;
00081         KalPlane lastKPlane() const;
00082         KalPlane previousKPlane() const;
00083     KalPlane originalKPlane() const;
00084 
00085         // operations
00086         void removeStep(int kplane = -1);
00087         double doQbest();
00088         void associateOrthStep(const GFtrack* _OrhGFtrack, KalHit::TYPE type = KalHit::FIT);
00089         void associateOrthGFtrack(const GFtrack* _OrhGFtrack, bool fix = false, 
00090                 KalHit::TYPE type = KalHit::FIT);
00091 
00092 private:
00093     
00094         // Parasitus 
00095         GFsegment* _mGFsegment;
00096 
00097     // Input Data
00098     SiCluster::view m_axis;
00099 
00100     // Status
00101         StatusHit m_status;
00102         int    m_lstGaps;
00103     double m_runChiSquare;
00104 
00105         // Output Data
00106         double m_qbest;
00107 
00108         // contability
00109     int    m_gaps; 
00110     int    m_istGaps;
00111     int    m_lstLayer;
00112     int    m_noisyHits;
00113     int    m_istNoisyHits;
00114 };
00115 
00116 //##############################################
00117 class GFparticle: public GFbase
00118 //##############################################
00119 {    
00120 public:
00121     
00122     GFparticle(double sigmaCut, double energy, int ist, 
00123                const Ray& testRay, bool doit = true);
00124         ~GFparticle() {
00125                 delete _mXGFtrack;
00126                 delete _mYGFtrack;
00127         }
00128         
00129         //-- from GFdata 
00130         void flagAllHits(int iflag=1);
00131         void unFlagAllHits();
00132         
00133         bool empty() const;
00134         bool accept() const;
00135         void clear();
00136         void writeOut(MsgStream& log) const; 
00137         //--
00138 
00139     // access 
00140         const GFtrack* getXGFtrack() const {return _mXGFtrack;}
00141         const GFtrack* getYGFtrack() const {return _mYGFtrack;}
00142 
00143     int numGaps ()  const {return m_gaps;}
00144     int numFirstGaps () const {return m_istGaps;}
00145     int numNoise() const {return m_noisyHits;}
00146         int numFirstNoise() const {return m_istNoisyHits;}
00147     int lastLayer() const { return m_lstLayer;}
00148 
00149         // operations
00150         bool veto(int& indexhit, double& sigma) const;
00151         double Qbest() const {return m_qbest;};
00152 
00153         
00154         void draw(gui::DisplayRep& v);
00155 
00156 protected:
00157 
00158         friend class GFsegment;
00159 
00160         // friend class GFparticle;
00161 
00162         friend class GFpair;
00163         friend class GFgamma;
00164 
00165         //-- from GFbase
00166         void ini();
00167 //      void doit(); // do a full pattern Regonition
00168         void step(int kplane); // One Step in the Pattern Recognition
00169         void anastep(int kplane); // make some analysis after the step is done
00170         void fit(); // fit the GF object - compute the GFdata
00171         bool end() const; // end of the Pattern Recognition?
00172         void kill();    
00173         void setAlive();
00174 
00175         void contability(int kplane); // contability of the anaStep
00176         void loadGFdata();   // after the fit load the data
00177         // ---
00178 
00179         // creation
00180         void setIniEnergy(double ene);
00181         void setStatus(StatusHit status) {m_status = status;}
00182 
00183         // access
00184         StatusHit status() const {return m_status;}     
00185 
00186         // association operations
00187         void associateStatus();
00188         void associateStep();
00189         void associateAnaStep();
00190         void associateFit();
00191 
00192         // operations
00193         double doQbest();
00194 
00195         // utilities
00196         static bool sameTower(const GFtrack* _GFtrk1,const GFtrack* _GFtrk2);
00197         static bool removeWorseStep(GFtrack* _GFtrkX, GFtrack* _GFtrkY);
00198 
00199 private:
00200     
00201     // Status
00202         bool m_associate;   // Do a 3D track
00203         bool m_conflictPattern; // Topology conflict 
00204         StatusHit m_status;
00205 
00206         // Output Data
00207         double m_qbest;
00208 
00209         // contability
00210     int m_gaps; 
00211     int m_istGaps;
00212     int m_lstLayer;
00213     int m_noisyHits;
00214     int m_istNoisyHits;
00215 
00216         // tracks
00217         GFtrack* _mXGFtrack;
00218         GFtrack* _mYGFtrack;
00219 };
00220 
00221 #endif

Generated at Wed Nov 21 12:21:20 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000