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

TkrTrack.cxx

Go to the documentation of this file.
00001 #include "reconRootData/TkrTrack.h"
00002 
00003 ClassImp(TkrTrack)
00004 
00005 TkrTrack::TkrTrack() {
00006     // default constructor
00007     m_hits = 0;
00008     m_locator = 0;              // list of hits
00009     
00010     m_id = 0;              // track id
00011     m_type = NONE;            // type of the track (gamma, e+, e-, hadron ...)
00012     m_motherId = NONE;        // id of the mother particle (-1 if none)
00013 
00014     m_residual = 0.0f;         // residual  
00015     m_chi2 = 0.0f;             // chi**2 of the fit
00016     m_quality = 0.0f;          // quality measure of the track
00017 
00018     m_firstLayer = 0;         // layer where the particle starts
00019 
00020     m_energyInput = 0.0f;         // energy input from the cal
00021     m_energyDetermined = 0.0f;    // energy determined using the tracker + cal
00022 }
00023 
00024 TkrTrack::TkrTrack(UShort_t id) {    
00025     m_id = id;              // track id
00026     m_type = NONE;            // type of the track (gamma, e+, e-, hadron ...)
00027     m_motherId = NONE;        // id of the mother particle (-1 if none)
00028 
00029     m_residual = 0.0f;         // residual  
00030     m_chi2 = 0.0f;             // chi**2 of the fit
00031     m_quality = 0.0f;          // quality measure of the track
00032 
00033     m_firstLayer = 0;         // layer where the particle starts
00034 
00035     m_energyInput = 0.0f;         // energy input from the cal
00036     m_energyDetermined = 0.0f;    // energy determined using the tracker + cal
00037     
00038     m_hits = 0; 
00039     m_locator = 0; 
00040 
00041     Create();
00042 }
00043 
00044 TkrTrack::~TkrTrack() {
00045     Clean();
00046 }
00047 
00048 void TkrTrack::Clean() {
00049 
00050     if (m_hits) {
00051         int nEntries = m_hits->GetEntries();
00052         for (int i=0; i<nEntries; i++)
00053             delete m_hits->At(i);
00054         m_hits->Clear();
00055         delete m_hits;
00056         m_hits = 0;
00057     }
00058 
00059     if (m_locator) {
00060         int nEntries = m_locator->GetEntries();
00061         for (int i=0; i<nEntries; i++)
00062             delete m_locator->At(i);
00063         m_locator->Clear();
00064         delete m_locator;
00065         m_locator = 0;
00066     }
00067 
00068     m_id = 0;              // track id
00069     m_type = NONE;            // type of the track (gamma, e+, e-, hadron ...)
00070     m_motherId = NONE;        // id of the mother particle (-1 if none)
00071 
00072     m_residual = 0.0f;         // residual  
00073     m_chi2 = 0.0f;             // chi**2 of the fit
00074     m_quality = 0.0f;          // quality measure of the track
00075 
00076     m_firstLayer = 0;         // layer where the particle starts
00077 
00078     m_energyInput = 0.0f;         // energy input from the cal
00079     m_energyDetermined = 0.0f;    // energy determined using the tracker + cal
00080 }
00081 
00082 void TkrTrack::Create() {
00083     if (!m_hits) m_hits = new TObjArray();
00084     if (!m_locator) m_locator = new TObjArray();
00085 }

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