ObjTrackAtNu Class Reference

#include <ObjTrackAtNu.h>

Inheritance diagram for ObjTrackAtNu:
ObjAtNu TrackAtNu TrackSegmentAtNu

List of all members.

Public Member Functions

 ObjTrackAtNu ()
 ObjTrackAtNu (const ObjTrackAtNu &rhs)
virtual ~ObjTrackAtNu ()
Int_t GetBegPlane () const
Int_t GetEndPlane () const
Int_t GetBegStrip ()
Int_t GetEndStrip ()
Double_t GetBegTime () const
Double_t GetEndTime () const
Double_t GetBegDir ()
Double_t GetBegVtxT ()
Double_t GetBegVtxZ () const
Double_t GetEndDir ()
Double_t GetEndVtxT ()
Double_t GetEndVtxZ () const
void SetReseedFlag (Bool_t flag)
Bool_t GetReseedFlag ()
void SetPartner (ObjTrackAtNu *objtrk)
ObjTrackAtNuGetPartner ()

Protected Member Functions

Bool_t AddHitToTrack (HitAtNu *hit)

Private Attributes

Int_t fBegPlane
Int_t fEndPlane
Double_t fBegTime
Double_t fEndTime
Double_t fBegVtxZ
Double_t fEndVtxZ
Bool_t fReseedFlag
ObjTrackAtNufPartner

Detailed Description

Definition at line 6 of file ObjTrackAtNu.h.


Constructor & Destructor Documentation

ObjTrackAtNu::ObjTrackAtNu (  ) 

Definition at line 7 of file ObjTrackAtNu.cxx.

00007                            :
00008   fBegPlane(-1), fEndPlane(-1),
00009   fBegTime(0.0), fEndTime(0.0), 
00010   fBegVtxZ(0.0), fEndVtxZ(0.0), 
00011   fReseedFlag(0), fPartner(0)
00012 {
00013   
00014 }

ObjTrackAtNu::ObjTrackAtNu ( const ObjTrackAtNu rhs  ) 

Definition at line 16 of file ObjTrackAtNu.cxx.

00016                                                   :
00017   ObjAtNu(rhs),
00018   fBegPlane(rhs.fBegPlane),
00019   fEndPlane(rhs.fEndPlane),
00020   fBegTime(rhs.fBegTime),
00021   fEndTime(rhs.fEndTime),
00022   fBegVtxZ(rhs.fBegVtxZ),
00023   fEndVtxZ(rhs.fEndVtxZ),
00024   fReseedFlag(rhs.fReseedFlag),
00025   fPartner(rhs.fPartner)
00026 {
00027 
00028 }

ObjTrackAtNu::~ObjTrackAtNu (  )  [virtual]

Definition at line 30 of file ObjTrackAtNu.cxx.

00031 {
00032 
00033 }


Member Function Documentation

Bool_t ObjTrackAtNu::AddHitToTrack ( HitAtNu hit  )  [protected]

Definition at line 165 of file ObjTrackAtNu.cxx.

References ObjAtNu::AddHitToList(), fBegPlane, fBegTime, fBegVtxZ, fEndPlane, fEndTime, fEndVtxZ, ObjAtNu::GetHitLast(), HitAtNu::GetPlane(), HitAtNu::GetTime(), and HitAtNu::GetZPos().

Referenced by TrackSegmentAtNu::AddCluster(), and TrackAtNu::AddHit().

00166 {
00167   if(this->AddHitToList(hit)){
00168     if(this->GetHitLast()==0){
00169       fBegPlane=hit->GetPlane();
00170       fEndPlane=hit->GetPlane();
00171       fBegTime=hit->GetTime();
00172       fEndTime=hit->GetTime();
00173       fBegVtxZ=hit->GetZPos();
00174       fEndVtxZ=hit->GetZPos();
00175     }
00176     else{
00177       if(hit->GetPlane()>fEndPlane){ 
00178         fEndPlane=hit->GetPlane(); fEndVtxZ=hit->GetZPos(); 
00179       }
00180       if(hit->GetTime()>fEndTime) fEndTime=hit->GetTime();
00181       if(hit->GetPlane()<fBegPlane){ 
00182         fBegPlane=hit->GetPlane(); fBegVtxZ=hit->GetZPos(); 
00183       }
00184       if(hit->GetTime()<fBegTime) fBegTime=hit->GetTime();
00185     }
00186     return true;
00187   }  
00188   else return false;
00189 } 

Double_t ObjTrackAtNu::GetBegDir (  ) 

Definition at line 79 of file ObjTrackAtNu.cxx.

References fBegPlane, ObjAtNu::GetHitAt(), ObjAtNu::GetHitLast(), HitAtNu::GetPlane(), HitAtNu::GetTPos(), and HitAtNu::GetZPos().

Referenced by TrackSegmentAtNu::IsBegAssoc(), and TrackSegmentAtNu::IsEndAssoc().

00080 {
00081   Double_t z=0.0,t=0.0;
00082   Double_t sw=0.0,swx=0.0,swx2=0.0;
00083   Double_t swy=0.0,swyx=0.0;
00084   for(Int_t i=0;i<1+this->GetHitLast();i++){
00085     HitAtNu* hit = (HitAtNu*)(this->GetHitAt(i));
00086     if(hit->GetPlane()<fBegPlane+10){
00087       z=hit->GetZPos(); t=hit->GetTPos();
00088       sw+=1.0; swx+=z; swx2+=z*z; 
00089       swy+=t; swyx+=t*z;;
00090     }
00091   }
00092   return (swx*swy-sw*swyx)/(swx*swx-sw*swx2);
00093 }

Int_t ObjTrackAtNu::GetBegPlane (  )  const
Int_t ObjTrackAtNu::GetBegStrip (  ) 

Definition at line 40 of file ObjTrackAtNu.cxx.

References fBegPlane, ObjAtNu::GetHitAt(), ObjAtNu::GetHitLast(), HitAtNu::GetPlane(), and HitAtNu::GetStrip().

Referenced by AlgAtNuReco::RunAlg().

00041 { 
00042   Double_t tot=0.0,begstrip=0.0;
00043   for(Int_t i=0;i<1+this->GetHitLast();i++){
00044     HitAtNu* hit = (HitAtNu*)(this->GetHitAt(i));
00045     if(hit->GetPlane()==fBegPlane){
00046       begstrip+=hit->GetStrip(); tot+=1.0;
00047     }
00048   }
00049   if(tot>0) return (Int_t)(begstrip/tot); else return 0;
00050 }

Double_t ObjTrackAtNu::GetBegTime (  )  const

Definition at line 52 of file ObjTrackAtNu.cxx.

References fBegTime.

Referenced by AlgAtNuReco::RunAlg().

00053 {
00054   return fBegTime;
00055 }

Double_t ObjTrackAtNu::GetBegVtxT (  ) 

Definition at line 95 of file ObjTrackAtNu.cxx.

References fBegPlane, ObjAtNu::GetHitAt(), ObjAtNu::GetHitLast(), HitAtNu::GetPlane(), and HitAtNu::GetTPos().

Referenced by TrackSegmentAtNu::IsBegAssoc(), and TrackSegmentAtNu::IsEndAssoc().

00096 {
00097   Double_t tot=0.0,begt=0.0;
00098   for(Int_t i=0;i<1+this->GetHitLast();i++){
00099     HitAtNu* hit = (HitAtNu*)(this->GetHitAt(i));
00100     if(hit->GetPlane()==fBegPlane){
00101       begt+=hit->GetTPos(); tot+=1.0;
00102     }
00103   }
00104   if(tot>0) return begt/tot; else return 0;
00105 }

Double_t ObjTrackAtNu::GetBegVtxZ (  )  const

Definition at line 107 of file ObjTrackAtNu.cxx.

References fBegVtxZ.

Referenced by TrackSegmentAtNu::IsBegAssoc(), and TrackSegmentAtNu::IsEndAssoc().

00108 {
00109   return fBegVtxZ;
00110 }

Double_t ObjTrackAtNu::GetEndDir (  ) 

Definition at line 112 of file ObjTrackAtNu.cxx.

References fEndPlane, ObjAtNu::GetHitAt(), ObjAtNu::GetHitLast(), HitAtNu::GetPlane(), HitAtNu::GetTPos(), and HitAtNu::GetZPos().

Referenced by TrackSegmentAtNu::IsBegAssoc(), TrackSegmentAtNu::IsEndAssoc(), and AlgAtNuReco::RunAlg().

00113 {
00114   Double_t z=0.0,t=0.0;
00115   Double_t sw=0.0,swx=0.0,swx2=0.0;
00116   Double_t swy=0.0,swyx=0.0;
00117   for(Int_t i=0;i<1+this->GetHitLast();i++){
00118     HitAtNu* hit = (HitAtNu*)(this->GetHitAt(i));
00119     if(hit->GetPlane()>fEndPlane-10){
00120       z=hit->GetZPos(); t=hit->GetTPos();
00121       sw+=1.0; swx+=z; swx2+=z*z; 
00122       swy+=t; swyx+=t*z;;
00123     }
00124   }
00125   return (swx*swy-sw*swyx)/(swx*swx-sw*swx2);
00126 }

Int_t ObjTrackAtNu::GetEndPlane (  )  const
Int_t ObjTrackAtNu::GetEndStrip (  ) 

Definition at line 62 of file ObjTrackAtNu.cxx.

References fEndPlane, ObjAtNu::GetHitAt(), ObjAtNu::GetHitLast(), HitAtNu::GetPlane(), and HitAtNu::GetStrip().

Referenced by AlgAtNuReco::RunAlg().

00063 {
00064   Double_t tot=0.0,endstrip=0.0;
00065   for(Int_t i=0;i<1+this->GetHitLast();i++){
00066     HitAtNu* hit = (HitAtNu*)(this->GetHitAt(i));
00067     if(hit->GetPlane()==fEndPlane){
00068       endstrip+=hit->GetStrip(); tot+=1.0;
00069     }
00070   }
00071   if(tot>0) return (Int_t)(endstrip/tot); else return 0;
00072 }

Double_t ObjTrackAtNu::GetEndTime (  )  const

Definition at line 74 of file ObjTrackAtNu.cxx.

References fEndTime.

Referenced by AlgAtNuReco::RunAlg().

00075 {
00076   return fEndTime;
00077 }

Double_t ObjTrackAtNu::GetEndVtxT (  ) 

Definition at line 128 of file ObjTrackAtNu.cxx.

References fEndPlane, ObjAtNu::GetHitAt(), ObjAtNu::GetHitLast(), HitAtNu::GetPlane(), and HitAtNu::GetTPos().

Referenced by TrackSegmentAtNu::IsBegAssoc(), and TrackSegmentAtNu::IsEndAssoc().

00129 {
00130   Double_t tot=0.0,endt=0.0;
00131   for(Int_t i=0;i<1+this->GetHitLast();i++){
00132     HitAtNu* hit = (HitAtNu*)(this->GetHitAt(i));
00133     if(hit->GetPlane()==fEndPlane){
00134       endt+=hit->GetTPos(); tot+=1.0;
00135     }
00136   }
00137   if(tot>0) return endt/tot; else return 0;
00138 }

Double_t ObjTrackAtNu::GetEndVtxZ (  )  const

Definition at line 140 of file ObjTrackAtNu.cxx.

References fEndVtxZ.

Referenced by TrackSegmentAtNu::IsBegAssoc(), and TrackSegmentAtNu::IsEndAssoc().

00141 {
00142   return fEndVtxZ;
00143 }

ObjTrackAtNu * ObjTrackAtNu::GetPartner (  ) 

Definition at line 160 of file ObjTrackAtNu.cxx.

References fPartner.

Referenced by AlgAtNuReco::RunAlg().

00161 {
00162   return fPartner;
00163 }

Bool_t ObjTrackAtNu::GetReseedFlag (  ) 

Definition at line 150 of file ObjTrackAtNu.cxx.

References fReseedFlag.

Referenced by AlgTrackAtNu::RunAlg(), and AlgAtNuReco::RunAlg().

00151 {
00152   return fReseedFlag;
00153 }

void ObjTrackAtNu::SetPartner ( ObjTrackAtNu objtrk  ) 

Definition at line 155 of file ObjTrackAtNu.cxx.

References fPartner.

Referenced by AlgAtNuRecoMCTruth::RunAlg(), and AlgAtNuReco::RunAlg().

00156 {
00157   fPartner=objtrk;
00158 }

void ObjTrackAtNu::SetReseedFlag ( Bool_t  flag  ) 

Definition at line 145 of file ObjTrackAtNu.cxx.

References fReseedFlag.

Referenced by AlgAtNuReco::RunAlg().

00146 {
00147   fReseedFlag = flag;
00148 }


Member Data Documentation

Int_t ObjTrackAtNu::fBegPlane [private]

Definition at line 44 of file ObjTrackAtNu.h.

Referenced by AddHitToTrack(), GetBegDir(), GetBegPlane(), GetBegStrip(), and GetBegVtxT().

Double_t ObjTrackAtNu::fBegTime [private]

Definition at line 46 of file ObjTrackAtNu.h.

Referenced by AddHitToTrack(), and GetBegTime().

Double_t ObjTrackAtNu::fBegVtxZ [private]

Definition at line 48 of file ObjTrackAtNu.h.

Referenced by AddHitToTrack(), and GetBegVtxZ().

Int_t ObjTrackAtNu::fEndPlane [private]

Definition at line 45 of file ObjTrackAtNu.h.

Referenced by AddHitToTrack(), GetEndDir(), GetEndPlane(), GetEndStrip(), and GetEndVtxT().

Double_t ObjTrackAtNu::fEndTime [private]

Definition at line 47 of file ObjTrackAtNu.h.

Referenced by AddHitToTrack(), and GetEndTime().

Double_t ObjTrackAtNu::fEndVtxZ [private]

Definition at line 49 of file ObjTrackAtNu.h.

Referenced by AddHitToTrack(), and GetEndVtxZ().

Definition at line 51 of file ObjTrackAtNu.h.

Referenced by GetPartner(), and SetPartner().

Bool_t ObjTrackAtNu::fReseedFlag [private]

Definition at line 50 of file ObjTrackAtNu.h.

Referenced by GetReseedFlag(), and SetReseedFlag().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1