CandSubShowerSRHandle Class Reference

#include <CandSubShowerSRHandle.h>

Inheritance diagram for CandSubShowerSRHandle:
CandRecoHandle CandHandle

List of all members.

Public Member Functions

 CandSubShowerSRHandle ()
 CandSubShowerSRHandle (const CandSubShowerSRHandle &csh)
 CandSubShowerSRHandle (CandSubShowerSR *cs)
virtual ~CandSubShowerSRHandle ()
virtual CandSubShowerSRHandleDupHandle () const
virtual void Trace (const char *c="") const
Double_t GetEnergy () const
void SetEnergy (Double_t)
PlaneView::PlaneView_t GetPlaneView () const
void SetPlaneView (PlaneView::PlaneView_t)
Float_t GetAvgDev () const
void SetAvgDev (Float_t)
Float_t GetSlope () const
void SetSlope (Float_t)
ClusterType::ClusterType_t GetClusterID () const
void SetClusterID (ClusterType::ClusterType_t)
Float_t GetProbEM () const
void SetProbEM (Float_t)
Double_t GetMinStripPE () const
void SetMinStripPE (Double_t)
Float_t GetMinU (Int_t) const
Float_t GetMaxU (Int_t) const
Float_t GetMinV (Int_t) const
Float_t GetMaxV (Int_t) const
Int_t GetNStrips (Int_t) const
Double_t GetAveTime ()
Double_t GetMinStpTime ()
Double_t GetMaxStpTime ()

Static Public Member Functions

static NavKey KeyFromSlice (const CandSubShowerSRHandle *)
static NavKey KeyFromViewEnergy (const CandSubShowerSRHandle *)
static NavKey KeyFromReverseViewEnergy (const CandSubShowerSRHandle *)

Detailed Description

Definition at line 19 of file CandSubShowerSRHandle.h.


Constructor & Destructor Documentation

CandSubShowerSRHandle::CandSubShowerSRHandle (  ) 

Definition at line 28 of file CandSubShowerSRHandle.cxx.

Referenced by DupHandle().

00029 {
00030 }

CandSubShowerSRHandle::CandSubShowerSRHandle ( const CandSubShowerSRHandle csh  ) 

Definition at line 33 of file CandSubShowerSRHandle.cxx.

00033                                                                              :
00034   CandRecoHandle(cdh)
00035 {
00036 }

CandSubShowerSRHandle::CandSubShowerSRHandle ( CandSubShowerSR cs  ) 

Definition at line 39 of file CandSubShowerSRHandle.cxx.

00039                                                                 :
00040   CandRecoHandle(cd)
00041 {
00042 }

CandSubShowerSRHandle::~CandSubShowerSRHandle (  )  [virtual]

Definition at line 45 of file CandSubShowerSRHandle.cxx.

00046 {
00047 }


Member Function Documentation

CandSubShowerSRHandle * CandSubShowerSRHandle::DupHandle (  )  const [virtual]

Reimplemented from CandRecoHandle.

Definition at line 50 of file CandSubShowerSRHandle.cxx.

References CandSubShowerSRHandle().

Referenced by CandShowerSRHandle::AddSubShower(), and AlgEventSSList::ReConstructShowers().

00051 {
00052    return (new CandSubShowerSRHandle(*this));
00053 }

Double_t CandSubShowerSRHandle::GetAveTime (  ) 

Definition at line 273 of file CandSubShowerSRHandle.cxx.

References CandHandle::GetDaughterIterator().

00274 {
00275   Double_t AveTime = 0.;  
00276   Double_t Tot = 0.;
00277   TIter stripItr(GetDaughterIterator());
00278   while (CandStripHandle *strip = 
00279          dynamic_cast<CandStripHandle*>(stripItr())) {  
00280     Tot += 1.;
00281     AveTime += strip->GetTime();
00282   }
00283   if(Tot<=0) return 0;
00284   return AveTime/Tot;
00285 }

Float_t CandSubShowerSRHandle::GetAvgDev (  )  const

Definition at line 92 of file CandSubShowerSRHandle.cxx.

References CandHandle::GetCandBase().

Referenced by AlgEventSSList::AddStripToEvent().

00093 {
00094   return dynamic_cast<const CandSubShowerSR *>(GetCandBase())->AvgDev;
00095 }

ClusterType::ClusterType_t CandSubShowerSRHandle::GetClusterID (  )  const
Double_t CandSubShowerSRHandle::GetEnergy (  )  const
Double_t CandSubShowerSRHandle::GetMaxStpTime (  ) 

Definition at line 303 of file CandSubShowerSRHandle.cxx.

References CandHandle::GetDaughterIterator().

Referenced by AlgShowerSSList::RunAlg().

00304 {
00305   Double_t maxTime = 0;
00306   TIter stripItr(GetDaughterIterator());
00307   while (CandStripHandle *strip =
00308          dynamic_cast<CandStripHandle*>(stripItr())) {
00309     if(strip->GetTime()>maxTime) maxTime = strip->GetTime();
00310   }
00311   return maxTime;
00312 }

Float_t CandSubShowerSRHandle::GetMaxU ( Int_t  iplane  )  const

Definition at line 207 of file CandSubShowerSRHandle.cxx.

References CandRecoHandle::GetBegPlane(), CandHandle::GetDaughterIterator(), VldContext::GetDetector(), CandRecoHandle::GetEndPlane(), GetPlaneView(), CandHandle::GetVldContext(), CandStripHandle::KeyFromPlane(), and PlaneView::kU.

Referenced by CandShowerSRHandle::GetMaxPhysU().

00207                                                         {
00208   if(this->GetPlaneView()!=PlaneView::kU) return -999;
00209   CandStripHandleItr sItr(GetDaughterIterator());
00210   CandStripHandle * begstrip = sItr();
00211   if(!begstrip) return -999;
00212   const VldContext * vld = begstrip->GetVldContext();
00213   if(!vld) return -999;
00214   PlexPlaneId plnid(vld->GetDetector(),iplane,false);
00215   if(plnid.GetPlaneView()!=PlaneView::kU) return -999;
00216   if(iplane<GetBegPlane() || iplane>GetEndPlane()) return -999;
00217 
00218   CandStripHandleItr stripItr(GetDaughterIterator());
00219   CandStripHandleKeyFunc *stripKf = stripItr.CreateKeyFunc();
00220   stripKf->SetFun(CandStripHandle::KeyFromPlane);
00221   stripItr.GetSet()->AdoptSortKeyFunc(stripKf);
00222   stripKf = 0;
00223   stripItr.GetSet()->Slice(iplane);
00224  
00225   Float_t maxU=-999;
00226   while (const CandStripHandle *strip =
00227          dynamic_cast<const CandStripHandle*>(stripItr())) {
00228     if(strip->GetTPos()>maxU) maxU = strip->GetTPos();
00229   }
00230   return maxU;
00231 }

Float_t CandSubShowerSRHandle::GetMaxV ( Int_t  iplane  )  const

Definition at line 235 of file CandSubShowerSRHandle.cxx.

References CandRecoHandle::GetBegPlane(), CandHandle::GetDaughterIterator(), VldContext::GetDetector(), CandRecoHandle::GetEndPlane(), GetPlaneView(), CandHandle::GetVldContext(), CandStripHandle::KeyFromPlane(), and PlaneView::kV.

Referenced by CandShowerSRHandle::GetMaxPhysV().

00235                                                          {
00236   if(this->GetPlaneView()!=PlaneView::kV) return -999;
00237   CandStripHandleItr sItr(GetDaughterIterator());
00238   CandStripHandle * begstrip = sItr();
00239   if(!begstrip)return -999;
00240   const VldContext * vld = begstrip->GetVldContext();
00241   if(!vld)return -999;
00242   PlexPlaneId plnid(vld->GetDetector(),iplane,false);
00243   if(plnid.GetPlaneView()!=PlaneView::kV)return -999.;
00244   if(iplane<GetBegPlane() || iplane>GetEndPlane()) return -999;
00245 
00246   CandStripHandleItr stripItr(GetDaughterIterator());
00247   CandStripHandleKeyFunc *stripKf = stripItr.CreateKeyFunc();
00248   stripKf->SetFun(CandStripHandle::KeyFromPlane);
00249   stripItr.GetSet()->AdoptSortKeyFunc(stripKf);
00250   stripKf = 0;
00251   stripItr.GetSet()->Slice(iplane);
00252 
00253   Float_t maxV=-999.;
00254   while (const CandStripHandle *strip =
00255          dynamic_cast<const CandStripHandle*>(stripItr())) {
00256     if(strip->GetTPos()>maxV) maxV=strip->GetTPos();
00257   }
00258   return maxV;
00259 }

Double_t CandSubShowerSRHandle::GetMinStpTime (  ) 

Definition at line 289 of file CandSubShowerSRHandle.cxx.

References CandHandle::GetDaughterIterator().

Referenced by AlgShowerSSList::RunAlg().

00290 {
00291   Double_t minTime = -1;
00292   TIter stripItr(GetDaughterIterator());
00293   while (CandStripHandle *strip =
00294          dynamic_cast<CandStripHandle*>(stripItr())) {
00295     if(minTime<0) minTime = strip->GetTime();
00296     else if(strip->GetTime()<minTime) minTime = strip->GetTime();
00297   }
00298   return minTime;
00299 }

Double_t CandSubShowerSRHandle::GetMinStripPE (  )  const

Definition at line 128 of file CandSubShowerSRHandle.cxx.

References CandHandle::GetCandBase().

00129 {
00130   return dynamic_cast<const CandSubShowerSR *>(GetCandBase())->MinStripPE;
00131 }

Float_t CandSubShowerSRHandle::GetMinU ( Int_t  iplane  )  const

Definition at line 152 of file CandSubShowerSRHandle.cxx.

References CandRecoHandle::GetBegPlane(), CandHandle::GetDaughterIterator(), VldContext::GetDetector(), CandRecoHandle::GetEndPlane(), GetPlaneView(), CandHandle::GetVldContext(), CandStripHandle::KeyFromPlane(), and PlaneView::kU.

Referenced by CandShowerSRHandle::GetMinPhysU().

00152                                                         {
00153   if(this->GetPlaneView()!=PlaneView::kU) return 999;
00154   CandStripHandleItr sItr(GetDaughterIterator());
00155   CandStripHandle * begstrip = sItr();
00156   if(!begstrip) return 999;
00157   const VldContext * vld = begstrip->GetVldContext();
00158   if(!vld) return 999;
00159   PlexPlaneId plnid(vld->GetDetector(),iplane,false);
00160   if(plnid.GetPlaneView()!=PlaneView::kU) return 999.;
00161   if(iplane<GetBegPlane() || iplane>GetEndPlane()) return 999;
00162 
00163   CandStripHandleItr stripItr(GetDaughterIterator());
00164   CandStripHandleKeyFunc *stripKf = stripItr.CreateKeyFunc();
00165   stripKf->SetFun(CandStripHandle::KeyFromPlane);
00166   stripItr.GetSet()->AdoptSortKeyFunc(stripKf);
00167   stripKf = 0;
00168   stripItr.GetSet()->Slice(iplane);
00169 
00170   Float_t minU=999.;
00171   while (const CandStripHandle *strip =
00172          dynamic_cast<const CandStripHandle*>(stripItr())) {
00173    if(strip->GetTPos()<minU) minU = strip->GetTPos();
00174   }
00175   return minU;
00176 }

Float_t CandSubShowerSRHandle::GetMinV ( Int_t  iplane  )  const

Definition at line 179 of file CandSubShowerSRHandle.cxx.

References CandRecoHandle::GetBegPlane(), CandHandle::GetDaughterIterator(), VldContext::GetDetector(), CandRecoHandle::GetEndPlane(), GetPlaneView(), CandHandle::GetVldContext(), CandStripHandle::KeyFromPlane(), and PlaneView::kV.

Referenced by CandShowerSRHandle::GetMinPhysV().

00179                                                         {
00180   if(this->GetPlaneView()!=PlaneView::kV) return 999;
00181   CandStripHandleItr sItr(GetDaughterIterator());
00182   CandStripHandle * begstrip = sItr();
00183   if(!begstrip) return 999;
00184   const VldContext * vld = begstrip->GetVldContext();
00185   if(!vld) return 999;
00186   PlexPlaneId plnid(vld->GetDetector(),iplane,false);
00187   if(plnid.GetPlaneView()!=PlaneView::kV) return 999;
00188   if(iplane<GetBegPlane() || iplane>GetEndPlane()) return 999;
00189 
00190   CandStripHandleItr stripItr(GetDaughterIterator());
00191   CandStripHandleKeyFunc *stripKf = stripItr.CreateKeyFunc();
00192   stripKf->SetFun(CandStripHandle::KeyFromPlane);
00193   stripItr.GetSet()->AdoptSortKeyFunc(stripKf);
00194   stripKf = 0;
00195   stripItr.GetSet()->Slice(iplane);
00196  
00197   Float_t minV=999.;
00198   while (const CandStripHandle *strip =
00199          dynamic_cast<const CandStripHandle*>(stripItr())) {
00200     if(strip->GetTPos()<minV) minV = strip->GetTPos();
00201   }
00202   return minV;
00203 }

Int_t CandSubShowerSRHandle::GetNStrips ( Int_t  iplane  )  const

Definition at line 262 of file CandSubShowerSRHandle.cxx.

References CandHandle::GetDaughterIterator().

Referenced by CandShowerSRHandle::GetNPhysStrips().

00262                                                          {
00263   Int_t nstrips=0;
00264   CandStripHandleItr stripItr(GetDaughterIterator());
00265   while (const CandStripHandle *strip =
00266          dynamic_cast<const CandStripHandle*>(stripItr())) {
00267     if(strip->GetPlane()==iplane)nstrips++;
00268   }
00269   return nstrips;
00270 }

PlaneView::PlaneView_t CandSubShowerSRHandle::GetPlaneView (  )  const
Float_t CandSubShowerSRHandle::GetProbEM (  )  const

Definition at line 116 of file CandSubShowerSRHandle.cxx.

References CandHandle::GetCandBase().

Referenced by NtpSRModule::FillNtpSubShowerSummary().

00117 {
00118   return dynamic_cast<const CandSubShowerSR *>(GetCandBase())->ProbEM;
00119 }

Float_t CandSubShowerSRHandle::GetSlope (  )  const

Definition at line 80 of file CandSubShowerSRHandle.cxx.

References CandHandle::GetCandBase().

Referenced by AlgEventSSList::AddStripToEvent(), and AlgShowerSS::RunAlg().

00081 {
00082   return dynamic_cast<const CandSubShowerSR *>(GetCandBase())->Slope;
00083 }

NavKey CandSubShowerSRHandle::KeyFromReverseViewEnergy ( const CandSubShowerSRHandle subshower  )  [static]

Definition at line 335 of file CandSubShowerSRHandle.cxx.

References GetEnergy(), GetPlaneView(), PlaneView::kU, PlaneView::kV, PlaneView::kX, and PlaneView::kY.

00336 {
00337   PlaneView::PlaneView_t view = subshower->GetPlaneView();
00338   Double_t eng = subshower->GetEnergy();
00339   if (view==PlaneView::kU||view==PlaneView::kX) return ((view+1)*2000+eng);
00340   if (view==PlaneView::kV||view==PlaneView::kY) return (view*1000+eng);
00341   else return (view*100+eng);  
00342 }

NavKey CandSubShowerSRHandle::KeyFromSlice ( const CandSubShowerSRHandle subshower  )  [static]

Reimplemented from CandRecoHandle.

Definition at line 318 of file CandSubShowerSRHandle.cxx.

References CandRecoHandle::GetCandSlice(), and CandHandle::GetUidInt().

Referenced by AlgEventSSList::RunAlg().

00319 {
00320   if (subshower->GetCandSlice()) {
00321     return static_cast<Int_t>(subshower->GetCandSlice()->GetUidInt());
00322   }
00323   return 0;
00324 }

NavKey CandSubShowerSRHandle::KeyFromViewEnergy ( const CandSubShowerSRHandle subshower  )  [static]

Definition at line 326 of file CandSubShowerSRHandle.cxx.

References GetEnergy(), GetPlaneView(), PlaneView::kU, PlaneView::kV, PlaneView::kX, and PlaneView::kY.

Referenced by NtpSRModule::FillNtpCluster(), and AlgSubShowerSRList::TestOverLap().

00327 {
00328   PlaneView::PlaneView_t view = subshower->GetPlaneView();
00329   Double_t eng = subshower->GetEnergy();
00330   if (view==PlaneView::kU||view==PlaneView::kX) return ((view+1)*2000+eng)*(-1.);
00331   if (view==PlaneView::kV||view==PlaneView::kY) return (view*1000+eng)*(-1.);
00332   else return (view*100+eng)*(-1.);  
00333 }

void CandSubShowerSRHandle::SetAvgDev ( Float_t  avgdev  ) 

Definition at line 98 of file CandSubShowerSRHandle.cxx.

References CandHandle::GetOwnedCandBase().

Referenced by AlgSubShowerSR::CalculateEnergyVertexAngle().

00099 {
00100   dynamic_cast<CandSubShowerSR *>(GetOwnedCandBase())->AvgDev=avgdev;
00101 }

void CandSubShowerSRHandle::SetClusterID ( ClusterType::ClusterType_t  ss  ) 
void CandSubShowerSRHandle::SetEnergy ( Double_t  en  ) 

Definition at line 62 of file CandSubShowerSRHandle.cxx.

References CandHandle::GetOwnedCandBase().

Referenced by AlgEventSSList::AddStripToEvent(), and AlgSubShowerSR::CalculateEnergyVertexAngle().

00063 {
00064   dynamic_cast<CandSubShowerSR *>(GetOwnedCandBase())->Energy = en;
00065 }

void CandSubShowerSRHandle::SetMinStripPE ( Double_t  minstrippe  ) 

Definition at line 134 of file CandSubShowerSRHandle.cxx.

References CandHandle::GetOwnedCandBase().

Referenced by AlgSubShowerSRList::FormHalo(), and AlgSubShowerSRList::RunAlg().

00135 {
00136   dynamic_cast<CandSubShowerSR *>(GetOwnedCandBase())->MinStripPE = minstrippe;
00137 }

void CandSubShowerSRHandle::SetPlaneView ( PlaneView::PlaneView_t  pv  ) 

Definition at line 74 of file CandSubShowerSRHandle.cxx.

References CandHandle::GetOwnedCandBase().

00075 {
00076   dynamic_cast<CandSubShowerSR *>(GetOwnedCandBase())->planeView = pv;
00077 }

void CandSubShowerSRHandle::SetProbEM ( Float_t  probem  ) 

Definition at line 122 of file CandSubShowerSRHandle.cxx.

References CandHandle::GetOwnedCandBase().

Referenced by AlgSubShowerSR::SubShowerID().

00123 {
00124   dynamic_cast<CandSubShowerSR *>(GetOwnedCandBase())->ProbEM = probem;
00125 }

void CandSubShowerSRHandle::SetSlope ( Float_t  slope  ) 

Definition at line 86 of file CandSubShowerSRHandle.cxx.

References CandHandle::GetOwnedCandBase().

Referenced by AlgSubShowerSR::CalculateEnergyVertexAngle().

00087 {
00088   dynamic_cast<CandSubShowerSR *>(GetOwnedCandBase())->Slope=slope;
00089 }

void CandSubShowerSRHandle::Trace ( const char *  c = ""  )  const [virtual]

Reimplemented from CandRecoHandle.

Definition at line 140 of file CandSubShowerSRHandle.cxx.

References Msg::kDebug, and MSG.

00141 {
00142   MSG("Cand", Msg::kDebug)
00143     << "*******Begin CandSubShowerSRHandle::Trace(\"" << c << "\")" << endl
00144     << "Information from CandSubShowerSRHandle's CandHandle: " << endl;
00145   CandHandle::Trace(c);
00146   MSG("Cand", Msg::kDebug)
00147     << "*******End CandSubShowerSRHandle::Trace(\"" << c << "\")" << endl;
00148 }


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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1