Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

ANtpEventManipulator Class Reference

#include <ANtpEventManipulator.h>

List of all members.

Public Member Functions

 ANtpEventManipulator ()
virtual ~ANtpEventManipulator ()
NtpSREventGetEvent ()
NtpSRTrackGetTrack (Int_t index)
NtpSRShowerGetShower (Int_t index)
NtpSRTrackGetPrimaryTrack ()
NtpSRShowerGetPrimaryShower ()
NtpSRStripGetStrip (Int_t index)
void SetPrimaryTrackCriteria (Int_t useNPlanes, Int_t useLength, Int_t usePH)
void SetPrimaryShowerCriteria (Int_t useNPlanes, Int_t usePH)
void SetEventInSnarl (Int_t eventIndex)
void Initialize (TClonesArray *eventArray, TClonesArray *trackArray, TClonesArray *showerArray, TClonesArray *stripArray)

Private Attributes

NtpSREventfNtpSREvent
TClonesArray * fEventArray
TClonesArray * fTrackArray
TClonesArray * fShowerArray
TClonesArray * fStripArray
Int_t fUseLengthTrack
Int_t fUsePHShower
Int_t fUseNPlanesShower
Int_t fUsePHTrack
Int_t fUseNPlanesTrack


Constructor & Destructor Documentation

ANtpEventManipulator::ANtpEventManipulator  ) 
 

Definition at line 20 of file ANtpEventManipulator.cxx.

References MSG.

00020                                            :
00021   fNtpSREvent(0),
00022   fEventArray(0),
00023   fTrackArray(0),
00024   fShowerArray(0),
00025   fStripArray(0),
00026   fUseLengthTrack(0),
00027   fUsePHShower(0),
00028   fUseNPlanesShower(0),
00029   fUsePHTrack(0),
00030   fUseNPlanesTrack(0)
00031 {
00032     
00033   MSG("ANtpEventManipulator", Msg::kDebug) << "ANtpEventManipulator::Constructor" << endl;
00034   
00035 }

ANtpEventManipulator::~ANtpEventManipulator  )  [virtual]
 

Definition at line 51 of file ANtpEventManipulator.cxx.

References MSG.

00052 { 
00053   MSG("ANtpEventManipulator", Msg::kDebug) << "ANtpEventManipulator::Destructor" << endl; 
00054 }


Member Function Documentation

NtpSREvent * ANtpEventManipulator::GetEvent  ) 
 

Definition at line 57 of file ANtpEventManipulator.cxx.

Referenced by CondensedNtpModule::Ana(), ANtpTrackInfoAna::Analyze(), ANtpShowerInfoAna::Analyze(), and ANtpAnalysisInfoAna::Analyze().

00058 {
00059   return fNtpSREvent;
00060 }

NtpSRShower * ANtpEventManipulator::GetPrimaryShower  ) 
 

Definition at line 142 of file ANtpEventManipulator.cxx.

References fNtpSREvent, fShowerArray, fUseNPlanesShower, MSG, NtpSRPlane::n, NtpSREvent::nshower, NtpSRShower::ph, NtpSRShower::plane, NtpSREvent::shw, and NtpSRStripPulseHeight::sigmap.

Referenced by CondensedNtpModule::Ana(), ANtpShowerInfoAna::Analyze(), and ANtpAnalysisInfoAna::Analyze().

00143 {
00144   NtpSRShower *ntpShower = 0;
00145   NtpSRShower *primaryShower = 0;
00146   
00147   if(!fNtpSREvent){
00148     MSG("ANtpEventManipulator", Msg::kWarning) << "No NtpSREvent to get a NtpSRShower from"
00149                                                << " - returning empty pointer" << endl;
00150     return ntpShower;
00151   } 
00152   
00153   for(Int_t i = 0; i < fNtpSREvent->nshower; ++i){
00154     
00155     ntpShower = dynamic_cast<NtpSRShower *>(fShowerArray->At(fNtpSREvent->shw[i]));
00156     
00157     //if you dont already have a candidate, make this Shower it
00158     if(!primaryShower) primaryShower = ntpShower;
00159     
00160     //check to see if this Shower is better than the best so far.  the fUseXXX
00161     //variables are set to 1. or 0. depending on if they should be used to 
00162     //determine which is the primary Shower
00163     if(ntpShower->plane.n > primaryShower->plane.n*fUseNPlanesShower
00164        && ntpShower->ph.sigmap > primaryShower->ph.sigmap*fUsePHShower)
00165       primaryShower = ntpShower;
00166     
00167   }//end loop over Showers in the event
00168   
00169   return primaryShower;
00170   
00171 }

NtpSRTrack * ANtpEventManipulator::GetPrimaryTrack  ) 
 

Definition at line 99 of file ANtpEventManipulator.cxx.

References NtpSRTrack::ds, fNtpSREvent, fTrackArray, fUseLengthTrack, fUseNPlanesTrack, MSG, NtpSRPlane::n, NtpSREvent::ntrack, NtpSRTrack::ph, NtpSRTrack::plane, NtpSRStripPulseHeight::sigmap, and NtpSREvent::trk.

Referenced by CondensedNtpModule::Ana(), ANtpTrackInfoAna::Analyze(), and ANtpAnalysisInfoAna::Analyze().

00100 {
00101   NtpSRTrack *primaryTrack = 0;
00102   NtpSRTrack *ntpTrack = 0;
00103 
00104   Int_t index = 0;
00105   
00106   if(!fNtpSREvent){
00107     MSG("ANtpEventManipulator", Msg::kWarning) << "No NtpSREvent to get a NtpSRTrack from"
00108                                                << " - returning empty pointer" << endl;
00109     return primaryTrack;
00110   } 
00111   
00112   for(Int_t i = 0; i < fNtpSREvent->ntrack; ++i){
00113     
00114     MSG("ANtpEventManipulator", Msg::kDebug) << "current track = " << i 
00115                                              << "/" << fNtpSREvent->ntrack << endl;
00116     
00117     index = fNtpSREvent->trk[i];
00118     
00119     MSG("ANtpEventManipulator", Msg::kDebug) << "current track index = " << index 
00120                                              << "/" << fNtpSREvent->ntrack << endl;
00121     
00122     ntpTrack = dynamic_cast<NtpSRTrack *>(fTrackArray->At(index));
00123     
00124     //if you dont already have a candidate, make this track it
00125     if(!primaryTrack) primaryTrack = ntpTrack;
00126     
00127     //check to see if this track is better than the best so far.  the fUseXXX
00128     //variables are set to 1. or 0. depending on if they should be used to 
00129     //determine which is the primary track
00130     if(ntpTrack->ds > primaryTrack->ds*fUseLengthTrack
00131        && ntpTrack->plane.n > primaryTrack->plane.n*fUseNPlanesTrack
00132        && ntpTrack->ph.sigmap > primaryTrack->ph.sigmap*fUsePHTrack)
00133       primaryTrack = ntpTrack;
00134     
00135   }//end loop over tracks in the event
00136   
00137   return primaryTrack;
00138   
00139 }

NtpSRShower * ANtpEventManipulator::GetShower Int_t  index  ) 
 

Definition at line 82 of file ANtpEventManipulator.cxx.

References fNtpSREvent, fShowerArray, MSG, NtpSREvent::nshower, and NtpSREvent::shw.

00083 {
00084   NtpSRShower *ntpShower = 0;
00085 
00086   if(!fNtpSREvent){
00087     MSG("ANtpEventManipulator", Msg::kWarning) << "No NtpSREvent to get a NtpSRShower from"
00088                                                << " - returning empty pointer" << endl;
00089     return ntpShower;
00090   }
00091   
00092   if(index < fNtpSREvent->nshower)
00093     ntpShower = dynamic_cast<NtpSRShower *>(fShowerArray->At(fNtpSREvent->shw[index]));
00094   
00095   return ntpShower;
00096 }

NtpSRStrip * ANtpEventManipulator::GetStrip Int_t  index  ) 
 

Definition at line 175 of file ANtpEventManipulator.cxx.

References fNtpSREvent, fStripArray, MSG, NtpSREvent::nstrip, and NtpSREvent::stp.

Referenced by CondensedNtpModule::Ana().

00176 {
00177   NtpSRStrip *ntpStrip = 0;
00178 
00179   if(!fNtpSREvent){
00180     MSG("ANtpEventManipulator", Msg::kWarning) << "No NtpSREvent to get a NtpSRStrip from"
00181                                                << " - returning empty pointer" << endl;
00182     return ntpStrip;
00183   }
00184   
00185   if(index < fNtpSREvent->nstrip)
00186     ntpStrip = dynamic_cast<NtpSRStrip *>(fStripArray->At(fNtpSREvent->stp[index]));
00187   
00188   return ntpStrip;
00189 }

NtpSRTrack * ANtpEventManipulator::GetTrack Int_t  index  ) 
 

Definition at line 64 of file ANtpEventManipulator.cxx.

References fNtpSREvent, fTrackArray, MSG, NtpSREvent::ntrack, and NtpSREvent::trk.

00065 {
00066   NtpSRTrack *ntpTrack = 0;
00067   
00068   if(!fNtpSREvent){
00069     MSG("ANtpEventManipulator", Msg::kWarning) << "No NtpSREvent to get a NtpSRTrack from"
00070                                                << " - returning empty pointer" << endl;
00071     return ntpTrack;
00072   } 
00073     
00074   if(index < fNtpSREvent->ntrack)
00075     ntpTrack = dynamic_cast<NtpSRTrack *>(fTrackArray->At(fNtpSREvent->trk[index]));
00076   
00077   return ntpTrack;
00078 }

void ANtpEventManipulator::Initialize TClonesArray *  eventArray,
TClonesArray *  trackArray,
TClonesArray *  showerArray,
TClonesArray *  stripArray
 

Definition at line 38 of file ANtpEventManipulator.cxx.

References fEventArray, fNtpSREvent, fShowerArray, fStripArray, fTrackArray, and MSG.

Referenced by ANtpRecoNtpManipulator::ANtpRecoNtpManipulator(), and ANtpRecoNtpManipulator::SetRecord().

00040 {
00041   fNtpSREvent = 0;
00042   fEventArray = eventArray;
00043   fTrackArray = trackArray;
00044   fShowerArray = showerArray;
00045   fStripArray =stripArray;
00046   MSG("ANtpEventManipulator", Msg::kDebug) << "ANtpEventManipulator::Constructor" << endl;    
00047 }

void ANtpEventManipulator::SetEventInSnarl Int_t  eventIndex  ) 
 

Definition at line 212 of file ANtpEventManipulator.cxx.

References fEventArray, fNtpSREvent, and MSG.

Referenced by CondensedNtpModule::Ana(), ANtpTrackInfoAna::Analyze(), ANtpShowerInfoAna::Analyze(), and ANtpAnalysisInfoAna::Analyze().

00213 {
00214   //check that such an event exists
00215   if(eventIndex < fEventArray->GetLast()+1) 
00216     fNtpSREvent = dynamic_cast<NtpSREvent *>(fEventArray->At(eventIndex));
00217   else{
00218     MSG("ANtpEventManipulator", Msg::kWarning) << "invalid event index, set to first event in array" << endl;
00219     fNtpSREvent = dynamic_cast<NtpSREvent *>(fEventArray->At(0));
00220   }
00221 
00222   return;
00223 }

void ANtpEventManipulator::SetPrimaryShowerCriteria Int_t  useNPlanes,
Int_t  usePH
 

Definition at line 203 of file ANtpEventManipulator.cxx.

References fUseNPlanesShower, and fUsePHShower.

Referenced by ANtpRecoNtpManipulator::SetPrimaryShowerCriteria().

00204 {
00205   fUseNPlanesShower = useNPlanes;
00206   fUsePHShower = usePH;
00207   
00208   return;
00209 }

void ANtpEventManipulator::SetPrimaryTrackCriteria Int_t  useNPlanes,
Int_t  useLength,
Int_t  usePH
 

Definition at line 192 of file ANtpEventManipulator.cxx.

References fUseLengthTrack, fUseNPlanesTrack, and fUsePHTrack.

Referenced by ANtpRecoNtpManipulator::SetPrimaryTrackCriteria().

00194 {
00195   fUseLengthTrack = useLength;
00196   fUseNPlanesTrack = useNPlanes;
00197   fUsePHTrack = usePH;
00198   
00199   return;
00200 }


Member Data Documentation

TClonesArray* ANtpEventManipulator::fEventArray [private]
 

Definition at line 42 of file ANtpEventManipulator.h.

Referenced by Initialize(), and SetEventInSnarl().

NtpSREvent* ANtpEventManipulator::fNtpSREvent [private]
 

Definition at line 40 of file ANtpEventManipulator.h.

Referenced by GetPrimaryShower(), GetPrimaryTrack(), GetShower(), GetStrip(), GetTrack(), Initialize(), and SetEventInSnarl().

TClonesArray* ANtpEventManipulator::fShowerArray [private]
 

Definition at line 44 of file ANtpEventManipulator.h.

Referenced by GetPrimaryShower(), GetShower(), and Initialize().

TClonesArray* ANtpEventManipulator::fStripArray [private]
 

Definition at line 45 of file ANtpEventManipulator.h.

Referenced by GetStrip(), and Initialize().

TClonesArray* ANtpEventManipulator::fTrackArray [private]
 

Definition at line 43 of file ANtpEventManipulator.h.

Referenced by GetPrimaryTrack(), GetTrack(), and Initialize().

Int_t ANtpEventManipulator::fUseLengthTrack [private]
 

Definition at line 47 of file ANtpEventManipulator.h.

Referenced by GetPrimaryTrack(), and SetPrimaryTrackCriteria().

Int_t ANtpEventManipulator::fUseNPlanesShower [private]
 

Definition at line 49 of file ANtpEventManipulator.h.

Referenced by GetPrimaryShower(), and SetPrimaryShowerCriteria().

Int_t ANtpEventManipulator::fUseNPlanesTrack [private]
 

Definition at line 51 of file ANtpEventManipulator.h.

Referenced by GetPrimaryTrack(), and SetPrimaryTrackCriteria().

Int_t ANtpEventManipulator::fUsePHShower [private]
 

Definition at line 48 of file ANtpEventManipulator.h.

Referenced by SetPrimaryShowerCriteria().

Int_t ANtpEventManipulator::fUsePHTrack [private]
 

Definition at line 50 of file ANtpEventManipulator.h.

Referenced by SetPrimaryTrackCriteria().


The documentation for this class was generated from the following files:
Generated on Thu Nov 1 15:55:35 2007 for loon by  doxygen 1.3.9.1