fSelHybrid(kFALSE),
fESD(0),
fAOD(0),
+ fVEvent(0),
fMCEvent(0),
fStack(0),
fOutputList(0),
fSelHybrid(kFALSE),
fESD(0),
fAOD(0),
+ fVEvent(0),
fMCEvent(0),
fStack(0),
fOutputList(0),
if(!filename.Contains(fPathStrOpt.Data()))
return;
}
- AliVEvent *event = (AliVEvent*)InputEvent();
- if (!event) {
+ fVEvent = (AliVEvent*)InputEvent();
+ if (!fVEvent) {
printf("ERROR: event not available\n");
return;
}
if(fDebug)
printf("run number = %d\n",runnumber);
- fESD = dynamic_cast<AliESDEvent*>(event);
+ fESD = dynamic_cast<AliESDEvent*>(fVEvent);
if(!fESD){
- fAOD = dynamic_cast<AliAODEvent*>(event);
+ fAOD = dynamic_cast<AliAODEvent*>(fVEvent);
if(!fAOD){
printf("ERROR: Invalid type of event!!!\n");
return;
printf("event is ok,\n run number=%d\n",runnumber);
- AliVVertex *pv = (AliVVertex*)event->GetPrimaryVertex();
+ AliVVertex *pv = (AliVVertex*)fVEvent->GetPrimaryVertex();
Bool_t pvStatus = kTRUE;
if(fESD){
AliESDVertex *esdv = (AliESDVertex*)fESD->GetPrimaryVertex();
/*if(fESD)
fGeom->SetMisalMatrix(fESD->GetEMCALMatrix(mod), mod);
else*/
- // if(event->GetEMCALMatrix(mod))
+ // if(fVEvent->GetEMCALMatrix(mod))
fGeomMatrix[mod] = (TGeoHMatrix*) matEMCAL->At(mod);
fGeom->SetMisalMatrix(fGeomMatrix[mod] , mod);
}
FillMcHists();
if(fDebug)
printf("passed calling of FillMcHists\n");
- if(fESD)
+ //if(fESD)
FillQA();
if(fDebug)
printf("passed calling of FillQA\n");
//________________________________________________________________________
void AliAnalysisTaskEMCALIsoPhoton::FillQA()
{
+
+ TObjArray *clusters = fESDClusters;
+
+ if (!clusters){
+ clusters = fAODClusters;
+ if(fDebug)
+ printf("ESD clusters empty...");
+ }
+ if (!clusters){
+ if(fDebug)
+ printf(" and AOD clusters as well!!!\n");
+ return;
+ }
if(!fSelPrimTracks)
return;
const int ntracks = fSelPrimTracks->GetEntriesFast();
const int ncells = fNCells50;//fESDCells->GetNumberOfCells();
- const Int_t nclus = fESDClusters->GetEntries();
+ const Int_t nclus = clusters->GetEntries();
fNTracks->Fill(ntracks);
fEmcNCells->Fill(ncells);
}
}
for(int ic=0;ic<nclus;ic++){
- AliVCluster *c = dynamic_cast<AliVCluster*>(fESDClusters->At(ic));
- //AliESDCaloCluster *c = (AliESDCaloCluster*)fESDClusters->At(ic);
+ AliVCluster *c = dynamic_cast<AliVCluster*>(clusters->At(ic));
+ //AliESDCaloCluster *c = (AliESDCaloCluster*)clusters->At(ic);
if(!c)
continue;
if(!c->IsEMCAL())