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

AtNuReco/HitCam.cxx

Go to the documentation of this file.
00001 
00002 // Package: AtNuReco
00003 //
00004 // HitCam.cxx
00005 //
00006 // chapman@hep.phy.cam.ac.uk
00007 // blake@hep.phy.cam.ac.uk
00009 #include "AtNuReco/HitCam.h"
00010 #include "Validity/VldContext.h"
00011 #include <cmath>
00012 
00013 ClassImp(HitCam)
00014   
00015   //CVSID("$Id: HitCam.cxx,v 1.2 2006/06/05 01:30:44 rhatcher Exp $");
00016 
00017 
00018 HitCam::HitCam(CandStripHandle* strip) :
00019    fStrip(0), fUid(0), 
00020    fPlaneView(-1), fStripNum(-1), fTime(-999.), fTrackFlag(0), 
00021    fShowerFlag(0), fCharge(0.), fPlane(-1), fTPos(-1), fZPos(-1)
00022 {
00023   if(strip) {
00024     fStrip=strip;
00025     fTime=1.0e9*strip->GetTime();
00026     fStripNum = strip->GetStrip();
00027     fCharge = strip->GetCharge();
00028     fPlane = strip->GetPlane();
00029     fTPos = strip->GetTPos();
00030     fZPos = strip->GetZPos();
00031     
00032     if( strip->GetPlaneView()==PlaneView::kU
00033         || strip->GetPlaneView()==PlaneView::kX
00034         || strip->GetPlaneView()==PlaneView::kA ) {fPlaneView=0;}
00035     if( strip->GetPlaneView()==PlaneView::kV
00036         || strip->GetPlaneView()==PlaneView::kY
00037         || strip->GetPlaneView()==PlaneView::kB ) {fPlaneView=1;}
00038   }
00039   
00040 }
00042 
00043 
00045 HitCam::~HitCam()
00046 {
00047 }
00049 
00050 
00052 int HitCam::IsShwAssoc(HitCam* hit) const
00053 {
00054   double win=99.9;
00055   if(fStrip!=0)
00056     {
00057       if( fabs(hit->GetTime()-this->GetTime())<win )
00058         {
00059           if( abs(hit->GetPlane()-this->GetPlane())<3 && abs(hit->GetStrip()-this->GetStrip())<4 )
00060             {
00061               return 2;
00062             }
00063           else if( abs(hit->GetPlane()-this->GetPlane())<5 && abs(hit->GetStrip()-this->GetStrip())<6 )
00064             {
00065               return 1;
00066             }
00067         }
00068     }
00069   return 0;
00070 }
00072 
00073 
00075 int HitCam::IsDiffuseShwAssoc(HitCam* hit) const
00076 {
00077   double win=99.9;
00078   if(fStrip!=0)
00079     {
00080       if( fabs(hit->GetTime()-this->GetTime())<win )
00081         {
00082           if( abs(hit->GetPlane()-this->GetPlane())<5 && abs(hit->GetStrip()-this->GetStrip())<11 )
00083             {
00084               return 2;
00085             }
00086           else if( abs(hit->GetPlane()-this->GetPlane())<9 && abs(hit->GetStrip()-this->GetStrip())<21 )
00087             {
00088               return 1;
00089             }
00090         }
00091     }
00092   return 0;
00093 }
00095 
00096 
00098 

Generated on Thu Nov 1 11:50:59 2007 for loon by  doxygen 1.3.9.1