SRMom Class Reference

#include <SRMom.h>

List of all members.

Public Member Functions

 SRMom ()
 SRMom (const MomNavigator *mom)
virtual ~SRMom ()
virtual std::multimap< Float_t,
Float_t > 
ArrayRAlongTrack (const Int_t eventNum, const Int_t trackNum) const
virtual std::multimap< Float_t,
Float_t > 
ArrayUAlongTrack (const Int_t eventNum, const Int_t trackNum) const
virtual std::multimap< Float_t,
Float_t > 
ArrayVAlongTrack (const Int_t eventNum, const Int_t trackNum) const
virtual std::multimap< Float_t,
Float_t > 
ArrayXAlongTrack (const Int_t eventNum, const Int_t trackNum) const
virtual std::multimap< Float_t,
Float_t > 
ArrayXAlongTrack (const NtpSRTrack *srTrack) const
virtual std::multimap< Float_t,
Float_t > 
ArrayYAlongTrack (const Int_t eventNum, const Int_t trackNum) const
virtual std::multimap< Float_t,
Float_t > 
ArrayYAlongTrack (const NtpSRTrack *srTrack) const
virtual Int_t BiggestShwIndex (Int_t eventNum) const
virtual Float_t ChiSq (const Int_t eventNum, const Int_t trackNum) const
virtual Float_t ChiSqPerNDoF (const Int_t eventNum, const Int_t trackNum) const
virtual Detector::Detector_t Detector () const
virtual Int_t EvtLthPln (const Int_t eventNum) const
virtual const NtpSRVertexEvtVtx (const Int_t eventNum) const
virtual Int_t EventVtxPlane (const Int_t eventNum) const
virtual Float_t EventVtxU (const Int_t eventNum) const
virtual Float_t EventVtxV (const Int_t eventNum) const
virtual Float_t EventVtxX (const Int_t eventNum) const
virtual Float_t EventVtxY (const Int_t eventNum) const
virtual Float_t EventVtxZ (const Int_t eventNum) const
virtual Bool_t LISnarl () const
virtual Int_t LongestTrackIndex (const Int_t eventNum) const
virtual Int_t NDoF (const Int_t eventNum, const Int_t trackNum) const
virtual Int_t NumEvents () const
virtual Int_t NumTracks (const Int_t eventNum) const
virtual Int_t NumShowers (const Int_t eventNum) const
virtual Int_t RunNumber () const
virtual Int_t ShwEndPln (const Int_t eventNum, const Int_t shwNum) const
virtual Int_t ShwLthPlanes (const Int_t eventNum, const Int_t shwNum) const
virtual Float_t ShwPHGeV (const Int_t eventNum, const Int_t shwNum) const
virtual const NtpSRVertexShwStartVtx (const Int_t eventNum, const Int_t shwNum) const
virtual Int_t SnarlNumber () const
virtual Float_t SnarlPoT () const
virtual const NtpStRecordSTRecord () const
virtual Int_t TrkContained (const Int_t eventNum, const Int_t trackNum) const
virtual Int_t TrackEndPlane (const Int_t eventNum, const Int_t trackNum) const
virtual Float_t TrackEndDistOuterTransEdge (const Int_t eventNum, const Int_t trackNum) const
virtual Float_t TrackEndDistZEnd (const Int_t eventNum, const Int_t trackNum) const
virtual Float_t TrkEndR (const Int_t eventNum, const Int_t trackNum) const
virtual Float_t TrackEndU (const Int_t eventNum, const Int_t trackNum) const
virtual Float_t TrackEndV (const Int_t eventNum, const Int_t trackNum) const
virtual Float_t TrackEndX (const Int_t eventNum, const Int_t trackNum) const
virtual Float_t TrackEndY (const Int_t eventNum, const Int_t trackNum) const
virtual Float_t TrackEndZ (const Int_t eventNum, const Int_t trackNum) const
virtual Float_t TrkEnergySimple (const Int_t eventNum, const Int_t trackNum) const
virtual Int_t TrkFitPass (const Int_t eventNum, const Int_t trackNum) const
virtual Float_t TrackLength (const Int_t eventNum, const Int_t trackNum) const
virtual Int_t TrackLengthPlanes (const Int_t eventNum, const Int_t trackNum) const
virtual Int_t TrackLengthPlanes (const NtpSRTrack *srTrack) const
virtual Float_t TrkMomCurv (const Int_t eventNum, const Int_t trackNum) const
virtual Float_t TrkMomRange (const Int_t eventNum, const Int_t trackNum) const
virtual Int_t TrkNumPln (const Int_t eventNum, const Int_t trackNum) const
virtual Int_t TrackNumStrips (const Int_t eventNum, const Int_t trackNum) const
virtual const NtpSRVertexTrkStartVtx (const Int_t eventNum, const Int_t trackNum) const
virtual Int_t TrackVtxPlane (const Int_t eventNum, const Int_t trackNum) const
virtual Float_t TrackVtxQOvP (const Int_t eventNum, const Int_t trackNum) const
virtual Float_t TrackVtxQOvP (const NtpSRTrack *srTrack) const
virtual Float_t TrackVtxQOvPError (const Int_t eventNum, const Int_t trackNum) const
virtual Float_t TrkVtxR (const Int_t eventNum, const Int_t trackNum) const
virtual Float_t TrackVtxX (const Int_t eventNum, const Int_t trackNum) const
virtual Float_t TrackVtxY (const Int_t eventNum, const Int_t trackNum) const
virtual Float_t TrackVtxZ (const Int_t eventNum, const Int_t trackNum) const

Private Member Functions

virtual const NtpSRTrackLongestTrackInEvent (const Int_t eventNum) const
virtual const NtpSREventSREvent (const Int_t eventNum) const
virtual const NtpSRShowerSRShower (const Int_t eventNum, const Int_t shwNum) const
virtual const NtpSRTrackSRTrack (const Int_t eventNum, const Int_t trackNum) const
virtual Int_t TrackEndPlane (const NtpSRTrack *srTrack) const
virtual Int_t TrackVtxPlane (const NtpSRTrack *srTrack) const
virtual Float_t TrackEndX (const NtpSRTrack *srTrack) const
virtual Float_t TrackEndY (const NtpSRTrack *srTrack) const
virtual const VldContextVldCntxt () const

Private Attributes

const MomNavigatorfmom
const NtpStRecordfstRecord
const NtpBDLiteRecordfbdLiteRec

Detailed Description

Definition at line 58 of file SRMom.h.


Constructor & Destructor Documentation

SRMom::SRMom (  )  [explicit]

Definition at line 93 of file SRMom.cxx.

00094 {
00095   fmom = 0;
00096   fstRecord = 0;
00097   fbdLiteRec = 0;
00098   /*
00099   fbuffSREvt = 0;
00100   fbuffEvtNum = -1;
00101   fbuffSRTrk = 0;
00102   fbuffTrkNum = -1;
00103   */
00104 }

SRMom::SRMom ( const MomNavigator mom  )  [explicit]

Definition at line 107 of file SRMom.cxx.

References fbdLiteRec, fmom, fstRecord, MomNavigator::GetFragment(), Msg::kWarning, MAXMSG, and MSG.

00108 {
00109   fmom = mom;
00110   if (!fmom){
00111     MSG("SRMom",Msg::kWarning) 
00112       << "No Mom in this snarl" << endl;
00113     fstRecord = 0;
00114     fbdLiteRec = 0;
00115   }
00116 
00117   else{
00118     fstRecord = dynamic_cast<NtpStRecord*>
00119       (fmom->GetFragment("NtpStRecord"));
00120     if (!fstRecord){
00121       MSG("SRMom",Msg::kWarning) 
00122         << "No NtpStRecord in Mom" << endl;
00123     }
00124 
00125     fbdLiteRec = dynamic_cast<NtpBDLiteRecord*>
00126       (fmom->GetFragment("NtpBDLiteRecord"));
00127     if (!fbdLiteRec){
00128       MAXMSG("SRMom",Msg::kWarning, 10)
00129         << "No NtpBDLiteRecord in Mom" << endl;
00130     }
00131   }
00132 
00133   /*
00134   fbuffSREvt = 0;
00135   fbuffEvtNum = -1;
00136   fbuffSRTrk = 0;
00137   fbuffTrkNum = -1;
00138   */
00139 }

SRMom::~SRMom (  )  [virtual]

Definition at line 142 of file SRMom.cxx.

References fbdLiteRec, fmom, and fstRecord.

00143 {
00144   fbdLiteRec = 0;
00145   fstRecord = 0;
00146   fmom = 0;
00147   /*
00148   fbuffSREvt = 0;
00149   fbuffEvtNum = -1;
00150   fbuffSRTrk = 0;
00151   fbuffTrkNum = -1;
00152   */
00153 }


Member Function Documentation

multimap< Float_t, Float_t > SRMom::ArrayRAlongTrack ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 156 of file SRMom.cxx.

References Msg::kWarning, MSG, NtpSRTrack::nstrip, SRTrack(), NtpSRTrack::stpx, NtpSRTrack::stpy, and NtpSRTrack::stpz.

00158 {
00159   multimap<Float_t, Float_t> md;
00160   md.clear();
00161   const NtpSRTrack* srTrack = SRTrack(eventNum, trackNum);
00162   if (!srTrack){
00163     MSG("SRMom",Msg::kWarning)
00164       << "No NtpSRTrack number " << trackNum
00165       << " in event number " << eventNum << endl;
00166     return md;
00167   }
00168   for (Int_t k=0; k<srTrack->nstrip; ++k){
00169 //     if(!srTrack->stpfit[k]){continue;}
00170     Float_t x = srTrack->stpx[k];
00171     Float_t y = srTrack->stpy[k];
00172     md.insert(pair<Float_t,Float_t>(srTrack->stpz[k],
00173                                     sqrt(x*x + y*y)));
00174   }
00175   return md;
00176 }

multimap< Float_t, Float_t > SRMom::ArrayUAlongTrack ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 179 of file SRMom.cxx.

References Msg::kWarning, MSG, NtpSRTrack::nstrip, SRTrack(), NtpSRTrack::stpu, and NtpSRTrack::stpz.

Referenced by MajorityCurvature::CalcCombCurv().

00181 {
00182   multimap<Float_t, Float_t> md;
00183   md.clear();
00184   const NtpSRTrack* srTrack = SRTrack(eventNum, trackNum);
00185   if (!srTrack){
00186     MSG("SRMom",Msg::kWarning)
00187       << "No NtpSRTrack number " << trackNum
00188       << " in event number " << eventNum << endl;
00189     return md;
00190   }
00191   for (Int_t k=0; k<srTrack->nstrip; ++k){
00192 //     if(!srTrack->stpfit[k]){continue;}
00193     md.insert(pair<Float_t,Float_t>(srTrack->stpz[k],
00194                                     srTrack->stpu[k]));
00195   }
00196   return md;
00197 }

multimap< Float_t, Float_t > SRMom::ArrayVAlongTrack ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 200 of file SRMom.cxx.

References Msg::kWarning, MSG, NtpSRTrack::nstrip, SRTrack(), NtpSRTrack::stpv, and NtpSRTrack::stpz.

Referenced by MajorityCurvature::CalcCombCurv().

00202 {
00203   multimap<Float_t, Float_t> md;
00204   md.clear();
00205   const NtpSRTrack* srTrack = SRTrack(eventNum, trackNum);
00206   if (!srTrack){
00207     MSG("SRMom",Msg::kWarning)
00208       << "No NtpSRTrack number " << trackNum
00209       << " in event number " << eventNum << endl;
00210     return md;
00211   }
00212   for (Int_t k=0; k<srTrack->nstrip; ++k){
00213 //     if(!srTrack->stpfit[k]){continue;}
00214     md.insert(pair<Float_t,Float_t>(srTrack->stpz[k],
00215                                     srTrack->stpv[k]));
00216   }
00217   return md;
00218 }

multimap< Float_t, Float_t > SRMom::ArrayXAlongTrack ( const NtpSRTrack srTrack  )  const [virtual]

Definition at line 252 of file SRMom.cxx.

References Msg::kWarning, MSG, NtpSRTrack::nstrip, NtpSRTrack::stpx, and NtpSRTrack::stpz.

00253 {
00254   multimap<Float_t, Float_t> md;
00255   md.clear();
00256   if (!srTrack){
00257     MSG("SRMom",Msg::kWarning)
00258       << "No NtpSRTrack passed to SRMom::ArrayXAlongTrack" << endl;
00259     return md;
00260   }
00261   
00262   for (Int_t k=0; k<srTrack->nstrip; ++k){
00263     md.insert(pair<Float_t,Float_t>(srTrack->stpz[k],
00264                                     srTrack->stpx[k]));
00265   }
00266   return md;
00267 }

multimap< Float_t, Float_t > SRMom::ArrayXAlongTrack ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 221 of file SRMom.cxx.

References Msg::kWarning, MSG, NtpSRTrack::nstrip, SRTrack(), NtpSRTrack::stpx, and NtpSRTrack::stpz.

Referenced by MajorityCurvature::CalcXCurv(), and MajorityCurvature::CalcXCurvObject().

00223 {
00224   multimap<Float_t, Float_t> md;
00225   md.clear();
00226   const NtpSRTrack* srTrack = SRTrack(eventNum, trackNum);
00227   if (!srTrack){
00228     MSG("SRMom",Msg::kWarning)
00229       << "No NtpSRTrack number " << trackNum
00230       << " in event number " << eventNum << endl;
00231     return md;
00232   }
00233   
00234   for (Int_t k=0; k<srTrack->nstrip; ++k){
00235 //     if(!srTrack->stpfit[k]){continue;}
00236     // cout<<k<<"  "<<srTrack->stpx[k]<<"  "<<srTrack->stpz[k]<<endl;
00237     md.insert(pair<Float_t,Float_t>(srTrack->stpz[k],
00238                                     srTrack->stpx[k]));
00239   }/*
00240   multimap<Float_t,Float_t>::const_iterator it = md.begin();
00241   
00242   for(int k=0;k<srTrack->nstrip; ++k){
00243     cout<<"from SR MOM  "<<it->first<<"  "<<it->second<<endl;
00244     it++;
00245   }
00246    */
00247   return md;
00248 }

multimap< Float_t, Float_t > SRMom::ArrayYAlongTrack ( const NtpSRTrack srTrack  )  const [virtual]

Definition at line 292 of file SRMom.cxx.

References Msg::kWarning, MSG, NtpSRTrack::nstrip, NtpSRTrack::stpy, and NtpSRTrack::stpz.

00293 {
00294   multimap<Float_t, Float_t> md;
00295   md.clear();
00296   if (!srTrack){
00297     MSG("SRMom",Msg::kWarning)
00298       << "No NtpSRTrack passed to SRMom::ArrayYAlongTrack" << endl;
00299     return md;
00300   }
00301   for (Int_t k=0; k<srTrack->nstrip; ++k){
00302     md.insert(pair<Float_t,Float_t>(srTrack->stpz[k],
00303                                     srTrack->stpy[k]));
00304   }
00305   return md;
00306 }

multimap< Float_t, Float_t > SRMom::ArrayYAlongTrack ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 270 of file SRMom.cxx.

References Msg::kWarning, MSG, NtpSRTrack::nstrip, SRTrack(), NtpSRTrack::stpy, and NtpSRTrack::stpz.

Referenced by MajorityCurvature::CalcYCurv(), and MajorityCurvature::CalcYCurvObject().

00272 {
00273   multimap<Float_t, Float_t> md;
00274   md.clear();
00275   const NtpSRTrack* srTrack = SRTrack(eventNum, trackNum);
00276   if (!srTrack){
00277     MSG("SRMom",Msg::kWarning)
00278       << "No NtpSRTrack number " << trackNum
00279       << " in event number " << eventNum << endl;
00280     return md;
00281   }
00282   for (Int_t k=0; k<srTrack->nstrip; ++k){
00283 //     if(!srTrack->stpfit[k]){continue;}
00284     md.insert(pair<Float_t,Float_t>(srTrack->stpz[k],
00285                                     srTrack->stpy[k]));
00286   }
00287   return md;
00288 }

Int_t SRMom::BiggestShwIndex ( Int_t  eventNum  )  const [virtual]

Definition at line 309 of file SRMom.cxx.

References Msg::kWarning, MSG, NumShowers(), and ShwPHGeV().

00310 {
00311   Float_t highestPH = 0.0;
00312   Int_t biggestShwIndex = -1;
00313   Int_t numShowers = this->NumShowers(eventNum);
00314   if (numShowers < 1){return -1;}
00315 
00316   for (Int_t j=0; j<numShowers; ++j){
00317     Float_t ph = this->ShwPHGeV(eventNum,j);
00318     if (ph > highestPH){
00319       highestPH = ph;
00320       biggestShwIndex = j;
00321     }
00322   }
00323   if (-1 == biggestShwIndex){
00324     MSG("SRMom",Msg::kWarning) 
00325       << "Showers in event " << eventNum << " have -ve energy." << endl;
00326   }
00327   return biggestShwIndex;
00328 }

Float_t SRMom::ChiSq ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 331 of file SRMom.cxx.

References NtpSRFitTrack::chi2, NtpSRTrack::fit, Msg::kWarning, MSG, NtpSRFitTrack::pass, and SRTrack().

00333 {
00334   const NtpSRTrack* srTrack = SRTrack(eventNum, trackNum);
00335   if (!srTrack){
00336     MSG("SRMom",Msg::kWarning)
00337       << "No NtpSRTrack number " << trackNum
00338       << " in event number " << eventNum << endl;
00339     return -1.0;
00340   }
00341   if (!srTrack->fit.pass) return -1.0;
00342   
00343   return srTrack->fit.chi2;
00344 }

Float_t SRMom::ChiSqPerNDoF ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 347 of file SRMom.cxx.

References NtpSRFitTrack::chi2, NtpSRTrack::fit, Msg::kWarning, MSG, NtpSRFitTrack::ndof, NtpSRFitTrack::pass, and SRTrack().

00349 {
00350   const NtpSRTrack* srTrack = SRTrack(eventNum, trackNum);
00351   if (!srTrack){
00352     MSG("SRMom",Msg::kWarning)
00353       << "No NtpSRTrack number " << trackNum
00354       << " in event number " << eventNum << endl;
00355     return -1.0;
00356   }
00357   if (!srTrack->fit.pass) return -1.0;
00358   if (!srTrack->fit.ndof) return -1.0;
00359 
00360   return srTrack->fit.chi2/srTrack->fit.ndof;
00361 }

Detector::Detector_t SRMom::Detector ( void   )  const [virtual]

Definition at line 364 of file SRMom.cxx.

References VldContext::GetDetector(), Detector::kUnknown, and VldCntxt().

00365 {
00366   const VldContext* vc = this->VldCntxt();
00367   if (!vc){return Detector::kUnknown;}
00368   return vc->GetDetector();
00369 }

Int_t SRMom::EventVtxPlane ( const Int_t  eventNum  )  const [virtual]

Definition at line 399 of file SRMom.cxx.

References Msg::kWarning, MSG, NtpSRVertex::plane, SREvent(), and NtpSREvent::vtx.

00400 {
00401   const NtpSREvent* srEvent = this->SREvent(eventNum);
00402   if(!srEvent){
00403     MSG("SRMom",Msg::kWarning) 
00404       << "No NtpSREvent with event number " << eventNum << endl;
00405     return -1;
00406   }
00407 
00408   return srEvent->vtx.plane;
00409 }

Float_t SRMom::EventVtxU ( const Int_t  eventNum  )  const [virtual]

Definition at line 412 of file SRMom.cxx.

References Msg::kWarning, MSG, SREvent(), NtpSRVertex::u, and NtpSREvent::vtx.

00413 {
00414   const NtpSREvent* srEvent = this->SREvent(eventNum);
00415   if(!srEvent){
00416     MSG("SRMom",Msg::kWarning) 
00417       << "No NtpSREvent with event number " << eventNum << endl;
00418     return -1;
00419   }
00420 
00421   return srEvent->vtx.u;
00422 }

Float_t SRMom::EventVtxV ( const Int_t  eventNum  )  const [virtual]

Definition at line 425 of file SRMom.cxx.

References Msg::kWarning, MSG, SREvent(), NtpSRVertex::v, and NtpSREvent::vtx.

00426 {
00427   const NtpSREvent* srEvent = this->SREvent(eventNum);
00428   if(!srEvent){
00429     MSG("SRMom",Msg::kWarning) 
00430       << "No NtpSREvent with event number " << eventNum << endl;
00431     return -1;
00432   }
00433 
00434   return srEvent->vtx.v;
00435 }

Float_t SRMom::EventVtxX ( const Int_t  eventNum  )  const [virtual]

Definition at line 438 of file SRMom.cxx.

References Msg::kWarning, MSG, SREvent(), NtpSREvent::vtx, and NtpSRVertex::x.

00439 {
00440   const NtpSREvent* srEvent = this->SREvent(eventNum);
00441   if(!srEvent){
00442     MSG("SRMom",Msg::kWarning) 
00443       << "No NtpSREvent with event number " << eventNum << endl;
00444     return -1;
00445   }
00446 
00447   return srEvent->vtx.x;
00448 }

Float_t SRMom::EventVtxY ( const Int_t  eventNum  )  const [virtual]

Definition at line 451 of file SRMom.cxx.

References Msg::kWarning, MSG, SREvent(), NtpSREvent::vtx, and NtpSRVertex::y.

00452 {
00453   const NtpSREvent* srEvent = this->SREvent(eventNum);
00454   if(!srEvent){
00455     MSG("SRMom",Msg::kWarning) 
00456       << "No NtpSREvent with event number " << eventNum << endl;
00457     return -1;
00458   }
00459 
00460   return srEvent->vtx.y;
00461 }

Float_t SRMom::EventVtxZ ( const Int_t  eventNum  )  const [virtual]

Definition at line 464 of file SRMom.cxx.

References Msg::kWarning, MSG, SREvent(), NtpSREvent::vtx, and NtpSRVertex::z.

00465 {
00466   const NtpSREvent* srEvent = this->SREvent(eventNum);
00467   if(!srEvent){
00468     MSG("SRMom",Msg::kWarning) 
00469       << "No NtpSREvent with event number " << eventNum << endl;
00470     return -1;
00471   }
00472 
00473   return srEvent->vtx.z;
00474 }

Int_t SRMom::EvtLthPln ( const Int_t  eventNum  )  const [virtual]

Definition at line 372 of file SRMom.cxx.

References NtpSREvent::end, Msg::kWarning, MSG, NtpSRVertex::plane, SREvent(), and NtpSREvent::vtx.

00373 {
00374   const NtpSREvent* srEvent = this->SREvent(eventNum);
00375   if(!srEvent){
00376     MSG("SRMom",Msg::kWarning) 
00377       << "No NtpSREvent with event number " << eventNum << endl;
00378     return -1;
00379   }
00380 
00381   return abs((Int_t) (srEvent->vtx.plane) -
00382               (Int_t) (srEvent->end.plane));
00383 }

const NtpSRVertex * SRMom::EvtVtx ( const Int_t  eventNum  )  const [virtual]

Definition at line 386 of file SRMom.cxx.

References Msg::kWarning, MSG, SREvent(), and NtpSREvent::vtx.

00387 {
00388   const NtpSREvent* srEvent = this->SREvent(eventNum);
00389   if(!srEvent){
00390     MSG("SRMom",Msg::kWarning) 
00391       << "No NtpSREvent with event number " << eventNum << endl;
00392     return 0;
00393   }
00394 
00395   return &(srEvent->vtx);
00396 }

Bool_t SRMom::LISnarl (  )  const [virtual]

Definition at line 477 of file SRMom.cxx.

References NtpStRecord::evthdr, fstRecord, and NtpSREventSummary::litime.

00478 {
00479   if (!fstRecord){return false;}
00480   if (-1.0 == fstRecord->evthdr.litime){return false;}
00481   else {return true;}
00482 }

Int_t SRMom::LongestTrackIndex ( const Int_t  eventNum  )  const [virtual]

Definition at line 485 of file SRMom.cxx.

References Msg::kWarning, MSG, NumTracks(), and TrackLength().

00486 {
00487   Float_t longestLength = 0.0;
00488   Int_t longestIndex = -1;
00489   Int_t numTracks = this->NumTracks(eventNum);
00490   if (numTracks < 1){return -1;}
00491 
00492   for (Int_t j=0; j<numTracks; ++j){
00493     Float_t length = this->TrackLength(eventNum,j);
00494     if (length > longestLength){
00495       longestLength = length;
00496       longestIndex = j;
00497     }
00498   }
00499   if (-1 == longestIndex){
00500     MSG("SRMom",Msg::kWarning) 
00501       << "Tracks in event " << eventNum << " have -ve length." << endl;
00502   }
00503   return longestIndex;
00504 }

const NtpSRTrack * SRMom::LongestTrackInEvent ( const Int_t  eventNum  )  const [private, virtual]

Definition at line 507 of file SRMom.cxx.

References Msg::kWarning, MSG, NumTracks(), SRTrack(), and TrackLength().

00508 {
00509   Float_t longestLength = 0.0;
00510   Int_t longestIndex = -1;
00511   Int_t numTracks = this->NumTracks(eventNum);
00512   if (numTracks < 1){return 0;}
00513 
00514   for (Int_t j=0; j<numTracks; ++j){
00515     Float_t length = this->TrackLength(eventNum,j);
00516     if (length > longestLength){
00517       longestLength = length;
00518       longestIndex = j;
00519     }
00520   }
00521   if (-1 == longestIndex){
00522     MSG("SRMom",Msg::kWarning) 
00523       << "Tracks in event " << eventNum << " have -ve length." << endl;
00524     return 0;
00525   }
00526   return this->SRTrack(eventNum, longestIndex);
00527 }

Int_t SRMom::NDoF ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 530 of file SRMom.cxx.

References NtpSRTrack::fit, Msg::kWarning, MSG, NtpSRFitTrack::ndof, NtpSRFitTrack::pass, and SRTrack().

00532 {
00533   const NtpSRTrack* srTrack = SRTrack(eventNum, trackNum);
00534   if (!srTrack){
00535     MSG("SRMom",Msg::kWarning)
00536       << "No NtpSRTrack number " << trackNum
00537       << " in event number " << eventNum << endl;
00538     return -1;
00539   }
00540   if (!srTrack->fit.pass) return -1;
00541 
00542   return srTrack->fit.ndof;
00543 }

Int_t SRMom::NumEvents (  )  const [virtual]

Definition at line 546 of file SRMom.cxx.

References NtpStRecord::evt, and fstRecord.

00547 {
00548   if (!fstRecord){return -1;}
00549 
00550   TClonesArray* srArray = fstRecord->evt;
00551 
00552   TIter digitIter(srArray);
00553   NtpSREvent* srEvent;
00554   Int_t numEvents = 0;
00555   while ( (srEvent = dynamic_cast<NtpSREvent*> (digitIter.Next()) ) ){
00556     numEvents++;
00557   }
00558 
00559   return numEvents;
00560 }

Int_t SRMom::NumShowers ( const Int_t  eventNum  )  const [virtual]

Definition at line 563 of file SRMom.cxx.

References Msg::kWarning, MSG, NtpSREvent::nshower, and SREvent().

Referenced by BiggestShwIndex(), and SRShower().

00564 {
00565   const NtpSREvent* srEvent = this->SREvent(eventNum);
00566   if(!srEvent){
00567     MSG("SRMom",Msg::kWarning) 
00568       << "No NtpSREvent with event number " << eventNum << endl;
00569     return -1;
00570   }
00571 
00572   return srEvent->nshower;
00573 }

Int_t SRMom::NumTracks ( const Int_t  eventNum  )  const [virtual]

Definition at line 576 of file SRMom.cxx.

References Msg::kWarning, MSG, NtpSREvent::ntrack, and SREvent().

Referenced by LongestTrackIndex(), and LongestTrackInEvent().

00577 {
00578   const NtpSREvent* srEvent = this->SREvent(eventNum);
00579   if(!srEvent){
00580     MSG("SRMom",Msg::kWarning) 
00581       << "No NtpSREvent with event number " << eventNum << endl;
00582     return -1;
00583   }
00584 
00585   return srEvent->ntrack;
00586 }

Int_t SRMom::RunNumber (  )  const [virtual]

Definition at line 604 of file SRMom.cxx.

References fstRecord, RecRecordImp< T >::GetHeader(), and RecDataHeader::GetRun().

00605 {
00606   return fstRecord->GetHeader().GetRun();
00607 }

Int_t SRMom::ShwEndPln ( const Int_t  eventNum,
const Int_t  shwNum 
) const [virtual]

Definition at line 623 of file SRMom.cxx.

References NtpSRPlane::end, Msg::kWarning, MSG, NtpSRShower::plane, and SRShower().

00625 {
00626   const NtpSRShower* srShower = this->SRShower(eventNum,shwNum);
00627   if (!srShower){
00628     MSG("SRMom",Msg::kWarning)
00629       << "No NtpSRShower number " << shwNum
00630       << " in event number " << eventNum<< endl;
00631     return 0;
00632   }
00633   return (Int_t) srShower->plane.end;
00634 }

Int_t SRMom::ShwLthPlanes ( const Int_t  eventNum,
const Int_t  shwNum 
) const [virtual]

Definition at line 637 of file SRMom.cxx.

References NtpSRPlane::beg, NtpSRPlane::end, Msg::kWarning, MSG, NtpSRShower::plane, and SRShower().

00639 {
00640   const NtpSRShower* srShower = this->SRShower(eventNum,shwNum);
00641   if (!srShower){
00642     MSG("SRMom",Msg::kWarning)
00643       << "No NtpSRShower number " << shwNum
00644       << " in event number " << eventNum<< endl;
00645     return 0;
00646   }
00647   return abs(((Int_t) srShower->plane.end)
00648              - ((Int_t) srShower->plane.beg));
00649 }

Float_t SRMom::ShwPHGeV ( const Int_t  eventNum,
const Int_t  shwNum 
) const [virtual]

Definition at line 652 of file SRMom.cxx.

References NtpSRStripPulseHeight::gev, Msg::kWarning, MSG, NtpSRShower::ph, and SRShower().

Referenced by BiggestShwIndex().

00654 {
00655   const NtpSRShower* srShower = this->SRShower(eventNum,shwNum);
00656   if (!srShower){
00657     MSG("SRMom",Msg::kWarning)
00658       << "No NtpSRShower number " << shwNum
00659       << " in event number " << eventNum<< endl;
00660     return 0.0;
00661   }
00662   return srShower->ph.gev;
00663 }

const NtpSRVertex * SRMom::ShwStartVtx ( const Int_t  eventNum,
const Int_t  shwNum 
) const [virtual]

Definition at line 666 of file SRMom.cxx.

References Msg::kWarning, MSG, SRShower(), and NtpSRShower::vtx.

00668 {
00669   const NtpSRShower* srShower = this->SRShower(eventNum,shwNum);
00670   if (!srShower){
00671     MSG("SRMom",Msg::kWarning)
00672       << "No NtpSRShower number " << shwNum
00673       << " in event number " << eventNum<< endl;
00674     return 0;
00675   }
00676   return &(srShower->vtx);
00677 }

Int_t SRMom::SnarlNumber (  )  const [virtual]

Definition at line 610 of file SRMom.cxx.

References fstRecord, RecRecordImp< T >::GetHeader(), and RecPhysicsHeader::GetSnarl().

00611 {
00612   return fstRecord->GetHeader().GetSnarl();
00613 }

Float_t SRMom::SnarlPoT (  )  const [virtual]

Definition at line 616 of file SRMom.cxx.

References fbdLiteRec, and NtpBDLiteRecord::tortgt.

00617 {
00618   if (!fbdLiteRec){return 0;}
00619   return fbdLiteRec->tortgt;
00620 }

const NtpSREvent * SRMom::SREvent ( const Int_t  eventNum  )  const [private, virtual]

Definition at line 680 of file SRMom.cxx.

References NtpStRecord::evt, and fstRecord.

Referenced by EventVtxPlane(), EventVtxU(), EventVtxV(), EventVtxX(), EventVtxY(), EventVtxZ(), EvtLthPln(), EvtVtx(), NumShowers(), NumTracks(), SRShower(), and SRTrack().

00681 {
00682   /*
00683   if (fbuffEvtNum == eventNum){
00684     return fbuffSREvt;
00685   }
00686   */
00687   if (!fstRecord){
00688     /*
00689     fbuffSREvt = 0;
00690     fbuffEvtNum = eventNum;
00691     fbuffTrkNum = -1;
00692     fbuffSRTrk = 0;
00693     */
00694     return 0;
00695   }
00696   TClonesArray& srArray = *(fstRecord->evt);
00697   NtpSREvent* srEvent = dynamic_cast<NtpSREvent*> (srArray[eventNum]);
00698   /*
00699   fbuffSREvt = srEvent;
00700   fbuffEvtNum = eventNum;
00701   fbuffTrkNum = -1;
00702   fbuffSRTrk = 0;
00703   */
00704   return srEvent;
00705 }

const NtpSRShower * SRMom::SRShower ( const Int_t  eventNum,
const Int_t  shwNum 
) const [private, virtual]

Definition at line 708 of file SRMom.cxx.

References fstRecord, Msg::kWarning, MSG, NumShowers(), NtpSREvent::shw, NtpStRecord::shw, and SREvent().

Referenced by ShwEndPln(), ShwLthPlanes(), ShwPHGeV(), and ShwStartVtx().

00710 {
00711   if (shwNum < 0){return 0;}
00712   if (shwNum >= this->NumShowers(eventNum)){return 0;}
00713 
00714   const NtpSREvent* srEvent = this->SREvent(eventNum);
00715   if (!srEvent){
00716     MSG("SRMom",Msg::kWarning) 
00717       << "No NtpSREvent with event number " << eventNum << endl;
00718     return 0;
00719   }
00720  
00721   Int_t shwIndex = srEvent->shw[shwNum];
00722   TClonesArray& shwArray = *(fstRecord->shw);
00723   NtpSRShower* shower = dynamic_cast<NtpSRShower*>
00724     (shwArray[shwIndex]); 
00725   return shower;
00726 }

const NtpSRTrack * SRMom::SRTrack ( const Int_t  eventNum,
const Int_t  trackNum 
) const [private, virtual]

Definition at line 729 of file SRMom.cxx.

References fstRecord, Msg::kWarning, MSG, SREvent(), NtpStRecord::trk, and NtpSREvent::trk.

Referenced by ArrayRAlongTrack(), ArrayUAlongTrack(), ArrayVAlongTrack(), ArrayXAlongTrack(), ArrayYAlongTrack(), ChiSq(), ChiSqPerNDoF(), LongestTrackInEvent(), NDoF(), TrackEndDistOuterTransEdge(), TrackEndDistZEnd(), TrackEndPlane(), TrackEndU(), TrackEndV(), TrackEndX(), TrackEndY(), TrackEndZ(), TrackLength(), TrackLengthPlanes(), TrackNumStrips(), TrackVtxPlane(), TrackVtxQOvP(), TrackVtxQOvPError(), TrackVtxX(), TrackVtxY(), TrackVtxZ(), TrkEndR(), TrkFitPass(), TrkMomCurv(), TrkMomRange(), TrkNumPln(), TrkStartVtx(), and TrkVtxR().

00731 {
00732   /*
00733   if ((fbuffTrkNum == trackNum) && (fbuffEvtNum == eventNum)){
00734     //    cout << "Returning bufferred track " << SnarlNumber() << ", " << eventNum << ", " << trackNum << endl;
00735     return fbuffSRTrk;
00736   }
00737   */
00738   const NtpSREvent* srEvent = this->SREvent(eventNum);
00739   if (!srEvent){
00740     MSG("SRMom",Msg::kWarning) 
00741       << "No NtpSREvent with event number " << eventNum << endl;
00742     /*
00743     fbuffSRTrk = 0;
00744     fbuffTrkNum = trackNum;
00745     //   cout << "Returning 0 for track " << SnarlNumber() << ", " << eventNum << ", " << trackNum << endl;
00746     */
00747     return 0;
00748   }
00749 
00750   Int_t trackIndex = srEvent->trk[trackNum];
00751   TClonesArray& trackArray = *(fstRecord->trk);
00752   NtpSRTrack* track = dynamic_cast<NtpSRTrack*>
00753     (trackArray[trackIndex]);
00754   /*
00755   fbuffSRTrk = track;
00756   fbuffTrkNum = trackNum;
00757   //  cout << "Returning non-buferred track " << SnarlNumber() << ", " << eventNum << ", " << trackNum << endl;
00758   */
00759   return track;
00760 }

virtual const NtpStRecord* SRMom::STRecord (  )  const [inline, virtual]

Definition at line 116 of file SRMom.h.

References fstRecord.

00116 {return fstRecord;}

Float_t SRMom::TrackEndDistOuterTransEdge ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 787 of file SRMom.cxx.

References PlaneOutline::DistanceToOuterEdge(), fmom, DataUtil::GetDetector(), PlexPlaneId::GetPlaneCoverage(), PlexPlaneId::GetPlaneView(), Msg::kWarning, MSG, SRTrack(), TrackEndPlane(), TrackEndX(), and TrackEndY().

Referenced by TrkContained().

00789 {
00790   const NtpSRTrack* srTrack = this->SRTrack(eventNum, trackNum);
00791   if (!srTrack){
00792     MSG("SRMom",Msg::kWarning)
00793       << "No NtpSRTrack number " << trackNum
00794       << " in event number " << eventNum << endl;
00795     return -999999.9;
00796   }
00797 
00798   const Int_t endPln = this->TrackEndPlane(srTrack);
00799   if (endPln < 0){
00800     MSG("SRMom",Msg::kWarning)
00801       << "Trying to find TrackEndDistOuterTransEdge for a plane "
00802       << "before the start of the detector."
00803       << endl;
00804     return -999999.9;
00805   }
00806   PlexPlaneId planeID(DataUtil::GetDetector(*fmom),
00807                       (UInt_t) endPln);
00808 
00809   Float_t distance = 0;
00810   Float_t xdist = 0;
00811   Float_t ydist = 0;
00812   PlaneOutline plnout;
00813   plnout.DistanceToOuterEdge(this->TrackEndX(srTrack),
00814                              this->TrackEndY(srTrack),
00815                              planeID.GetPlaneView(),
00816                              planeID.GetPlaneCoverage(),
00817                              distance,
00818                              xdist,
00819                              ydist);    
00820   return distance;
00821 }

Float_t SRMom::TrackEndDistZEnd ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 824 of file SRMom.cxx.

References Munits::cm, det, NtpSRTrack::end, fmom, DataUtil::GetDetector(), Detector::kFar, Detector::kNear, Msg::kWarning, MSG, SRTrack(), and NtpSRVertex::z.

Referenced by TrkContained().

00826 {
00827   const NtpSRTrack* srTrack = this->SRTrack(eventNum, trackNum);
00828   if (!srTrack){
00829     MSG("SRMom",Msg::kWarning)
00830       << "No NtpSRTrack number " << trackNum
00831       << " in event number " << eventNum << endl;
00832     return -999999.9;
00833   }
00834 
00835   Detector::Detector_t det = DataUtil::GetDetector(*fmom);
00836   Float_t detLength = 282*5.94*Munits::cm;
00837   if (Detector::kFar == det){
00838     detLength = 484*5.94*Munits::cm;
00839   }
00840   else{
00841     if (Detector::kNear != det){
00842       MSG("SRMom",Msg::kWarning)
00843         << "Trying to find TrkEndDistZEnd for non-existant detector."
00844         << endl;
00845       return -999999.9;
00846     }
00847   }
00848   return detLength - srTrack->end.z;
00849 }

Int_t SRMom::TrackEndPlane ( const NtpSRTrack srTrack  )  const [private, virtual]

Definition at line 866 of file SRMom.cxx.

References NtpSRTrack::end, Msg::kWarning, MSG, and NtpSRVertex::plane.

00867 {
00868   if (!srTrack){
00869     MSG("SRMom",Msg::kWarning)
00870       << "Trying to find TrackEndPlane for a null track." << endl;
00871     return -1;
00872   }
00873   return srTrack->end.plane;
00874 }

Int_t SRMom::TrackEndPlane ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 852 of file SRMom.cxx.

References NtpSRTrack::end, Msg::kWarning, MSG, NtpSRVertex::plane, and SRTrack().

Referenced by TrackEndDistOuterTransEdge(), and TrackLengthPlanes().

00854 {
00855   const NtpSRTrack* srTrack = this->SRTrack(eventNum, trackNum);
00856   if (!srTrack){
00857     MSG("SRMom",Msg::kWarning)
00858       << "No NtpSRTrack number " << trackNum
00859       << " in event number " << eventNum << endl;
00860     return -1;
00861   }
00862   return srTrack->end.plane;
00863 }

Float_t SRMom::TrackEndU ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 894 of file SRMom.cxx.

References NtpSRTrack::end, Msg::kWarning, MSG, SRTrack(), and NtpSRVertex::u.

00896 {
00897   const NtpSRTrack* srTrack = this->SRTrack(eventNum, trackNum);
00898   if (!srTrack){
00899     MSG("SRMom",Msg::kWarning)
00900       << "No NtpSRTrack number " << trackNum
00901       << " in event number " << eventNum << endl;
00902     return -999999.9;
00903   }
00904   return srTrack->end.u;
00905 }

Float_t SRMom::TrackEndV ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 908 of file SRMom.cxx.

References NtpSRTrack::end, Msg::kWarning, MSG, SRTrack(), and NtpSRVertex::v.

00910 {
00911   const NtpSRTrack* srTrack = this->SRTrack(eventNum, trackNum);
00912   if (!srTrack){
00913     MSG("SRMom",Msg::kWarning)
00914       << "No NtpSRTrack number " << trackNum
00915       << " in event number " << eventNum << endl;
00916     return -999999.9;
00917   }
00918   return srTrack->end.v;
00919 }

Float_t SRMom::TrackEndX ( const NtpSRTrack srTrack  )  const [private, virtual]

Definition at line 936 of file SRMom.cxx.

References NtpSRTrack::end, Msg::kWarning, MSG, and NtpSRVertex::x.

00937 {
00938   if (!srTrack){
00939     MSG("SRMom",Msg::kWarning)
00940       << "Trying to find TrackEndX for a null track." << endl;
00941     return -999999.9;
00942   }
00943   return srTrack->end.x;
00944 }

Float_t SRMom::TrackEndX ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 922 of file SRMom.cxx.

References NtpSRTrack::end, Msg::kWarning, MSG, SRTrack(), and NtpSRVertex::x.

Referenced by TrackEndDistOuterTransEdge().

00924 {
00925   const NtpSRTrack* srTrack = this->SRTrack(eventNum, trackNum);
00926   if (!srTrack){
00927     MSG("SRMom",Msg::kWarning)
00928       << "No NtpSRTrack number " << trackNum
00929       << " in event number " << eventNum << endl;
00930     return -999999.9;
00931   }
00932   return srTrack->end.x;
00933 }

Float_t SRMom::TrackEndY ( const NtpSRTrack srTrack  )  const [private, virtual]

Definition at line 961 of file SRMom.cxx.

References NtpSRTrack::end, Msg::kWarning, MSG, and NtpSRVertex::y.

00962 {
00963   if (!srTrack){
00964     MSG("SRMom",Msg::kWarning)
00965       << "Trying to find TrackEndY for a null track." << endl;
00966     return -999999.9;
00967   }
00968   return srTrack->end.y;
00969 }

Float_t SRMom::TrackEndY ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 947 of file SRMom.cxx.

References NtpSRTrack::end, Msg::kWarning, MSG, SRTrack(), and NtpSRVertex::y.

Referenced by TrackEndDistOuterTransEdge().

00949 {
00950   const NtpSRTrack* srTrack = this->SRTrack(eventNum, trackNum);
00951   if (!srTrack){
00952     MSG("SRMom",Msg::kWarning)
00953       << "No NtpSRTrack number " << trackNum
00954       << " in event number " << eventNum << endl;
00955     return -999999.9;
00956   }
00957   return srTrack->end.y;
00958 }

Float_t SRMom::TrackEndZ ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 972 of file SRMom.cxx.

References NtpSRTrack::end, Msg::kWarning, MSG, SRTrack(), and NtpSRVertex::z.

00974 {
00975   const NtpSRTrack* srTrack = this->SRTrack(eventNum, trackNum);
00976   if (!srTrack){
00977     MSG("SRMom",Msg::kWarning)
00978       << "No NtpSRTrack number " << trackNum
00979       << " in event number " << eventNum << endl;
00980     return -999999.9;
00981   }
00982   return srTrack->end.z;
00983 }

Float_t SRMom::TrackLength ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 1015 of file SRMom.cxx.

References NtpSRTrack::ds, Msg::kWarning, MSG, and SRTrack().

Referenced by LongestTrackIndex(), and LongestTrackInEvent().

01017 {
01018   const NtpSRTrack* srTrack = this->SRTrack(eventNum, trackNum);
01019   if (!srTrack){
01020     MSG("SRMom",Msg::kWarning)
01021       << "No NtpSRTrack number " << trackNum
01022       << " in event number " << eventNum << endl;
01023     return -1.0;
01024   }
01025   Float_t trackLength = srTrack->ds;
01026   return trackLength;
01027 }

Int_t SRMom::TrackLengthPlanes ( const NtpSRTrack srTrack  )  const [virtual]

Definition at line 1048 of file SRMom.cxx.

References Msg::kWarning, MSG, TrackEndPlane(), and TrackVtxPlane().

01049 {
01050   if (!srTrack){
01051     MSG("SRMom",Msg::kWarning)
01052       << "No NtpSRTrack given to SRMom::TrkLthPln" << endl;
01053     return -1;
01054   }
01055   Int_t vtxPlane = TrackVtxPlane(srTrack);
01056   Int_t endPlane = TrackEndPlane(srTrack);
01057   if (-1 == endPlane || -1 == vtxPlane){return -1;}
01058   Int_t trackLength = endPlane - vtxPlane;
01059   return trackLength;
01060 }

Int_t SRMom::TrackLengthPlanes ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 1030 of file SRMom.cxx.

References Msg::kWarning, MSG, SRTrack(), TrackEndPlane(), and TrackVtxPlane().

Referenced by MajorityCurvature::CurvatureComb(), MajorityCurvature::XCurvature(), MajorityCurvature::XCurvatureObject(), MajorityCurvature::YCurvature(), and MajorityCurvature::YCurvatureObject().

01032 {
01033   const NtpSRTrack* srTrack = this->SRTrack(eventNum, trackNum);
01034   if (!srTrack){
01035     MSG("SRMom",Msg::kWarning)
01036       << "No NtpSRTrack number " << trackNum
01037       << " in event number " << eventNum << endl;
01038     return -1;
01039   }
01040   Int_t vtxPlane = TrackVtxPlane(srTrack);
01041   Int_t endPlane = TrackEndPlane(srTrack);
01042   if (-1 == endPlane || -1 == vtxPlane){return -1;}
01043   Int_t trackLength = endPlane - vtxPlane;
01044   return trackLength;
01045 }

Int_t SRMom::TrackNumStrips ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 1107 of file SRMom.cxx.

References Msg::kWarning, MSG, NtpSRTrack::nstrip, and SRTrack().

01109 {
01110   const NtpSRTrack* srTrack = this->SRTrack(eventNum, trackNum);
01111   if (!srTrack){
01112     MSG("SRMom",Msg::kWarning)
01113       << "No NtpSRTrack number " << trackNum
01114       << " in event number " << eventNum << endl;
01115     return -1;
01116   }
01117   return srTrack->nstrip;
01118 }

Int_t SRMom::TrackVtxPlane ( const NtpSRTrack srTrack  )  const [private, virtual]

Definition at line 1149 of file SRMom.cxx.

References Msg::kWarning, MSG, NtpSRVertex::plane, and NtpSRTrack::vtx.

01150 {
01151   if (!srTrack){
01152     MSG("SRMom",Msg::kWarning)
01153       << "Trying to find TrackEndX for a null track." << endl;
01154     return -1;
01155   }
01156   return srTrack->vtx.plane;
01157 }

Int_t SRMom::TrackVtxPlane ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 1135 of file SRMom.cxx.

References Msg::kWarning, MSG, NtpSRVertex::plane, SRTrack(), and NtpSRTrack::vtx.

Referenced by TrackLengthPlanes().

01137 {
01138   const NtpSRTrack* srTrack = this->SRTrack(eventNum, trackNum);
01139   if (!srTrack){
01140     MSG("SRMom",Msg::kWarning)
01141       << "No NtpSRTrack number " << trackNum
01142       << " in event number " << eventNum << endl;
01143     return -1;
01144   }
01145   return srTrack->vtx.plane;
01146 }

Float_t SRMom::TrackVtxQOvP ( const NtpSRTrack srTrack  )  const [virtual]

Definition at line 1174 of file SRMom.cxx.

References Msg::kWarning, NtpSRTrack::momentum, MSG, and NtpSRMomentum::qp.

01175 {
01176   if (!srTrack){
01177     MSG("SRMom",Msg::kWarning)
01178       << "No NtpSRTrack given to SRMom::TrackVtxQOvP" << endl;
01179     return -999999.9;
01180   }
01181   return srTrack->momentum.qp;
01182 }

Float_t SRMom::TrackVtxQOvP ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 1160 of file SRMom.cxx.

References Msg::kWarning, NtpSRTrack::momentum, MSG, NtpSRMomentum::qp, and SRTrack().

Referenced by MajorityCurvature::CurvatureImproved().

01162 {
01163   const NtpSRTrack* srTrack = this->SRTrack(eventNum, trackNum);
01164   if (!srTrack){
01165     MSG("SRMom",Msg::kWarning)
01166       << "No NtpSRTrack number " << trackNum
01167       << " in event number " << eventNum << endl;
01168     return -999999.9;
01169   }
01170   return srTrack->momentum.qp;
01171 }

Float_t SRMom::TrackVtxQOvPError ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 1185 of file SRMom.cxx.

References NtpSRMomentum::eqp, Msg::kWarning, NtpSRTrack::momentum, MSG, and SRTrack().

01187 {
01188   const NtpSRTrack* srTrack = this->SRTrack(eventNum, trackNum);
01189   if (!srTrack){
01190     MSG("SRMom",Msg::kWarning)
01191       << "No NtpSRTrack number " << trackNum
01192       << " in event number " << eventNum << endl;
01193     return -999999.9;
01194   }
01195   return srTrack->momentum.eqp;
01196 }

Float_t SRMom::TrackVtxX ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 1216 of file SRMom.cxx.

References Msg::kWarning, MSG, SRTrack(), NtpSRTrack::vtx, and NtpSRVertex::x.

01218 {
01219   const NtpSRTrack* srTrack = this->SRTrack(eventNum, trackNum);
01220   if (!srTrack){
01221     MSG("SRMom",Msg::kWarning)
01222       << "No NtpSRTrack number " << trackNum
01223       << " in event number " << eventNum << endl;
01224     return -999999.9;
01225   }
01226   return srTrack->vtx.x;
01227 }

Float_t SRMom::TrackVtxY ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 1230 of file SRMom.cxx.

References Msg::kWarning, MSG, SRTrack(), NtpSRTrack::vtx, and NtpSRVertex::y.

01232 {
01233   const NtpSRTrack* srTrack = this->SRTrack(eventNum, trackNum);
01234   if (!srTrack){
01235     MSG("SRMom",Msg::kWarning)
01236       << "No NtpSRTrack number " << trackNum
01237       << " in event number " << eventNum << endl;
01238     return -999999.9;
01239   }
01240   return srTrack->vtx.y;
01241 }

Float_t SRMom::TrackVtxZ ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 1244 of file SRMom.cxx.

References Msg::kWarning, MSG, SRTrack(), NtpSRTrack::vtx, and NtpSRVertex::z.

01246 {
01247   const NtpSRTrack* srTrack = this->SRTrack(eventNum, trackNum);
01248   if (!srTrack){
01249     MSG("SRMom",Msg::kWarning)
01250       << "No NtpSRTrack number " << trackNum
01251       << " in event number " << eventNum << endl;
01252     return -999999.9;
01253   }
01254   return srTrack->vtx.z;
01255 }

Int_t SRMom::TrkContained ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 763 of file SRMom.cxx.

References TrackEndDistOuterTransEdge(), and TrackEndDistZEnd().

Referenced by TrkEnergySimple().

00765 {
00766   Float_t dOut = this->TrackEndDistOuterTransEdge(eventNum,trackNum);
00767   Float_t dz = this->TrackEndDistZEnd(eventNum,trackNum);
00768   if (dOut < -999990){return -1;}
00769   if (dz < -999990){return -1;}
00770   if (dOut < 0.2){return 0;}
00771   if (dz < 0.2){return 0;}
00772   return 1;
00773   /*
00774   //Will only work with newer versions of the code
00775   const NtpSRTrack* srTrack = this->SRTrack(eventNum, trackNum);
00776   if (!srTrack){
00777     MSG("SRMom",Msg::kWarning)
00778       << "No NtpSRTrack number " << trackNum
00779       << " in event number " << eventNum << endl;
00780     return -1;
00781   }
00782   return srTrack->contained;
00783   */
00784 }

Float_t SRMom::TrkEndR ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 877 of file SRMom.cxx.

References NtpSRTrack::end, Msg::kWarning, MSG, SRTrack(), NtpSRVertex::x, and NtpSRVertex::y.

00879 {
00880   const NtpSRTrack* srTrack = this->SRTrack(eventNum, trackNum);
00881   if (!srTrack){
00882     MSG("SRMom",Msg::kWarning)
00883       << "No NtpSRTrack number " << trackNum
00884       << " in event number " << eventNum << endl;
00885     return -999999.9;
00886   }
00887   Float_t x = srTrack->end.x;
00888   Float_t y = srTrack->end.y;
00889   Float_t r = sqrt(x*x + y*y);
00890   return r;
00891 }

Float_t SRMom::TrkEnergySimple ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 986 of file SRMom.cxx.

References TrkContained(), TrkMomCurv(), and TrkMomRange().

00988 {
00989   //Simple function that uses the SR's opinion on containment.
00990   Int_t contained = this->TrkContained(eventNum,trackNum);
00991   if (-1.0 == contained){
00992     return -999999.9;
00993   }
00994   if (!contained){
00995     return this->TrkMomCurv(eventNum,trackNum);
00996   }
00997   return TrkMomRange(eventNum,trackNum);
00998 }

Int_t SRMom::TrkFitPass ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 1001 of file SRMom.cxx.

References NtpSRTrack::fit, Msg::kWarning, MSG, NtpSRFitTrack::pass, and SRTrack().

01003 {
01004   const NtpSRTrack* srTrack = this->SRTrack(eventNum, trackNum);
01005   if (!srTrack){
01006     MSG("SRMom",Msg::kWarning)
01007       << "No NtpSRTrack number " << trackNum
01008       << " in event number " << eventNum << endl;
01009     return -1;
01010   }
01011   return (Int_t) srTrack->fit.pass;
01012 }

Float_t SRMom::TrkMomCurv ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 1063 of file SRMom.cxx.

References Msg::kWarning, NtpSRTrack::momentum, MSG, NtpSRMomentum::qp, and SRTrack().

Referenced by TrkEnergySimple().

01065 {
01066   const NtpSRTrack* srTrack = this->SRTrack(eventNum, trackNum);
01067   if (!srTrack){
01068     MSG("SRMom",Msg::kWarning)
01069       << "No NtpSRTrack number " << trackNum
01070       << " in event number " << eventNum << endl;
01071     return -999999.9;
01072   }
01073   Float_t qOvp = srTrack->momentum.qp;
01074   if (!qOvp) return -999999.9;
01075   return fabs(1.0/qOvp);
01076 }

Float_t SRMom::TrkMomRange ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 1079 of file SRMom.cxx.

References Msg::kWarning, NtpSRTrack::momentum, MSG, NtpSRMomentum::range, and SRTrack().

Referenced by TrkEnergySimple().

01081 {
01082   const NtpSRTrack* srTrack = this->SRTrack(eventNum, trackNum);
01083   if (!srTrack){
01084     MSG("SRMom",Msg::kWarning)
01085       << "No NtpSRTrack number " << trackNum
01086       << " in event number " << eventNum << endl;
01087     return -999999.9;
01088   }
01089   return srTrack->momentum.range;
01090 }

Int_t SRMom::TrkNumPln ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 1093 of file SRMom.cxx.

References Msg::kWarning, MSG, NtpSRPlane::n, NtpSRTrack::plane, and SRTrack().

01095 {
01096   const NtpSRTrack* srTrack = this->SRTrack(eventNum, trackNum);
01097   if (!srTrack){
01098     MSG("SRMom",Msg::kWarning)
01099       << "No NtpSRTrack number " << trackNum
01100       << " in event number " << eventNum << endl;
01101     return -1;
01102   }
01103   return srTrack->plane.n;
01104 }

const NtpSRVertex * SRMom::TrkStartVtx ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 1121 of file SRMom.cxx.

References Msg::kWarning, MSG, SRTrack(), and NtpSRTrack::vtx.

01123 {
01124   const NtpSRTrack* srTrack = this->SRTrack(eventNum, trackNum);
01125   if (!srTrack){
01126     MSG("SRMom",Msg::kWarning)
01127       << "No NtpSRTrack number " << trackNum
01128       << " in event number " << eventNum << endl;
01129     return 0;
01130   }
01131   return &(srTrack->vtx);
01132 }

Float_t SRMom::TrkVtxR ( const Int_t  eventNum,
const Int_t  trackNum 
) const [virtual]

Definition at line 1199 of file SRMom.cxx.

References Msg::kWarning, MSG, SRTrack(), NtpSRTrack::vtx, NtpSRVertex::x, and NtpSRVertex::y.

01201 {
01202   const NtpSRTrack* srTrack = this->SRTrack(eventNum, trackNum);
01203   if (!srTrack){
01204     MSG("SRMom",Msg::kWarning)
01205       << "No NtpSRTrack number " << trackNum
01206       << " in event number " << eventNum << endl;
01207     return -999999.9;
01208   }
01209   Float_t x = srTrack->vtx.x;
01210   Float_t y = srTrack->vtx.y;
01211   Float_t r = sqrt(x*x + y*y);
01212   return r;
01213 }

const VldContext * SRMom::VldCntxt (  )  const [private, virtual]

Definition at line 1258 of file SRMom.cxx.

References fstRecord, and RecRecordImp< T >::GetVldContext().

Referenced by Detector().

01259 {
01260   if (!fstRecord){
01261     return 0;
01262   }
01263   return fstRecord->GetVldContext();
01264 }


Member Data Documentation

Definition at line 183 of file SRMom.h.

Referenced by SnarlPoT(), SRMom(), and ~SRMom().

const MomNavigator* SRMom::fmom [private]

Definition at line 181 of file SRMom.h.

Referenced by SRMom(), TrackEndDistOuterTransEdge(), TrackEndDistZEnd(), and ~SRMom().

const NtpStRecord* SRMom::fstRecord [private]

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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1