]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
here are correct for LHC11a, what i committed before was pilot version
authoralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 13 Apr 2011 12:51:45 +0000 (12:51 +0000)
committeralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 13 Apr 2011 12:51:45 +0000 (12:51 +0000)
T0/AliT0Reconstructor.cxx

index c138091d8c725d46a4194185dafddfe01987ed54..c1e8c23e0063daaf5d720f7d5cd38ebbc3e12284 100644 (file)
@@ -285,9 +285,9 @@ void AliT0Reconstructor::Reconstruct(AliRawReader* rawReader, TTree*recTree) con
   //  Int_t refPoint = 0;
   Int_t badpmt[24];
   //Bad channel
-  for (Int_t i=0; i<24; i++) 
-  badpmt[i] = GetRecoParam() -> GetBadChannels(i);
+  for (Int_t i=0; i<24; i++) {
+    badpmt[i] = GetRecoParam() -> GetBadChannels(i);
+  }
   Int_t low[500], high[500];
 
   Int_t allData[110][5];
@@ -450,7 +450,8 @@ void AliT0Reconstructor::Reconstruct(AliRawReader* rawReader, TTree*recTree) con
        for (Int_t ipmt=0; ipmt<12; ipmt++){
         if(time[ipmt] !=0 && badpmt[ipmt]==0 &&  adcmip[ipmt]>lowAmpThreshold && adcmip[ipmt]<highAmpThreshold )
           {
-            if(TMath::Abs(time[ipmt])<TMath::Abs(besttimeC)){
+              //              if(TMath::Abs(time[ipmt])<TMath::Abs(besttimeC)) {
+            if(time[ipmt]<besttimeC){
               besttimeC=time[ipmt]; //timeC
                  pmtBestC=ipmt;
             }
@@ -460,28 +461,29 @@ void AliT0Reconstructor::Reconstruct(AliRawReader* rawReader, TTree*recTree) con
         {
           if(time[ipmt] != 0  && badpmt[ipmt]==0 && adcmip[ipmt]>lowAmpThreshold && adcmip[ipmt]<highAmpThreshold)
             {
-              if(TMath::Abs(time[ipmt])<TMath::Abs(besttimeA)) {
+              if(time[ipmt]<besttimeA) {
+                //            if(TMath::Abs(time[ipmt])<TMath::Abs(besttimeA)) {
                 besttimeA=time[ipmt]; //timeA
                 pmtBestA=ipmt;
               }
             }
         }
        if(besttimeA < 999999) 
-        //      frecpoints->SetTimeBestA((besttimeA * channelWidth)- 1000.*fLatencyHPTDC + 1000.*fLatencyL1A - 1000.*fGRPdelays - fTimeMeanShift[1] ); 
-        frecpoints->SetTimeBestA((besttimeA * channelWidth- fTimeMeanShift[1])); 
+        frecpoints->SetTimeBestA((besttimeA * channelWidth)- 1000.*fLatencyHPTDC + 1000.*fLatencyL1A - 1000.*fGRPdelays - fTimeMeanShift[1] ); 
+       //       frecpoints->SetTimeBestA((besttimeA * channelWidth- fTimeMeanShift[1])); 
 
        if( besttimeC < 999999 ) 
-        //      frecpoints->SetTimeBestC((besttimeC * channelWidth)- 1000.*fLatencyHPTDC +1000.*fLatencyL1C - 1000.*fGRPdelays - fTimeMeanShift[2]);
-        frecpoints->SetTimeBestC((besttimeC * channelWidth - fTimeMeanShift[2]));
+        frecpoints->SetTimeBestC((besttimeC * channelWidth)- 1000.*fLatencyHPTDC +1000.*fLatencyL1C - 1000.*fGRPdelays - fTimeMeanShift[2]);
+       // frecpoints->SetTimeBestC((besttimeC * channelWidth - fTimeMeanShift[2]));
        AliDebug(5,Form(" pmtA %i besttimeA %f shift A %f ps, pmtC %i besttimeC %f shiftC %f ps",
                       pmtBestA,besttimeA, fTimeMeanShift[1],
                       pmtBestC,  besttimeC,fTimeMeanShift[2]));
         if(besttimeA <999999 && besttimeC < 999999 ){
          //     timeDiff = ( besttimeA - besttimeC)* 0.001* channelWidth + fLatencyL1A - fLatencyL1C;
-         // timeclock = channelWidth * Float_t( besttimeA+besttimeC)/2. - 1000.*fLatencyHPTDC + 1000.*fLatencyL1 - 1000.*fGRPdelays - fTimeMeanShift[0] ;  
+         timeclock = channelWidth * Float_t( besttimeA+besttimeC)/2. - 1000.*fLatencyHPTDC + 1000.*fLatencyL1 - 1000.*fGRPdelays - fTimeMeanShift[0] ;  
         meanTime = (besttimeA+besttimeC-2.*Float_t(ref))/2.;
         timeDiff = ( besttimeA - besttimeC)* 0.001* channelWidth ;
-        timeclock = channelWidth * Float_t( besttimeA+besttimeC)/2. - fTimeMeanShift[0] ;  
+        // timeclock = channelWidth * Float_t( besttimeA+besttimeC)/2. - fTimeMeanShift[0] ;  
         vertex =  meanVertex - c*(timeDiff)/2. ; //+ (fdZonA - fdZonC)/2; 
        }
       }  //if phys event