ShowerSegmentAtNu Class Reference

#include <ShowerSegmentAtNu.h>

Inheritance diagram for ShowerSegmentAtNu:
ObjShowerAtNu ObjAtNu

List of all members.

Public Member Functions

 ShowerSegmentAtNu ()
 ShowerSegmentAtNu (ClusterAtNu *cluster)
 ShowerSegmentAtNu (const ShowerSegmentAtNu &rhs)
 ~ShowerSegmentAtNu ()
void AddCluster (ClusterAtNu *cluster)
Bool_t ContainsClr (ClusterAtNu *cluster)
ClusterAtNuGetClrAt (Int_t i)
Int_t GetClrLast ()
void AddSegment (ShowerSegmentAtNu *segment)
Int_t IsShwAssoc (ShowerSegmentAtNu *segment)
Int_t IsShwAssoc (ClusterAtNu *cluster)
Int_t IsDiffuseShwAssoc (ClusterAtNu *cluster)
Double_t GetScore () const

Private Attributes

TObjArray * fClrList

Detailed Description

Definition at line 7 of file ShowerSegmentAtNu.h.


Constructor & Destructor Documentation

ShowerSegmentAtNu::ShowerSegmentAtNu (  ) 

Definition at line 7 of file ShowerSegmentAtNu.cxx.

00007                                      :
00008   fClrList(0)
00009 {
00010 
00011 }

ShowerSegmentAtNu::ShowerSegmentAtNu ( ClusterAtNu cluster  ) 

Definition at line 13 of file ShowerSegmentAtNu.cxx.

References AddCluster().

00013                                                          :
00014   fClrList(0)
00015 {
00016   this->AddCluster(cluster);
00017 }

ShowerSegmentAtNu::ShowerSegmentAtNu ( const ShowerSegmentAtNu rhs  ) 

Definition at line 19 of file ShowerSegmentAtNu.cxx.

00019                                                                  :
00020   ObjShowerAtNu(rhs),
00021   fClrList(rhs.fClrList)
00022 {
00023 
00024 }

ShowerSegmentAtNu::~ShowerSegmentAtNu (  ) 

Definition at line 26 of file ShowerSegmentAtNu.cxx.

References fClrList.

00027 {
00028   if(fClrList) delete fClrList;
00029 }


Member Function Documentation

void ShowerSegmentAtNu::AddCluster ( ClusterAtNu cluster  ) 

Definition at line 31 of file ShowerSegmentAtNu.cxx.

References ObjShowerAtNu::AddHitToShower(), ContainsClr(), fClrList, ObjAtNu::GetHitAt(), and ObjAtNu::GetHitLast().

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

00032 {
00033   if(!fClrList) fClrList = new TObjArray();
00034   if(!this->ContainsClr(cluster)){
00035     fClrList->Add(cluster);
00036     for(Int_t i=0;i<1+cluster->GetHitLast();i++){
00037       HitAtNu* hit = (HitAtNu*)(cluster->GetHitAt(i));
00038       this->AddHitToShower(hit);
00039     }
00040   }
00041   return;
00042 }

void ShowerSegmentAtNu::AddSegment ( ShowerSegmentAtNu segment  ) 

Definition at line 62 of file ShowerSegmentAtNu.cxx.

References AddCluster(), GetClrAt(), and GetClrLast().

Referenced by AlgAtNuReco::RunAlg().

00063 {
00064   for(Int_t i=0;i<1+segment->GetClrLast();i++){
00065     ClusterAtNu* clr = (ClusterAtNu*)(segment->GetClrAt(i));
00066     this->AddCluster(clr);
00067   }
00068   return; 
00069 }

Bool_t ShowerSegmentAtNu::ContainsClr ( ClusterAtNu cluster  ) 

Definition at line 44 of file ShowerSegmentAtNu.cxx.

References fClrList.

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

00045 {
00046   for(Int_t i=0;i<1+fClrList->GetLast();i++){
00047     if(cluster==(ClusterAtNu*)(fClrList->At(i))) return true;
00048   }
00049   return false;
00050 }

ClusterAtNu * ShowerSegmentAtNu::GetClrAt ( Int_t  i  ) 

Definition at line 52 of file ShowerSegmentAtNu.cxx.

References fClrList.

Referenced by AddSegment(), IsDiffuseShwAssoc(), IsShwAssoc(), and AlgAtNuReco::RunAlg().

00053 {
00054   if(fClrList) return (ClusterAtNu*)(fClrList->At(i)); else return 0;
00055 }

Int_t ShowerSegmentAtNu::GetClrLast (  ) 

Definition at line 57 of file ShowerSegmentAtNu.cxx.

References fClrList.

Referenced by AddSegment(), IsDiffuseShwAssoc(), IsShwAssoc(), and AlgAtNuReco::RunAlg().

00058 {
00059   if(fClrList) return fClrList->GetLast(); else return -1;
00060 }

Double_t ShowerSegmentAtNu::GetScore (  )  const

Definition at line 104 of file ShowerSegmentAtNu.cxx.

References ObjAtNu::GetHitLast().

Referenced by AlgAtNuReco::RunAlg().

00105 {
00106   return 1+this->GetHitLast();
00107 }

Int_t ShowerSegmentAtNu::IsDiffuseShwAssoc ( ClusterAtNu cluster  ) 

Definition at line 93 of file ShowerSegmentAtNu.cxx.

References GetClrAt(), GetClrLast(), and ClusterAtNu::IsDiffuseShwAssoc().

Referenced by AlgAtNuReco::RunAlg().

00094 {
00095   Int_t assoctmp,assoc = 0;
00096   for(Int_t i=0;i<1+this->GetClrLast();i++){
00097     ClusterAtNu* clr = (ClusterAtNu*)(this->GetClrAt(i));
00098     assoctmp=clr->IsDiffuseShwAssoc(cluster);
00099     if(assoctmp>assoc) assoc=assoctmp; if(assoc>1) return assoc;
00100   }
00101   return assoc;
00102 }

Int_t ShowerSegmentAtNu::IsShwAssoc ( ClusterAtNu cluster  ) 

Definition at line 82 of file ShowerSegmentAtNu.cxx.

References GetClrAt(), GetClrLast(), and ClusterAtNu::IsShwAssoc().

00083 {
00084   Int_t assoctmp,assoc = 0;
00085   for(Int_t i=0;i<1+this->GetClrLast();i++){
00086     ClusterAtNu* clr = (ClusterAtNu*)(this->GetClrAt(i));
00087     assoctmp=clr->IsShwAssoc(cluster);
00088     if(assoctmp>assoc) assoc=assoctmp; if(assoc>1) return assoc;
00089   }
00090   return assoc;
00091 }

Int_t ShowerSegmentAtNu::IsShwAssoc ( ShowerSegmentAtNu segment  ) 

Definition at line 71 of file ShowerSegmentAtNu.cxx.

References GetClrAt(), and GetClrLast().

Referenced by AlgAtNuReco::RunAlg().

00072 {
00073   Int_t assoctmp,assoc = 0;
00074   for(Int_t i=0;i<1+segment->GetClrLast();i++){
00075     ClusterAtNu* cluster = (ClusterAtNu*)(segment->GetClrAt(i));
00076     assoctmp=this->IsShwAssoc(cluster);
00077     if(assoctmp>assoc) assoc=assoctmp; if(assoc>1) return assoc;
00078   }
00079   return assoc;
00080 }


Member Data Documentation

TObjArray* ShowerSegmentAtNu::fClrList [private]

Definition at line 32 of file ShowerSegmentAtNu.h.

Referenced by AddCluster(), ContainsClr(), GetClrAt(), GetClrLast(), and ~ShowerSegmentAtNu().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1