fNEvent = 0 ;
fRecParticlesInRun = 0 ;
SetParameters() ; // fill the parameters matrix from parameters file
+ SetEventRange(0,-1) ;
}
//________________________________________________________________________
-void AliPHOSPIDv1::Exec(Option_t * option)
+void AliPHOSPIDv1::Exec(Option_t *option)
{
- //Steering method
-
+ // Steering method to perform particle reconstruction and identification
+ // for the event range from fFirstEvent to fLastEvent.
+ // This range is optionally set by SetEventRange().
+ // if fLastEvent=-1 (by default), then process events until the end.
if(strstr(option,"tim"))
gBenchmark->Start("PHOSPID");
AliPHOSGetter * gime = AliPHOSGetter::Instance() ;
- Int_t nevents = gime->MaxEvent() ;
- Int_t ievent ;
-
-
- for(ievent = 0; ievent < nevents; ievent++){
+ if (fLastEvent == -1)
+ fLastEvent = gime->MaxEvent() - 1 ;
+ else
+ fLastEvent = TMath::Min(fLastEvent,gime->MaxEvent());
+ Int_t nEvents = fLastEvent - fFirstEvent + 1;
+
+ Int_t ievent ;
+ for (ievent = fFirstEvent; ievent <= fLastEvent; ievent++) {
gime->Event(ievent,"TR") ;
if(gime->TrackSegments() && //Skip events, where no track segments made
gime->TrackSegments()->GetEntriesFast()) {
gBenchmark->Stop("PHOSPID");
Info("Exec", "took %f seconds for PID %f seconds per event",
gBenchmark->GetCpuTime("PHOSPID"),
- gBenchmark->GetCpuTime("PHOSPID")/nevents) ;
+ gBenchmark->GetCpuTime("PHOSPID")/nEvents) ;
}
Unload();
}
//____________________________________________________________________________
-const Float_t AliPHOSPIDv1::GetParameterCalibration(Int_t i) const
+Float_t AliPHOSPIDv1::GetParameterCalibration(Int_t i) const
{
// Get the i-th parameter "Calibration"
Float_t param = 0.;
}
//____________________________________________________________________________
-const Float_t AliPHOSPIDv1::GetCalibratedEnergy(const Float_t e) const
+Float_t AliPHOSPIDv1::GetCalibratedEnergy(Float_t e) const
{
// It calibrates Energy depending on the recpoint energy.
// The energy of the reconstructed cluster is corrected with
}
//____________________________________________________________________________
-const Float_t AliPHOSPIDv1::GetParameterCpv2Emc(Int_t i, TString axis) const
+Float_t AliPHOSPIDv1::GetParameterCpv2Emc(Int_t i, TString axis) const
{
// Get the i-th parameter "CPV-EMC distance" for the specified axis
Float_t param = 0.;
}
//____________________________________________________________________________
-const Float_t AliPHOSPIDv1::GetCpv2EmcDistanceCut(TString axis, Float_t e) const
+Float_t AliPHOSPIDv1::GetCpv2EmcDistanceCut(TString axis, Float_t e) const
{
// Get CpvtoEmcDistance Cut depending on the cluster energy, axis and
// Purity-Efficiency point
}
//____________________________________________________________________________
-const Float_t AliPHOSPIDv1::GetEllipseParameter(TString particle, TString param, Float_t e) const
+Float_t AliPHOSPIDv1::GetEllipseParameter(TString particle, TString param, Float_t e) const
{
// Calculates the parameter param of the ellipse
}
//_____________________________________________________________________________
-const Float_t AliPHOSPIDv1::GetParameterPhotonBoundary (Int_t i) const
+Float_t AliPHOSPIDv1::GetParameterPhotonBoundary (Int_t i) const
{
// Get the parameter "i" to calculate the boundary on the moment M2x
// for photons at high p_T
}
//____________________________________________________________________________
-const Float_t AliPHOSPIDv1::GetParameterPi0Boundary (Int_t i) const
+Float_t AliPHOSPIDv1::GetParameterPi0Boundary (Int_t i) const
{
// Get the parameter "i" to calculate the boundary on the moment M2x
// for pi0 at high p_T
}
//____________________________________________________________________________
-const Float_t AliPHOSPIDv1::GetParameterTimeGate(Int_t i) const
+Float_t AliPHOSPIDv1::GetParameterTimeGate(Int_t i) const
{
// Get TimeGate parameter depending on Purity-Efficiency i:
// i=0 - Low purity, i=1 - Medium purity, i=2 - High purity
}
//_____________________________________________________________________________
-const Float_t AliPHOSPIDv1::GetParameterToCalculateEllipse(TString particle, TString param, Int_t i) const
+Float_t AliPHOSPIDv1::GetParameterToCalculateEllipse(TString particle, TString param, Int_t i) const
{
// Get the parameter "i" that is needed to calculate the ellipse
// parameter "param" for the particle "particle" ("photon" or "pi0")
//____________________________________________________________________________
-const Float_t AliPHOSPIDv1::GetDistance(AliPHOSEmcRecPoint * emc,AliPHOSRecPoint * cpv, Option_t * axis)const
+Float_t AliPHOSPIDv1::GetDistance(AliPHOSEmcRecPoint * emc,AliPHOSRecPoint * cpv, Option_t * axis)const
{
// Calculates the distance between the EMC RecPoint and the PPSD RecPoint
return 100000000 ;
}
//____________________________________________________________________________
-const Int_t AliPHOSPIDv1::GetCPVBit(AliPHOSEmcRecPoint * emc,AliPHOSRecPoint * cpv,const Int_t effPur, Float_t e) const
+Int_t AliPHOSPIDv1::GetCPVBit(AliPHOSEmcRecPoint * emc,AliPHOSRecPoint * cpv, Int_t effPur, Float_t e) const
{
if(effPur>2 || effPur<0)
Error("GetCPVBit","Invalid Efficiency-Purity choice %d",effPur);
}
//____________________________________________________________________________
-const Int_t AliPHOSPIDv1::GetPrincipalBit(TString particle, const Double_t* p,const Int_t effPur, Float_t e)const
+Int_t AliPHOSPIDv1::GetPrincipalBit(TString particle, const Double_t* p, Int_t effPur, Float_t e)const
{
//Is the particle inside de PCA ellipse?
}
//____________________________________________________________________________
-const Int_t AliPHOSPIDv1::GetHardPhotonBit(AliPHOSEmcRecPoint * emc) const
+Int_t AliPHOSPIDv1::GetHardPhotonBit(AliPHOSEmcRecPoint * emc) const
{
// Set bit for identified hard photons (E > 30 GeV)
// if the second moment M2x is below the boundary
}
//____________________________________________________________________________
-const Int_t AliPHOSPIDv1::GetHardPi0Bit(AliPHOSEmcRecPoint * emc) const
+Int_t AliPHOSPIDv1::GetHardPi0Bit(AliPHOSEmcRecPoint * emc) const
{
// Set bit for identified hard pi0 (E > 30 GeV)
// if the second moment M2x is above the boundary