Skip to content

Commit

Permalink
ALIROOT-5572 Allow use of AliTOFcalib::TuneForMC() when old ESD TOF d…
Browse files Browse the repository at this point in the history
…ata structure detected, AliFatal otherwise (R. Preghenella)
  • Loading branch information
chiarazampolli authored and hristov committed Aug 29, 2014
1 parent 587e2cb commit 2501aed
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions TOF/AliTOFcalib.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2442,12 +2442,11 @@ AliTOFcalib::CalibrateESD(AliESDEvent *event)
track->SetTOFsignal(time);
}
}

if (fCorrectTExp)
CalibrateTExp(event);
}

if (fCorrectTExp) {
AliWarning("\n\nfCorrectTExp is a DEPRECATED flag, it will do NOTHING\n\n");
}


}

//----------------------------------------------------------------------------
Expand Down Expand Up @@ -2525,6 +2524,13 @@ AliTOFcalib::CalibrateTExp(AliESDEvent *event) const
* calibrate TExp
*/

/* check if new TOF data structure, crash in case */
TClonesArray* esdTOFhits = event->GetESDTOFHits();
if (esdTOFhits) {
AliFatal("This method is DEPRECATED, doing NOTHING");
return ;
}

if (!fInitFlag) {
AliError("class not yet initialized. Initialize it before.");
return;
Expand Down Expand Up @@ -2560,8 +2566,12 @@ AliTOFcalib::TuneForMC(AliESDEvent *event, Double_t resolution)
* tune for MC
*/

AliFatal("This method is DEPRECATED, doing NOTHING");
return 0.;
/* check if new TOF data structure, crash in case */
TClonesArray* esdTOFhits = event->GetESDTOFHits();
if (esdTOFhits) {
AliFatal("This method is DEPRECATED, doing NOTHING");
return 0.;
}

/* get vertex spread and define T0-spread */
Double_t diamond2 = TMath::Abs(event->GetSigma2DiamondZ());
Expand Down

0 comments on commit 2501aed

Please sign in to comment.