fix after checking pass2 LHC10h
authoralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 22 Feb 2011 07:31:48 +0000 (07:31 +0000)
committeralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 22 Feb 2011 07:31:48 +0000 (07:31 +0000)
T0/AliT0Reconstructor.cxx

index 5bc175f..4ee1298 100644 (file)
@@ -209,7 +209,7 @@ void AliT0Reconstructor::Reconstruct(TTree*digitsTree, TTree*clustersTree) const
   }
   
   for (Int_t ipmt=0; ipmt<12; ipmt++){
-    if(time[ipmt] > 1 ) {
+    if(time[ipmt] > 1 && adc[ipmt]>0.1) {
       if(time[ipmt]<besttimeC){
        besttimeC=time[ipmt]; //timeC
        pmtBestC=ipmt;
@@ -217,7 +217,7 @@ void AliT0Reconstructor::Reconstruct(TTree*digitsTree, TTree*clustersTree) const
     }
   }
   for ( Int_t ipmt=12; ipmt<24; ipmt++){
-    if(time[ipmt] > 1) {
+    if(time[ipmt] > 1 && adc[ipmt]>0.1) {
       if(time[ipmt]<besttimeA) {
        besttimeA=time[ipmt]; //timeA
         pmtBestA=ipmt;}
@@ -276,7 +276,7 @@ void AliT0Reconstructor::Reconstruct(AliRawReader* rawReader, TTree*recTree) con
   Int_t refPoint = 0;
   //Bad channel
   Int_t badpmt = GetRecoParam()->GetRefPoint();
-  Int_t low[110], high[110];
+  Int_t low[500], high[500];
 
   Int_t allData[110][5];
   
@@ -294,6 +294,8 @@ void AliT0Reconstructor::Reconstruct(AliRawReader* rawReader, TTree*recTree) con
       high[i0] = Int_t (GetRecoParam()->GetHigh(i0));
       }
    
+  Float_t lowAmpThreshold =  GetRecoParam()->GetLow(200);  
+  Float_t highAmpThreshold =  GetRecoParam()->GetHigh(200);  
   Double32_t besttimeA=9999999;
   Double32_t besttimeC=9999999;
   Int_t pmtBestA=99999;
@@ -440,7 +442,7 @@ void AliT0Reconstructor::Reconstruct(AliRawReader* rawReader, TTree*recTree) con
        }
        fESDTZEROfriend->SetT0timeCorr(noncalibtime) ;     
        for (Int_t ipmt=0; ipmt<12; ipmt++){
-        if(time[ipmt] > 1 && ipmt != badpmt && adc[ipmt]>0.1 )
+        if(time[ipmt] > 1 && ipmt != badpmt && adc[ipmt]>lowAmpThreshold && adc[ipmt]<highAmpThreshold)
           {
             if(time[ipmt]<besttimeC){
                  besttimeC=time[ipmt]; //timeC
@@ -450,7 +452,7 @@ void AliT0Reconstructor::Reconstruct(AliRawReader* rawReader, TTree*recTree) con
        }
        for ( Int_t ipmt=12; ipmt<24; ipmt++)
         {
-          if(time[ipmt] > 1 && ipmt != badpmt && adc[ipmt]>0.1)
+          if(time[ipmt] > 1 && ipmt != badpmt && adc[ipmt]>lowAmpThreshold && adc[ipmt]<highAmpThreshold)
             {
               if(time[ipmt]<besttimeA) {
                 besttimeA=time[ipmt]; //timeA
@@ -516,9 +518,9 @@ void AliT0Reconstructor::Reconstruct(AliRawReader* rawReader, TTree*recTree) con
   ****************************************************/
   
   AliDebug(1,Form("Start FillESD T0"));
+
   pESD ->SetT0spread(fTimeSigmaShift);
  
-
   Float_t channelWidth = fParam->GetChannelWidth() ;  
   Float_t c = 0.0299792458; // cm/ps
   Float_t currentVertex=0, shift=0;
@@ -574,7 +576,7 @@ void AliT0Reconstructor::Reconstruct(AliRawReader* rawReader, TTree*recTree) con
     if ( time[i] >1) {
       ampQTC[i] = frecpoints -> GetAmp(i);
       amp[i] = frecpoints -> AmpLED(i);
-      AliDebug(1,Form("T0: time %f  ampQTC %f ampLED %f \n", time[i], ampQTC[i], amp[i]));
+      AliDebug(10,Form("T0: time %f  ampQTC %f ampLED %f \n", time[i], ampQTC[i], amp[i]));
    }
   }
   Int_t trig= frecpoints ->GetT0Trig();
@@ -600,7 +602,7 @@ void AliT0Reconstructor::Reconstruct(AliRawReader* rawReader, TTree*recTree) con
     
     AliESDfriend *fr = (AliESDfriend*)pESD->FindListObject("AliESDfriend");
     if (fr) {
-      AliDebug(1, Form("Writing TZERO friend data to ESD tree"));
+      AliDebug(10, Form("Writing TZERO friend data to ESD tree"));
 
       //     if (ncont>2) {
        tcorr = fESDTZEROfriend->GetT0timeCorr();