ClusterAtNu Class Reference

#include <ClusterAtNu.h>

Inheritance diagram for ClusterAtNu:
ObjAtNu

List of all members.

Public Member Functions

 ClusterAtNu ()
 ClusterAtNu (HitAtNu *hit)
 ClusterAtNu (const ClusterAtNu &rhs)
 ~ClusterAtNu ()
Int_t IsTrkAssoc (ClusterAtNu *clrm, ClusterAtNu *clrp) const
Int_t IsShwAssoc (ClusterAtNu *clr) const
Int_t IsDiffuseShwAssoc (ClusterAtNu *clr) const
Int_t IsHitAssoc (HitAtNu *hit) const
Int_t GetPlane () const
Int_t GetBegStrip () const
Int_t GetEndStrip () const
Double_t GetBegTime () const
Double_t GetEndTime () const
Double_t GetZPos ()
Double_t GetTPos ()
Double_t GetCharge ()
Int_t GetDigits ()
Int_t GetTrkFlag () const
Int_t GetShwFlag () const
Int_t GetTrkPlnFlag () const
Int_t GetShwPlnFlag () const
Int_t GetClrPlnFlag () const
void SetTrkFlag (Int_t flag)
void SetShwFlag (Int_t flag)
void SetTrkPlnFlag (Int_t flag)
void SetShwPlnFlag (Int_t flag)
void SetClrPlnFlag (Int_t flag)
void AddHit (HitAtNu *hit)

Private Attributes

Int_t fPlane
Int_t fBegStrip
Int_t fEndStrip
Double_t fBegTime
Double_t fEndTime
Double_t fZPos
Double_t fTPos
Double_t fCharge
Int_t fTrkFlag
Int_t fShwFlag
Int_t fTrkPlnFlag
Int_t fShwPlnFlag
Int_t fClrPlnFlag

Detailed Description

Definition at line 6 of file ClusterAtNu.h.


Constructor & Destructor Documentation

ClusterAtNu::ClusterAtNu (  ) 

Definition at line 7 of file ClusterAtNu.cxx.

00007                          :
00008   fPlane(-1),fBegStrip(-1), fEndStrip(-1), 
00009   fBegTime(0.0), fEndTime(0.0), 
00010   fZPos(0.0), fTPos(0.0), fCharge(0.0),
00011   fTrkFlag(0), fShwFlag(0),
00012   fTrkPlnFlag(0), fShwPlnFlag(0), fClrPlnFlag(0)
00013 {
00014 
00015 }

ClusterAtNu::ClusterAtNu ( HitAtNu hit  ) 

Definition at line 17 of file ClusterAtNu.cxx.

References AddHit().

00017                                      :
00018   fPlane(-1),fBegStrip(-1), fEndStrip(-1), 
00019   fBegTime(0.0), fEndTime(0.0), 
00020   fZPos(0.0), fTPos(0.0), fCharge(0.0),
00021   fTrkFlag(0), fShwFlag(0),
00022   fTrkPlnFlag(0), fShwPlnFlag(0), fClrPlnFlag(0)
00023 {
00024   this->AddHit(hit);
00025 }

ClusterAtNu::ClusterAtNu ( const ClusterAtNu rhs  ) 

Definition at line 27 of file ClusterAtNu.cxx.

00027                                                :
00028   ObjAtNu(rhs),
00029   fPlane(rhs.fPlane),
00030   fBegStrip(rhs.fBegStrip),
00031   fEndStrip(rhs.fEndStrip),
00032   fBegTime(rhs.fBegTime),
00033   fEndTime(rhs.fEndTime),
00034   fZPos(rhs.fZPos),
00035   fTPos(rhs.fTPos),
00036   fCharge(rhs.fCharge),
00037   fTrkFlag(rhs.fTrkFlag),
00038   fShwFlag(rhs.fShwFlag),
00039   fTrkPlnFlag(rhs.fTrkPlnFlag),
00040   fShwPlnFlag(rhs.fShwPlnFlag),
00041   fClrPlnFlag(rhs.fClrPlnFlag)
00042 {
00043 
00044 }

ClusterAtNu::~ClusterAtNu (  ) 

Definition at line 46 of file ClusterAtNu.cxx.

00047 {
00048 
00049 }


Member Function Documentation

void ClusterAtNu::AddHit ( HitAtNu hit  ) 

Definition at line 249 of file ClusterAtNu.cxx.

References ObjAtNu::AddHitToList(), fBegStrip, fBegTime, fCharge, fEndStrip, fEndTime, fPlane, fTPos, fZPos, HitAtNu::GetCharge(), ObjAtNu::GetHitLast(), HitAtNu::GetPlane(), HitAtNu::GetStrip(), HitAtNu::GetTime(), HitAtNu::GetTPos(), and HitAtNu::GetZPos().

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

00250 {
00251   if(this->AddHitToList(hit)){
00252     if(this->GetHitLast()==0){
00253       fPlane=hit->GetPlane();
00254       fBegStrip=hit->GetStrip();
00255       fEndStrip=hit->GetStrip();
00256       fBegTime=hit->GetTime();
00257       fEndTime=hit->GetTime();
00258       fZPos=hit->GetZPos();
00259     }
00260     else{
00261       if(hit->GetStrip()<fBegStrip) fBegStrip=hit->GetStrip();
00262       if(hit->GetStrip()>fEndStrip) fEndStrip=hit->GetStrip();
00263       if(hit->GetTime()<fBegTime) fBegTime=hit->GetTime();
00264       if(hit->GetTime()>fEndTime) fEndTime=hit->GetTime();
00265     }
00266     fTPos = (fTPos*fCharge+hit->GetTPos()*hit->GetCharge())/(fCharge+hit->GetCharge());
00267     fCharge += hit->GetCharge();
00268     return;
00269   }
00270   else return;
00271 }

Int_t ClusterAtNu::GetBegStrip (  )  const
Double_t ClusterAtNu::GetBegTime (  )  const

Definition at line 188 of file ClusterAtNu.cxx.

References fBegTime.

Referenced by IsDiffuseShwAssoc(), IsShwAssoc(), and IsTrkAssoc().

00189 {
00190   return fBegTime;
00191 }

Double_t ClusterAtNu::GetCharge (  ) 

Definition at line 173 of file ClusterAtNu.cxx.

References fCharge.

Referenced by AlgAtNuReco::RunAlg().

00174 {
00175   return fCharge;
00176 }

Int_t ClusterAtNu::GetClrPlnFlag (  )  const

Definition at line 219 of file ClusterAtNu.cxx.

References fClrPlnFlag.

00220 {
00221   return fClrPlnFlag;
00222 }

Int_t ClusterAtNu::GetDigits (  ) 

Definition at line 178 of file ClusterAtNu.cxx.

References digits(), HitAtNu::GetDigits(), ObjAtNu::GetHitAt(), and ObjAtNu::GetHitLast().

Referenced by AlgAtNuReco::RunAlg().

00179 {
00180   Int_t i,digits=0;
00181   for(i=0;i<1+this->GetHitLast();i++){
00182     HitAtNu* hit = (HitAtNu*)(this->GetHitAt(i));
00183     digits+=hit->GetDigits();
00184   }
00185   return digits;
00186 }

Int_t ClusterAtNu::GetEndStrip (  )  const
Double_t ClusterAtNu::GetEndTime (  )  const

Definition at line 193 of file ClusterAtNu.cxx.

References fEndTime.

Referenced by IsDiffuseShwAssoc(), IsShwAssoc(), and IsTrkAssoc().

00194 {
00195   return fEndTime;
00196 }

Int_t ClusterAtNu::GetPlane (  )  const
Int_t ClusterAtNu::GetShwFlag (  )  const

Definition at line 204 of file ClusterAtNu.cxx.

References fShwFlag.

Referenced by AlgAtNuReco::RunAlg().

00205 {
00206   return fShwFlag;
00207 }

Int_t ClusterAtNu::GetShwPlnFlag (  )  const

Definition at line 214 of file ClusterAtNu.cxx.

References fShwPlnFlag.

Referenced by AlgAtNuReco::RunAlg().

00215 {
00216   return fShwPlnFlag;
00217 }

Double_t ClusterAtNu::GetTPos (  ) 

Definition at line 168 of file ClusterAtNu.cxx.

References fTPos.

00169 {
00170   return fTPos;
00171 }

Int_t ClusterAtNu::GetTrkFlag (  )  const

Definition at line 199 of file ClusterAtNu.cxx.

References fTrkFlag.

Referenced by AlgAtNuReco::RunAlg().

00200 {
00201   return fTrkFlag;
00202 }

Int_t ClusterAtNu::GetTrkPlnFlag (  )  const

Definition at line 209 of file ClusterAtNu.cxx.

References fTrkPlnFlag.

Referenced by AlgAtNuReco::RunAlg().

00210 {
00211   return fTrkPlnFlag;
00212 }

Double_t ClusterAtNu::GetZPos (  ) 

Definition at line 163 of file ClusterAtNu.cxx.

References fZPos.

Referenced by AlgAtNuReco::RunAlg().

00164 {
00165   return fZPos;
00166 }

Int_t ClusterAtNu::IsDiffuseShwAssoc ( ClusterAtNu clr  )  const

Definition at line 124 of file ClusterAtNu.cxx.

References fBegStrip, fBegTime, fEndStrip, fEndTime, fPlane, GetBegStrip(), GetBegTime(), GetEndStrip(), GetEndTime(), GetPlane(), and win.

Referenced by ShowerSegmentAtNu::IsDiffuseShwAssoc().

00125 {
00126   Double_t win = 99.9;
00127   Int_t assoc = 0;
00128   if(fEndTime-clr->GetBegTime()>-win || clr->GetEndTime()-fBegTime>-win){
00129     if( clr->GetPlane()-fPlane<9 && clr->GetPlane()-fPlane>-9
00130      && clr->GetEndStrip()-fBegStrip>-21 && fEndStrip-clr->GetBegStrip()>-21 ){
00131        if( ( clr->GetPlane()-fPlane<5 && clr->GetPlane()-fPlane>-5
00132         && clr->GetEndStrip()-fBegStrip>-11 && fEndStrip-clr->GetBegStrip()>-11 ) )
00133          assoc=2; else assoc=1;
00134     }
00135   }
00136   return assoc;
00137 }

Int_t ClusterAtNu::IsHitAssoc ( HitAtNu hit  )  const

Definition at line 139 of file ClusterAtNu.cxx.

References fBegStrip, fBegTime, fEndStrip, fEndTime, fPlane, HitAtNu::GetPlane(), HitAtNu::GetStrip(), HitAtNu::GetTime(), and win.

Referenced by AlgAtNuReco::RunAlg().

00140 {
00141   Double_t win = 9999.9;
00142   if( hit->GetPlane()==fPlane 
00143    && hit->GetStrip()>fBegStrip-2 && hit->GetStrip()<fEndStrip+2
00144    && hit->GetTime()>fBegTime-win && hit->GetTime()<fEndTime+win )
00145     return 1; else return 0;
00146 }

Int_t ClusterAtNu::IsShwAssoc ( ClusterAtNu clr  )  const

Definition at line 107 of file ClusterAtNu.cxx.

References fBegStrip, fBegTime, fEndStrip, fEndTime, fPlane, GetBegStrip(), GetBegTime(), GetEndStrip(), GetEndTime(), GetPlane(), and win.

Referenced by ShowerSegmentAtNu::IsShwAssoc(), and AlgAtNuReco::RunAlg().

00108 {
00109   Double_t win = 99.9;
00110   Int_t assoc = 0;
00111   if(fEndTime-clr->GetBegTime()>-win || clr->GetEndTime()-fBegTime>-win){
00112     if( clr->GetPlane()-fPlane<5 && clr->GetPlane()-fPlane>-5
00113      && clr->GetEndStrip()-fBegStrip>-6 && fEndStrip-clr->GetBegStrip()>-6 ){
00114        if( ( clr->GetPlane()-fPlane<3 && clr->GetPlane()-fPlane>-3
00115           && clr->GetEndStrip()-fBegStrip>-1 && fEndStrip-clr->GetBegStrip()>-1 )
00116         || ( clr->GetPlane()-fPlane==0 
00117           && clr->GetEndStrip()-fBegStrip>-3 && fEndStrip-clr->GetBegStrip()>-3 ) ) 
00118          assoc=2; else assoc=1;
00119     }
00120   }
00121   return assoc;
00122 }

Int_t ClusterAtNu::IsTrkAssoc ( ClusterAtNu clrm,
ClusterAtNu clrp 
) const

Definition at line 51 of file ClusterAtNu.cxx.

References fBegStrip, fBegTime, fEndStrip, fEndTime, fPlane, GetBegStrip(), GetBegTime(), GetEndStrip(), GetEndTime(), GetPlane(), Munits::km, max, min, and win.

Referenced by AlgAtNuReco::RunAlg().

00052 {
00053   Double_t win=99.9;
00054   Int_t assoc=0; 
00055   Double_t min=0.20,max=0.80;
00056   if( (fEndTime-clrm->GetBegTime()>-win && clrm->GetEndTime()-fBegTime>-win)
00057    && (fEndTime-clrp->GetBegTime()>-win && clrp->GetEndTime()-fBegTime>-win) ){
00058 
00059     Double_t clrmGetBegStrip=clrm->GetBegStrip();
00060     Double_t clrmGetEndStrip=clrm->GetEndStrip();
00061     if(fPlane-clrm->GetPlane()>2){
00062       Double_t km=2.0/(fPlane-clrm->GetPlane());
00063       clrmGetBegStrip=fBegStrip+km*(clrmGetBegStrip-fBegStrip);
00064       clrmGetEndStrip=fEndStrip+km*(clrmGetEndStrip-fEndStrip);
00065     }
00066 
00067     Double_t clrpGetBegStrip=clrp->GetBegStrip();
00068     Double_t clrpGetEndStrip=clrp->GetEndStrip();
00069     if(clrp->GetPlane()-fPlane>2){
00070       Double_t kp=2.0/(clrp->GetPlane()-fPlane);
00071       clrpGetBegStrip=fBegStrip+kp*(clrpGetBegStrip-fBegStrip);
00072       clrpGetEndStrip=fEndStrip+kp*(clrpGetEndStrip-fEndStrip);
00073     }
00074 
00075     Double_t k0 = 0.5*(clrp->GetPlane()-clrm->GetPlane()-4.0);
00076     min = min + 0.1*k0; max = max - 0.1*k0; 
00077 
00078     if(fEndStrip-clrm->GetBegStrip()>-1.1 && clrp->GetEndStrip()-fBegStrip>-1.1){
00079       if(fBegStrip-clrm->GetEndStrip()>-0.1 || clrp->GetBegStrip()-fEndStrip>-0.1){
00080         if( ( (clrp->GetBegStrip()-fEndStrip)-(fBegStrip-clrm->GetEndStrip())<2.1
00081           &&  (clrp->GetBegStrip()-fEndStrip)-(fBegStrip-clrm->GetEndStrip())>-2.1 )
00082          || ( min*clrmGetEndStrip+max*clrpGetEndStrip>fBegStrip-0.5
00083           &&  max*clrmGetBegStrip+min*clrpGetBegStrip<fEndStrip+0.5 ) )
00084           if(assoc<2) assoc=2; 
00085       }
00086       if(clrm->GetEndStrip()-fBegStrip>-1.1 && fEndStrip-clrp->GetBegStrip()>-1.1){
00087         if(assoc<1) assoc=1;
00088       }
00089     }
00090     if(fBegStrip-clrm->GetEndStrip()<1.1 && clrp->GetBegStrip()-fEndStrip<1.1){
00091       if(fEndStrip-clrm->GetBegStrip()<0.1 || clrp->GetEndStrip()-fBegStrip<0.1){
00092         if( ( (clrp->GetEndStrip()-fBegStrip)-(fEndStrip-clrm->GetBegStrip())>-2.1
00093           &&  (clrp->GetEndStrip()-fBegStrip)-(fEndStrip-clrm->GetBegStrip())<2.1 )
00094          || ( min*clrpGetEndStrip+max*clrmGetEndStrip>fBegStrip-0.5
00095           &&  max*clrpGetBegStrip+min*clrmGetBegStrip<fEndStrip+0.5 ) )
00096          if(assoc<2) assoc=2;
00097       }
00098       if(clrm->GetBegStrip()-fEndStrip<1.1 && fBegStrip-clrp->GetEndStrip()<1.1){
00099         if(assoc<1) assoc=1;
00100       }
00101     }
00102 
00103   }
00104   return assoc;
00105 }

void ClusterAtNu::SetClrPlnFlag ( Int_t  flag  ) 

Definition at line 244 of file ClusterAtNu.cxx.

References fClrPlnFlag.

Referenced by AlgAtNuReco::RunAlg().

00245 {
00246   fClrPlnFlag=flag;
00247 }

void ClusterAtNu::SetShwFlag ( Int_t  flag  ) 

Definition at line 229 of file ClusterAtNu.cxx.

References fShwFlag.

Referenced by AlgAtNuReco::RunAlg().

00230 {
00231   fShwFlag=flag;
00232 }

void ClusterAtNu::SetShwPlnFlag ( Int_t  flag  ) 

Definition at line 239 of file ClusterAtNu.cxx.

References fShwPlnFlag.

Referenced by AlgAtNuReco::RunAlg().

00240 {
00241   fShwPlnFlag=flag;
00242 }

void ClusterAtNu::SetTrkFlag ( Int_t  flag  ) 

Definition at line 224 of file ClusterAtNu.cxx.

References fTrkFlag.

Referenced by AlgAtNuReco::RunAlg().

00225 {
00226   fTrkFlag=flag;
00227 }

void ClusterAtNu::SetTrkPlnFlag ( Int_t  flag  ) 

Definition at line 234 of file ClusterAtNu.cxx.

References fTrkPlnFlag.

Referenced by AlgAtNuReco::RunAlg().

00235 {
00236   fTrkPlnFlag=flag;
00237 }


Member Data Documentation

Int_t ClusterAtNu::fBegStrip [private]

Definition at line 50 of file ClusterAtNu.h.

Referenced by AddHit(), GetBegStrip(), IsDiffuseShwAssoc(), IsHitAssoc(), IsShwAssoc(), and IsTrkAssoc().

Double_t ClusterAtNu::fBegTime [private]

Definition at line 52 of file ClusterAtNu.h.

Referenced by AddHit(), GetBegTime(), IsDiffuseShwAssoc(), IsHitAssoc(), IsShwAssoc(), and IsTrkAssoc().

Double_t ClusterAtNu::fCharge [private]

Definition at line 56 of file ClusterAtNu.h.

Referenced by AddHit(), and GetCharge().

Int_t ClusterAtNu::fClrPlnFlag [private]

Definition at line 61 of file ClusterAtNu.h.

Referenced by GetClrPlnFlag(), and SetClrPlnFlag().

Int_t ClusterAtNu::fEndStrip [private]

Definition at line 51 of file ClusterAtNu.h.

Referenced by AddHit(), GetEndStrip(), IsDiffuseShwAssoc(), IsHitAssoc(), IsShwAssoc(), and IsTrkAssoc().

Double_t ClusterAtNu::fEndTime [private]

Definition at line 53 of file ClusterAtNu.h.

Referenced by AddHit(), GetEndTime(), IsDiffuseShwAssoc(), IsHitAssoc(), IsShwAssoc(), and IsTrkAssoc().

Int_t ClusterAtNu::fPlane [private]

Definition at line 49 of file ClusterAtNu.h.

Referenced by AddHit(), GetPlane(), IsDiffuseShwAssoc(), IsHitAssoc(), IsShwAssoc(), and IsTrkAssoc().

Int_t ClusterAtNu::fShwFlag [private]

Definition at line 58 of file ClusterAtNu.h.

Referenced by GetShwFlag(), and SetShwFlag().

Int_t ClusterAtNu::fShwPlnFlag [private]

Definition at line 60 of file ClusterAtNu.h.

Referenced by GetShwPlnFlag(), and SetShwPlnFlag().

Double_t ClusterAtNu::fTPos [private]

Definition at line 55 of file ClusterAtNu.h.

Referenced by AddHit(), and GetTPos().

Int_t ClusterAtNu::fTrkFlag [private]

Definition at line 57 of file ClusterAtNu.h.

Referenced by GetTrkFlag(), and SetTrkFlag().

Int_t ClusterAtNu::fTrkPlnFlag [private]

Definition at line 59 of file ClusterAtNu.h.

Referenced by GetTrkPlnFlag(), and SetTrkPlnFlag().

Double_t ClusterAtNu::fZPos [private]

Definition at line 54 of file ClusterAtNu.h.

Referenced by AddHit(), and GetZPos().


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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1