]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFtrackerMI.cxx
New files: import hits from FPD, PMD and VZERO.
[u/mrichter/AliRoot.git] / TOF / AliTOFtrackerMI.cxx
index 0bb5fb65801e2857f75701722eee0fced3d89fac..698429dfa47840fe45ecc77cb27eb6a1ebe60fb2 100644 (file)
  * about the suitability of this software for any purpose. It is          *
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
-// AliTOFtracker Class
-// Task: Perform association of the ESD tracks to TOF Clusters
-// and Update ESD track with associated TOF Cluster parameters 
-//
-//--------------------------------------------------------------------
+
+//-----------------------------------------------------------------//
+//                                                                 //
+//   AliTOFtracker Class                                           //
+//   Task: Perform association of the ESD tracks to TOF Clusters   //
+//   and Update ESD track with associated TOF Cluster parameters   //
+//                                                                 //
+//-----------------------------------------------------------------//
 
 #include <Rtypes.h>
-#include "AliTOFtrackerMI.h"
-#include "AliTOFtrack.h"
+
 #include "TClonesArray.h"
-#include "TError.h"
-#include "AliTOFdigit.h"
-#include "AliTOFGeometry.h"
-#include "AliTOF.h"
-#include "AliRun.h"
-#include "AliModule.h"
+#include "TGeoManager.h"
+#include "TTree.h"
 #include "TTreeStream.h"
-#include "AliTOFcluster.h"
+
+#include "AliRun.h"
+#include "AliESD.h"
+#include "AliESDtrack.h"
+
 #include "AliTOFcalib.h"
+#include "AliTOFcluster.h"
+#include "AliTOFGeometry.h"
+#include "AliTOFtrackerMI.h"
+#include "AliTOFtrack.h"
+
+extern TGeoManager *gGeoManager;
 
 ClassImp(AliTOFtrackerMI)
 
 //_____________________________________________________________________________
-AliTOFtrackerMI::AliTOFtrackerMI(AliTOFGeometry * geom, Double_t parPID[2]) { 
+AliTOFtrackerMI::AliTOFtrackerMI(AliTOFGeometry * geom, Double_t parPID[2]):
+  fGeom(geom),
+  fTOFpid(new AliTOFpidESD(parPID)),
+  fHoles(kFALSE),
+  fN(0),
+  fNseeds(0),
+  fNseedsTOF(0),
+  fngoodmatch(0),
+  fnbadmatch(0),
+  fnunmatch(0),
+  fnmatch(0),
+  fR(378.), 
+  fTOFHeigth(15.3),  
+  fdCut(3.), 
+  fDx(1.5), 
+  fDy(0), 
+  fDz(0), 
+  fTracks(0x0),
+  fSeeds(0x0),
+  fDebugStreamer(0x0)
+ { 
   //AliTOFtrackerMI main Ctor
 
   //fHoles=true;
-  fNseeds=0;
-  fNseedsTOF=0;
-  fngoodmatch=0;
-  fnbadmatch=0;
-  fnunmatch=0;
-  fnmatch=0;
-  fGeom = geom;
-  fTOFpid = new AliTOFpidESD(parPID);
-  fR=378.; 
-  fTOFHeigth=15.3;  
-  fdCut=3.; 
   fDy=AliTOFGeometry::XPad(); 
   fDz=AliTOFGeometry::ZPad(); 
-  fDx=1.5; 
-  fSeeds=0x0;
-  fTracks=0x0;
-  fN=0;
   fDebugStreamer = new TTreeSRedirector("TOFdebug.root");   
   //Init(); // temporary solution to know about Holes/no Holes
   fHoles=geom->GetHoles();
 }
 //_____________________________________________________________________________
-AliTOFtrackerMI::AliTOFtrackerMI(const AliTOFtrackerMI &t):AliTracker() { 
+AliTOFtrackerMI::AliTOFtrackerMI(const AliTOFtrackerMI &t):
+  AliTracker(),
+  fGeom(0x0),
+  fTOFpid(0x0),
+  fHoles(kFALSE),
+  fN(0),
+  fNseeds(0),
+  fNseedsTOF(0),
+  fngoodmatch(0),
+  fnbadmatch(0),
+  fnunmatch(0),
+  fnmatch(0),
+  fR(378.), 
+  fTOFHeigth(15.3),  
+  fdCut(3.), 
+  fDx(1.5), 
+  fDy(0), 
+  fDz(0), 
+  fTracks(0x0),
+  fSeeds(0x0),
+  fDebugStreamer(0x0)
+ { 
   //AliTOFtrackerMI copy Ctor
 
   fHoles=t.fHoles;
@@ -133,7 +167,7 @@ void AliTOFtrackerMI::Init() {
   AliModule* frame=gAlice->GetModule("FRAME"); 
 
   if(!frame) {
-    Error("Init","Could Not load FRAME! Assume Frame with Holes \n");
+    AliError("Could Not load FRAME! Assume Frame with Holes ");
     fHoles=true;
   } else{
     if(frame->IsVersion()==1) {fHoles=false;}    
@@ -589,7 +623,7 @@ void AliTOFtrackerMI::MatchTracksMI(Bool_t mLastStep){
 
 //   TBranch *branch=dTree->GetBranch("TOF");
 //   if (!branch) { 
-//     Error("LoadClusters"," can't get the branch with the TOF digits !\n");
+//     AliError(" can't get the branch with the TOF digits !");
 //     return 1;
 //   }
 
@@ -702,7 +736,7 @@ Int_t AliTOFtrackerMI::InsertCluster(AliTOFcluster *c) {
   //This function adds a cluster to the array of clusters sorted in Z
   //--------------------------------------------------------------------
   if (fN==kMaxCluster) {
-    Error("InsertCluster","Too many clusters !\n");
+    AliError("Too many clusters !");
     return 1;
   }
 
@@ -764,8 +798,8 @@ Float_t AliTOFtrackerMI::GetLinearDistances(AliTOFtrack * track, AliTOFcluster *
   //
   Double_t v0[3];
   Double_t dir[3];
-  track->GetGlobalXYZ(v0[0],v0[1],v0[2]);
-  track->GetPxPyPz(dir[0],dir[1],dir[2]);
+  track->GetXYZ(v0);
+  track->GetPxPyPz(dir);
   dir[0]/=track->GetP();
   dir[1]/=track->GetP();
   dir[2]/=track->GetP();