]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/src/AliL3Track.cxx
New class to make V2 clusters starting from digits or hits (fast simulation). Origin...
[u/mrichter/AliRoot.git] / HLT / src / AliL3Track.cxx
index 8d286e786b623eb210d688307d12c33e1364b392..7056ecd4589c2a87305521c1a5aaf901162b2868 100644 (file)
@@ -3,14 +3,14 @@
 // Author: Anders Vestbo <mailto:vestbo$fi.uib.no>, Uli Frankenfeld <mailto:franken@fi.uib.no>
 //*-- Copyright &copy ASV
 
+#include "AliL3StandardIncludes.h"
 
 #include "AliL3RootTypes.h"
-
 #include "AliL3Logging.h"
 #include "AliL3Track.h"
 #include "AliL3Transform.h"
 #include "AliL3Vertex.h"
-#include <math.h>
+
 
 //_____________________________________________________________
 // AliL3Track
@@ -49,7 +49,7 @@ AliL3Track::AliL3Track()
   fIsLocal=true;
   fRowRange[0]=0;
   fRowRange[1]=0;
-  memset(fHitNumbers,0,176*sizeof(UInt_t));
+  memset(fHitNumbers,0,159*sizeof(UInt_t));
 }
 
 void AliL3Track::Set(AliL3Track *tpt){
@@ -65,6 +65,9 @@ void AliL3Track::Set(AliL3Track *tpt){
   SetTgl(tpt->GetTgl());
   SetCharge(tpt->GetCharge());
   SetHits(tpt->GetNHits(),(UInt_t *)tpt->GetHitNumbers());
+#ifdef do_mc
+  SetMCid(tpt->GetMCid());
+#endif
 }
 
 Int_t AliL3Track::Compare(const AliL3Track *track) const
@@ -189,8 +192,9 @@ Double_t AliL3Track::GetCrossingAngle(Int_t padrow)
   tangent[1] = (xyz[0] - GetCenterX())/GetRadius();
   
   Double_t perp_padrow[2] = {1,0}; //locally in slice
-
+  
   Double_t cos_beta = fabs(tangent[0]*perp_padrow[0] + tangent[1]*perp_padrow[1]);
+  if(cos_beta > 1) cos_beta=1;
   return acos(cos_beta);
 }
 
@@ -287,8 +291,8 @@ Bool_t AliL3Track::CalculateReferencePoint(Double_t angle,Double_t radius){
 Bool_t AliL3Track::CalculateEdgePoint(Double_t angle){
   // Global coordinate: crossing point with y = ax; a=tan(angle);
   //
-  Double_t rmin=80;  //min Radius of TPC
-  Double_t rmax=260; //max Radius of TPC
+  Double_t rmin=AliL3Transform::Row2X(AliL3Transform::GetFirstRow(-1));  //min Radius of TPC
+  Double_t rmax=AliL3Transform::Row2X(AliL3Transform::GetLastRow(-1)); //max Radius of TPC
 
   Double_t a = tan(angle);
   Double_t pp=(fCenterX+a*fCenterY)/(1+pow(a,2));