ScintCalEvent Class Reference

#include <ScintCalEvent.h>

List of all members.

Public Member Functions

 ScintCalEvent ()
virtual ~ScintCalEvent ()
virtual const NtpSRDateGetDate (const MomNavigator *mom) const
virtual const VldContextGetVldCntxt (const MomNavigator *mom) const
virtual const NtpSRTrackGetLongestTrack (const MomNavigator *mom) const
virtual Float_t GetPHOfStrip (const Int_t stripNo, const MomNavigator *mom) const
virtual UShort_t GetPlaneOfStrip (const Int_t stripNo, const MomNavigator *mom) const
virtual Bool_t LISnarl (const MomNavigator *mom) const
virtual Int_t NumTracks (const MomNavigator *mom) const
virtual const std::multimap
< UShort_t, Int_t > 
PutStripsInPlaneOrder (const NtpSRTrack &track, const MomNavigator *mom) const
virtual UInt_t Trigger (const MomNavigator *mom) const

Detailed Description

Definition at line 16 of file ScintCalEvent.h.


Constructor & Destructor Documentation

ScintCalEvent::ScintCalEvent (  ) 

Definition at line 24 of file ScintCalEvent.cxx.

00025 {
00026 }

ScintCalEvent::~ScintCalEvent (  )  [virtual]

Definition at line 30 of file ScintCalEvent.cxx.

00031 {
00032 }


Member Function Documentation

const NtpSRDate * ScintCalEvent::GetDate ( const MomNavigator mom  )  const [virtual]

Definition at line 36 of file ScintCalEvent.cxx.

References NtpSREventSummary::date, NtpStRecord::evthdr, and MomNavigator::GetFragment().

00037 {
00038   NtpStRecord* stRecord = dynamic_cast<NtpStRecord*>
00039     (mom->GetFragment("NtpStRecord"));
00040 
00041   return  &(stRecord->evthdr.date);
00042 }

const NtpSRTrack * ScintCalEvent::GetLongestTrack ( const MomNavigator mom  )  const [virtual]

Definition at line 95 of file ScintCalEvent.cxx.

References NtpSRTrack::ds, MomNavigator::GetFragment(), Msg::kWarning, MSG, and NtpStRecord::trk.

00096 { 
00097   NtpStRecord* stRecord = dynamic_cast<NtpStRecord*>
00098     (mom->GetFragment("NtpStRecord"));
00099 
00100   if (!stRecord){
00101     MSG("ScintCalEvent",Msg::kWarning) 
00102       << "No NtpStRecord in Mom" << endl;
00103     return 0;
00104   }
00105 
00106   TClonesArray* trackArray = stRecord->trk;
00107 
00108   TIter digitIter(trackArray);
00109   NtpSRTrack* thisTrack;
00110   Float_t trackLength = 0;
00111   NtpSRTrack* track = 0;
00112   while ( (thisTrack = (NtpSRTrack*) digitIter.Next()) ){
00113     if ((thisTrack->ds)>trackLength){
00114       track = thisTrack;
00115       trackLength = thisTrack->ds;
00116     }
00117   }
00118   return (track);
00119 }

Float_t ScintCalEvent::GetPHOfStrip ( const Int_t  stripNo,
const MomNavigator mom 
) const [virtual]

Definition at line 123 of file ScintCalEvent.cxx.

References MomNavigator::GetFragment(), Msg::kWarning, MSG, NtpSRStrip::ph0, NtpSRStrip::ph1, NtpSRPulseHeight::raw, and NtpStRecord::stp.

00125 {
00126   NtpStRecord* stRecord = dynamic_cast<NtpStRecord*>
00127     (mom->GetFragment("NtpStRecord"));
00128   if (!stRecord){
00129     MSG("ScintCalEvent",Msg::kWarning) 
00130       << "No NtpStRecord in Mom" << endl;
00131     return 0;
00132   }
00133 
00134   TClonesArray* stripArray = stRecord->stp;
00135   NtpSRStrip* srStrip = dynamic_cast<NtpSRStrip*> ( (*stripArray)[stripNo] );
00136   Float_t rawPH0 = srStrip->ph0.raw;
00137   Float_t rawPH1 = srStrip->ph1.raw;
00138   return (rawPH0 + rawPH1);
00139 }

UShort_t ScintCalEvent::GetPlaneOfStrip ( const Int_t  stripNo,
const MomNavigator mom 
) const [virtual]

Definition at line 208 of file ScintCalEvent.cxx.

References MomNavigator::GetFragment(), Msg::kWarning, MSG, NtpSRStrip::plane, and NtpStRecord::stp.

Referenced by PutStripsInPlaneOrder().

00210 {
00211   NtpStRecord* stRecord = dynamic_cast<NtpStRecord*>
00212     (mom->GetFragment("NtpStRecord"));
00213   if (!stRecord){
00214     MSG("ScintCalEvent",Msg::kWarning) 
00215       << "No NtpStRecord in Mom" << endl;
00216     return 0;
00217   }
00218 
00219   TClonesArray* stripArray = stRecord->stp;
00220   NtpSRStrip* srStrip = dynamic_cast<NtpSRStrip*> ( (*stripArray)[stripNo] );
00221   UShort_t planeNo = srStrip->plane;
00222   return planeNo;
00223 }

const VldContext * ScintCalEvent::GetVldCntxt ( const MomNavigator mom  )  const [virtual]

Definition at line 46 of file ScintCalEvent.cxx.

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

00047 {
00048   NtpStRecord* stRecord = dynamic_cast<NtpStRecord*>
00049     (mom->GetFragment("NtpStRecord"));
00050 
00051   return  stRecord->GetVldContext();
00052 }

Bool_t ScintCalEvent::LISnarl ( const MomNavigator mom  )  const [virtual]

Definition at line 55 of file ScintCalEvent.cxx.

References NtpStRecord::evthdr, MomNavigator::GetFragment(), Msg::kWarning, NtpSREventSummary::litime, and MSG.

Referenced by ScintCalModule::Ana().

00056 {
00057   NtpStRecord* stRecord = dynamic_cast<NtpStRecord*>
00058     (mom->GetFragment("NtpStRecord"));
00059 
00060   if (!stRecord){
00061     MSG("ScintCalEvent",Msg::kWarning) 
00062       << "No NtpStRecord in Mom" << endl;
00063     return 0;
00064   }
00065 
00066   if (-1.0 == stRecord->evthdr.litime) {return false;}
00067   else {return true;}
00068 }

Int_t ScintCalEvent::NumTracks ( const MomNavigator mom  )  const [virtual]

Definition at line 71 of file ScintCalEvent.cxx.

References MomNavigator::GetFragment(), Msg::kWarning, MSG, and NtpStRecord::trk.

Referenced by ScintCalModule::Ana().

00072 {
00073   NtpStRecord* stRecord = dynamic_cast<NtpStRecord*>
00074     (mom->GetFragment("NtpStRecord"));
00075 
00076   if (!stRecord){
00077     MSG("ScintCalEvent",Msg::kWarning) 
00078       << "No NtpStRecord in Mom" << endl;
00079     return 0;
00080   }
00081 
00082   TClonesArray* trackArray = stRecord->trk;
00083 
00084   TIter digitIter(trackArray);
00085   NtpSRTrack* thisTrack;
00086   Int_t numtracks =0;
00087   while ( (thisTrack = (NtpSRTrack*) digitIter.Next()) ){
00088     numtracks++;
00089   }
00090   return numtracks;
00091 }

const multimap< UShort_t, Int_t > ScintCalEvent::PutStripsInPlaneOrder ( const NtpSRTrack track,
const MomNavigator mom 
) const [virtual]

Definition at line 193 of file ScintCalEvent.cxx.

References GetPlaneOfStrip(), and NtpSRTrack::nstrip.

00195 {
00196   multimap<UShort_t, Int_t> mStripIndices;
00197   Int_t numStrips = track.nstrip;
00198   
00199   for (Int_t presentStrip = 0; presentStrip < numStrips; ++presentStrip){
00200     const UShort_t plane = this->GetPlaneOfStrip(presentStrip, mom);
00201     mStripIndices.insert(pair<UShort_t, Int_t>(plane, presentStrip));
00202   }
00203   return mStripIndices;
00204 }

UInt_t ScintCalEvent::Trigger ( const MomNavigator mom  )  const [virtual]

Definition at line 227 of file ScintCalEvent.cxx.

References MomNavigator::GetFragment(), RecRecordImp< T >::GetHeader(), and RecPhysicsHeader::GetTrigSrc().

Referenced by ScintCalModule::Ana().

00228 {
00229   NtpStRecord* stRecord = dynamic_cast<NtpStRecord*>
00230     (mom->GetFragment("NtpStRecord"));
00231   RecCandHeader candHeader = stRecord->GetHeader();
00232   return candHeader.GetTrigSrc();
00233 }


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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1