]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONEventReconstructor.cxx
Comments updated
[u/mrichter/AliRoot.git] / MUON / AliMUONEventReconstructor.cxx
index b087050b33d1a32bf98b3624f53ac36d94e94d4a..e00e585606c248768c131655af49a5346bf37345 100644 (file)
 
 /*
 $Log$
+Revision 1.16  2000/10/24 09:22:35  gosset
+Method AddHitsForRecFromRawClusters: real Z of raw cluster and not Z of chamber
+
+Revision 1.15  2000/10/12 15:17:30  gosset
+Sign of fSimpleBValue corrected: sign ox Bx and not Bz (thanks to Galina)
+
+Revision 1.14  2000/10/04 18:21:26  morsch
+Include stdlib.h
+
+Revision 1.13  2000/10/02 21:28:09  fca
+Removal of useless dependecies via forward declarations
+
 Revision 1.12  2000/10/02 16:58:29  egangler
 Cleaning of the code :
 -> coding conventions
@@ -98,6 +110,7 @@ Addition of files for track reconstruction in C++
 //__________________________________________________________________________
 
 #include <iostream.h>
+#include <stdlib.h>
 
 #include <TRandom.h>
 #include <TFile.h>
@@ -162,11 +175,11 @@ AliMUONEventReconstructor::AliMUONEventReconstructor(void)
   fRecTrackHitsPtr = new TClonesArray("AliMUONTrack", 100);
   fNRecTrackHits = 0; // really needed or GetEntriesFast sufficient ????
 
-  // Sign of fSimpleBValue according to sign of value at (50,50,950).
+  // Sign of fSimpleBValue according to sign of Bx value at (50,50,950).
   Float_t b[3], x[3];
   x[0] = 50.; x[1] = 50.; x[2] = 950.;
   gAlice->Field()->Field(x, b);
-  fSimpleBValue = TMath::Sign(fSimpleBValue,(Double_t) b[2]);
+  fSimpleBValue = TMath::Sign(fSimpleBValue,(Double_t) b[0]);
   // See how to get fSimple(BValue, BLength, BPosition)
   // automatically calculated from the actual magnetic field ????
 
@@ -261,7 +274,7 @@ Double_t AliMUONEventReconstructor::GetImpactParamFromBendingMomentum(Double_t B
   // Returns impact parameter at vertex in bending plane (cm),
   // from the signed bending momentum "BendingMomentum" in bending plane (GeV/c),
   // using simple values for dipole magnetic field.
-  // The sign is the sign of the charge.
+  // The sign of "BendingMomentum" is the sign of the charge.
   return (-0.0003 * fSimpleBValue * fSimpleBLength * fSimpleBPosition /
          BendingMomentum);
 }
@@ -270,9 +283,9 @@ Double_t AliMUONEventReconstructor::GetImpactParamFromBendingMomentum(Double_t B
 Double_t AliMUONEventReconstructor::GetBendingMomentumFromImpactParam(Double_t ImpactParam)
 {
   // Returns signed bending momentum in bending plane (GeV/c),
+  // the sign being the sign of the charge for particles moving forward in Z,
   // from the impact parameter "ImpactParam" at vertex in bending plane (cm),
   // using simple values for dipole magnetic field.
-  // The sign is the sign of the charge.
   return (-0.0003 * fSimpleBValue * fSimpleBLength * fSimpleBPosition /
          ImpactParam);
 }
@@ -704,9 +717,8 @@ void AliMUONEventReconstructor::AddHitsForRecFromRawClusters(TTree* TR)
       //  original raw cluster
       hitForRec->SetChamberNumber(ch);
       hitForRec->SetHitNumber(iclus);
-      // Z coordinate of the chamber (cm)
-      // could (should) be more exact from chamber geometry ???? 
-      hitForRec->SetZ((&(pMUON->Chamber(ch)))->Z());
+      // Z coordinate of the raw cluster (cm)
+      hitForRec->SetZ(clus->fZ[0]);
       if (fPrintLevel >= 10) {
        cout << "chamber (0...): " << ch <<
          " raw cluster (0...): " << iclus << endl;