SelectEvent.h File Reference

Go to the source code of this file.

Functions

bool SelectEvent (const CandEventHandle *event)
bool SelectCosmicEvent (const CandEventHandle *event)
const CandTrackHandleGetRemovableTrack (const CandEventHandle *event)
CandTrackHandleGetRemovableTrack (CandEventHandle *event, CandTrackListHandle *tracklist)
bool TrackEndContained (const CandTrackHandle *track)
int GetMaxTrackLikePlane (const CandEventHandle *event, const CandTrackHandle *track, int n)

Function Documentation

int GetMaxTrackLikePlane ( const CandEventHandle event,
const CandTrackHandle track,
int  n 
)
CandTrackHandle* GetRemovableTrack ( CandEventHandle event,
CandTrackListHandle tracklist 
)

Definition at line 52 of file SelectEvent.cxx.

References CandHandle::GetDaughterIterator(), CandRecoHandle::GetEndPlane(), and CandRecoHandle::GetVtxPlane().

00053                                                                   {
00054   
00055   const int ntracks = event->GetLastTrack()+1;
00056   const CandTrackHandle* rc = NULL;
00057   int nplanes = 0;
00058   
00059   for(int itrack = 0; itrack<ntracks && !rc; ++itrack){
00060     const CandTrackHandle* track = event->GetTrack(itrack);
00061     if(track==NULL)continue;
00062     int tpln = abs(track->GetEndPlane() - track->GetVtxPlane());
00063     if(tpln>nplanes){
00064       nplanes = tpln;
00065       rc = track;
00066     }
00067   }
00068   
00069   CandTrackHandle *cth = NULL;
00070   CandTrackHandleItr tlIter(tracklist->GetDaughterIterator());
00071   while(CandTrackHandle *cth_test = dynamic_cast<CandTrackHandle*>(tlIter())){
00072     if(cth_test->IsEqual(rc)){
00073       cth = cth_test;
00074       break;
00075     }
00076   }
00077   return cth;
00078 }

const CandTrackHandle* GetRemovableTrack ( const CandEventHandle event  ) 

Definition at line 35 of file SelectEvent.cxx.

References CandRecoHandle::GetEndPlane(), and CandRecoHandle::GetVtxPlane().

Referenced by RemoveMuon::Ana(), MergeEvent::Reco(), AlgMuonRemoval::RunAlg(), AlgCosmicMuonRemoval::RunAlg(), and AlgRmMuList::RunAlg().

00035                                                                       {
00036   const int ntracks = event->GetLastTrack()+1;
00037   const CandTrackHandle* rc = NULL;
00038   int nplanes = 0;
00039 
00040   for(int itrack = 0; itrack<ntracks && !rc; ++itrack){
00041     const CandTrackHandle* track = event->GetTrack(itrack);
00042     if(track==NULL)continue;
00043     int tpln = abs(track->GetEndPlane() - track->GetVtxPlane());
00044     if(tpln>nplanes){
00045       nplanes = tpln;
00046       rc = track;
00047     }    
00048   }
00049   return rc;
00050 }

bool SelectCosmicEvent ( const CandEventHandle event  ) 

Definition at line 28 of file SelectEvent.cxx.

Referenced by AlgCosmicMuonRemoval::RunAlg().

00028                                                      {
00029   const int nshowers = event->GetLastShower();
00030   const int ntracks = event->GetLastTrack();
00031   return ((nshowers>=0)&&(ntracks>=0));
00032 }

bool SelectEvent ( const CandEventHandle event  ) 

Definition at line 18 of file SelectEvent.cxx.

Referenced by RemoveMuon::Ana(), MergeEvent::Reco(), AlgMuonRemoval::RunAlg(), and AlgRmMuList::RunAlg().

00019 {
00020   
00021   const int ntracks = event->GetLastTrack();
00022   return (ntracks>=0);
00023 
00024 }

bool TrackEndContained ( const CandTrackHandle track  ) 

Definition at line 81 of file SelectEvent.cxx.

References MuELoss::a, VldContext::GetDetector(), CandRecoHandle::GetEndPlane(), CandRecoHandle::GetEndU(), CandRecoHandle::GetEndV(), CandRecoHandle::GetEndZ(), CandHandle::GetVldContext(), Detector::kFar, and Detector::kNear.

Referenced by RemoveMuon::Ana(), and AlgRmMu::RunAlg().

00081                                                     {
00082   if(track->GetVldContext()->GetDetector()==Detector::kNear){    
00083     //pitt fiducial volume for ND
00084     Float_t trk_u  = track->GetEndU();
00085     Float_t trk_v  = track->GetEndV();
00086     Float_t trk_x = 0.70710678*(trk_u - trk_v);
00087     Float_t trk_y = 0.70710678*(trk_u + trk_v);    
00088     Float_t trk_z = track->GetEndZ();
00089     Float_t trk_r2 = trk_x*trk_x + trk_y*trk_y;
00090     Bool_t endc = false;
00091     if(trk_z<7.0) {
00092       if( trk_u>0.3 && trk_u<1.8 && trk_v>-1.8 && trk_v<-0.3 &&
00093           trk_x<2.4 && trk_r2>0.8*0.8 ) endc = true;
00094       else endc = false;
00095     }
00096     else{
00097       static const Float_t coil_cut=0.8*0.8;
00098       static const Float_t x0=0.8;
00099       static const Float_t y0=0.0;
00100       static const Float_t a=1.7;
00101       static const Float_t b=1.4;
00102       const Float_t xsc = (trk_x-x0)/a; // rescale ellipse to unit circle
00103       const Float_t ysc = (trk_y-y0)/b;
00104       if( (sqrt(xsc*xsc + ysc*ysc)<1.0) &&
00105           (trk_r2>coil_cut) && (trk_z<15.6) ) endc = true;
00106       else endc = false;
00107     }
00108 
00109     if(endc) return true;
00110     return false;
00111   }
00112   else if(track->GetVldContext()->GetDetector()==Detector::kFar){
00113     if(track->GetEndPlane()>475) return false;
00114     if(TMath::Power(track->GetEndU(),2) + 
00115        TMath::Power(track->GetEndV(),2) > 12.25) return false;
00116     return true;
00117   }
00118   return false;
00119 }


Generated on 22 Nov 2017 for loon by  doxygen 1.6.1