ShowerSegmentCamAtNu Class Reference

#include <ShowerSegmentCamAtNu.h>

List of all members.

Public Member Functions

 ShowerSegmentCamAtNu (ClusterCamAtNu *clustm, ClusterCamAtNu *clust0, ClusterCamAtNu *clustp)
 ~ShowerSegmentCamAtNu ()
void AddCluster (ClusterCamAtNu *clust)
bool ContainsCluster (ClusterCamAtNu *clust)
ClusterCamAtNuGetCluster (unsigned int i)
unsigned int GetEntries () const
int GetBegPlane () const
int GetEndPlane () const
int GetPlaneView () const
double GetBegDir ()
double GetBegTPos ()
double GetBegZPos () const
int GetBegStrip ()
int GetEndStrip ()
double GetEndDir ()
double GetEndTPos ()
double GetEndZPos () const
void AddSegment (ShowerSegmentCamAtNu *segment)
int IsShwLikeAssoc (ClusterCamAtNu *Clust)
int IsShwAssoc (ClusterCamAtNu *Clust)
int IsShwAssoc (ShowerSegmentCamAtNu *segment)
int IsDiffuseShwAssoc (ClusterCamAtNu *cluster)
unsigned int GetNHits () const
void SetReseedFlag (int flag)
int GetReseedFlag () const
void SetUID (int uid)
int GetUID () const
void SetNPlanes (int nplanes)
int GetNPlanes () const
double GetBegTime () const
double GetEndTime () const
void SetPartner (ShowerSegmentCamAtNu *segment)
ShowerSegmentCamAtNuGetPartner ()

Private Attributes

vector< ClusterCamAtNu * > ClustersInSegment
ShowerSegmentCamAtNufPartner
int fUID
int fBegPlane
int fEndPlane
double fBegVtxZ
double fEndVtxZ
int fReseedFlag
int fPlaneView
int fNPlanes
double fBegTime
double fEndTime

Detailed Description

Definition at line 18 of file ShowerSegmentCamAtNu.h.


Constructor & Destructor Documentation

ShowerSegmentCamAtNu::ShowerSegmentCamAtNu ( ClusterCamAtNu clustm,
ClusterCamAtNu clust0,
ClusterCamAtNu clustp 
)

Definition at line 20 of file ShowerSegmentCamAtNu.cxx.

00020                                                                                                                 :
00021   fPartner(0), fUID(0), fBegPlane(999), fEndPlane(-999), fBegVtxZ(999.), 
00022   fEndVtxZ(-999.), fReseedFlag(0), fPlaneView(-1), fNPlanes(0), fBegTime(0.), fEndTime(0.)
00023 {
00024   fPlaneView=clust0->GetPlaneView();
00025   fBegTime=clust0->GetBegTime();
00026   fEndTime=clust0->GetEndTime();
00027 
00028   this->AddCluster(clustm); this->AddCluster(clust0); this->AddCluster(clustp);
00029 }

ShowerSegmentCamAtNu::~ShowerSegmentCamAtNu (  ) 

Definition at line 34 of file ShowerSegmentCamAtNu.cxx.

00035 {
00036 }


Member Function Documentation

void ShowerSegmentCamAtNu::AddCluster ( ClusterCamAtNu clust  ) 

Definition at line 41 of file ShowerSegmentCamAtNu.cxx.

References ClustersInSegment, ContainsCluster(), fBegPlane, fBegTime, fBegVtxZ, fEndPlane, fEndTime, fEndVtxZ, ClusterCamAtNu::GetBegTime(), ClusterCamAtNu::GetEndTime(), ClusterCamAtNu::GetPlane(), VHS::GetPlane(), and ClusterCamAtNu::GetZPos().

Referenced by AddSegment(), AlgAtmosShowerList::FindShowerLikeSegments(), AlgAtmosShowerList::Form2DShowers(), and AlgAtmosShowerList::MatchShowers().

00042 {
00043   if(clust) {
00044     if(this->ContainsCluster(clust)==false) 
00045       {
00046         ClustersInSegment.push_back(clust);
00047         if( fBegPlane > clust->GetPlane()){ fBegPlane = clust->GetPlane(); fBegVtxZ =  clust->GetZPos(); }
00048         if( fEndPlane < clust->GetPlane()){ fEndPlane = clust->GetPlane(); fEndVtxZ =  clust->GetZPos(); }
00049         
00050         if( clust->GetBegTime()<fBegTime ) { fBegTime=clust->GetBegTime(); }
00051         if( clust->GetEndTime()>fEndTime ) { fEndTime=clust->GetEndTime(); }
00052       }
00053   }
00054   
00055   return;
00056 }

void ShowerSegmentCamAtNu::AddSegment ( ShowerSegmentCamAtNu segment  ) 

Definition at line 83 of file ShowerSegmentCamAtNu.cxx.

References AddCluster(), GetCluster(), and GetEntries().

Referenced by AlgAtmosShowerList::Form2DShowers().

00084 {
00085   for(unsigned int i=0; i<segment->GetEntries(); ++i) {
00086     this->AddCluster(segment->GetCluster(i));    
00087   }
00088 
00089   return;
00090 }

bool ShowerSegmentCamAtNu::ContainsCluster ( ClusterCamAtNu clust  ) 

Definition at line 61 of file ShowerSegmentCamAtNu.cxx.

References ClustersInSegment.

Referenced by AddCluster(), and AlgAtmosShowerList::MatchShowers().

00062 {
00063   for(unsigned int i=0; i<ClustersInSegment.size(); ++i) {
00064     if(clust==ClustersInSegment[i]) {return true;}
00065   }
00066 
00067   return false;
00068 }

double ShowerSegmentCamAtNu::GetBegDir (  ) 

Definition at line 250 of file ShowerSegmentCamAtNu.cxx.

References ClustersInSegment, fBegPlane, GetEntries(), VHS::GetPlane(), HitCamAtNu::GetTPos(), and HitCamAtNu::GetZPos().

00251 {
00252   double z=0.0,t=0.0;
00253   double sw=0.0,swx=0.0,swx2=0.0;
00254   double swy=0.0,swyx=0.0;
00255   unsigned int nclusters = this->GetEntries();
00256   unsigned int nhits = 0;
00257   HitCamAtNu* hit=0;
00258   for( unsigned int i=0; i<nclusters; ++i)
00259     {//find the clusters on the first plane in the segment
00260       if(ClustersInSegment[i]->GetPlane()<fBegPlane+10)
00261         {
00262           nhits = ClustersInSegment[i]->GetEntries();
00263 
00264           //loop over hits in cluster
00265           for(unsigned int j=0;j<nhits;++j)
00266             {
00267               hit = ClustersInSegment[i]->GetHit(j);
00268               if(hit)
00269                 {
00270                   z=hit->GetZPos(); t=hit->GetTPos();
00271                   sw+=1.0; swx+=z; swx2+=z*z; 
00272                   swy+=t; swyx+=t*z;;
00273                 }
00274             }
00275         }
00276     }
00277   if((swx*swx-sw*swx2)!=0) {return (swx*swy-sw*swyx)/(swx*swx-sw*swx2);}
00278   else return 0;
00279 }

int ShowerSegmentCamAtNu::GetBegPlane (  )  const
int ShowerSegmentCamAtNu::GetBegStrip (  ) 

Definition at line 183 of file ShowerSegmentCamAtNu.cxx.

References ClustersInSegment, fBegPlane, GetEntries(), VHS::GetPlane(), and HitCamAtNu::GetStrip().

Referenced by AlgAtmosShowerList::Form2DShowers(), and AlgAtmosShowerList::MatchShowers().

00184 {
00185   double tot=0.,begstrip=0.;
00186   //Loop over clusters in segment
00187   unsigned int nclusters = this->GetEntries();
00188   unsigned int nhits = 0;
00189   HitCamAtNu* hit=0;
00190 
00191   for( unsigned int i=0; i<nclusters; ++i)
00192     {//find the clusters on the first plane in the segment
00193       if(ClustersInSegment[i]->GetPlane()==fBegPlane)
00194         {
00195           nhits = ClustersInSegment[i]->GetEntries();
00196 
00197           //loop over hits in cluster
00198           for(unsigned int j=0;j<nhits;++j)
00199             {
00200               hit = ClustersInSegment[i]->GetHit(j);
00201               if(hit)
00202                 {
00203                   begstrip+=hit->GetStrip();
00204                   tot+=1.;
00205                 }
00206             }
00207         }
00208     }
00209   if(tot>0) return int(begstrip/tot); 
00210   else return 0;
00211 }

double ShowerSegmentCamAtNu::GetBegTime (  )  const [inline]

Definition at line 93 of file ShowerSegmentCamAtNu.h.

References fBegTime.

Referenced by AlgAtmosShowerList::MatchShowers().

00093 { return fBegTime; };

double ShowerSegmentCamAtNu::GetBegTPos (  ) 

Definition at line 119 of file ShowerSegmentCamAtNu.cxx.

References ClustersInSegment, fBegPlane, GetEntries(), VHS::GetPlane(), and HitCamAtNu::GetTPos().

Referenced by AlgAtmosShowerList::FindShowerLikeSegments().

00120 {
00121   double tot=0.0,begt=0.0;
00122   //Loop over clusters in segment
00123   unsigned int nclusters = this->GetEntries();
00124   unsigned int nhits = 0;
00125   HitCamAtNu* hit=0;
00126   for( unsigned int i=0; i<nclusters; ++i)
00127     {//find the clusters on the first plane in the segment
00128       if(ClustersInSegment[i]->GetPlane()==fBegPlane)
00129         {
00130           nhits = ClustersInSegment[i]->GetEntries();
00131 
00132           //loop over hits in cluster
00133           for(unsigned int j=0;j<nhits;++j)
00134             {
00135               hit = ClustersInSegment[i]->GetHit(j);
00136               if(hit)
00137                 {
00138                   begt+=hit->GetTPos();
00139                   tot+=1.0;
00140                 }
00141             }
00142         }
00143     }
00144   if(tot>0) return (begt/tot); 
00145   else return 0;
00146 }

double ShowerSegmentCamAtNu::GetBegZPos (  )  const

Definition at line 319 of file ShowerSegmentCamAtNu.cxx.

References fBegVtxZ.

00320 {
00321   return fBegVtxZ;
00322 }

ClusterCamAtNu * ShowerSegmentCamAtNu::GetCluster ( unsigned int  i  ) 
double ShowerSegmentCamAtNu::GetEndDir (  ) 

Definition at line 284 of file ShowerSegmentCamAtNu.cxx.

References ClustersInSegment, fEndPlane, GetEntries(), VHS::GetPlane(), HitCamAtNu::GetTPos(), and HitCamAtNu::GetZPos().

00285 {
00286   double z=0.0,t=0.0;
00287   double sw=0.0,swx=0.0,swx2=0.0;
00288   double swy=0.0,swyx=0.0;
00289   unsigned int nclusters = this->GetEntries();
00290   unsigned int nhits = 0;
00291   HitCamAtNu* hit=0;
00292   for( unsigned int i=0; i<nclusters; ++i)
00293     {//find the clusters on the first plane in the segment
00294       if(ClustersInSegment[i]->GetPlane()>fEndPlane-10)
00295         {
00296           nhits = ClustersInSegment[i]->GetEntries();
00297 
00298           //loop over hits in cluster
00299           for(unsigned int j=0;j<nhits;++j)
00300             {
00301               hit = ClustersInSegment[i]->GetHit(j);
00302               if(hit)
00303                 {
00304                   z=hit->GetZPos(); t=hit->GetTPos();
00305                   sw+=1.0; swx+=z; swx2+=z*z; 
00306                   swy+=t; swyx+=t*z;;
00307                 }
00308             }
00309         }
00310     }
00311   
00312   if((swx*swx-sw*swx2)!=0) {return (swx*swy-sw*swyx)/(swx*swx-sw*swx2);}
00313   else return 0;
00314 }

int ShowerSegmentCamAtNu::GetEndPlane (  )  const
int ShowerSegmentCamAtNu::GetEndStrip (  ) 

Definition at line 216 of file ShowerSegmentCamAtNu.cxx.

References ClustersInSegment, fEndPlane, GetEntries(), VHS::GetPlane(), and HitCamAtNu::GetStrip().

Referenced by AlgAtmosShowerList::Form2DShowers(), and AlgAtmosShowerList::MatchShowers().

00217 {
00218   double tot=0.,endstrip=0.;
00219   //Loop over clusters in segment
00220   unsigned int nclusters = this->GetEntries();
00221   unsigned int nhits = 0;
00222   HitCamAtNu* hit=0;
00223 
00224   for( unsigned int i=0; i<nclusters; ++i)
00225     {//find the clusters on the first plane in the segment
00226       if(ClustersInSegment[i]->GetPlane()==fEndPlane)
00227         {
00228           nhits = ClustersInSegment[i]->GetEntries();
00229 
00230           //loop over hits in cluster
00231           for(unsigned int j=0;j<nhits;++j)
00232             {
00233               hit = ClustersInSegment[i]->GetHit(j);
00234               if(hit)
00235                 {
00236                   endstrip+=hit->GetStrip();
00237                   tot+=1.;
00238                 }
00239             }
00240         }
00241     }
00242   if(tot>0) {return int(endstrip/tot);}
00243   else return 0;
00244 }

double ShowerSegmentCamAtNu::GetEndTime (  )  const [inline]

Definition at line 94 of file ShowerSegmentCamAtNu.h.

References fEndTime.

Referenced by AlgAtmosShowerList::MatchShowers().

00094 { return fEndTime; };

double ShowerSegmentCamAtNu::GetEndTPos (  ) 

Definition at line 151 of file ShowerSegmentCamAtNu.cxx.

References ClustersInSegment, fEndPlane, GetEntries(), VHS::GetPlane(), and HitCamAtNu::GetTPos().

Referenced by AlgAtmosShowerList::FindShowerLikeSegments().

00152 {
00153   double tot=0.0,endt=0.0;
00154   //Loop over clusters in segment
00155   unsigned int nclusters = this->GetEntries();
00156   unsigned int nhits = 0;
00157   HitCamAtNu* hit=0;
00158   for( unsigned int i=0; i<nclusters; ++i)
00159     {//find the clusters on the first plane in the segment
00160       if(ClustersInSegment[i]->GetPlane()==fEndPlane)
00161         {
00162           nhits = ClustersInSegment[i]->GetEntries();
00163 
00164           //loop over hits in cluster
00165           for(unsigned int j=0;j<nhits;++j)
00166             {
00167               hit = ClustersInSegment[i]->GetHit(j);
00168               if(hit)
00169                 {
00170                   endt+=hit->GetTPos();
00171                   tot+=1.0;
00172                 }
00173             }
00174         }
00175     }
00176   if(tot>0) return (endt/tot); 
00177   else return 0;
00178 }

double ShowerSegmentCamAtNu::GetEndZPos (  )  const

Definition at line 327 of file ShowerSegmentCamAtNu.cxx.

References fEndVtxZ.

00328 {
00329   return fEndVtxZ;
00330 }

unsigned int ShowerSegmentCamAtNu::GetEntries (  )  const
unsigned int ShowerSegmentCamAtNu::GetNHits (  )  const

Definition at line 394 of file ShowerSegmentCamAtNu.cxx.

References ClustersInSegment, and GetEntries().

Referenced by AlgAtmosShowerList::Form2DShowers(), and AlgAtmosShowerList::MatchShowers().

00395 {
00396   unsigned int nhits=0;
00397   for(unsigned int i=0;i<this->GetEntries();i++)
00398     {
00399       nhits+=ClustersInSegment[i]->GetEntries();
00400     }
00401   return nhits;
00402 }  

int ShowerSegmentCamAtNu::GetNPlanes (  )  const [inline]

Definition at line 89 of file ShowerSegmentCamAtNu.h.

References fNPlanes.

00089 { return fNPlanes; };

ShowerSegmentCamAtNu* ShowerSegmentCamAtNu::GetPartner (  )  [inline]

Definition at line 97 of file ShowerSegmentCamAtNu.h.

References fPartner.

Referenced by AlgAtmosShowerList::MatchShowers().

00097 {return (ShowerSegmentCamAtNu*)(fPartner);};

int ShowerSegmentCamAtNu::GetPlaneView (  )  const

Definition at line 335 of file ShowerSegmentCamAtNu.cxx.

References fPlaneView.

Referenced by AlgAtmosShowerList::FindShowerLikeSegments().

00336 {
00337   return fPlaneView;
00338 }

int ShowerSegmentCamAtNu::GetReseedFlag (  )  const [inline]

Definition at line 77 of file ShowerSegmentCamAtNu.h.

References fReseedFlag.

Referenced by AlgAtmosShowerList::Form3DShowers().

00077 { return fReseedFlag; };

int ShowerSegmentCamAtNu::GetUID (  )  const [inline]
int ShowerSegmentCamAtNu::IsDiffuseShwAssoc ( ClusterCamAtNu cluster  ) 

Definition at line 407 of file ShowerSegmentCamAtNu.cxx.

References ClustersInSegment, and GetEntries().

Referenced by AlgAtmosShowerList::MatchShowers().

00408 {
00409   int assoctmp,assoc = 0;
00410   for(unsigned int i=0;i<this->GetEntries();i++)
00411     {
00412       assoctmp=ClustersInSegment[i]->IsDiffuseShwAssoc(cluster);
00413       if(assoctmp>1) { return assoctmp; }
00414       else { assoc=assoctmp; }
00415     }
00416   return assoc;
00417 }

int ShowerSegmentCamAtNu::IsShwAssoc ( ShowerSegmentCamAtNu segment  ) 

Definition at line 364 of file ShowerSegmentCamAtNu.cxx.

References GetCluster(), GetEntries(), and IsShwAssoc().

00365 {
00366   int assoctmp,assoc = 0;
00367   for(unsigned int i=0;i<segment->GetEntries();i++)
00368     {
00369       ClusterCamAtNu* cluster = segment->GetCluster(i);
00370       assoctmp=this->IsShwAssoc(cluster);
00371       if(assoctmp>assoc) assoc=assoctmp; if(assoc>1) return assoc;
00372     }
00373   return assoc;
00374 }

int ShowerSegmentCamAtNu::IsShwAssoc ( ClusterCamAtNu Clust  ) 

Definition at line 379 of file ShowerSegmentCamAtNu.cxx.

References ClustersInSegment, and GetEntries().

Referenced by AlgAtmosShowerList::Form2DShowers(), and IsShwAssoc().

00380 {
00381   int assoctmp,assoc = 0;
00382   for(unsigned int i=0;i<this->GetEntries();i++)
00383     {
00384       assoctmp=ClustersInSegment[i]->IsShwAssoc(cluster);
00385       if(assoctmp>1) { return assoctmp; }
00386       else { assoc=assoctmp; }
00387     }
00388   return assoc;
00389 }

int ShowerSegmentCamAtNu::IsShwLikeAssoc ( ClusterCamAtNu Clust  ) 

Definition at line 343 of file ShowerSegmentCamAtNu.cxx.

References GetCluster(), GetEntries(), and ClusterCamAtNu::IsShwAssoc().

Referenced by AlgAtmosShowerList::FindShowerLikeSegments().

00344 {
00345   int tempassoc=0;
00346   int assoc=0;
00347 
00348   for(unsigned int i=0; i<this->GetEntries(); ++i) {
00349     ClusterCamAtNu* Clust1 = this->GetCluster(i);
00350     
00351     tempassoc=Clust1->IsShwAssoc(Clust);
00352 
00353     if(tempassoc>assoc) {assoc=tempassoc;}
00354 
00355     if(assoc>1) {return assoc;}
00356   }
00357 
00358   return assoc;
00359 }

void ShowerSegmentCamAtNu::SetNPlanes ( int  nplanes  )  [inline]

Definition at line 88 of file ShowerSegmentCamAtNu.h.

References fNPlanes.

00088 { fNPlanes=nplanes; };

void ShowerSegmentCamAtNu::SetPartner ( ShowerSegmentCamAtNu segment  )  [inline]

Definition at line 96 of file ShowerSegmentCamAtNu.h.

References fPartner.

Referenced by AlgAtmosShowerList::MatchShowers().

00096 {fPartner = segment;};

void ShowerSegmentCamAtNu::SetReseedFlag ( int  flag  )  [inline]

Definition at line 76 of file ShowerSegmentCamAtNu.h.

References fReseedFlag.

00076 { fReseedFlag=flag; };

void ShowerSegmentCamAtNu::SetUID ( int  uid  )  [inline]

Member Data Documentation

Definition at line 115 of file ShowerSegmentCamAtNu.h.

Referenced by AddCluster(), GetBegDir(), GetBegPlane(), GetBegStrip(), and GetBegTPos().

Definition at line 122 of file ShowerSegmentCamAtNu.h.

Referenced by AddCluster(), and GetBegTime().

Definition at line 117 of file ShowerSegmentCamAtNu.h.

Referenced by AddCluster(), and GetBegZPos().

Definition at line 116 of file ShowerSegmentCamAtNu.h.

Referenced by AddCluster(), GetEndDir(), GetEndPlane(), GetEndStrip(), and GetEndTPos().

Definition at line 123 of file ShowerSegmentCamAtNu.h.

Referenced by AddCluster(), and GetEndTime().

Definition at line 118 of file ShowerSegmentCamAtNu.h.

Referenced by AddCluster(), and GetEndZPos().

Definition at line 121 of file ShowerSegmentCamAtNu.h.

Referenced by GetNPlanes(), and SetNPlanes().

Definition at line 112 of file ShowerSegmentCamAtNu.h.

Referenced by GetPartner(), and SetPartner().

Definition at line 120 of file ShowerSegmentCamAtNu.h.

Referenced by GetPlaneView().

Definition at line 119 of file ShowerSegmentCamAtNu.h.

Referenced by GetReseedFlag(), and SetReseedFlag().

Definition at line 114 of file ShowerSegmentCamAtNu.h.

Referenced by GetUID(), and SetUID().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1