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

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)
NtpSRTrackGetPrimaryTrackNS ()
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 CondensedNtpModuleAtm::Ana(), CondensedNtpModule::Ana(), VtxFinderAna::Analyze(), ANtpTrackInfoAna::Analyze(), ANtpShowerInfoAna::Analyze(), ANtpAnalysisInfoAna::Analyze(), AnalysisInfoAna::Analyze(), ANtpInfoObjectFillerNC::FillEventTimingAndActivityInformation(), ANtpInfoObjectFillerNC::FillInformation(), ANtpInfoObjectFillerNC::FillVHSEvtInfo(), NtpVtxFinder::FindVertex(), and NueAnalysisCuts::SetNtpInfoObjects().

00058 {
00059   return fNtpSREvent;
00060 }

NtpSRShower * ANtpEventManipulator::GetPrimaryShower  ) 
 

Definition at line 182 of file ANtpEventManipulator.cxx.

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

Referenced by CondensedNtpModule::Ana(), ANtpShowerInfoAna::Analyze(), ANtpAnalysisInfoAna::Analyze(), AnalysisInfoAna::Analyze(), ANtpInfoObjectFillerNC::FillEventTimingAndActivityInformation(), ANtpInfoObjectFillerNC::FillInformation(), and NueAnalysisCuts::SetNtpInfoObjects().

00183 {
00184   
00185   NtpSRShower *ntpShower = 0;
00186   NtpSRShower *primaryShower = 0;
00187   
00188   if(!fNtpSREvent){
00189     MSG("ANtpEventManipulator", Msg::kWarning) << "No NtpSREvent to get a NtpSRShower from"
00190                                                << " - returning empty pointer" << endl;
00191     return ntpShower;
00192   } 
00193   
00194   for(Int_t i = 0; i < fNtpSREvent->nshower; ++i){
00195     
00196     ntpShower = dynamic_cast<NtpSRShower *>(fShowerArray->At(fNtpSREvent->shw[i]));
00197     
00198     //if you dont already have a candidate, make this Shower it
00199     if(!primaryShower) primaryShower = ntpShower;
00200     
00201     //check to see if this Shower is better than the best so far.  the fUseXXX
00202     //variables are set to 1. or 0. depending on if they should be used to 
00203     //determine which is the primary Shower
00204 //     if(ntpShower->plane.n > primaryShower->plane.n*fUseNPlanesShower
00205 //        && ntpShower->ph.sigmap > primaryShower->ph.sigmap*fUsePHShower)
00206 //       primaryShower = ntpShower;
00207     
00208   }//end loop over Showers in the event
00209   
00210   return primaryShower;
00211   
00212 }

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 CondensedNtpModuleAtm::Ana(), CondensedNtpModule::Ana(), VtxFinderAna::Analyze(), ANtpAnalysisInfoAna::Analyze(), ANtpInfoObjectFillerNC::FillEventTimingAndActivityInformation(), ANtpInfoObjectFillerNC::FillInformation(), and NtpVtxFinder::FindVertex().

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 }

NtpSRTrack * ANtpEventManipulator::GetPrimaryTrackNS  ) 
 

Definition at line 143 of file ANtpEventManipulator.cxx.

References NtpSRPlane::beg, NtpSRPlane::end, fNtpSREvent, fTrackArray, len, MSG, NtpSREvent::ntrack, NtpSRTrack::plane, and NtpSREvent::trk.

Referenced by ANtpInfoObjectFillerNC::FillCrossOverInformation(), and ANtpInfoObjectFillerNC::FillTrackInformation().

00144 {
00145   NtpSRTrack *primaryTrack = 0;
00146   NtpSRTrack *ntpTrack = 0;
00147 
00148   Int_t    index  = 0;
00149   Double_t lenmax =-999;
00150   
00151   if(!fNtpSREvent){
00152     MSG("ANtpEventManipulator", Msg::kWarning) << "No NtpSREvent to get a NtpSRTrack from"
00153                                                << " - returning empty pointer" << endl;
00154     return primaryTrack;
00155   } 
00156   
00157   for(Int_t i = 0; i < fNtpSREvent->ntrack; ++i){
00158     
00159 //     MSG("ANtpEventManipulator", Msg::kInfo) << "current track = " << i 
00160 //                                           << "/" << fNtpSREvent->ntrack << endl;
00161     
00162     index = fNtpSREvent->trk[i];
00163     
00164 //     MSG("ANtpEventManipulator", Msg::kInfo) << "current track index = " << index 
00165 //                                           << "/" << fNtpSREvent->ntrack << endl;
00166     
00167     ntpTrack = dynamic_cast<NtpSRTrack *>(fTrackArray->At(index));
00168     Double_t len = ntpTrack->plane.end-ntpTrack->plane.beg+1;
00169         
00170     if(len>=lenmax) {
00171      lenmax=len;
00172      primaryTrack = ntpTrack;
00173     }
00174        
00175   }//end loop over tracks in the event
00176   
00177   return primaryTrack;
00178   
00179 }

NtpSRShower * ANtpEventManipulator::GetShower Int_t  index  ) 
 

Definition at line 82 of file ANtpEventManipulator.cxx.

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

Referenced by ANtpShowerInfoAna::Analyze().

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 216 of file ANtpEventManipulator.cxx.

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

Referenced by CondensedNtpModule::Ana().

00217 {
00218   NtpSRStrip *ntpStrip = 0;
00219 
00220   if(!fNtpSREvent){
00221     MSG("ANtpEventManipulator", Msg::kWarning) << "No NtpSREvent to get a NtpSRStrip from"
00222                                                << " - returning empty pointer" << endl;
00223     return ntpStrip;
00224   }
00225   
00226   if(index < fNtpSREvent->nstrip)
00227     ntpStrip = dynamic_cast<NtpSRStrip *>(fStripArray->At(fNtpSREvent->stp[index]));
00228   
00229   return ntpStrip;
00230 }

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 257 of file ANtpEventManipulator.cxx.

References fEventArray, fNtpSREvent, and MSG.

Referenced by CondensedNtpModuleAtm::Ana(), CondensedNtpModule::Ana(), VtxFinderAna::Analyze(), ANtpTrackInfoAna::Analyze(), ANtpShowerInfoAna::Analyze(), ANtpAnalysisInfoAna::Analyze(), AnalysisInfoAna::Analyze(), ANtpInfoObjectFillerNC::FillEventTimingAndActivityInformation(), ANtpInfoObjectFillerNC::FillInformation(), NtpVtxFinder::FindVertex(), and NueAnalysisCuts::SetNtpInfoObjects().

00258 {
00259   //check that such an event exists
00260   if(eventIndex < fEventArray->GetLast()+1) 
00261     fNtpSREvent = dynamic_cast<NtpSREvent *>(fEventArray->At(eventIndex));
00262   else{
00263     MSG("ANtpEventManipulator", Msg::kWarning) << "invalid event index, "
00264                                                << eventIndex << "/" 
00265                                                << fEventArray->GetLast()+1 
00266                                                << " set to first event in array" 
00267                                                << endl;
00268     fNtpSREvent = dynamic_cast<NtpSREvent *>(fEventArray->At(0));
00269   }
00270 
00271   return;
00272 }

void ANtpEventManipulator::SetPrimaryShowerCriteria Int_t  useNPlanes,
Int_t  usePH
 

Definition at line 248 of file ANtpEventManipulator.cxx.

References fUseNPlanesShower, and fUsePHShower.

Referenced by ANtpRecoNtpManipulator::SetPrimaryShowerCriteria().

00249 {
00250   fUseNPlanesShower = useNPlanes;
00251   fUsePHShower = usePH;
00252   
00253   return;
00254 }

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

Definition at line 237 of file ANtpEventManipulator.cxx.

References fUseLengthTrack, fUseNPlanesTrack, and fUsePHTrack.

Referenced by ANtpRecoNtpManipulator::SetPrimaryTrackCriteria().

00239 {
00240   fUseLengthTrack = useLength;
00241   fUseNPlanesTrack = useNPlanes;
00242   fUsePHTrack = usePH;
00243   
00244   return;
00245 }


Member Data Documentation

TClonesArray* ANtpEventManipulator::fEventArray [private]
 

Definition at line 43 of file ANtpEventManipulator.h.

Referenced by Initialize(), and SetEventInSnarl().

NtpSREvent* ANtpEventManipulator::fNtpSREvent [private]
 

Definition at line 41 of file ANtpEventManipulator.h.

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

TClonesArray* ANtpEventManipulator::fShowerArray [private]
 

Definition at line 45 of file ANtpEventManipulator.h.

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

TClonesArray* ANtpEventManipulator::fStripArray [private]
 

Definition at line 46 of file ANtpEventManipulator.h.

Referenced by GetStrip(), and Initialize().

TClonesArray* ANtpEventManipulator::fTrackArray [private]
 

Definition at line 44 of file ANtpEventManipulator.h.

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

Int_t ANtpEventManipulator::fUseLengthTrack [private]
 

Definition at line 48 of file ANtpEventManipulator.h.

Referenced by GetPrimaryTrack(), and SetPrimaryTrackCriteria().

Int_t ANtpEventManipulator::fUseNPlanesShower [private]
 

Definition at line 50 of file ANtpEventManipulator.h.

Referenced by SetPrimaryShowerCriteria().

Int_t ANtpEventManipulator::fUseNPlanesTrack [private]
 

Definition at line 52 of file ANtpEventManipulator.h.

Referenced by GetPrimaryTrack(), and SetPrimaryTrackCriteria().

Int_t ANtpEventManipulator::fUsePHShower [private]
 

Definition at line 49 of file ANtpEventManipulator.h.

Referenced by SetPrimaryShowerCriteria().

Int_t ANtpEventManipulator::fUsePHTrack [private]
 

Definition at line 51 of file ANtpEventManipulator.h.

Referenced by SetPrimaryTrackCriteria().


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 15:00:22 2008 for loon by  doxygen 1.3.9.1