if (!entry4) AliFatal("LHC clock-phase shift is not found in OCDB !");
AliLHCClockPhase *phase = (AliLHCClockPhase*)entry4->GetObject();
- printf("@@@@ GRP/Calib/LHCClockPhase %f\n",phase->GetMeanPhase());
-
fGRPdelays = l1Delay - phase->GetMeanPhase();
fParam = AliT0Parameters::Instance();
fLatencyL1A = fParam->GetLatencyL1A();
fLatencyL1C = fParam->GetLatencyL1C();
fLatencyHPTDC = fParam->GetLatencyHPTDC();
- AliDebug(0,Form(" LatencyL1 %f latencyL1A %f latencyL1C %f latencyHPTDC %f \n",fLatencyL1, fLatencyL1A, fLatencyL1C, fLatencyHPTDC));
+ AliDebug(2,Form(" LatencyL1 %f latencyL1A %f latencyL1C %f latencyHPTDC %f \n",fLatencyL1, fLatencyL1A, fLatencyL1C, fLatencyHPTDC));
// fdZonC = TMath::Abs(fParam->GetZPositionShift("T0/C/PMT1"));
//fdZonA = TMath::Abs(fParam->GetZPositionShift("T0/A/PMT15"));
Int_t pmtBestC=99999;
AliT0RecPoint* frecpoints= new AliT0RecPoint ();
- clustersTree->Branch( "T0", "AliT0RecPoint" ,&frecpoints, 405,1);
+ clustersTree->Branch( "T0", "AliT0RecPoint" ,&frecpoints);
Float_t time[24], adc[24];
for (Int_t ipmt=0; ipmt<24; ipmt++) {
Int_t refPoint = 0;
//Bad channel
Int_t badpmt = GetRecoParam()->GetRefPoint();
-
Int_t low[110], high[110];
Int_t allData[110][5];
AliT0RecPoint* frecpoints= new AliT0RecPoint ();
- recTree->Branch( "T0", "AliT0RecPoint" ,&frecpoints, 405,1);
+ recTree->Branch( "T0", "AliT0RecPoint" ,&frecpoints);
AliDebug(10," before read data ");
AliT0RawReader myrawreader(rawReader);
}
fESDTZEROfriend->SetT0timeCorr(noncalibtime) ;
for (Int_t ipmt=0; ipmt<12; ipmt++){
- if(time[ipmt] > 1 && ipmt != badpmt )
+ if(time[ipmt] > 1 && ipmt != badpmt && adc[ipmt]>0.1 )
{
if(time[ipmt]<besttimeC){
besttimeC=time[ipmt]; //timeC
}
for ( Int_t ipmt=12; ipmt<24; ipmt++)
{
- if(time[ipmt] > 1 && ipmt != badpmt)
+ if(time[ipmt] > 1 && ipmt != badpmt && adc[ipmt]>0.1)
{
if(time[ipmt]<besttimeA) {
besttimeA=time[ipmt]; //timeA
}
}
if(besttimeA < 999999)
- frecpoints->SetTimeBestA(besttimeA * channelWidth - 1000.*fLatencyHPTDC + 1000.*fLatencyL1A /*+ 1000.*fGRPdelays*/);
+ frecpoints->SetTimeBestA(besttimeA * channelWidth - 1000.*fLatencyHPTDC + 1000.*fLatencyL1A - 1000.*fGRPdelays);
if( besttimeC < 999999 )
- frecpoints->SetTimeBestC(besttimeC * channelWidth - 1000.*fLatencyHPTDC +1000.*fLatencyL1C/* + 1000.*fGRPdelays*/);
+ frecpoints->SetTimeBestC(besttimeC * channelWidth - 1000.*fLatencyHPTDC +1000.*fLatencyL1C - 1000.*fGRPdelays);
AliDebug(10,Form(" pmtA %i besttimeA %f ps, pmtC %i besttimeC %f ps",
pmtBestA,besttimeA, pmtBestC, besttimeC));
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*/;
- printf(" @@@ fGRPdelays %f\n",fGRPdelays);
+ timeclock = channelWidth * Float_t( besttimeA+besttimeC)/2. - 1000.*fLatencyHPTDC + 1000.*fLatencyL1 - 1000.*fGRPdelays;
meanTime = (besttimeA+besttimeC-2.*Float_t(ref))/2.;
vertex = meanVertex - c*(timeDiff)/2. ; //+ (fdZonA - fdZonC)/2;
}
// cout<<"@@ spdver "<<spdver<<" ncont "<<ncont<<endl;
if(ncont>2 ) {
shift = currentVertex/c;
- cout<<" @@@ vertex shif "<<shift<<" vertex "<<currentVertex<<endl;
}
}
TTree *treeR = clustersTree;