WCSimRecoVertex.cc

Go to the documentation of this file.
00001 #include "WCSimRecoVertex.hh"
00002 
00003 #include "WCSimRecoObjectTable.hh"
00004 
00005 ClassImp(WCSimRecoVertex)
00006 
00007 WCSimRecoVertex::WCSimRecoVertex()
00008 {
00009   this->Reset();
00010 
00011   WCSimRecoObjectTable::Instance()->NewVertex();
00012 }
00013 
00014 WCSimRecoVertex::WCSimRecoVertex( Double_t x, Double_t y, Double_t z )
00015 {
00016   this->Reset();
00017   
00018   this->SetVertex(x,y,z);
00019   this->SetFOM(0.0,1,1);
00020 
00021   WCSimRecoObjectTable::Instance()->NewVertex();
00022 }
00023   
00024 WCSimRecoVertex::WCSimRecoVertex( Double_t x, Double_t y, Double_t z, Double_t px, Double_t py, Double_t pz )
00025 {
00026   this->Reset();
00027 
00028   this->SetVertex(x,y,z);
00029   this->SetDirection(px,py,pz);
00030   this->SetFOM(0.0,1,1);
00031   
00032   WCSimRecoObjectTable::Instance()->NewVertex();
00033 }
00034 
00035 
00036 WCSimRecoVertex::WCSimRecoVertex(Double_t x, Double_t y, Double_t z, Double_t t, Double_t px, Double_t py, Double_t pz, Double_t fom, Int_t nsteps, Bool_t pass, Int_t status )
00037 {
00038   this->Reset();
00039 
00040   this->SetVertex(x,y,z);
00041   this->SetDirection(px,py,pz);
00042   this->SetFOM(fom,nsteps,pass);
00043   this->SetStatus(status);
00044 
00045   WCSimRecoObjectTable::Instance()->NewVertex();
00046 }
00047 
00048 WCSimRecoVertex::WCSimRecoVertex(Double_t x, Double_t y, Double_t z, Double_t t, Double_t px, Double_t py, Double_t pz, Double_t angle, Double_t length, Double_t fom, Int_t nsteps, Bool_t pass, Int_t status )
00049 {
00050   this->Reset();
00051 
00052   this->SetVertex(x,y,z,t);
00053   this->SetDirection(px,py,pz);
00054   this->SetConeAngle(angle);
00055   this->SetTrackLength(length);
00056   this->SetFOM(fom,nsteps,pass);
00057   this->SetStatus(status);
00058 
00059   WCSimRecoObjectTable::Instance()->NewVertex();
00060 }
00061 
00062 WCSimRecoVertex::~WCSimRecoVertex()
00063 {
00064   WCSimRecoObjectTable::Instance()->DeleteVertex();
00065 }
00066 
00067 void WCSimRecoVertex::SetVertex( Double_t x, Double_t y, Double_t z )
00068 {
00069   this->SetVertex(x,y,z,950.0);
00070 }
00071 
00072 void WCSimRecoVertex::SetVertex( Double_t x, Double_t y, Double_t z, Double_t t )
00073 {
00074   fX = x;
00075   fY = y;
00076   fZ = z;
00077   fTime  = t;
00078   fFoundVertex = 1;
00079 }
00080 
00081 void WCSimRecoVertex::SetDirection( Double_t px, Double_t py, Double_t pz )
00082 {
00083   fDirX = px;
00084   fDirY = py;
00085   fDirZ = pz;
00086   fFoundDirection = 1;
00087 }
00088 
00089 void WCSimRecoVertex::SetConeAngle( Double_t angle )
00090 {
00091   fConeAngle = angle;
00092 }
00093 
00094 void WCSimRecoVertex::SetTrackLength( Double_t length )
00095 {
00096   fTrackLength = length;
00097 }
00098 
00099 void WCSimRecoVertex::SetFOM( Double_t fom, Int_t nsteps, Bool_t pass )
00100 {
00101   fFOM = fom;
00102   fIterations = nsteps;
00103   fPass = pass;
00104 }
00105 
00106 void WCSimRecoVertex::SetStatus( Int_t status )
00107 {
00108   fStatus = status;
00109 }
00110 
00111 void WCSimRecoVertex::Reset()
00112 { 
00113   fX = 0.0;
00114   fY = 0.0;
00115   fZ = 0.0;
00116   fTime = 950.0;
00117   fFoundVertex = 0;
00118 
00119   fDirX = 0.0;
00120   fDirY = 0.0;
00121   fDirZ = 0.0;
00122   fFoundDirection = 0;
00123 
00124   fConeAngle = 42.0;
00125   fTrackLength = 0.0;
00126 
00127   fFOM = 0.0;
00128   fIterations = 0;
00129   fPass = 0;
00130   
00131   fStatus = WCSimRecoVertex::kOK;
00132 }
00133