]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/src/AliL3VertexFinder.cxx
Copy constructor and assignment operator are added
[u/mrichter/AliRoot.git] / HLT / src / AliL3VertexFinder.cxx
index 70cd3591215f92afab452b135198d25a566a4ee8..ade080673c3f90cebee281d9daaacc7eaaf49f7d 100644 (file)
@@ -1,14 +1,21 @@
+// @(#) $Id$
+
 // Author: Uli Frankenfeld <mailto:franken@fi.uib.no>
-//*-- Copyright &copy Uli
+//*-- Copyright &copy ALICE HLT Group
 
 #include "AliL3StandardIncludes.h"
-
+#include "AliL3RootTypes.h"
+#include "AliL3SpacePointData.h"
+#include "AliL3VertexData.h"
 #include "AliL3Logging.h"
 #include "AliL3VertexArray.h"
 #include "AliL3Vertex.h"
 #include "AliL3VertexFinder.h"
 #include "AliL3SpacePointData.h"
+#include "AliL3Transform.h"
 
+/** \class AliL3VertexFinder
+<pre>
 //_____________________________________________________________
 // AliL3VertexFinder
 //
 //   SetZErr(GetZErrSector());
 // 
 //
+</pre>
+*/
+
+#if __GNUC__ >= 3
+using namespace std;
+#endif
 
 ClassImp(AliL3VertexFinder)
-AliL3VertexFinder::AliL3VertexFinder(){
+
+AliL3VertexFinder::AliL3VertexFinder()
+{
   //
   // default constructor for the AliL3VertexFinder class. 
   //
@@ -39,38 +54,46 @@ AliL3VertexFinder::AliL3VertexFinder(){
   SetZErr(1);
   fR=0;
   fPhi=0;
-
   fMWxy = 1.;
-    
 }
 
-AliL3VertexFinder::~AliL3VertexFinder(){
+AliL3VertexFinder::~AliL3VertexFinder()
+{
   //
   // destructor
   //
 }
 
-void AliL3VertexFinder::Reset(){
+void AliL3VertexFinder::Reset()
+{
+  //
+  // Reset
+  //
   ResetSector();
 }
 
 
-void AliL3VertexFinder::Read(Int_t ncluster, AliL3SpacePointData* hits ){
+void AliL3VertexFinder::Read(Int_t ncluster, AliL3SpacePointData* hits )
+{
   //
   //  analyze sector 
   // 
   
-  const Int_t seedRow = 175
-  const Int_t firstRow = seedRow-32;
+  const Int_t kseedRow = AliL3Transform::GetNRows() - 1
+  const Int_t kfirstRow = kseedRow-32;
   for(Int_t n=0;n<ncluster;n++){
-    if(hits[n].fPadRow==seedRow)
+    if(hits[n].fPadRow==kseedRow)
       FillSectorSeed3D(hits[n].fX,hits[n].fY,hits[n].fZ);  //copy seeds in 3D
-    if(hits[n].fPadRow<=seedRow && hits[n].fPadRow>=firstRow)
+    if(hits[n].fPadRow<=kseedRow && hits[n].fPadRow>=kfirstRow)
       FillSector3D(hits[n].fX,hits[n].fY,hits[n].fZ);  //copy data in 3D
   }
 }
 
-void AliL3VertexFinder::Analyze(){
+void AliL3VertexFinder::Analyze()
+{
+  //
+  // analyze all
+  //
   FindSectorVertex();
   SetZ(GetZSector());
   SetZErr(GetZSectorErr());
@@ -78,7 +101,11 @@ void AliL3VertexFinder::Analyze(){
   <<AliL3Log::kDec<<"Vertex: "<<GetZ()<<"  RMS: "<<GetZErr()<<ENDLOG;
 }
 
-void AliL3VertexFinder::Write(AliL3Vertex *vertex){
+void AliL3VertexFinder::Write(AliL3Vertex *vertex) const
+{
+  //
+  // write
+  //
   vertex->SetX(GetX());
   vertex->SetY(GetZ());
   vertex->SetZ(GetZ());
@@ -89,7 +116,11 @@ void AliL3VertexFinder::Write(AliL3Vertex *vertex){
   vertex->SetXYWeight(GetXYWeight());
 }
 
-void AliL3VertexFinder::Write(AliL3VertexData *vertex){
+void AliL3VertexFinder::Write(AliL3VertexData *vertex) const
+{
+  //
+  // write
+  //
   vertex->fX=GetX();
   vertex->fY=GetZ();
   vertex->fZ=GetZ();