ObjShowerAtNu Class Reference

#include <ObjShowerAtNu.h>

Inheritance diagram for ObjShowerAtNu:

ObjAtNu ShowerAtNu ShowerSegmentAtNu List of all members.

Public Member Functions

 ObjShowerAtNu ()
 ObjShowerAtNu (const ObjShowerAtNu &rhs)
virtual ~ObjShowerAtNu ()
Int_t GetBegPlane () const
Int_t GetEndPlane () const
Double_t GetBegTime () const
Double_t GetEndTime () const
Int_t GetBegStrip ()
Int_t GetEndStrip ()
Double_t GetDir ()
Double_t GetVtxT ()
Double_t GetVtxZ ()
Double_t GetCharge ()
void SetReseedFlag (Bool_t flag)
Bool_t GetReseedFlag ()
void SetPartner (ObjShowerAtNu *objshw)
ObjShowerAtNuGetPartner ()

Protected Member Functions

Bool_t AddHitToShower (HitAtNu *hit)

Private Attributes

Int_t fBegPlane
Int_t fEndPlane
Double_t fBegTime
Double_t fEndTime
Bool_t fReseedFlag
ObjShowerAtNufPartner

Detailed Description

Definition at line 7 of file ObjShowerAtNu.h.


Constructor & Destructor Documentation

ObjShowerAtNu::ObjShowerAtNu (  ) 

Definition at line 7 of file ObjShowerAtNu.cxx.

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

ObjShowerAtNu::ObjShowerAtNu ( const ObjShowerAtNu rhs  ) 

Definition at line 15 of file ObjShowerAtNu.cxx.

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

ObjShowerAtNu::~ObjShowerAtNu (  )  [virtual]

Definition at line 27 of file ObjShowerAtNu.cxx.

00028 {
00029 
00030 }


Member Function Documentation

Bool_t ObjShowerAtNu::AddHitToShower ( HitAtNu hit  )  [protected]

Definition at line 155 of file ObjShowerAtNu.cxx.

References fBegPlane, fBegTime, fEndPlane, fEndTime, HitAtNu::GetPlane(), and HitAtNu::GetTime().

Referenced by ShowerSegmentAtNu::AddCluster().

00156 {
00157   if(this->AddHitToList(hit)){
00158     if(this->GetHitLast()==0){
00159       fBegPlane=hit->GetPlane();
00160       fEndPlane=hit->GetPlane();
00161       fBegTime=hit->GetTime();
00162       fEndTime=hit->GetTime();
00163     }
00164     else{
00165       if(hit->GetPlane()>fEndPlane) fEndPlane=hit->GetPlane();  
00166       if(hit->GetPlane()<fBegPlane) fBegPlane=hit->GetPlane();
00167       if(hit->GetTime()>fEndTime) fEndTime=hit->GetTime();
00168       if(hit->GetTime()<fBegTime) fBegTime=hit->GetTime();
00169     }
00170     return true;
00171   }
00172   else return false;
00173 }

Int_t ObjShowerAtNu::GetBegPlane (  )  const

Definition at line 56 of file ObjShowerAtNu.cxx.

References fBegPlane.

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

00057 {
00058   return fBegPlane;
00059 }

Int_t ObjShowerAtNu::GetBegStrip (  ) 

Definition at line 32 of file ObjShowerAtNu.cxx.

References fBegPlane, ObjAtNu::GetHitAt(), and ObjAtNu::GetHitLast().

00033 {
00034   Double_t tot=0.0,begstrip=0.0;
00035   for(Int_t i=0;i<1+this->GetHitLast();i++){
00036     HitAtNu* hit = (HitAtNu*)(this->GetHitAt(i));
00037     if(hit->GetPlane()==fBegPlane){
00038       begstrip+=hit->GetStrip(); tot+=1.0;
00039     }
00040   }
00041   if(tot>0) return (Int_t)(begstrip/tot); else return 0;
00042 }

Double_t ObjShowerAtNu::GetBegTime (  )  const

Definition at line 66 of file ObjShowerAtNu.cxx.

References fBegTime.

00067 {
00068   return fBegTime;
00069 }

Double_t ObjShowerAtNu::GetCharge (  ) 

Definition at line 122 of file ObjShowerAtNu.cxx.

References ObjAtNu::GetHitAt(), and ObjAtNu::GetHitLast().

00123 {
00124   Double_t chg=0.0;
00125   Int_t i;
00126   for(i=0;i<1+this->GetHitLast();i++){
00127     HitAtNu* hit1 = (HitAtNu*)(this->GetHitAt(i));
00128     if(hit1->GetShwFlag()>1){
00129       chg += hit1->GetCharge();
00130     }
00131   }
00132   return chg;
00133 }

Double_t ObjShowerAtNu::GetDir (  ) 

Definition at line 76 of file ObjShowerAtNu.cxx.

References ObjAtNu::GetHitAt(), ObjAtNu::GetHitLast(), and VHS::GetPlane().

00077 {  
00078   Double_t w,z,t;
00079   Double_t sz=0.0,st=0.0,szz=0.0,szt=0.0,sw=0.0;
00080   Int_t bpln=-1,epln=-1;
00081   Int_t i;
00082   for(i=0;i<1+this->GetHitLast();i++){
00083     HitAtNu* hit1 = (HitAtNu*)(this->GetHitAt(i));
00084     if(hit1->GetShwFlag()>1){
00085       z=hit1->GetZPos(); t=hit1->GetTPos(); w=1.0; 
00086       sz+=w*z; st+=w*t; szz+=w*z*z; szt+=w*z*t; sw+=w;
00087       if(bpln<0||hit1->GetPlane()<bpln) bpln=hit1->GetPlane();
00088       if(epln<0||hit1->GetPlane()>epln) epln=hit1->GetPlane();
00089     }  
00090   }
00091   if(epln>bpln) return (sw*szt-sz*st)/(sw*szz-sz*sz); else return 0.0;
00092 }

Int_t ObjShowerAtNu::GetEndPlane (  )  const

Definition at line 61 of file ObjShowerAtNu.cxx.

References fEndPlane.

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

00062 {
00063   return fEndPlane;
00064 }

Int_t ObjShowerAtNu::GetEndStrip (  ) 

Definition at line 44 of file ObjShowerAtNu.cxx.

References fEndPlane, ObjAtNu::GetHitAt(), and ObjAtNu::GetHitLast().

00045 {
00046   Double_t tot=0.0,endstrip=0.0;
00047   for(Int_t i=0;i<1+this->GetHitLast();i++){
00048     HitAtNu* hit = (HitAtNu*)(this->GetHitAt(i));
00049     if(hit->GetPlane()==fEndPlane){
00050       endstrip+=hit->GetStrip(); tot+=1.0;
00051     }
00052   }
00053   if(tot>0) return (Int_t)(endstrip/tot); else return 0;
00054 }

Double_t ObjShowerAtNu::GetEndTime (  )  const

Definition at line 71 of file ObjShowerAtNu.cxx.

References fEndTime.

00072 {
00073   return fEndTime;
00074 }

ObjShowerAtNu * ObjShowerAtNu::GetPartner (  ) 

Definition at line 145 of file ObjShowerAtNu.cxx.

References fPartner.

Referenced by AlgAtNuReco::RunAlg().

00146 {
00147   return fPartner;
00148 }

Bool_t ObjShowerAtNu::GetReseedFlag (  ) 

Definition at line 140 of file ObjShowerAtNu.cxx.

References fReseedFlag.

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

00141 {
00142   return fReseedFlag;
00143 }

Double_t ObjShowerAtNu::GetVtxT (  ) 

Definition at line 94 of file ObjShowerAtNu.cxx.

References ObjAtNu::GetHitAt(), and ObjAtNu::GetHitLast().

00095 {
00096   Double_t w=0.0,tpos=0.0,tot=0.0;
00097   Int_t i;
00098   for(i=0;i<1+this->GetHitLast();i++){
00099     HitAtNu* hit1 = (HitAtNu*)(this->GetHitAt(i));
00100     if(hit1->GetShwFlag()>1){
00101       w=1.0;
00102       tpos+=w*hit1->GetTPos(); tot+=w;
00103     }  
00104   }
00105   return tpos/tot;
00106 }

Double_t ObjShowerAtNu::GetVtxZ (  ) 

Definition at line 108 of file ObjShowerAtNu.cxx.

References ObjAtNu::GetHitAt(), and ObjAtNu::GetHitLast().

00109 {
00110   Double_t w=0.0,zpos=0.0,tot=0.0;
00111   Int_t i;
00112   for(i=0;i<1+this->GetHitLast();i++){
00113     HitAtNu* hit1 = (HitAtNu*)(this->GetHitAt(i));
00114     if(hit1->GetShwFlag()>1){
00115       w=1.0;
00116       zpos+=w*hit1->GetZPos(); tot+=w; 
00117     }  
00118   }
00119   return zpos/tot;
00120 }

void ObjShowerAtNu::SetPartner ( ObjShowerAtNu objshw  ) 

Definition at line 150 of file ObjShowerAtNu.cxx.

References fPartner.

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

00151 {
00152   fPartner=objshw;
00153 }

void ObjShowerAtNu::SetReseedFlag ( Bool_t  flag  ) 

Definition at line 135 of file ObjShowerAtNu.cxx.

References fReseedFlag.

Referenced by AlgAtNuReco::RunAlg().

00136 {
00137   fReseedFlag = flag;
00138 }


Member Data Documentation

Int_t ObjShowerAtNu::fBegPlane [private]

Definition at line 42 of file ObjShowerAtNu.h.

Referenced by AddHitToShower(), GetBegPlane(), and GetBegStrip().

Double_t ObjShowerAtNu::fBegTime [private]

Definition at line 44 of file ObjShowerAtNu.h.

Referenced by AddHitToShower(), and GetBegTime().

Int_t ObjShowerAtNu::fEndPlane [private]

Definition at line 43 of file ObjShowerAtNu.h.

Referenced by AddHitToShower(), GetEndPlane(), and GetEndStrip().

Double_t ObjShowerAtNu::fEndTime [private]

Definition at line 45 of file ObjShowerAtNu.h.

Referenced by AddHitToShower(), and GetEndTime().

ObjShowerAtNu* ObjShowerAtNu::fPartner [private]

Definition at line 47 of file ObjShowerAtNu.h.

Referenced by GetPartner(), and SetPartner().

Bool_t ObjShowerAtNu::fReseedFlag [private]

Definition at line 46 of file ObjShowerAtNu.h.

Referenced by GetReseedFlag(), and SetReseedFlag().


The documentation for this class was generated from the following files:
Generated on Mon Aug 11 01:06:39 2014 for loon by  doxygen 1.4.7