CandRecoHandle Class Reference

#include <CandRecoHandle.h>

Inheritance diagram for CandRecoHandle:
CandHandle CandAtNuRecoHandle CandCluster3DHandle CandEventHandle CandShowerHandle CandSubShowerSRHandle CandTrackHandle FarDetEventHandle CandShowerAtNuHandle CandShowerEMHandle CandShowerSRHandle CandFitTrackHandle CandTrackAtNuHandle CandTrackCamHandle CandTrackSRHandle

List of all members.

Public Member Functions

 CandRecoHandle ()
 CandRecoHandle (const CandRecoHandle &cdh)
 CandRecoHandle (CandReco *cd)
virtual ~CandRecoHandle ()
virtual CandRecoHandleDupHandle () const
virtual void Trace (const char *c="") const
void SetCandSlice (const CandSliceHandle *slice)
const CandSliceHandleGetCandSlice () const
CandSliceHandleGetCandSliceWritable ()
Int_t GetNStrip (PlaneView::PlaneView_t=PlaneView::kUnknown) const
Int_t GetNStrip (const CandRecoHandle *, PlaneView::PlaneView_t=PlaneView::kUnknown) const
Int_t GetNDigit (StripEnd::StripEnd_t=StripEnd::kWhole) const
Int_t GetNPlane (PlaneView::PlaneView_t=PlaneView::kUnknown) const
virtual Int_t GetBegPlane (PlaneView::PlaneView_t=PlaneView::kUnknown) const
virtual Int_t GetEndPlane (PlaneView::PlaneView_t=PlaneView::kUnknown) const
void SetVtxU (Double_t)
Double_t GetVtxU () const
void SetVtxV (Double_t)
Double_t GetVtxV () const
void SetVtxZ (Double_t)
Double_t GetVtxZ () const
void SetVtxT (Double_t)
Double_t GetVtxT () const
void SetVtxPlane (Int_t)
Int_t GetVtxPlane () const
void SetEndU (Double_t)
Double_t GetEndU () const
void SetEndV (Double_t)
Double_t GetEndV () const
void SetEndZ (Double_t)
Double_t GetEndZ () const
void SetEndT (Double_t)
Double_t GetEndT () const
void SetEndPlane (Int_t)
Int_t GetTermPlane () const
void SetVtxDirCosU (Double_t)
Double_t GetVtxDirCosU () const
void SetVtxDirCosV (Double_t)
Double_t GetVtxDirCosV () const
void SetVtxDirCosZ (Double_t)
Double_t GetVtxDirCosZ () const
void SetEndDirCosU (Double_t)
Double_t GetEndDirCosU () const
void SetEndDirCosV (Double_t)
Double_t GetEndDirCosV () const
void SetEndDirCosZ (Double_t)
Double_t GetEndDirCosZ () const
void SetDirCosU (Double_t)
Double_t GetDirCosU () const
void SetDirCosV (Double_t)
Double_t GetDirCosV () const
void SetDirCosZ (Double_t)
Double_t GetDirCosZ () const
void SetTimeSlope (Double_t)
Double_t GetTimeSlope () const
void SetTimeOffset (Double_t)
Double_t GetTimeOffset () const
CalTimeType::CalTimeType_t GetCalTimeType () const
void CalibrateSigMapped (UInt_t fEncoded, Float_t)
void CalibrateMIP (UInt_t fEncoded, Float_t)
Double_t GetCharge (CalStripType::CalStripType_t=CalStripType::kMIP) const
Double_t GetPlaneCharge (Int_t iplane, CalStripType::CalStripType_t=CalStripType::kMIP) const
Double_t GetStripCharge (const CandStripHandle *) const
Double_t GetStripCharge (const CandStripHandle *, CalStripType::CalStripType_t, StripEnd::StripEnd_t=StripEnd::kWhole) const
Double_t GetStripCharge (const CandStripHandle *, StripEnd::StripEnd_t, CalStripType::CalStripType_t=CalStripType::kMIP) const

Static Public Member Functions

static NavKey KeyFromSlice (const CandRecoHandle *)

Detailed Description

Definition at line 31 of file CandRecoHandle.h.


Constructor & Destructor Documentation

CandRecoHandle::CandRecoHandle (  ) 

Definition at line 35 of file CandRecoHandle.cxx.

Referenced by DupHandle().

00036 {
00037 }

CandRecoHandle::CandRecoHandle ( const CandRecoHandle cdh  ) 

Definition at line 40 of file CandRecoHandle.cxx.

00040                                                         :
00041   CandHandle(cdh)
00042 {
00043 }

CandRecoHandle::CandRecoHandle ( CandReco cd  ) 

Definition at line 46 of file CandRecoHandle.cxx.

00046                                            :
00047   CandHandle(cd)
00048 {
00049 }

CandRecoHandle::~CandRecoHandle (  )  [virtual]

Definition at line 52 of file CandRecoHandle.cxx.

00053 {
00054 }


Member Function Documentation

void CandRecoHandle::CalibrateMIP ( UInt_t  fEncoded,
Float_t  ph 
)

Definition at line 791 of file CandRecoHandle.cxx.

References CandReco::fMIP, and CandHandle::GetOwnedCandBase().

Referenced by AlgShowerCam::CalculateShowerEnergy(), AlgShowerAtNu::RunAlg(), and AlgTrackAtNu::RunAlg().

00792 {
00793   CandReco *candreco = dynamic_cast<CandReco *>(GetOwnedCandBase());
00794   candreco->fMIP[encoded] = ph;
00795 }

void CandRecoHandle::CalibrateSigMapped ( UInt_t  fEncoded,
Float_t  ph 
)

Definition at line 784 of file CandRecoHandle.cxx.

References CandReco::fSigMapped, and CandHandle::GetOwnedCandBase().

Referenced by AlgShowerCam::CalculateShowerEnergy(), AlgShowerAtNu::RunAlg(), and AlgTrackAtNu::RunAlg().

00785 {
00786   CandReco *candreco = dynamic_cast<CandReco *>(GetOwnedCandBase());
00787   candreco->fSigMapped[encoded] = ph;
00788 }

CandRecoHandle * CandRecoHandle::DupHandle (  )  const [virtual]
Int_t CandRecoHandle::GetBegPlane ( PlaneView::PlaneView_t  planeview_t = PlaneView::kUnknown  )  const [virtual]

Definition at line 146 of file CandRecoHandle.cxx.

References CandHandle::GetCandBase(), CandHandle::GetDaughterIterator(), CandStripHandle::GetPlane(), CandStripHandle::GetPlaneView(), GetTermPlane(), GetVtxPlane(), PlaneView::kA, PlaneView::kB, and PlaneView::kUnknown.

Referenced by VertexFinder::AcceptTrackInfo(), AtNuTreeModule::Ana(), RecoTreeModule::Ana(), CandShowerSRHandle::BuriedTrack(), VertexFinder::CheckTrackInfo(), AlgEventSSList::CreatePrimaryShower(), AlgEventSRList::CreatePrimaryShower(), AlgTrackSRList::DeleteTwinTracks(), CandTrackSRHandle::GetHoughResid2(), CandShowerHandle::GetMaxU(), CandSubShowerSRHandle::GetMaxU(), CandShowerHandle::GetMaxV(), CandSubShowerSRHandle::GetMaxV(), CandShowerHandle::GetMinU(), CandSubShowerSRHandle::GetMinU(), CandSubShowerSRHandle::GetMinV(), CandShowerHandle::GetMinV(), CandTrackHandle::GetScore(), AlgFitTrackMS::InitArrays(), CandTrackHandle::IsUnphysical(), AlgEventSRList::RemoveTracksinShowers(), AlgTrackSR::RunAlg(), AlgEventSRList::RunAlg(), AlgEventSSList::RunAlg(), AlgShowerSR::SetUV(), AlgTrack::SetUVZ(), and TrackContext::TrackContext().

00148 {
00149  if(planeview_t == PlaneView::kUnknown){
00150    Int_t iplane =  dynamic_cast<const CandReco *>
00151                                     (GetCandBase())->fVertex.GetPlane();
00152    if(iplane>=0) return iplane;
00153   }
00154   TIter stripItr(GetDaughterIterator());
00155   CandStripHandle *strip;
00156   Bool_t first(1);
00157   Int_t plane=0;
00158 
00159   Double_t dir = 1;
00160   if(this->GetVtxPlane() - this->GetTermPlane() > 0) dir = -1;
00161 
00162   while ((strip = dynamic_cast<CandStripHandle*>(stripItr()))) {
00163     PlaneView::PlaneView_t planeview = strip->GetPlaneView();
00164     if (planeview!=PlaneView::kA && planeview!=PlaneView::kB &&
00165         (planeview_t==PlaneView::kUnknown || planeview_t==planeview) &&
00166         (first || strip->GetPlane()*dir<plane*dir)) {
00167       first = 0;
00168       plane = strip->GetPlane();
00169     }
00170   }
00171   return plane;
00172 }

CalTimeType::CalTimeType_t CandRecoHandle::GetCalTimeType (  )  const

Definition at line 771 of file CandRecoHandle.cxx.

References CandStripHandle::GetCalTimeType(), CandHandle::GetDaughterIterator(), and CalTimeType::kNone.

00772 {
00773   TIter stripItr(GetDaughterIterator());
00774   CandStripHandle *strip = dynamic_cast<CandStripHandle*>(stripItr());
00775   if (strip) {
00776     return strip->GetCalTimeType();
00777   }
00778   else {
00779     return CalTimeType::kNone;
00780   }
00781 }

const CandSliceHandle * CandRecoHandle::GetCandSlice (  )  const
CandSliceHandle * CandRecoHandle::GetCandSliceWritable (  ) 

Definition at line 88 of file CandRecoHandle.cxx.

References CandHandle::GetOwnedCandBase().

Referenced by AlgFitTrackCam::CleanNDLists().

00089 {
00090   return dynamic_cast<CandReco *>(GetOwnedCandBase())->fCandSlice;
00091 }

Double_t CandRecoHandle::GetCharge ( CalStripType::CalStripType_t  caltype_t = CalStripType::kMIP  )  const

Definition at line 231 of file CandRecoHandle.cxx.

References CandReco::fMIP, CandReco::fSigMapped, CandHandle::GetCandBase(), CandHandle::GetDaughterIterator(), Msg::kError, CalStripType::kGeV, CalStripType::kMIP, StripEnd::kNegative, CalStripType::kNone, CalDigitType::kNone, CalDigitType::kPE, CalStripType::kPE, StripEnd::kPositive, CalDigitType::kSigCorr, CalStripType::kSigCorr, CalStripType::kSigLin, CalDigitType::kSigLin, CalStripType::kSigMapped, and MSG.

Referenced by AlgEventSSList::AddStripToEvent(), CandShowerSRHandle::BelongsWithTrack(), CandShowerHandle::CalibrateEnergy(), GfxShowerList::ExecuteEvent(), NtpCluster3DModule::FillNtpCluster(), NtpSRBleachFiller::GetlateBucketPHFraction(), CandTrackSRHandle::GetScore(), AlgRmMu::RunAlg(), AlgEventSSList::RunAlg(), EVD::UpdateChargeHists(), and EVD::UpdateSummary().

00233 {
00234   Double_t charge=0.;
00235   Bool_t calstrip = kTRUE;
00236   CalDigitType::CalDigitType_t caldigittype = CalDigitType::kNone;
00237   switch (caltype_t) {
00238   case CalStripType::kNone:
00239     caldigittype = CalDigitType::kNone;
00240     calstrip = kFALSE;
00241     break;
00242   case CalStripType::kSigLin:
00243     caldigittype = CalDigitType::kSigLin;
00244     calstrip = kFALSE;
00245     break;
00246   case CalStripType::kSigCorr:
00247     caldigittype = CalDigitType::kSigCorr;
00248     calstrip = kFALSE;
00249     break;
00250   case CalStripType::kPE:
00251     caldigittype = CalDigitType::kPE;
00252     calstrip = kFALSE;
00253     break;
00254   default:
00255     calstrip = kTRUE;
00256     break;
00257   }
00258   TIter stripItr(GetDaughterIterator());
00259   const CandReco *candreco =
00260                           dynamic_cast<const CandReco *>(GetCandBase());
00261   while (const CandStripHandle *strip =
00262     dynamic_cast<const CandStripHandle*>(stripItr())) {
00263     if (!calstrip) {
00264       charge += strip->GetCharge(caldigittype);
00265     } 
00266     else {
00267       Int_t encodedNegative =
00268                  strip->GetStripEndId(StripEnd::kNegative).GetEncoded();
00269       Int_t encodedPositive =
00270                  strip->GetStripEndId(StripEnd::kPositive).GetEncoded();
00271       switch (caltype_t) {
00272       case CalStripType::kSigMapped:
00273         if ((candreco->fSigMapped).count(encodedNegative)) {
00274           charge += (candreco->fSigMapped)[encodedNegative];
00275         }
00276         if ((candreco->fSigMapped).count(encodedPositive)) {
00277           charge += (candreco->fSigMapped)[encodedPositive];
00278         }
00279         break;
00280       case CalStripType::kMIP:
00281       
00282         if ((candreco->fMIP).count(encodedNegative)) {
00283           charge += (candreco->fMIP)[encodedNegative];
00284         }
00285         if ((candreco->fMIP).count(encodedPositive)) {
00286           charge += (candreco->fMIP)[encodedPositive];
00287         }
00288         break;
00289       case CalStripType::kGeV:
00290         if ((candreco->fMIP).count(encodedNegative)) {
00291           charge += (candreco->fMIP)[encodedNegative]/18.5;
00292         }
00293         if ((candreco->fMIP).count(encodedPositive)) {
00294           charge += (candreco->fMIP)[encodedPositive]/18.5;
00295         }
00296         break;
00297       default:
00298         MSG("RecoBase",Msg::kError)
00299                       << "undefined CalStripType " << caltype_t << "\n";
00300         break;
00301       }
00302     }
00303   }
00304   return charge;
00305 }

Double_t CandRecoHandle::GetDirCosU (  )  const
Double_t CandRecoHandle::GetDirCosV (  )  const
Double_t CandRecoHandle::GetDirCosZ (  )  const
Double_t CandRecoHandle::GetEndDirCosU (  )  const
Double_t CandRecoHandle::GetEndDirCosV (  )  const
Double_t CandRecoHandle::GetEndDirCosZ (  )  const
Int_t CandRecoHandle::GetEndPlane ( PlaneView::PlaneView_t  planeview_t = PlaneView::kUnknown  )  const [virtual]

Definition at line 175 of file CandRecoHandle.cxx.

References CandHandle::GetCandBase(), CandHandle::GetDaughterIterator(), CandStripHandle::GetPlane(), CandStripHandle::GetPlaneView(), GetTermPlane(), GetVtxPlane(), PlaneView::kA, PlaneView::kB, and PlaneView::kUnknown.

Referenced by VertexFinder::AcceptTrackInfo(), AtNuTreeModule::Ana(), RemoveMuon::Ana(), RecoTreeModule::Ana(), CandShowerHandle::BelongsWithShower(), CandTrackHandle::BelongsWithShower(), CandShowerSRHandle::BelongsWithTrack(), CandShowerHandle::BelongsWithTrack(), CandShowerSRHandle::BuriedTrack(), AlgTrack::CalculateTrace(), VertexFinder::CheckTrackInfo(), AlgFarDetEvent::Contained(), AlgTrackSRList::DeleteTwinTracks(), AlgCosmicMuonRemoval::FillEvtInfo(), UberModule::FillNtpTrackEnd(), UberModuleLite::FillNtpTrackEnd(), NtpSRModule::FillNtpTrackEnd(), MCAnalysis::FillTrkInfo(), AlgMuonRemoval::FillTrkInfo(), CandTrackSRHandle::GetHoughResid2(), GetMaxTrackLikePlane(), CandShowerHandle::GetMaxU(), CandSubShowerSRHandle::GetMaxU(), CandShowerHandle::GetMaxV(), CandSubShowerSRHandle::GetMaxV(), CandShowerHandle::GetMinU(), CandSubShowerSRHandle::GetMinU(), CandSubShowerSRHandle::GetMinV(), CandShowerHandle::GetMinV(), GetRemovableTrack(), CandTrackHandle::GetScore(), AlgFitTrackMS::InitArrays(), CandTrackHandle::IsUnphysical(), MergeEvent::Reco(), AlgEventSRList::RemoveTracksinShowers(), AlgTrackSR::RunAlg(), AlgRmMu::RunAlg(), AlgTrackAtNu::RunAlg(), AlgEventSRList::RunAlg(), AlgEventSSList::RunAlg(), AlgFitTrackAtNu::RunAlg(), AlgTrack::SetdS(), AlgFitTrackCam::SetPropertiesFromFinderTrack(), AlgFitTrackSR::SetTrackEndParameters(), AlgFitTrackSR::SetTrackParameters(), AlgShowerSR::SetUV(), AlgTrack::SetUVZ(), AlgFitTrackSR::SwimVertexAndEndPoints(), TrackContext::TrackContext(), and TrackEndContained().

00177 {
00178   
00179   if(planeview_t == PlaneView::kUnknown){
00180    Int_t iplane =  dynamic_cast<const CandReco *>
00181                                     (GetCandBase())->fTerm.GetPlane();
00182    if(iplane>=0) return iplane;
00183   }
00184   TIter stripItr(GetDaughterIterator());
00185   CandStripHandle *strip;
00186   Bool_t first(1);
00187   Int_t plane=0;
00188 
00189   Double_t dir = 1;
00190   if(this->GetVtxPlane() - this->GetTermPlane() > 0) dir = -1;
00191 
00192   while ((strip = dynamic_cast<CandStripHandle*>(stripItr()))) {
00193     PlaneView::PlaneView_t planeview = strip->GetPlaneView();
00194     if (planeview!=PlaneView::kA && planeview!=PlaneView::kB &&
00195         (planeview_t==PlaneView::kUnknown || planeview_t==planeview) &&
00196         (first || strip->GetPlane()*dir>plane*dir)) {
00197       first = 0;
00198       plane = strip->GetPlane();
00199     }
00200   }
00201   return plane;
00202 }

Double_t CandRecoHandle::GetEndT (  )  const
Double_t CandRecoHandle::GetEndU (  )  const
Double_t CandRecoHandle::GetEndV (  )  const
Double_t CandRecoHandle::GetEndZ (  )  const
Int_t CandRecoHandle::GetNDigit ( StripEnd::StripEnd_t  stripend_t = StripEnd::kWhole  )  const

Definition at line 115 of file CandRecoHandle.cxx.

References CandHandle::GetDaughterIterator(), CandStripHandle::GetNDigit(), and n.

Referenced by AlgFitTrackCam::SetTrackProperties().

00116 {
00117   Int_t n=0;
00118   TIter stripItr(GetDaughterIterator());
00119   CandStripHandle *strip;
00120   while ((strip = dynamic_cast<CandStripHandle*>(stripItr()))) {
00121     n += strip->GetNDigit(stripend_t);
00122   }
00123   return n;
00124 }

Int_t CandRecoHandle::GetNPlane ( PlaneView::PlaneView_t  planeview_t = PlaneView::kUnknown  )  const

Definition at line 205 of file CandRecoHandle.cxx.

References CandHandle::GetDaughterIterator(), CandStripHandle::GetPlane(), CandStripHandle::GetPlaneView(), PlaneView::kA, PlaneView::kB, CandStripHandle::KeyFromPlane(), and PlaneView::kUnknown.

Referenced by VertexFinder::CheckTrackInfo(), AlgTrackSRList::DeleteTwinTracks(), and StopMuFinderFar::IsStopping().

00207 {
00208   CandStripHandleItr stripItr(GetDaughterIterator());
00209   CandStripHandleKeyFunc *stripKf = stripItr.CreateKeyFunc();
00210   stripKf->SetFun(CandStripHandle::KeyFromPlane);
00211   stripItr.GetSet()->AdoptSortKeyFunc(stripKf);
00212   stripKf = 0;
00213 
00214   Int_t plane=0;
00215   Int_t oldplane=0;
00216   CandStripHandle *strip;
00217   while ((strip = dynamic_cast<CandStripHandle*>(stripItr()))) {
00218     PlaneView::PlaneView_t planeview = strip->GetPlaneView();
00219     if (planeview!=PlaneView::kA && planeview!=PlaneView::kB &&
00220         (planeview_t==PlaneView::kUnknown || planeview==planeview_t)) {
00221       if (!plane || strip->GetPlane()!=oldplane) {
00222         plane++;
00223       }
00224       oldplane = strip->GetPlane();
00225     }
00226   }
00227   return plane;
00228 }

Int_t CandRecoHandle::GetNStrip ( const CandRecoHandle reco,
PlaneView::PlaneView_t  planeview_t = PlaneView::kUnknown 
) const

Definition at line 128 of file CandRecoHandle.cxx.

References CandHandle::FindDaughter(), CandHandle::GetDaughterIterator(), CandStripHandle::GetPlaneView(), PlaneView::kUnknown, and n.

00130 {
00131   Int_t n=0;
00132   TIter stripItr(GetDaughterIterator());
00133   CandStripHandle *strip;
00134   while ((strip = dynamic_cast<CandStripHandle*>(stripItr()))) {
00135     PlaneView::PlaneView_t planeview = strip->GetPlaneView();
00136     if ((planeview_t==PlaneView::kUnknown || planeview==planeview_t) &&
00137         reco->FindDaughter(strip)) {
00138       n++;
00139     }
00140   }
00141   return n;
00142 }

Int_t CandRecoHandle::GetNStrip ( PlaneView::PlaneView_t  planeview_t = PlaneView::kUnknown  )  const
Double_t CandRecoHandle::GetPlaneCharge ( Int_t  iplane,
CalStripType::CalStripType_t  caltype_t = CalStripType::kMIP 
) const

Definition at line 307 of file CandRecoHandle.cxx.

References CandReco::fMIP, CandReco::fSigMapped, CandHandle::GetCandBase(), CandHandle::GetDaughterIterator(), Msg::kError, CandStripHandle::KeyFromPlane(), CalStripType::kGeV, CalStripType::kMIP, StripEnd::kNegative, CalStripType::kNone, CalDigitType::kNone, CalDigitType::kPE, CalStripType::kPE, StripEnd::kPositive, CalDigitType::kSigCorr, CalStripType::kSigCorr, CalStripType::kSigLin, CalDigitType::kSigLin, CalStripType::kSigMapped, and MSG.

Referenced by CandShowerSRHandle::BuriedTrack(), AlgCosmicMuonRemoval::FillEvtInfo(), MCAnalysis::FillTrkInfo(), AlgMuonRemoval::FillTrkInfo(), GetMaxTrackLikePlane(), and CandTrackHandle::IsUnphysical().

00309 {
00310 
00311 
00312   Double_t charge=0.;
00313   Bool_t calstrip = kTRUE;
00314   CalDigitType::CalDigitType_t caldigittype = CalDigitType::kNone;
00315   switch (caltype_t) {
00316   case CalStripType::kNone:
00317     caldigittype = CalDigitType::kNone;
00318     calstrip = kFALSE;
00319     break;
00320   case CalStripType::kSigLin:
00321     caldigittype = CalDigitType::kSigLin;
00322     calstrip = kFALSE;
00323     break;
00324   case CalStripType::kSigCorr:
00325     caldigittype = CalDigitType::kSigCorr;
00326     calstrip = kFALSE;
00327     break;
00328   case CalStripType::kPE:
00329     caldigittype = CalDigitType::kPE;
00330     calstrip = kFALSE;
00331     break;
00332   default:
00333     calstrip = kTRUE;
00334     break;
00335   }
00336 
00337   CandStripHandleItr stripItr(GetDaughterIterator());
00338   CandStripHandleKeyFunc *stripKf = stripItr.CreateKeyFunc();
00339   stripKf->SetFun(CandStripHandle::KeyFromPlane);
00340   stripItr.GetSet()->AdoptSortKeyFunc(stripKf);
00341   stripKf = 0;
00342   stripItr.GetSet()->Slice(iplane);
00343   const CandReco *candreco =
00344                           dynamic_cast<const CandReco *>(GetCandBase());
00345   while (const CandStripHandle *strip =
00346     dynamic_cast<const CandStripHandle*>(stripItr())) {
00347     if(strip->GetPlane()==iplane){
00348       if (!calstrip) {
00349         charge += strip->GetCharge(caldigittype);
00350       } 
00351       else {
00352         Int_t encodedNegative =
00353           strip->GetStripEndId(StripEnd::kNegative).GetEncoded();
00354         Int_t encodedPositive =
00355           strip->GetStripEndId(StripEnd::kPositive).GetEncoded();
00356         switch (caltype_t) {
00357         case CalStripType::kSigMapped:
00358           if ((candreco->fSigMapped).count(encodedNegative)) {
00359             charge += (candreco->fSigMapped)[encodedNegative];
00360           }
00361           if ((candreco->fSigMapped).count(encodedPositive)) {
00362             charge += (candreco->fSigMapped)[encodedPositive];
00363           }
00364           break;
00365         case CalStripType::kMIP:
00366           
00367           if ((candreco->fMIP).count(encodedNegative)) {
00368             charge += (candreco->fMIP)[encodedNegative];
00369           }
00370           if ((candreco->fMIP).count(encodedPositive)) {
00371             charge += (candreco->fMIP)[encodedPositive];
00372           }
00373           break;
00374         case CalStripType::kGeV:
00375           if ((candreco->fMIP).count(encodedNegative)) {
00376             charge += (candreco->fMIP)[encodedNegative]/18.5;
00377           }
00378           if ((candreco->fMIP).count(encodedPositive)) {
00379             charge += (candreco->fMIP)[encodedPositive]/18.5;
00380           }
00381           break;
00382         default:
00383           MSG("RecoBase",Msg::kError)
00384             << "undefined CalStripType " << caltype_t << "\n";
00385           break;
00386         }
00387       }
00388     }
00389   }
00390   return charge;
00391 }

Double_t CandRecoHandle::GetStripCharge ( const CandStripHandle strip,
StripEnd::StripEnd_t  stripend_t,
CalStripType::CalStripType_t  calstriptype_t = CalStripType::kMIP 
) const

Definition at line 491 of file CandRecoHandle.cxx.

References GetStripCharge().

00494 {
00495   return GetStripCharge(strip,calstriptype_t,stripend_t);
00496 }

Double_t CandRecoHandle::GetStripCharge ( const CandStripHandle strip,
CalStripType::CalStripType_t  calstriptype_t,
StripEnd::StripEnd_t  stripend_t = StripEnd::kWhole 
) const

Definition at line 394 of file CandRecoHandle.cxx.

References CandHandle::FindDaughter(), CandReco::fMIP, CandReco::fSigMapped, CandHandle::GetCandBase(), CandStripHandle::GetCharge(), PlexStripEndId::GetEncoded(), CandStripHandle::GetStripEndId(), Msg::kError, CalStripType::kGeV, CalStripType::kMIP, StripEnd::kNegative, CalStripType::kNone, CalDigitType::kNone, CalDigitType::kPE, CalStripType::kPE, StripEnd::kPositive, CalDigitType::kSigCorr, CalStripType::kSigCorr, CalStripType::kSigLin, CalDigitType::kSigLin, CalStripType::kSigMapped, StripEnd::kWhole, and MSG.

00397 {
00398   if (!FindDaughter(strip)) {
00399     return 0.;
00400   }
00401   Bool_t calstrip = kTRUE;
00402   CalDigitType::CalDigitType_t caldigittype = CalDigitType::kNone;
00403   switch (calstriptype_t) {
00404   case CalStripType::kNone:
00405     caldigittype = CalDigitType::kNone;
00406     calstrip = kFALSE;
00407     break;
00408   case CalStripType::kSigLin:
00409     caldigittype = CalDigitType::kSigLin;
00410     calstrip = kFALSE;
00411     break;
00412   case CalStripType::kSigCorr:
00413     caldigittype = CalDigitType::kSigCorr;
00414     calstrip = kFALSE;
00415     break;
00416   case CalStripType::kPE:
00417     caldigittype = CalDigitType::kPE;
00418     calstrip = kFALSE;
00419     break;
00420   default:
00421     calstrip = kTRUE;
00422     break;
00423   }
00424   if (!calstrip) {
00425     return strip->GetCharge(stripend_t,caldigittype);
00426   } 
00427   else {
00428     Int_t encodedNegative =
00429                  strip->GetStripEndId(StripEnd::kNegative).GetEncoded();
00430     Int_t encodedPositive =
00431                  strip->GetStripEndId(StripEnd::kPositive).GetEncoded();
00432     const CandReco *candreco =
00433                           dynamic_cast<const CandReco *>(GetCandBase());
00434     Double_t charge=0.;
00435     switch (calstriptype_t) {
00436     case CalStripType::kSigMapped:
00437       if (stripend_t==StripEnd::kNegative ||
00438           stripend_t==StripEnd::kWhole) {
00439         if ((candreco->fSigMapped).count(encodedNegative)) {
00440           charge += (candreco->fSigMapped)[encodedNegative];
00441         }
00442       }
00443       if (stripend_t==StripEnd::kPositive ||
00444           stripend_t==StripEnd::kWhole) {
00445         if ((candreco->fSigMapped).count(encodedPositive)) {
00446           charge += (candreco->fSigMapped)[encodedPositive];
00447         }
00448       }
00449       break;
00450     case CalStripType::kMIP:
00451 
00452 // for now, kludge 1 MIP = 530 ADU - put this in db later!!!!
00453       if (stripend_t==StripEnd::kNegative ||
00454           stripend_t==StripEnd::kWhole) {
00455         if ((candreco->fMIP).count(encodedNegative)) {
00456           charge += (candreco->fMIP)[encodedNegative];
00457         }
00458       }
00459       if (stripend_t==StripEnd::kPositive ||
00460           stripend_t==StripEnd::kWhole) {
00461         if ((candreco->fMIP).count(encodedPositive)) {
00462           charge += (candreco->fMIP)[encodedPositive];
00463         }
00464       }
00465       break;
00466     case CalStripType::kGeV:
00467       if (stripend_t==StripEnd::kNegative ||
00468           stripend_t==StripEnd::kWhole) {
00469         if ((candreco->fMIP).count(encodedNegative)) {
00470           charge += (candreco->fMIP)[encodedNegative]/18.5;
00471         }
00472       }
00473       if (stripend_t==StripEnd::kPositive ||
00474           stripend_t==StripEnd::kWhole) {
00475         if ((candreco->fMIP).count(encodedPositive)) {
00476           charge += (candreco->fMIP)[encodedPositive]/18.5;
00477         }
00478       }
00479       break;
00480     default:
00481       MSG("RecoBase",Msg::kError)
00482                  << "undefined CalStripType " << calstriptype_t << "\n";
00483       break;
00484     }
00485     return charge;
00486   }
00487   return 0.;
00488 }

Double_t CandRecoHandle::GetStripCharge ( const CandStripHandle strip  )  const
Int_t CandRecoHandle::GetTermPlane (  )  const

Definition at line 628 of file CandRecoHandle.cxx.

References CandHandle::GetCandBase().

Referenced by GetBegPlane(), GetEndPlane(), and AlgEventSR::RunAlg().

00629 {
00630   return dynamic_cast<const CandReco *>
00631                                     (GetCandBase())->fTerm.GetPlane();
00632 }

Double_t CandRecoHandle::GetTimeOffset (  )  const
Double_t CandRecoHandle::GetTimeSlope (  )  const
Double_t CandRecoHandle::GetVtxDirCosU (  )  const
Double_t CandRecoHandle::GetVtxDirCosV (  )  const
Double_t CandRecoHandle::GetVtxDirCosZ (  )  const
Int_t CandRecoHandle::GetVtxPlane (  )  const

Reimplemented in FarDetEventHandle.

Definition at line 568 of file CandRecoHandle.cxx.

References CandHandle::GetCandBase().

Referenced by AtNuTreeModule::Ana(), RemoveMuon::Ana(), RecoTreeModule::Ana(), CandShowerHandle::BelongsWithShower(), CandTrackHandle::BelongsWithShower(), CandShowerSRHandle::BelongsWithTrack(), CandShowerHandle::BelongsWithTrack(), CandTrackHandle::BelongsWithTrack(), GfxShower::BuildDiscreteImp(), GfxTrack::BuildDiscreteImp(), AlgTrack::CalculateTrace(), AlgFarDetEventList::CompareShowersWithTrack(), AlgFarDetEvent::Contained(), AlgFitShowerEM::CopyFromShowerEM(), AlgCosmicMuonRemoval::FillEvtInfo(), UberModule::FillNtpTrackVertex(), NtpSRModule::FillNtpTrackVertex(), UberModuleLite::FillNtpTrackVertex(), MCAnalysis::FillTrkInfo(), AlgMuonRemoval::FillTrkInfo(), GetBegPlane(), CandTrackHandle::GetdS(), GetEndPlane(), NtpSRBleachFiller::GetFixedWindowPH(), GetMaxTrackLikePlane(), CandTrackHandle::GetRange(), GetRemovableTrack(), MergeEvent::Reco(), AlgEventSR::RunAlg(), AlgRmMu::RunAlg(), AlgShowerAtNu::RunAlg(), AlgTrackAtNu::RunAlg(), AlgShowerSS::RunAlg(), AlgEventSRList::RunAlg(), AlgEventSSList::RunAlg(), AlgShowerCam::RunAlg(), AlgFitTrackAtNu::RunAlg(), AlgTrack::SetdS(), AlgFitTrackCam::SetPropertiesFromFinderTrack(), AlgFarDetEvent::SetShowerProperties(), AlgFitTrackSR::SetTrackEndParameters(), AlgFitTrackSR::SetTrackParameters(), AlgFarDetEvent::SetTrackProperties(), and AlgFitTrackSR::SwimVertexAndEndPoints().

00569 {
00570   return dynamic_cast<const CandReco *>
00571                                     (GetCandBase())->fVertex.GetPlane();
00572 }

Double_t CandRecoHandle::GetVtxT (  )  const
Double_t CandRecoHandle::GetVtxU (  )  const

Reimplemented in FarDetEventHandle.

Definition at line 520 of file CandRecoHandle.cxx.

References CandHandle::GetCandBase().

Referenced by VertexFinder::AcceptTrackInfo(), AlgEventSSList::AddStripToEvent(), AtNuTreeModule::Ana(), RemoveMuon::Ana(), RecoTreeModule::Ana(), CandShowerHandle::BelongsWithShower(), CandShowerSRHandle::BelongsWithShower(), CandTrackHandle::BelongsWithShower(), CandShowerSRHandle::BelongsWithTrack(), CandShowerHandle::BelongsWithTrack(), CandTrackHandle::BelongsWithTrack(), GfxTrack::BuildDiscreteImp(), GfxShower::BuildDiscreteImp(), AlgEventSSList::BuildEventFromUnassoc(), GfxTrack::BuildRealImp(), GfxShower::BuildRealImp(), AlgTrack::CalculateTrace(), AlgReco::Calibrate(), AlgFarDetEventList::CompareShowersWithTrack(), AlgFarDetEvent::Contained(), AlgFitShowerEM::CopyFromShowerEM(), UberModule::FillNtpTrackVertex(), NtpSRModule::FillNtpTrackVertex(), UberModuleLite::FillNtpTrackVertex(), TruthHelper::GetClosestNeuVtx(), TrackContext::GetUSR(), AlgFitTrackSR::InitializeFit(), CandTrackHandle::IsUnphysical(), NtpCandReco::NtpCandReco(), AlgEventSR::RunAlg(), AlgTrackAtNu::RunAlg(), AlgShowerAtNu::RunAlg(), AlgRmMu::RunAlg(), AlgShowerSS::RunAlg(), AlgEventSRList::RunAlg(), AlgShowerCam::RunAlg(), AlgFitTrackAtNu::RunAlg(), AlgFitTrackCam::SetPropertiesFromFinderTrack(), AlgFarDetEvent::SetShowerProperties(), AlgFitTrackSR::SetTrackParameters(), AlgFarDetEvent::SetTrackProperties(), EVD::UpdateSummary(), and AlgFitTrackMS::WriteFit().

00521 {
00522   return dynamic_cast<const CandReco *>(GetCandBase())->fVertex.GetU();
00523 }

Double_t CandRecoHandle::GetVtxV (  )  const

Reimplemented in FarDetEventHandle.

Definition at line 532 of file CandRecoHandle.cxx.

References CandHandle::GetCandBase().

Referenced by VertexFinder::AcceptTrackInfo(), AlgEventSSList::AddStripToEvent(), AtNuTreeModule::Ana(), RemoveMuon::Ana(), RecoTreeModule::Ana(), CandShowerHandle::BelongsWithShower(), CandShowerSRHandle::BelongsWithShower(), CandTrackHandle::BelongsWithShower(), CandShowerSRHandle::BelongsWithTrack(), CandShowerHandle::BelongsWithTrack(), CandTrackHandle::BelongsWithTrack(), GfxTrack::BuildDiscreteImp(), GfxShower::BuildDiscreteImp(), AlgEventSSList::BuildEventFromUnassoc(), GfxTrack::BuildRealImp(), GfxShower::BuildRealImp(), AlgTrack::CalculateTrace(), AlgFarDetEventList::CompareShowersWithTrack(), AlgFarDetEvent::Contained(), AlgFitShowerEM::CopyFromShowerEM(), UberModule::FillNtpTrackVertex(), NtpSRModule::FillNtpTrackVertex(), UberModuleLite::FillNtpTrackVertex(), TruthHelper::GetClosestNeuVtx(), TrackContext::GetVSR(), AlgFitTrackSR::InitializeFit(), CandTrackHandle::IsUnphysical(), NtpCandReco::NtpCandReco(), AlgEventSR::RunAlg(), AlgTrackAtNu::RunAlg(), AlgShowerAtNu::RunAlg(), AlgRmMu::RunAlg(), AlgShowerSS::RunAlg(), AlgEventSRList::RunAlg(), AlgShowerCam::RunAlg(), AlgFitTrackAtNu::RunAlg(), AlgFitTrackCam::SetPropertiesFromFinderTrack(), AlgFarDetEvent::SetShowerProperties(), AlgFitTrackSR::SetTrackParameters(), AlgFarDetEvent::SetTrackProperties(), EVD::UpdateSummary(), and AlgFitTrackMS::WriteFit().

00533 {
00534   return dynamic_cast<const CandReco *>(GetCandBase())->fVertex.GetV();
00535 }

Double_t CandRecoHandle::GetVtxZ (  )  const
NavKey CandRecoHandle::KeyFromSlice ( const CandRecoHandle reco  )  [static]

Reimplemented in CandFitShowerEMHandle, CandSubShowerSRHandle, CandEventHandle, CandFitTrackHandle, CandShowerHandle, and CandTrackHandle.

Definition at line 506 of file CandRecoHandle.cxx.

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

00507 {
00508   if (reco->GetCandSlice()) {
00509     return static_cast<Int_t>(reco->GetCandSlice()->GetUidInt());
00510   }
00511   return 0;
00512 }

void CandRecoHandle::SetCandSlice ( const CandSliceHandle slice  ) 
void CandRecoHandle::SetDirCosU ( Double_t  dvar  ) 
void CandRecoHandle::SetDirCosV ( Double_t  dvar  ) 
void CandRecoHandle::SetDirCosZ ( Double_t  dvar  ) 
void CandRecoHandle::SetEndDirCosU ( Double_t  dvar  ) 
void CandRecoHandle::SetEndDirCosV ( Double_t  dvar  ) 
void CandRecoHandle::SetEndDirCosZ ( Double_t  dvar  ) 
void CandRecoHandle::SetEndPlane ( Int_t  ivar  ) 
void CandRecoHandle::SetEndT ( Double_t  dvar  ) 
void CandRecoHandle::SetEndU ( Double_t  dvar  ) 
void CandRecoHandle::SetEndV ( Double_t  dvar  ) 
void CandRecoHandle::SetEndZ ( Double_t  dvar  ) 
void CandRecoHandle::SetTimeOffset ( Double_t  dvar  ) 
void CandRecoHandle::SetTimeSlope ( Double_t  dvar  ) 
void CandRecoHandle::SetVtxDirCosU ( Double_t  dvar  ) 

Definition at line 673 of file CandRecoHandle.cxx.

References CandHandle::GetOwnedCandBase().

Referenced by AlgFitTrackCam::SetTrackProperties().

00674 {
00675   dynamic_cast<CandReco *>(GetOwnedCandBase())->fVtxDirCosU = dvar;
00676 }

void CandRecoHandle::SetVtxDirCosV ( Double_t  dvar  ) 

Definition at line 686 of file CandRecoHandle.cxx.

References CandHandle::GetOwnedCandBase().

Referenced by AlgFitTrackCam::SetTrackProperties().

00687 {
00688   dynamic_cast<CandReco *>(GetOwnedCandBase())->fVtxDirCosV = dvar;
00689 }

void CandRecoHandle::SetVtxDirCosZ ( Double_t  dvar  ) 

Definition at line 698 of file CandRecoHandle.cxx.

References CandHandle::GetOwnedCandBase().

Referenced by AlgFitTrackCam::SetTrackProperties().

00699 {
00700   dynamic_cast<CandReco *>(GetOwnedCandBase())->fVtxDirCosZ = dvar;
00701 }

void CandRecoHandle::SetVtxPlane ( Int_t  ivar  ) 
void CandRecoHandle::SetVtxT ( Double_t  dvar  ) 
void CandRecoHandle::SetVtxU ( Double_t  dvar  ) 
void CandRecoHandle::SetVtxV ( Double_t  dvar  ) 
void CandRecoHandle::SetVtxZ ( Double_t  dvar  ) 
void CandRecoHandle::Trace ( const char *  c = ""  )  const [virtual]

Reimplemented from CandHandle.

Reimplemented in CandAtNuRecoHandle, CandFitTrackAtNuHandle, CandShowerAtNuHandle, CandTrackAtNuHandle, FarDetEventHandle, CandFitShowerEMHandle, CandFitTrackMSHandle, CandFitTrackSRHandle, CandShowerEMHandle, CandShowerSRHandle, CandSubShowerSRHandle, CandTrackSRHandle, CandCluster3DHandle, CandEventHandle, CandFitTrackHandle, CandShowerHandle, and CandTrackHandle.

Definition at line 63 of file CandRecoHandle.cxx.

References Msg::kDebug, and MSG.

00064 {
00065   MSG("Cand", Msg::kDebug)
00066      << "**********Begin CandRecoHandle::Trace(\"" << c << "\")" << endl
00067             << "Information from CandRecoHandle's CandHandle: " << endl;
00068   CandHandle::Trace(c);
00069   MSG("Cand", Msg::kDebug)
00070       << "**********End CandRecoHandle::Trace(\"" << c << "\")" << endl;
00071 }


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1