add un-use functionality to clusters
[u/mrichter/AliRoot.git] / TOF / AliTOFtrackerMI.cxx
index 7035076..f25c925 100644 (file)
@@ -72,77 +72,6 @@ AliTOFtrackerMI::AliTOFtrackerMI():
    fDz=AliTOFGeometry::ZPad(); 
    fDebugStreamer = new TTreeSRedirector("TOFdebug.root");   
 }
-//_____________________________________________________________________________
-AliTOFtrackerMI::AliTOFtrackerMI(const AliTOFtrackerMI &t):
-  AliTracker(),
-  fRecoParam(0x0),
-  fGeom(0x0),
-  fPid(0x0),
-  fN(0),
-  fNseeds(0),
-  fNseedsTOF(0),
-  fngoodmatch(0),
-  fnbadmatch(0),
-  fnunmatch(0),
-  fnmatch(0),
-  fR(379.), 
-  fTOFHeigth(15.3),  
-  fdCut(3.), 
-  fDx(1.5), 
-  fDy(0), 
-  fDz(0), 
-  fTracks(new TClonesArray("AliTOFtrack")),
-  fSeeds(new TClonesArray("AliESDtrack")),
-  fDebugStreamer(0x0)
- { 
-  //AliTOFtrackerMI copy Ctor
-
-  fNseeds=t.fNseeds;
-  fNseedsTOF=t.fNseedsTOF;
-  fngoodmatch=t.fngoodmatch;
-  fnbadmatch=t.fnbadmatch;
-  fnunmatch=t.fnunmatch;
-  fnmatch=t.fnmatch;
-  fRecoParam = t.fRecoParam;
-  fGeom=t.fGeom;
-  fPid = t.fPid;
-  fR=t.fR; 
-  fTOFHeigth=t.fTOFHeigth;  
-  fdCut=t.fdCut; 
-  fDy=t.fDy; 
-  fDz=t.fDz; 
-  fDx=1.5; 
-  fSeeds=t.fSeeds;
-  fTracks=t.fTracks;
-  fN=t.fN;
-}
-
-//_________________________________________________________________________________
-AliTOFtrackerMI& AliTOFtrackerMI::operator=(const AliTOFtrackerMI &t)
-{ 
-  //AliTOFtrackerMI assignment operator
-
-  this->fNseeds=t.fNseeds;
-  this->fNseedsTOF=t.fNseedsTOF;
-  this->fngoodmatch=t.fngoodmatch;
-  this->fnbadmatch=t.fnbadmatch;
-  this->fnunmatch=t.fnunmatch;
-  this->fnmatch=t.fnmatch;
-  this->fRecoParam = t.fRecoParam;
-  this->fGeom = t.fGeom;
-  this->fPid = t.fPid;
-  this->fR=t.fR; 
-  this->fTOFHeigth=t.fTOFHeigth;  
-  this->fdCut=t.fdCut; 
-  this->fDy=t.fDy;
-  this->fDz=t.fDz;
-  this->fDx=t.fDx;
-  this->fSeeds=t.fSeeds;
-  this->fTracks=t.fTracks;
-  this->fN=t.fN;
-  return *this;
-
-}
 
 //_____________________________________________________________________________
 AliTOFtrackerMI::~AliTOFtrackerMI(){
@@ -184,7 +113,7 @@ Int_t AliTOFtrackerMI::PropagateBack(AliESDEvent* event) {
     AliFatal("No Reco Param found for TOF!!!");
   }
   //fRecoParam->Dump();
-  if(fRecoParam->GetApplyPbPbCuts())fRecoParam=fRecoParam->GetPbPbparam();
+  //if(fRecoParam->GetApplyPbPbCuts())fRecoParam=fRecoParam->GetPbPbparam();
   //fRecoParam->PrintParameters();
 
   Double_t parPID[2];   
@@ -331,10 +260,10 @@ void AliTOFtrackerMI::MatchTracks( Bool_t /*mLastStep*/){
 void AliTOFtrackerMI::MatchTracksMI(Bool_t mLastStep){
 
   //Match ESD tracks to clusters in TOF
-  const Float_t kTofOffset = 26;  // time offset
-  const Float_t kMinQuality        = -6.; // minimal quality
-  const Float_t kMaxQualityD       = 1.;  // max delta quality if cluster used
-  const Float_t kForbiddenR        = 0.1;  // minimal PID according TPC
+  const Float_t kTofOffset   = 26;  // time offset
+  const Float_t kMinQuality  = -6.; // minimal quality
+  const Float_t kMaxQualityD = 1.;  // max delta quality if cluster used
+  const Float_t kForbiddenR  = 0.1; // minimal PID according TPC
 
   static const Double_t kMasses[]={
     0.000511, 0.105658, 0.139570, 0.493677, 0.938272, 1.875613
@@ -420,10 +349,10 @@ void AliTOFtrackerMI::MatchTracksMI(Bool_t mLastStep){
     Float_t scalefact=3.;    
     Double_t dphi=
       scalefact*
-      ((5*TMath::Sqrt(cov[0]) + 3.*fDy +10.*TMath::Abs(par[2]))/fR); 
+      ((5*TMath::Sqrt(cov[0]) + 3.*fDy + 10.*TMath::Abs(par[2]))/fR); 
     Double_t dz=
       scalefact*
-      (5*TMath::Sqrt(cov[2]) + 3.*fDz  +10.*TMath::Abs(par[3]));
+      (5*TMath::Sqrt(cov[2]) + 3.*fDz + 10.*TMath::Abs(par[3]));
     
     Double_t phi=TMath::ATan2(par[0],x) + trackTOFin->GetAlpha();
     if (phi<-TMath::Pi())phi+=2*TMath::Pi();
@@ -457,7 +386,7 @@ void AliTOFtrackerMI::MatchTracksMI(Bool_t mLastStep){
       if (nfound>=1000) break;
       index[nfound]=clind[icl];
       AliTOFcluster *cluster = fClusters[clind[icl]];
-      GetLinearDistances(trackTOFin,cluster, distances);
+      GetLinearDistances(trackTOFin, cluster, distances);
       dist3D[nfound][0] = distances[4];
       dist3D[nfound][1] = distances[1];
       dist3D[nfound][2] = distances[2];
@@ -472,7 +401,7 @@ void AliTOFtrackerMI::MatchTracksMI(Bool_t mLastStep){
       //
       clusters[nfound] = cluster;
       //
-      //length  and TOF updates 
+      //length and TOF updates 
       trackTOFin->GetIntegratedTimes(times[nfound]);
       length[nfound] = trackTOFin->GetIntegratedLength();
       length[nfound]+=distances[4];
@@ -598,6 +527,10 @@ void AliTOFtrackerMI::MatchTracksMI(Bool_t mLastStep){
 
     AliTOFtrack *trackTOFout = new AliTOFtrack(*t); 
     trackTOFout->PropagateTo(379.);
+
+    // Fill the track residual histograms.
+    FillResiduals(trackTOFout,cgold,kFALSE);
+
     t->UpdateTrackParams(trackTOFout,AliESDtrack::kTOFout);    
     t->SetIntegratedLength(length[igold]);
     t->SetIntegratedTimes(times[igold]);