fCalculated[2] = 0;
fCalculated[3] = 0;
+ fT0cur[0]=0.;
+ fT0cur[1]=0.;
+
if(AliPID::ParticleMass(0) == 0) new AliPID();
fPIDesd = new AliESDpid();
fCalculated[2] = 0;
fCalculated[3] = 0;
+ fT0cur[0]=0.;
+ fT0cur[1]=0.;
+
if(AliPID::ParticleMass(0) == 0) new AliPID();
if(!fPIDesd){
//
// Remake TOF PID probabilities
//
-
Double_t t0tof[6];
if(fKmask) ApplyMask(esd);
t0fill = fT0fillExt;
}
}
+ else if(esd){
+ Float_t t0spread = esd->GetSigma2DiamondZ(); // vertex pread ^2
+ if(t0spread > 0) t0spread = TMath::Sqrt(t0spread)/0.0299792458;
+
+ if(fT0spreadExt > 0) SetT0FillWidth(fT0spreadExt);
+ else{
+ SetT0FillWidth(t0spread);
+ t0fill = fT0fillExt;
+ }
+ }
Float_t thrGood = TMath::Max(Float_t(500.),fT0width*3);
}
// T0 pt bin
+ Float_t *t0values = new Float_t[fNmomBins];
+ Float_t *t0resolution = new Float_t[fNmomBins];
if(fCalculated[7] < 100){
for(Int_t i=0;i<fNmomBins;i++){
t0maker->DefineT0("all",fPIDesd->GetTOFResponse().GetMinMom(i),fPIDesd->GetTOFResponse().GetMaxMom(i));
t0tof[1] = t0maker->GetResult(1);
t0tof[2] = t0maker->GetResult(2);
t0tof[3] = t0maker->GetResult(3);
-
Float_t t0bin =-1000*t0tof[0]; // best t0
Float_t t0binRes =1000*t0tof[1]; // sigma best t0
t0binRes= t0sigma;
}
}
- fPIDesd->GetTOFResponse().SetT0bin(i,t0bin);
- fPIDesd->GetTOFResponse().SetT0binRes(i,t0binRes);
+ t0values[i] = t0bin;
+ t0resolution[i] = t0binRes;
}
}
else{
for(Int_t i=0;i<fNmomBins;i++){
- fPIDesd->GetTOFResponse().SetT0bin(i,lT0Current);
- fPIDesd->GetTOFResponse().SetT0binRes(i,fT0sigma);
+ t0values[i] = lT0Current;
+ t0resolution[i] = fT0sigma;
}
}
+ for(Int_t i=0;i<fNmomBins;i++){
+ fPIDesd->GetTOFResponse().SetT0bin(i,t0values[i]);
+ fPIDesd->GetTOFResponse().SetT0binRes(i,t0resolution[i]);
+ }
+
+ delete[] t0values;
+ delete[] t0resolution;
return fCalculated;
}
//
}
//____________________________________________________________________________
-void AliTOFT0maker::LoadChannelMap(char *filename){
+void AliTOFT0maker::LoadChannelMap(const char *filename){
// Load the histo with the channel off map
TFile *f= new TFile(filename);
if(!f){
if ((t->GetStatus()&AliESDtrack::kTOFout)==0) continue;
/* check if channel is enabled */
- if (fTOFcalib && !fTOFcalib->IsChannelEnabled(t->GetTOFCalChannel())) {
- /* reset TOF status */
- t->ResetStatus(AliESDtrack::kTOFin);
- t->ResetStatus(AliESDtrack::kTOFout);
- t->ResetStatus(AliESDtrack::kTOFmismatch);
- t->ResetStatus(AliESDtrack::kTOFpid);
+ if (fTOFcalib){
+ if(!fTOFcalib->IsChannelEnabled(t->GetTOFCalChannel())) {
+ /* reset TOF status */
+ t->ResetStatus(AliESDtrack::kTOFin);
+ t->ResetStatus(AliESDtrack::kTOFout);
+ t->ResetStatus(AliESDtrack::kTOFmismatch);
+ t->ResetStatus(AliESDtrack::kTOFpid);
+ }
}
Double_t time=t->GetTOFsignal();
esd->SetTOFHeader(tofHeader);
+ delete tofHeader;
+
AliDebug(1,Form("resTOF=%f T0spread=%f t0Gen=%f t0resGen=%f",fTimeResolution,fT0width,t0Gen,t0ResGen));
AliDebug(1,Form("%d ",nt0));
for (Int_t ii=0; ii<nt0; ii++)