Added Ecore; added check of TOF calculation
authorprsnko <Dmitri.Peressounko@cern.ch>
Sat, 12 Apr 2014 19:12:51 +0000 (23:12 +0400)
committerprsnko <Dmitri.Peressounko@cern.ch>
Mon, 14 Apr 2014 04:15:10 +0000 (08:15 +0400)
ANALYSIS/TenderSupplies/AliPHOSTenderSupply.cxx

index 72bfbaf..05b4cf8 100644 (file)
@@ -347,7 +347,10 @@ void AliPHOSTenderSupply::ProcessEvent()
      
       clu->SetEmcCpvDistance(r);    
       clu->SetChi2(TestLambda(clu->E(),clu->GetM20(),clu->GetM02()));                     //not yet implemented
-      clu->SetTOF(EvalTOF(&cluPHOS,cells));       
+      Double_t tof=EvalTOF(&cluPHOS,cells); 
+      if(TMath::Abs(tof-clu->GetTOF())>100.e-9) //something wrong in cell TOF!
+       tof=clu->GetTOF() ;
+      clu->SetTOF(tof);       
       Double_t minDist=clu->GetDistanceToBadChannel() ;//Already calculated
       DistanceToBadChannel(mod,&locPos,minDist);
       clu->SetDistanceToBadChannel(minDist) ;
@@ -425,7 +428,10 @@ void AliPHOSTenderSupply::ProcessEvent()
       clu->SetEmcCpvDistance(r); //Distance in sigmas
      
       clu->SetChi2(TestLambda(clu->E(),clu->GetM20(),clu->GetM02()));                     //not yet implemented
-      clu->SetTOF(EvalTOF(&cluPHOS,cells));       
+      Double_t tof=EvalTOF(&cluPHOS,cells); 
+      if(TMath::Abs(tof-clu->GetTOF())>100.e-9) //something wrong in cell TOF!
+       tof=clu->GetTOF() ;
+      clu->SetTOF(tof);       
       Double_t minDist=clu->GetDistanceToBadChannel() ;//Already calculated
       DistanceToBadChannel(mod,&locPos,minDist);
       clu->SetDistanceToBadChannel(minDist) ;
@@ -826,7 +832,6 @@ Double_t AliPHOSTenderSupply::EvalTOF(AliVCluster * clu,AliVCaloCells * cells){
       eMax=elist[iDigit] ;
     }
   }
-
   
    //Try to improve accuracy 
   //Do not account time of soft cells: