]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFtrackerV1.cxx
Added a new method to reset the digit indices in a TOF volume
[u/mrichter/AliRoot.git] / TOF / AliTOFtrackerV1.cxx
index b4a6254f134c6a448ef16a6eb6459ec2ef235e82..564027a34d766ec24fbebc798a48a86bd0beff30 100644 (file)
 #include <TFile.h>
 #include <TH1F.h>
 #include <TH2F.h>
+#include <TSeqCollection.h>
 
-#include "AliAlignObj.h"
+//#include "AliAlignObj.h"
 #include "AliESDtrack.h"
 #include "AliESDEvent.h"
 #include "AliLog.h"
 #include "AliTrackPointArray.h"
+#include "AliGeomManager.h"
+#include "AliCDBManager.h"
 
 #include "AliTOFcalib.h"
 #include "AliTOFRecoParam.h"
@@ -47,6 +50,7 @@
 #include "AliTOFGeometry.h"
 #include "AliTOFtrackerV1.h"
 #include "AliTOFtrack.h"
+#include "AliTOFpidESD.h"
 
 extern TROOT *gROOT;
 
@@ -160,7 +164,9 @@ AliTOFtrackerV1::~AliTOFtrackerV1() {
 
   SaveCheckHists();
 
-  delete fRecoParam; 
+  if(!(AliCDBManager::Instance()->GetCacheFlag())){
+    delete fRecoParam;
+  }
   delete fPid; 
   delete fHDigClusMap;
   delete fHDigNClus;
@@ -332,7 +338,7 @@ void AliTOFtrackerV1::MatchTracks( ){
   Float_t dY=AliTOFGeometry::XPad(); 
   Float_t dZ=AliTOFGeometry::ZPad(); 
 
-  const Int_t ncmax = 100;
+  const Int_t kncmax = 100;
   Float_t sensRadius = fRecoParam->GetSensRadius();
   Float_t scaleFact   = fRecoParam->GetWindowScaleFact();
   Float_t dyMax=fRecoParam->GetWindowSizeMaxY(); 
@@ -376,11 +382,11 @@ void AliTOFtrackerV1::MatchTracks( ){
 
     // find the clusters inside the selected window 
     Int_t nc=0;
-    AliTOFcluster *clusters[ncmax]; // pointers to the clusters in the window
-    Int_t index[ncmax];//to keep track of the cluster index
+    AliTOFcluster *clusters[kncmax]; // pointers to the clusters in the window
+    Int_t index[kncmax];//to keep track of the cluster index
     for (Int_t k=FindClusterIndex(z-dz); k<fN; k++) {  
       AliTOFcluster *c=fClusters[k];
-      if(nc>ncmax)break;
+      if(nc>kncmax)break;
       if(c->GetZ() > z+dz) break;
       if(c->IsUsed()) continue;      
       if(!c->GetStatus()) continue; // skip bad channels as declared in OCDB