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

ANtpSnarlManipulator Class Reference

#include <ANtpSnarlManipulator.h>

List of all members.

Public Member Functions

 ANtpSnarlManipulator ()
virtual ~ANtpSnarlManipulator ()
NtpSREventGetEvent (Int_t index)
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 Initialize (TClonesArray *eventArray, TClonesArray *trackArray, TClonesArray *showerArray, TClonesArray *stripArray)

Private Attributes

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

ANtpSnarlManipulator::ANtpSnarlManipulator  ) 
 

Definition at line 20 of file ANtpSnarlManipulator.cxx.

References MSG.

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

ANtpSnarlManipulator::~ANtpSnarlManipulator  )  [virtual]
 

Definition at line 50 of file ANtpSnarlManipulator.cxx.

References MSG.

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


Member Function Documentation

NtpSREvent * ANtpSnarlManipulator::GetEvent Int_t  index  ) 
 

Definition at line 56 of file ANtpSnarlManipulator.cxx.

References fEventArray.

00057 {
00058   NtpSREvent *ntpEvent = 0;
00059       
00060   if(index < fEventArray->GetLast()+1)
00061     ntpEvent = dynamic_cast<NtpSREvent *>(fEventArray->At(index));
00062   
00063   return ntpEvent;
00064 }

NtpSRShower * ANtpSnarlManipulator::GetPrimaryShower  ) 
 

Definition at line 116 of file ANtpSnarlManipulator.cxx.

References fShowerArray, fUseNPlanesShower, NtpSRPlane::n, NtpSRShower::ph, NtpSRShower::plane, and NtpSRStripPulseHeight::sigmap.

00117 {
00118   NtpSRShower *ntpShower = 0;
00119   NtpSRShower *primaryShower = 0;
00120   
00121   for(Int_t i = 0; i < fShowerArray->GetLast()+1; ++i){
00122     
00123     ntpShower = dynamic_cast<NtpSRShower *>(fShowerArray->At(i));
00124     
00125     //if you dont already have a candidate, make this Shower it
00126     if(!primaryShower) primaryShower = ntpShower;
00127     
00128     //check to see if this Shower is better than the best so far.  the fUseXXX
00129     //variables are set to 1. or 0. depending on if they should be used to 
00130     //determine which is the primary Shower
00131     if(ntpShower->plane.n > primaryShower->plane.n*fUseNPlanesShower
00132        && ntpShower->ph.sigmap > primaryShower->ph.sigmap*fUsePHShower)
00133       primaryShower = ntpShower;
00134     
00135   }//end loop over Showers in the event
00136   
00137   return primaryShower;
00138   
00139 }

NtpSRTrack * ANtpSnarlManipulator::GetPrimaryTrack  ) 
 

Definition at line 89 of file ANtpSnarlManipulator.cxx.

References NtpSRTrack::ds, fTrackArray, fUseLengthTrack, fUseNPlanesTrack, NtpSRPlane::n, NtpSRTrack::ph, NtpSRTrack::plane, and NtpSRStripPulseHeight::sigmap.

00090 {
00091   NtpSRTrack *primaryTrack = 0;
00092   NtpSRTrack *ntpTrack = 0;
00093 
00094   for(Int_t i = 0; i < fTrackArray->GetLast()+1; ++i){
00095     
00096     ntpTrack = dynamic_cast<NtpSRTrack *>(fTrackArray->At(i));
00097     
00098     //if you dont already have a candidate, make this track it
00099     if(!primaryTrack) primaryTrack = ntpTrack;
00100     
00101     //check to see if this track is better than the best so far.  the fUseXXX
00102     //variables are set to 1. or 0. depending on if they should be used to 
00103     //determine which is the primary track
00104     if(ntpTrack->ds > primaryTrack->ds*fUseLengthTrack
00105        && ntpTrack->plane.n > primaryTrack->plane.n*fUseNPlanesTrack
00106        && ntpTrack->ph.sigmap > primaryTrack->ph.sigmap*fUsePHTrack)
00107       primaryTrack = ntpTrack;
00108     
00109   }//end loop over tracks in the event
00110   
00111   return primaryTrack;
00112   
00113 }

NtpSRShower * ANtpSnarlManipulator::GetShower Int_t  index  ) 
 

Definition at line 78 of file ANtpSnarlManipulator.cxx.

References fShowerArray.

00079 {
00080   NtpSRShower *ntpShower = 0;
00081 
00082   if(index < fShowerArray->GetLast()+1)
00083     ntpShower = dynamic_cast<NtpSRShower *>(fShowerArray->At(index));
00084   
00085   return ntpShower;
00086 }

NtpSRStrip * ANtpSnarlManipulator::GetStrip Int_t  index  ) 
 

Definition at line 142 of file ANtpSnarlManipulator.cxx.

References fStripArray.

00143 {
00144   NtpSRStrip *ntpStrip = 0;
00145 
00146   if(index < fStripArray->GetLast()+1)
00147     ntpStrip = dynamic_cast<NtpSRStrip *>(fStripArray->At(index));
00148   
00149   return ntpStrip;
00150 }

NtpSRTrack * ANtpSnarlManipulator::GetTrack Int_t  index  ) 
 

Definition at line 67 of file ANtpSnarlManipulator.cxx.

References fTrackArray.

00068 {
00069   NtpSRTrack *ntpTrack = 0;
00070       
00071   if(index < fTrackArray->GetLast()+1)
00072     ntpTrack = dynamic_cast<NtpSRTrack *>(fTrackArray->At(index));
00073   
00074   return ntpTrack;
00075 }

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

Definition at line 37 of file ANtpSnarlManipulator.cxx.

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

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

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

void ANtpSnarlManipulator::SetPrimaryShowerCriteria Int_t  useNPlanes,
Int_t  usePH
 

Definition at line 164 of file ANtpSnarlManipulator.cxx.

References fUseNPlanesShower, and fUsePHShower.

Referenced by ANtpRecoNtpManipulator::SetPrimaryShowerCriteria().

00165 {
00166   fUseNPlanesShower = useNPlanes;
00167   fUsePHShower = usePH;
00168   
00169   return;
00170 }

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

Definition at line 153 of file ANtpSnarlManipulator.cxx.

References fUseLengthTrack, fUseNPlanesTrack, and fUsePHTrack.

Referenced by ANtpRecoNtpManipulator::SetPrimaryTrackCriteria().

00155 {
00156   fUseLengthTrack = useLength;
00157   fUseNPlanesTrack = useNPlanes;
00158   fUsePHTrack = usePH;
00159   
00160   return;
00161 }


Member Data Documentation

TClonesArray* ANtpSnarlManipulator::fEventArray [private]
 

Definition at line 39 of file ANtpSnarlManipulator.h.

Referenced by GetEvent(), and Initialize().

TClonesArray* ANtpSnarlManipulator::fShowerArray [private]
 

Definition at line 41 of file ANtpSnarlManipulator.h.

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

TClonesArray* ANtpSnarlManipulator::fStripArray [private]
 

Definition at line 42 of file ANtpSnarlManipulator.h.

Referenced by GetStrip(), and Initialize().

TClonesArray* ANtpSnarlManipulator::fTrackArray [private]
 

Definition at line 40 of file ANtpSnarlManipulator.h.

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

Int_t ANtpSnarlManipulator::fUseLengthTrack [private]
 

Definition at line 44 of file ANtpSnarlManipulator.h.

Referenced by GetPrimaryTrack(), and SetPrimaryTrackCriteria().

Int_t ANtpSnarlManipulator::fUseNPlanesShower [private]
 

Definition at line 46 of file ANtpSnarlManipulator.h.

Referenced by GetPrimaryShower(), and SetPrimaryShowerCriteria().

Int_t ANtpSnarlManipulator::fUseNPlanesTrack [private]
 

Definition at line 48 of file ANtpSnarlManipulator.h.

Referenced by GetPrimaryTrack(), and SetPrimaryTrackCriteria().

Int_t ANtpSnarlManipulator::fUsePHShower [private]
 

Definition at line 45 of file ANtpSnarlManipulator.h.

Referenced by SetPrimaryShowerCriteria().

Int_t ANtpSnarlManipulator::fUsePHTrack [private]
 

Definition at line 47 of file ANtpSnarlManipulator.h.

Referenced by SetPrimaryTrackCriteria().


The documentation for this class was generated from the following files:
Generated on Fri Mar 28 15:54:27 2008 for loon by  doxygen 1.3.9.1