#include "AliTRDcalibDB.h"
#include "AliTRDgeometry.h"
#include "info/AliTRDpidInfo.h"
+#include "AliAnalysisManager.h"
ClassImp(AliTRDpidRefMakerLQ)
//
// AliTRDCalPIDQRef destructor
//
+ if (AliAnalysisManager::GetAnalysisManager()->IsProofMode()) return;
if(fPDF){
//fPDF->Write("PDF_LQ", TObject::kSingleKey);
fPDF->Delete();
return kTRUE;
}
-
+#include "AliAnalysisManager.h"
//________________________________________________________________________
void AliTRDpidRefMakerLQ::UserExec(Option_t */*opt*/)
{
-// Load PID data into local data storage
-
- if(!(fInfo = dynamic_cast<TObjArray*>(GetInputData(3)))) return;
+// Process pid info data array
+// The tasks have also access to the following containers which, for the time being, are not used
+// fTracks = dynamic_cast<TObjArray*>(GetInputData(1))
+// fEvent = dynamic_cast<AliTRDeventInfo*>(GetInputData(2))
+// fV0s = dynamic_cast<TObjArray*>(GetInputData(3))
+
+ if(!(fInfo = dynamic_cast<TObjArray*>(GetInputData(4)))){
+ Int_t ev((Int_t)AliAnalysisManager::GetAnalysisManager()->GetCurrentEntry());
+ AliDebug(3, Form("Missing pid info container in ev %d", ev));
+ return;
+ }
AliDebug(2, Form("ENTRIES pid[%d]\n", fInfo->GetEntriesFast()));
AliTRDpidInfo *pid(NULL);
// estimate bucket statistics
Int_t idx(AliTRDCalPIDLQ::GetModelID(ip,is)),
nb(kMinBuckets), // number of buckets
- ns((Int_t)(((Float_t)(ndata[idx]))/nb)); //statistics/bucket
+ ns((Int_t)(((Float_t)(ndata[idx]))/nb)); //statistics/bucket
AliDebug(2, Form("pBin[%d] sBin[%d] n[%d] ns[%d] nb[%d]", ip, is, ndata[idx], ns, nb));
if(ns<Int_t(kMinStat)){
}
}
- pdf=dynamic_cast<TKDPDF*>(fPDF->At(idx));
+ if(!(pdf=dynamic_cast<TKDPDF*>(fPDF->At(idx)))){
+ AliWarning(Form("Missing pdf for model id[%d]", idx));
+ continue;
+ }
TH1 *h1 = (TH1D*)((TObjArray*)fContainer->At(ip))->At(is);
ax = h1->GetXaxis();
h1->Clear();