NtpSelection Class Reference

#include <NtpSelection.h>

List of all members.

Static Public Member Functions

static Bool_t PassFail (NtpStRecord *ntpRecord, Int_t ievent)
static Int_t PrimaryTrack (NtpStRecord *ntpRecord, Int_t ievent)

Private Member Functions

 NtpSelection ()
 ~NtpSelection ()

Detailed Description

Definition at line 8 of file NtpSelection.h.


Constructor & Destructor Documentation

NtpSelection::NtpSelection (  )  [private]

Definition at line 15 of file NtpSelection.cxx.

00016 {
00017 
00018 }

NtpSelection::~NtpSelection (  )  [private]

Definition at line 20 of file NtpSelection.cxx.

00021 {
00022 
00023 }


Member Function Documentation

Bool_t NtpSelection::PassFail ( NtpStRecord ntpRecord,
Int_t  ievent 
) [static]

Definition at line 25 of file NtpSelection.cxx.

Referenced by NtpTrackAD::LoadEvent(), and NtpTimingNtuple::Run().

00026 {
00027   return 1;
00028 }

Int_t NtpSelection::PrimaryTrack ( NtpStRecord ntpRecord,
Int_t  ievent 
) [static]

Definition at line 30 of file NtpSelection.cxx.

References NtpSRTrack::end, NtpStRecord::evt, n, NtpSRVertex::plane, NtpStRecord::trk, and NtpSRTrack::vtx.

Referenced by NtpTimingFit::AddEvent(), NtpTimingNtuple::Fill(), and NtpTrackAD::LoadEvent().

00031 {
00032   TClonesArray* eventArray  = (TClonesArray*)(ntpRecord->evt);
00033   TClonesArray* trackArray  = (TClonesArray*)(ntpRecord->trk);
00034 
00035   if( ievent<0 || ievent>eventArray->GetLast() ){
00036     return -1;
00037   }
00038 
00039   NtpSREvent* event = (NtpSREvent*)(eventArray->At(ievent));
00040 
00041   Int_t event_ntrack = event->ntrack;
00042   Int_t* event_trk = event->trk;
00043   Int_t primtrkid = -1;
00044   Int_t primtrklength = 0;
00045 
00046   for( Int_t n=0; n<event_ntrack; n++ ){
00047     Int_t trkid = event_trk[n];
00048     NtpSRTrack* track = (NtpSRTrack*)(trackArray->At(trkid));
00049     if( 1+abs(track->end.plane-track->vtx.plane)>primtrklength ){
00050       primtrklength = 1+abs(track->end.plane-track->vtx.plane);
00051       primtrkid = trkid;
00052     }
00053   }
00054 
00055   return primtrkid;
00056 }


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1