]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFCalibTask.cxx
Do not get main runloader from gAlice
[u/mrichter/AliRoot.git] / TOF / AliTOFCalibTask.cxx
index 09e5b61dc3da7289705b61d69856797182d36a10..dfe0faa9039d9ca620400aa9b8239773c9ab9ad2 100644 (file)
  **************************************************************************/
 /*
 $Log$
+Revision 1.6  2007/10/05 10:44:11  zampolli
+Oversight for debugging purpose fixed
+
+Revision 1.5  2007/10/05 10:38:10  zampolli
+Oversight fixed
+
 Revision 1.4  2007/10/04 15:36:44  zampolli
 Updates to new TOF offline calibration schema
 
@@ -187,8 +193,11 @@ AliTOFCalibTask:: ~AliTOFCalibTask()
   // destructor
 
   AliInfo("TOF Calib Task: Deleting");
+  for (Int_t i =0;i<TOFCHANNELS;i++){
+         delete [] fbigarray[i];
+  }
   delete[] fbigarray;
-  delete findexarray;
+  delete[] findexarray;
   delete fOutputContainer;
   delete fhToT;
   delete fhTime;
@@ -437,7 +446,7 @@ void AliTOFCalibTask::Exec(Option_t * opt)
     nselected++;
     Int_t ich = Int_t(t->GetTOFCalChannel()); 
     fhch->Fill(ich);
-    ich=3;
+    //    ich=3; //only for debug purpose
     AliDebug(2,Form(" ESD in channel %i, filling array %i",t->GetTOFCalChannel(),ich));
     Float_t tot = t->GetTOFsignalToT();
     Float_t time = t->GetTOFsignalRaw();
@@ -498,7 +507,6 @@ void AliTOFCalibTask::Terminate(Option_t *)
 
   for (Int_t i = 0;i<TOFCHANNELS;i++){
     Int_t size=findexarray[i]*NIDX;
-    if (i==3) AliInfo(Form(" entries %i in channel %i ",findexarray[i],i));
     AliDebug(2, Form(" entries %i in channel %i ",findexarray[i],i));
     if (findexarray[i]<=2) {
       AliDebug(1, Form(" not enough statistics for combined PID for channel %i, putting all the tracks as if they were pions",i));
@@ -575,8 +583,8 @@ Bool_t AliTOFCalibTask::Select(AliESDtrack *t){
   //  return 0;  // skipping momentum cut
   } 
    
-  UInt_t assignedTOFcluster=t->GetTOFcluster();//index of the assigned TOF cluster, >0 ?
-  if(assignedTOFcluster==0){ // not matched
+  Int_t assignedTOFcluster=t->GetTOFcluster();//index of the assigned TOF cluster, >0 ?
+  if(assignedTOFcluster==-1){ // not matched
     return 0;
   }
   fnESDassTOFcl++;
@@ -738,6 +746,10 @@ Bool_t AliTOFCalibTask::CombPID(Float_t *smallarray, Int_t size){
        smallarray[idxextimePr]=-1;
       }
     }
+    delete[] exptof; 
+    delete[] timeofflight;
+    delete[] texp;
+    delete[] index;
     
   }
   return 1;
@@ -798,6 +810,11 @@ Float_t  AliTOFCalibTask::LoopCombPID(Int_t itrkinset, Int_t ntrkinset, Float_t
        
        chisquarebest=chisquare;
       }
+      delete[] besttimezero;
+      delete[] bestchisquare;
+      delete[] bestweightedtimezero;
+      delete[] weightedtimezero;
+      delete[] timezero;
     }
   }
   return chisquarebest;