TrackCamAtNu Class Reference

#include <TrackCamAtNu.h>

List of all members.

Public Member Functions

 TrackCamAtNu (CandSliceHandle *slice)
virtual ~TrackCamAtNu ()
CandSliceHandleGetCandSliceHandle () const
int GetBegPlane () const
int GetEndPlane () const
void AddHit (HitCamAtNu *hit)
bool ContainsHit (HitCamAtNu *hit) const
HitCamAtNuGetHit (unsigned int i) const
double GetBegTPos ()
double GetEndTPos ()
double GetDir (int Plane1, int Plane2)
double GetBegDir ()
double GetEndDir ()
double GetBegZPos () const
double GetEndZPos () const
int GetPlaneView () const
unsigned int GetEntries () const
int GetUID () const
void SetUID (int UIDNum)
void SetPartner (TrackCamAtNu *objtrk)
TrackCamAtNuGetPartner () const

Private Attributes

CandSliceHandlefSlice
int fBegPlane
int fEndPlane
double fBegZ
double fEndZ
int fUID
TrackCamAtNufPartner
int fPlaneView
vector< HitCamAtNu * > HitsInTrack

Detailed Description

Definition at line 19 of file TrackCamAtNu.h.


Constructor & Destructor Documentation

TrackCamAtNu::TrackCamAtNu ( CandSliceHandle slice  ) 

Definition at line 18 of file TrackCamAtNu.cxx.

00018                                                  :
00019   fSlice(0), fBegPlane(999), fEndPlane(-999), fBegZ(999.), fEndZ(-999.),
00020   fUID(0), fPartner(0), fPlaneView(-1)
00021 {
00022   fSlice = slice;
00023 }

TrackCamAtNu::~TrackCamAtNu (  )  [virtual]

Definition at line 28 of file TrackCamAtNu.cxx.

References HitsInTrack.

00029 {
00030   HitsInTrack.clear();
00031 }


Member Function Documentation

void TrackCamAtNu::AddHit ( HitCamAtNu hit  ) 

Definition at line 36 of file TrackCamAtNu.cxx.

References ContainsHit(), fBegPlane, fBegZ, fEndPlane, fEndZ, fPlaneView, GetEntries(), VHS::GetPlane(), HitCamAtNu::GetPlane(), HitCamAtNu::GetPlaneView(), HitCamAtNu::GetZPos(), and HitsInTrack.

00037 {
00038   if(this->GetEntries()==0) { fPlaneView=hit->GetPlaneView(); }
00039 
00040   if(this->ContainsHit(hit)==true) {return;}
00041   HitsInTrack.push_back(hit);   
00042 
00043   if( fBegPlane > hit->GetPlane()){ fBegPlane = hit->GetPlane(); fBegZ = hit->GetZPos();}
00044   if( fEndPlane < hit->GetPlane()){ fEndPlane = hit->GetPlane(); fEndZ = hit->GetZPos();}
00045 
00046   return;
00047 }

bool TrackCamAtNu::ContainsHit ( HitCamAtNu hit  )  const

Definition at line 52 of file TrackCamAtNu.cxx.

References HitsInTrack.

Referenced by AddHit().

00053 {
00054   for(unsigned int i=0; i<HitsInTrack.size(); ++i) {
00055     if(hit==HitsInTrack[i]) {return true;}
00056   }
00057 
00058   return false;
00059 }

double TrackCamAtNu::GetBegDir (  ) 

Definition at line 143 of file TrackCamAtNu.cxx.

References fBegPlane, and GetDir().

00144 {
00145   return this->GetDir(fBegPlane,fBegPlane+10);
00146 }

int TrackCamAtNu::GetBegPlane (  )  const [inline]

Definition at line 27 of file TrackCamAtNu.h.

References fBegPlane.

Referenced by AlgShowerCam::FindShowerVertex(), and AlgAtmosShowerList::FormVertexShowers().

00027 {return fBegPlane;};

double TrackCamAtNu::GetBegTPos (  ) 

Definition at line 73 of file TrackCamAtNu.cxx.

References fBegPlane, HitCamAtNu::GetPlane(), HitCamAtNu::GetTPos(), and HitsInTrack.

00074 {
00075   double tot=0.0,begt=0.0;
00076   unsigned int nhits = HitsInTrack.size();
00077 
00078   for(unsigned int i=0; i<nhits; ++i) {
00079     //find the hits on the first plane in the track
00080     HitCamAtNu* hit = HitsInTrack[i];
00081 
00082     if(hit->GetPlane()==fBegPlane) {
00083       begt+=hit->GetTPos();
00084       tot+=1.0;
00085     }
00086   }
00087   if(tot>0) return (begt/tot); 
00088   else return 0;
00089 }

double TrackCamAtNu::GetBegZPos (  )  const [inline]

Definition at line 38 of file TrackCamAtNu.h.

References fBegZ.

00038 {return fBegZ;};

CandSliceHandle* TrackCamAtNu::GetCandSliceHandle (  )  const [inline]

Definition at line 25 of file TrackCamAtNu.h.

References fSlice.

00025 {return fSlice;};

double TrackCamAtNu::GetDir ( int  Plane1,
int  Plane2 
)

Definition at line 115 of file TrackCamAtNu.cxx.

References HitCamAtNu::GetPlane(), HitCamAtNu::GetTPos(), HitCamAtNu::GetZPos(), and HitsInTrack.

Referenced by GetBegDir(), and GetEndDir().

00116 {
00117   double z=0.0,t=0.0;
00118   double sw=0.0,swx=0.0,swx2=0.0;
00119   double swy=0.0,swyx=0.0;
00120   unsigned int nhits = HitsInTrack.size();
00121 
00122   for( unsigned int i=0; i<nhits; ++i) {
00123     HitCamAtNu* hit = HitsInTrack[i];
00124 
00125     //find the hits in the end region of the track
00126     if(hit->GetPlane()>=Plane1 && hit->GetPlane()<=Plane2) {
00127       z=hit->GetZPos(); 
00128       t=hit->GetTPos();
00129       sw+=1.0; 
00130       swx+=z; 
00131       swx2+=z*z; 
00132       swy+=t; 
00133       swyx+=t*z;
00134     }
00135   }
00136   if((swx*swx-sw*swx2)!=0) {return (swx*swy-sw*swyx)/(swx*swx-sw*swx2);}
00137   else return 0;
00138 }

double TrackCamAtNu::GetEndDir (  ) 

Definition at line 151 of file TrackCamAtNu.cxx.

References fEndPlane, and GetDir().

00152 {
00153   return this->GetDir(fEndPlane-10,fEndPlane);
00154 }

int TrackCamAtNu::GetEndPlane (  )  const [inline]

Definition at line 28 of file TrackCamAtNu.h.

References fEndPlane.

Referenced by AlgShowerCam::FindShowerVertex(), and AlgAtmosShowerList::FormVertexShowers().

00028 {return fEndPlane;};

double TrackCamAtNu::GetEndTPos (  ) 

Definition at line 94 of file TrackCamAtNu.cxx.

References fEndPlane, HitCamAtNu::GetPlane(), HitCamAtNu::GetTPos(), and HitsInTrack.

00095 {
00096   double tot=0.0,endt=0.0;
00097   unsigned int nhits = HitsInTrack.size();
00098 
00099   for(unsigned int i=0; i<nhits; ++i) {
00100     //find the hits on the first plane in the track
00101     HitCamAtNu* hit = HitsInTrack[i];
00102 
00103     if(hit->GetPlane()==fEndPlane) {
00104       endt+=hit->GetTPos();
00105       tot+=1.0;
00106     }
00107   }
00108   if(tot>0) return (endt/tot); 
00109   else return 0;
00110 }

double TrackCamAtNu::GetEndZPos (  )  const [inline]

Definition at line 39 of file TrackCamAtNu.h.

References fEndZ.

00039 {return fEndZ;};

unsigned int TrackCamAtNu::GetEntries (  )  const [inline]

Definition at line 41 of file TrackCamAtNu.h.

References HitsInTrack.

Referenced by AddHit(), AlgAtmosShowerList::FormDummyTracks(), and AlgAtmosShowerList::FormVertexShowers().

00041 {return HitsInTrack.size();};

HitCamAtNu * TrackCamAtNu::GetHit ( unsigned int  i  )  const

Definition at line 64 of file TrackCamAtNu.cxx.

References HitsInTrack.

Referenced by AlgAtmosShowerList::FormDummyTracks(), and AlgAtmosShowerList::FormVertexShowers().

00065 {
00066   if(i<HitsInTrack.size()) {return HitsInTrack[i];}
00067   else {return 0;}
00068 }

TrackCamAtNu* TrackCamAtNu::GetPartner (  )  const [inline]

Definition at line 47 of file TrackCamAtNu.h.

References fPartner.

00047 {return fPartner;};

int TrackCamAtNu::GetPlaneView (  )  const [inline]

Definition at line 40 of file TrackCamAtNu.h.

References fPlaneView.

00040 {return fPlaneView;};

int TrackCamAtNu::GetUID (  )  const [inline]

Definition at line 43 of file TrackCamAtNu.h.

References fUID.

00043 {return fUID;};

void TrackCamAtNu::SetPartner ( TrackCamAtNu objtrk  )  [inline]

Definition at line 46 of file TrackCamAtNu.h.

References fPartner.

00046 {fPartner=objtrk;};

void TrackCamAtNu::SetUID ( int  UIDNum  )  [inline]

Definition at line 44 of file TrackCamAtNu.h.

References fUID.

00044 {fUID=UIDNum;};


Member Data Documentation

int TrackCamAtNu::fBegPlane [private]

Definition at line 52 of file TrackCamAtNu.h.

Referenced by AddHit(), GetBegDir(), GetBegPlane(), and GetBegTPos().

double TrackCamAtNu::fBegZ [private]

Definition at line 54 of file TrackCamAtNu.h.

Referenced by AddHit(), and GetBegZPos().

int TrackCamAtNu::fEndPlane [private]

Definition at line 53 of file TrackCamAtNu.h.

Referenced by AddHit(), GetEndDir(), GetEndPlane(), and GetEndTPos().

double TrackCamAtNu::fEndZ [private]

Definition at line 55 of file TrackCamAtNu.h.

Referenced by AddHit(), and GetEndZPos().

Definition at line 57 of file TrackCamAtNu.h.

Referenced by GetPartner(), and SetPartner().

int TrackCamAtNu::fPlaneView [private]

Definition at line 58 of file TrackCamAtNu.h.

Referenced by AddHit(), and GetPlaneView().

Definition at line 47 of file TrackCamAtNu.h.

Referenced by GetCandSliceHandle().

int TrackCamAtNu::fUID [private]

Definition at line 56 of file TrackCamAtNu.h.

Referenced by GetUID(), and SetUID().


The documentation for this class was generated from the following files:

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1