//
// For stand alone usage please refer to the following example:
// {
-// gSystem->Load("libANALYSIS.so");
-// gSystem->Load("libTRDqaRec.so");
+// gSystem->Load("libANALYSIS");
+// gSystem->Load("libTRDqaRec");
// AliTRDresolution *res = new AliTRDresolution();
// //res->SetMCdata();
// //res->SetVerbose();
#include "AliPID.h"
#include "AliLog.h"
#include "AliESDtrack.h"
+#include "AliESDHeader.h"
#include "AliMathBase.h"
#include "AliTrackPointArray.h"
return H->Projection(kYrez);
}
-
//________________________________________________________
TH1* AliTRDresolution::PlotTracklet(const AliTRDtrackV1 *track)
{
if(fkESD->IsElectron()) v0pid = -1;
else if(fkESD->IsPion()) v0pid = 0;
else if(fkESD->IsProton()) v0pid = 1;
- if(DebugLevel()>=1 && v0pid>-2){
+ if(DebugLevel()>=1/* && v0pid>-2*/){
Float_t tpc(fkESD->GetTPCdedx());
Float_t tof(fkESD->GetTOFbeta());
+ Int_t ev(fEvent->GetEventHeader()->GetEventNumberInFile());
AliTRDtrackV1 t(*fkTrack); t.SetOwner();
(*DebugStream()) << "trackIn"
+ <<"ev=" << ev
<<"pid=" << v0pid
<<"tpc=" << tpc
<<"tof=" << tof
val[kPrez] = (TMath::ASin(tin->GetSnp())-TMath::ATan(dydx0))*TMath::RadToDeg();
val[kNdim+1] = 0.;//dx;
if((H = (THnSparseI*)fContainer->At(kMCtrackIn))) H->Fill(val);
+ val[kBC] = ily; // reset for subsequent components
+
+ if(DebugLevel()>=1 && exactPID>-2){
+ Float_t tpc(fkESD->GetTPCdedx());
+ Float_t tof(fkESD->GetTOFbeta());
+ AliTRDtrackV1 t(*fkTrack); t.SetOwner();
+ (*DebugStream()) << "MCtrackIn"
+ <<"pid=" << exactPID
+ <<"tpc=" << tpc
+ <<"tof=" << tof
+ <<"track.=" << &t
+ <<"trackIn.=" << tin
+ << "\n";
+ }
}
}
//if(bc>1) break; // do nothing for the rest of TRD objects if satellite bunch
+npad;
ioff=isel*4;
} else {
+ if(mc && ly<0) ly=0; // fix for bug in PlotMC
isel = ly; ioff = isel;
}
if(ioff>=ih){
if(ac) cen = coord[kNdim]-1;
// global selection
if(ndim==kNdimTrklt){
+ if(mc && ly<0) ly=0; // fix for bug in PlotMC
ioff = ly*3/*4*/;
isel = ly;
} else {
v = H->GetBinContent(ib, coord);
if(v<1.) continue;
ly = coord[kBC]-1; // layer selection
+ if(ly<0) ly=0; // fix for bug in PlotMC
// charge selection
ch=0; sp=2;// [pi-] track [dafault]
if(rcBin>0){ // debug mode in which species are also saved
AliWarning("Missing/Wrong data @ hTracklet2TRDin needed for infering pt/p segmentation.");
return kFALSE;
}
- fNpt=H->GetAxis(kPt)->GetNbins()+1;
+ // protect for backward compatibility
+ fNpt=H->GetAxis(kPt)?(H->GetAxis(kPt)->GetNbins()+1):1;
if(!MakeMomSegmentation()) return kFALSE;
//PROCESS EXPERIMENTAL DISTRIBUTIONS