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

HitCamAtNu.cxx

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

Generated on Mon Feb 15 11:06:47 2010 for loon by  doxygen 1.3.9.1