fMyTracks(0),
fMyMcParts(0),
fHeader(0x0),
+ fOADBContainer(0),
fCaloClusters(0),
fCaloClustersNew(0),
fAODMCParticles(0),
fMyTracks(0),
fMyMcParts(0),
fHeader(0),
+ fOADBContainer(0),
fCaloClusters(0),
fCaloClustersNew(0),
fAODMCParticles(0),
}
//if(fIsGrid)fOutputList->Add(fTree);
fGeom = AliEMCALGeometry::GetInstance(fGeoName);
+ fOADBContainer = new AliOADBContainer("AliEMCALgeo");
+ fOADBContainer->InitFromFile(Form("$ALICE_ROOT/OADB/EMCAL/EMCALlocal2master.root"),"AliEMCALgeo");
fNV0sBefAndAftRerun = new TH2F("hNV0sBefAndAftRerun","check if the number of v0s change with rerun;old v0 n;new v0 n",50,0.5,50.5,50,0.5,50.5);
{
// User exec, called once per event.
- Bool_t isSelected = 0;
+ Bool_t isSelected = kTRUE;
if(fPeriod.Contains("11")){
if(fPeriod.Contains("11a"))
isSelected = (((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kEMC1);
printf("Error: no primary vertex found!\n");
return;
}
+ if(!pvStatus && this->fDebug)
+ printf("bad pv status\n");
if(TMath::Abs(pv->GetZ())>15)
return;
if(this->fDebug)
fHeader->fInputFileName = inpfile->GetName();
+ fHeader->fRunNumber = runnumber;
fHeader->fTrClassMask = fVev->GetHeader()->GetTriggerMask();
fHeader->fTrCluster = fVev->GetHeader()->GetTriggerCluster();
AliCentrality *cent = InputEvent()->GetCentrality();
fHeader->fCl1Cent = cent->GetCentralityPercentileUnchecked("CL1");
fHeader->fTrCent = cent->GetCentralityPercentileUnchecked("TRK");
- AliOADBContainer emcGeoMat("AliEMCALgeo");
- emcGeoMat.InitFromFile(Form("$ALICE_ROOT/OADB/EMCAL/EMCALlocal2master.root"),"AliEMCALgeo");
- TObjArray *matEMCAL=(TObjArray*)emcGeoMat.GetObject(runnumber,"EmcalMatrices");
+ TObjArray *matEMCAL=(TObjArray*)fOADBContainer->GetObject(runnumber,"EmcalMatrices");
for(Int_t mod=0; mod < (fGeom->GetEMCGeometry())->GetNumberOfSuperModules(); mod++){
if(fGeoName=="EMCAL_FIRSTYEARV1" && mod>3)
break;
if(fIsMC)
GetMcParts();
- if(this->fDebug)
+ if(this->fDebug && fIsMC)
printf("fMyMcParts nentries=%d",fMyMcParts->GetEntries());
fTree->Fill();
if (!fVCells)
return;
Int_t ncells = fVCells->GetNumberOfCells();
- Int_t mcel = 0;
+ Int_t mcel = 0;//, maxcelid=-1;
+ Double_t maxcellE = 0;//, maxcellEta=0, maxcellPhi=0;
for(Int_t icell = 0; icell<ncells; icell++){
Int_t absID = TMath::Abs(fVCells->GetCellNumber(icell));
AliPhotonCellObj *mycell = static_cast<AliPhotonCellObj*>(fMyCells->New(mcel++));
if(!fGeom)
return;
/*if(!fIsMC)*/fGeom->EtaPhiFromIndex(absID,eta,phi);
+ if(maxcellE<fVCells->GetCellAmplitude(absID)){
+ maxcellE = fVCells->GetCellAmplitude(absID);
+ /*maxcellEta = eta;
+ maxcellPhi = phi;
+ maxcelid = absID;*/
+ }
Float_t theta = 2*TMath::ATan(TMath::Exp(-eta));
mycell->fAbsID = absID;
mycell->fE = fVCells->GetCellAmplitude(absID);
Int_t nclus = fCaloClusters->GetEntries();
if(0==nclus)
printf("CaloClusters has ZERO entries\n");
- Int_t mcl = 0;
+ Int_t mcl = 0, maxcelid=-1;
+ Double_t maxcellE=0, maxcellEtac=0,maxcellPhic=0;
for(Int_t ic=0; ic < nclus; ic++){
AliVCluster *clus = static_cast<AliVCluster*>(fCaloClusters->At(ic));
if(!clus)
continue;
if(clus->E() < fClusThresh)
continue;
+ if(fDebug)
+ printf("cluster %d survived\n", ic);
Float_t pos[3];
clus->GetPosition(pos);
TVector3 cpos(pos);
Short_t id = -1;
myclus->fEmax = GetMaxCellEnergy( clus, id);
myclus->fIdmax = id;
+ if(maxcellE < myclus->fEmax){
+ maxcellE = myclus->fEmax;
+ maxcelid = id;
+ maxcellEtac = cpos.Eta();
+ maxcellPhic = cpos.Phi();
+ }
myclus->fTmax = fVCells->GetCellTime(id);
myclus->fEcross = GetCrossEnergy( clus, id);
myclus->fDisp = clus->GetDispersion();
myclus->fTrEp = clus->E()/track->P();
myclus->fTrDedx = track->GetTPCsignal();
}
- if(this->fDebug)
+ if(this->fDebug){
+ printf(" ---===+++ Max Cell among clusters: id=%d, E=%1.2f, eta-clus=%1.2f, phi-clus=%1.2f\n",maxcelid,maxcellE,maxcellEtac,maxcellPhic);
printf("::FillMyClusters() returning...\n\n");
+ }
}
//________________________________________________________________________
printf("\t\t::GetMcIsolation() starting\n");
//printf("\t\t incoming particle: PDG = %d, itrack=%d;\n",mcP->GetPdgCode(),itrack);
}
- if (!this->fStack && !this->fAODMCParticles){
+ if (!this->fStack && !this->fAODMCParticles && this->fDebug){
printf("\t\t\tNo MC stack/array!\n");
return -1;
}