//________________________________________
AliAnaCalorimeterQA::AliAnaCalorimeterQA() :
-AliAnaCaloTrackCorrBaseClass(), fCalorimeter(""),
+AliAnaCaloTrackCorrBaseClass(),
//Switches
fFillAllCellTimeHisto(kTRUE),
fExoNECrossCuts(0), fExoECrossCuts(),
fExoNDTimeCuts(0), fExoDTimeCuts(),
+fClusterMomentum(), fClusterMomentum2(),
+fPrimaryMomentum(),
//Histograms
fhE(0), fhPt(0),
fhPhi(0), fhEta(0), fhEtaPhiE(0),
fhAmplitude(0), fhAmpId(0), fhEtaPhiAmp(0),
fhTime(0), fhTimeVz(0),
fhTimeId(0), fhTimeAmp(0),
+fhAmpIdLowGain(0), fhTimeIdLowGain(0), fhTimeAmpLowGain(0),
+
fhCellECross(0),
fhCaloCorrNClusters(0), fhCaloCorrEClusters(0),
fhCaloCorrNCells(0), fhCaloCorrECells(0),
fhNClustersMod(0), fhNCellsMod(0),
fhNCellsPerClusterMod(0), fhNCellsPerClusterModNoCut(0),
-fhGridCells(0), fhGridCellsE(0), fhGridCellsTime(0),
-fhTimeAmpPerRCU(0), fhIMMod(0),
+fhGridCells(0), fhGridCellsE(0), fhGridCellsTime(0),
+fhGridCellsLowGain(0), fhGridCellsELowGain(0), fhGridCellsTimeLowGain(0),
+fhTimeAmpPerRCU(0), fhIMMod(0),
// Weight studies
fhECellClusterRatio(0), fhECellClusterLogRatio(0),
fhRecoMCDeltaPhi(), fhRecoMCDeltaEta(),
// MC only
-fhGenMCE(), fhGenMCEtaPhi(),
-fhGenMCAccE(), fhGenMCAccEtaPhi(),
+fhGenMCE(), fhGenMCPt(), fhGenMCEtaPhi(),
+fhGenMCAccE(), fhGenMCAccPt(), fhGenMCAccEtaPhi(),
//matched MC
fhEMVxyz(0), fhEMR(0),
// MC
- for(Int_t i = 0; i < 6; i++)
+ for(Int_t i = 0; i < 7; i++)
{
fhRecoMCE[i][0] = 0; fhRecoMCE[i][1] = 0;
fhRecoMCPhi[i][0] = 0; fhRecoMCPhi[i][1] = 0;
fhRecoMCDeltaEta[i][0] = 0; fhRecoMCDeltaEta[i][1] = 0;
}
+ for(Int_t i = 0; i < 4; i++)
+ {
+ fhGenMCE[i] = 0;
+ fhGenMCPt[i] = 0;
+ fhGenMCEtaPhi[i] = 0;
+ fhGenMCAccE[i] = 0;
+ fhGenMCAccPt[i] = 0;
+ fhGenMCAccEtaPhi[i] = 0;
+ }
+
//Initialize parameters
InitParameters();
}
//Bad cluster histograms
// printf("AliAnaCalorimeterQA::BadClusterHistograms() - Event %d - Calorimeter %s \n \t E %f, n cells %d, max cell absId %d, maxCellFrac %f\n",
- // GetReader()->GetEventNumber(), fCalorimeter.Data(),
+ // GetReader()->GetEventNumber(), GetCalorimeterString().Data(),
// clus->E(),clus->GetNCells(),absIdMax,maxCellFraction);
fhBadClusterEnergy ->Fill(clus->E());
if(fFillAllCellTimeHisto)
{
Double_t time = cells->GetCellTime(absId);
- GetCaloUtils()->RecalibrateCellTime(time, fCalorimeter, absId,GetReader()->GetInputEvent()->GetBunchCrossNumber());
+ GetCaloUtils()->RecalibrateCellTime(time, GetCalorimeter(), absId,GetReader()->GetInputEvent()->GetBunchCrossNumber());
Float_t diff = (tmax-time*1e9);
fhBadCellTimeSpreadRespectToCellMax->Fill(clus->E(), diff);
//Recalibrate cell energy if needed
amp = cells->GetCellAmplitude(id);
- GetCaloUtils()->RecalibrateCellAmplitude(amp,fCalorimeter, id);
+ GetCaloUtils()->RecalibrateCellAmplitude(amp,GetCalorimeter(), id);
energy += amp;
time = cells->GetCellTime(id);
//Recalibrate energy and time
- GetCaloUtils()->RecalibrateCellAmplitude(amp , fCalorimeter, id);
- GetCaloUtils()->RecalibrateCellTime (time, fCalorimeter, id, GetReader()->GetInputEvent()->GetBunchCrossNumber());
+ GetCaloUtils()->RecalibrateCellAmplitude(amp , GetCalorimeter(), id);
+ GetCaloUtils()->RecalibrateCellTime (time, GetCalorimeter(), id, GetReader()->GetInputEvent()->GetBunchCrossNumber());
w = GetCaloUtils()->GetEMCALRecoUtils()->GetCellWeight(cells->GetCellAmplitude(id),energy);
aTime += time*1e9;
Int_t ncellsCut = 0;
Float_t ecellsCut = 0;
- if( GetDebug() > 0 )
- printf("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - %s cell entries %d\n", fCalorimeter.Data(), ncells );
+ AliDebug(1,Form("%s cell entries %d", GetCalorimeterString().Data(), ncells));
//Init arrays and used variables
Int_t *nCellsInModule = new Int_t [fNModules];
Float_t amp = 0.;
Double_t time = 0.;
Int_t id = -1;
+ Bool_t highG = kFALSE;
Float_t recalF = 1.;
Int_t bc = GetReader()->GetInputEvent()->GetBunchCrossNumber();
for (Int_t iCell = 0; iCell < cells->GetNumberOfCells(); iCell++)
{
- if(GetDebug() > 2)
- printf("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - Cell : amp %f, absId %d \n", cells->GetAmplitude(iCell), cells->GetCellNumber(iCell));
+ AliDebug(2,Form("Cell : amp %f, absId %d", cells->GetAmplitude(iCell), cells->GetCellNumber(iCell)));
- Int_t nModule = GetModuleNumberCellIndexes(cells->GetCellNumber(iCell),fCalorimeter, icol, irow, iRCU);
- if(GetDebug() > 2)
- printf("\t module %d, column %d, row %d \n", nModule,icol,irow);
+ Int_t nModule = GetModuleNumberCellIndexes(cells->GetCellNumber(iCell),GetCalorimeter(), icol, irow, iRCU);
+
+ AliDebug(2,Form("\t module %d, column %d, row %d", nModule,icol,irow));
if(nModule < fNModules)
{
//Check if the cell is a bad channel
if(GetCaloUtils()->IsBadChannelsRemovalSwitchedOn())
{
- if(fCalorimeter=="EMCAL")
+ if(GetCalorimeter()==kEMCAL)
{
if(GetCaloUtils()->GetEMCALChannelStatus(nModule,icol,irow)) continue;
}
amp = cells->GetAmplitude(iCell)*recalF;
time = cells->GetTime(iCell);
id = cells->GetCellNumber(iCell);
+ highG = cells->GetCellHighGain(id);
// Amplitude recalibration if set
- GetCaloUtils()->RecalibrateCellAmplitude(amp, fCalorimeter, id);
+ GetCaloUtils()->RecalibrateCellAmplitude(amp, GetCalorimeter(), id);
// Time recalibration if set
- GetCaloUtils()->RecalibrateCellTime (time, fCalorimeter, id, GetReader()->GetInputEvent()->GetBunchCrossNumber());
+ GetCaloUtils()->RecalibrateCellTime (time, GetCalorimeter(), id, GetReader()->GetInputEvent()->GetBunchCrossNumber());
//Transform time to ns
time *= 1.0e9;
if(time < fTimeCutMin || time > fTimeCutMax)
{
- if(GetDebug() > 0 )
- printf("AliAnaCalorimeterQA - Remove cell with Time %f\n",time);
+ AliDebug(1,Form("Remove cell with Time %f",time));
continue;
}
// Remove exotic cells, defined only for EMCAL
- if(fCalorimeter=="EMCAL" &&
+ if(GetCalorimeter()==kEMCAL &&
GetCaloUtils()->GetEMCALRecoUtils()->IsExoticCell(id, cells, bc)) continue;
fhAmplitude->Fill(amp);
fhAmpId ->Fill(amp,id);
fhAmpMod ->Fill(amp,nModule);
-
+ if(!highG) fhAmpIdLowGain->Fill(amp,id);
//E cross for exotic cells
if(amp > 0.05)
{
Int_t icols = icol;
Int_t irows = irow;
- if(fCalorimeter=="EMCAL")
+ if(GetCalorimeter()==kEMCAL)
{
icols = (nModule % 2) ? icol + fNMaxCols : icol;
if(nModule < 10 )
fhGridCells ->Fill(icols,irows);
fhGridCellsE->Fill(icols,irows,amp);
+ if(!highG)
+ {
+ fhGridCellsLowGain ->Fill(icols,irows);
+ fhGridCellsELowGain->Fill(icols,irows,amp);
+ }
+
if(fFillAllCellTimeHisto)
{
- //printf("%s: time %g\n",fCalorimeter.Data(), time);
+ //printf("%s: time %g\n",GetCalorimeterString().Data(), time);
Double_t v[3] = {0,0,0}; //vertex ;
GetReader()->GetVertex(v);
fhTimeId ->Fill(time,id);
fhTimeAmp ->Fill(amp,time);
fhGridCellsTime->Fill(icols,irows,time);
+ if(!highG) fhGridCellsTimeLowGain->Fill(icols,irows,time);
fhTimeMod ->Fill(time,nModule);
fhTimeAmpPerRCU [nModule*fNRCU+iRCU]->Fill(amp, time);
+ if(!highG)
+ {
+ fhTimeIdLowGain ->Fill(time,id);
+ fhTimeAmpLowGain->Fill(amp,time);
+ }
+
}
}
//Get Eta-Phi position of Cell
if(fFillAllPosHisto)
{
- if(fCalorimeter=="EMCAL" && GetCaloUtils()->IsEMCALGeoMatrixSet()){
+ if(GetCalorimeter()==kEMCAL && GetCaloUtils()->IsEMCALGeoMatrixSet()){
Float_t celleta = 0.;
Float_t cellphi = 0.;
GetEMCALGeometry()->EtaPhiFromIndex(id, celleta, cellphi);
fhRCellE->Fill(rcell,amp) ;
fhXYZCell->Fill(cellpos[0],cellpos[1],cellpos[2]) ;
}//EMCAL Cells
- else if(fCalorimeter=="PHOS" && GetCaloUtils()->IsPHOSGeoMatrixSet()){
+ else if(GetCalorimeter()==kPHOS && GetCaloUtils()->IsPHOSGeoMatrixSet()){
TVector3 xyz;
Int_t relId[4], module;
Float_t xCell, zCell;
//Number of cells per module
for(Int_t imod = 0; imod < fNModules; imod++ )
{
- if(GetDebug() > 1)
- printf("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - module %d calo %s cells %d\n", imod, fCalorimeter.Data(), nCellsInModule[imod]);
+ AliDebug(1,Form("Module %d calo %s cells %d", imod, GetCalorimeterString().Data(), nCellsInModule[imod]));
fhNCellsMod->Fill(nCellsInModule[imod],imod) ;
}
{
for (Int_t iCell = 0; iCell < cells->GetNumberOfCells(); iCell++)
{
- if(GetDebug() > 2)
- printf("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - Cell : amp %f, absId %d \n", cells->GetAmplitude(iCell), cells->GetCellNumber(iCell));
+ AliDebug(2,Form("Cell : amp %f, absId %d", cells->GetAmplitude(iCell), cells->GetCellNumber(iCell)));
+
+ Int_t nModule = GetModuleNumberCellIndexes(cells->GetCellNumber(iCell),GetCalorimeter(), icol, irow, iRCU);
- Int_t nModule = GetModuleNumberCellIndexes(cells->GetCellNumber(iCell),fCalorimeter, icol, irow, iRCU);
- if(GetDebug() > 2)
- printf("\t module %d, column %d, row %d \n", nModule,icol,irow);
+ AliDebug(2,Form("\t module %d, column %d, row %d", nModule,icol,irow));
if(nModule < fNModules)
{
//Check if the cell is a bad channel
if(GetCaloUtils()->IsBadChannelsRemovalSwitchedOn())
{
- if(fCalorimeter=="EMCAL")
+ if(GetCalorimeter()==kEMCAL)
{
if(GetCaloUtils()->GetEMCALChannelStatus(nModule,icol,irow)) continue;
}
id = cells->GetCellNumber(iCell);
// Amplitude recalibration if set
- GetCaloUtils()->RecalibrateCellAmplitude(amp, fCalorimeter, id);
+ GetCaloUtils()->RecalibrateCellAmplitude(amp, GetCalorimeter(), id);
// Time recalibration if set
- GetCaloUtils()->RecalibrateCellTime (time, fCalorimeter, id, GetReader()->GetInputEvent()->GetBunchCrossNumber());
+ GetCaloUtils()->RecalibrateCellTime (time, GetCalorimeter(), id, GetReader()->GetInputEvent()->GetBunchCrossNumber());
//Transform time to ns
time *= 1.0e9;
if(time < fTimeCutMin || time > fTimeCutMax)
{
- if(GetDebug() > 0 )
- printf("AliAnaCalorimeterQA - Remove cell with Time %f\n",time);
+ AliDebug(1,Form("Remove cell with Time %f",time));
continue;
}
// Remove exotic cells, defined only for EMCAL
- if(fCalorimeter=="EMCAL" &&
+ if(GetCalorimeter()==kEMCAL &&
GetCaloUtils()->GetEMCALRecoUtils()->IsExoticCell(id, cells, bc)) continue;
//E cross for exotic cells
//Get position of cell compare to cluster
- if(fCalorimeter=="EMCAL" && GetCaloUtils()->IsEMCALGeoMatrixSet()){
+ if(GetCalorimeter()==kEMCAL && GetCaloUtils()->IsEMCALGeoMatrixSet()){
Double_t cellpos[] = {0, 0, 0};
GetEMCALGeometry()->GetGlobal(absId, cellpos);
fhDeltaCellClusterRE ->Fill(r-rcell, clEnergy) ;
}//EMCAL and its matrices are available
- else if(fCalorimeter=="PHOS" && GetCaloUtils()->IsPHOSGeoMatrixSet())
+ else if(GetCalorimeter()==kPHOS && GetCaloUtils()->IsPHOSGeoMatrixSet())
{
TVector3 xyz;
Int_t relId[4], module;
Int_t dIphi = 0;
Int_t ietaMax=-1; Int_t iphiMax = 0; Int_t rcuMax = 0;
- Int_t smMax = GetModuleNumberCellIndexes(absIdMax,fCalorimeter, ietaMax, iphiMax, rcuMax);
+ Int_t smMax = GetModuleNumberCellIndexes(absIdMax,GetCalorimeter(), ietaMax, iphiMax, rcuMax);
- for (Int_t ipos = 0; ipos < clus->GetNCells(); ipos++) {
-
+ for (Int_t ipos = 0; ipos < clus->GetNCells(); ipos++)
+ {
Int_t absId = clus->GetCellsAbsId()[ipos];
Int_t ieta=-1; Int_t iphi = 0; Int_t rcu = 0;
- Int_t sm = GetModuleNumberCellIndexes(absId,fCalorimeter, ieta, iphi, rcu);
+ Int_t sm = GetModuleNumberCellIndexes(absId,GetCalorimeter(), ieta, iphi, rcu);
if(dIphi < TMath::Abs(iphi-iphiMax)) dIphi = TMath::Abs(iphi-iphiMax);
if(goodCluster)
{
-
// Was cluster matched?
Bool_t matched = GetCaloPID()->IsTrackMatched(clus,GetCaloUtils(),GetReader()->GetInputEvent());
fhDeltaIA[matched]->Fill(clus->E(),dIA);
- if(clus->E() > 0.5){
-
+ if(clus->E() > 0.5)
+ {
fhDeltaIAL0[matched] ->Fill(clus->GetM02(),dIA);
fhDeltaIAL1[matched] ->Fill(clus->GetM20(),dIA);
fhDeltaIANCells[matched]->Fill(clus->GetNCells(),dIA);
-
}
// Origin of clusters
Int_t nLabel = clus->GetNLabels();
Int_t* labels = clus->GetLabels();
+
if(IsDataMC())
{
- Int_t tag = GetMCAnalysisUtils()->CheckOrigin(labels,nLabel, GetReader());
+ Int_t tag = GetMCAnalysisUtils()->CheckOrigin(labels,nLabel, GetReader(),GetCalorimeter());
if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPhoton) &&
!GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPi0) &&
!GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCEta) &&
else fhBadClusterDeltaIEtaDeltaIPhiE6->Fill(dIeta,dIphi);
fhBadClusterDeltaIA->Fill(clus->E(),dIA);
-
}
}
if(fFillAllCellTimeHisto)
{
Double_t time = cells->GetCellTime(absId);
- GetCaloUtils()->RecalibrateCellTime(time, fCalorimeter, absId,GetReader()->GetInputEvent()->GetBunchCrossNumber());
+ GetCaloUtils()->RecalibrateCellTime(time, GetCalorimeter(), absId,GetReader()->GetInputEvent()->GetBunchCrossNumber());
Float_t diff = (tmax-time*1.0e9);
fhCellTimeSpreadRespectToCellMax->Fill(clus->E(), diff);
}// fill cell-cluster histogram loop
}//check time and energy of cells respect to max energy cell if cluster of more than 1 cell
-
- // Get vertex for photon momentum calculation and event selection
- Double_t v[3] = {0,0,0}; //vertex ;
- //GetReader()->GetVertex(v); //
-
- TLorentzVector mom ;
- clus->GetMomentum(mom,v);
-
- Float_t e = mom.E();
- Float_t pt = mom.Pt();
- Float_t eta = mom.Eta();
- Float_t phi = mom.Phi();
+
+ Float_t e = fClusterMomentum.E();
+ Float_t pt = fClusterMomentum.Pt();
+ Float_t eta = fClusterMomentum.Eta();
+ Float_t phi = fClusterMomentum.Phi();
if(phi < 0) phi +=TMath::TwoPi();
- if(GetDebug() > 0) {
- printf("AliAnaCalorimeterQA::ClusterHistograms() - cluster: E %2.3f, pT %2.3f, eta %2.3f, phi %2.3f \n",e,pt,eta,phi*TMath::RadToDeg());
- }
+ AliDebug(1,Form("cluster: E %2.3f, pT %2.3f, eta %2.3f, phi %2.3f",e,pt,eta,phi*TMath::RadToDeg()));
fhE ->Fill(e);
if(nModule >=0 && nModule < fNModules) fhEMod->Fill(e,nModule);
AliVCaloCells* cells)
{
// Fill clusters related histograms
-
- TLorentzVector mom ;
Int_t nLabel = 0 ;
Int_t *labels = 0x0;
Int_t nCaloClusters = caloClusters->GetEntriesFast() ;
// Get vertex for photon momentum calculation and event selection
Double_t v[3] = {0,0,0}; //vertex ;
//GetReader()->GetVertex(v);
-
+
Int_t *nClustersInModule = new Int_t[fNModules];
for(Int_t imod = 0; imod < fNModules; imod++ ) nClustersInModule[imod] = 0;
- if(GetDebug() > 0)
- printf("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - In %s there are %d clusters \n", fCalorimeter.Data(), nCaloClusters);
+ AliDebug(1,Form("In %s there are %d clusters", GetCalorimeterString().Data(), nCaloClusters));
// Loop over CaloClusters
for(Int_t iclus = 0; iclus < nCaloClusters; iclus++)
{
- if(GetDebug() > 0)
- printf("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - cluster: %d/%d, data %d \n",
- iclus+1,nCaloClusters,GetReader()->GetDataType());
+ AliDebug(1,Form("Cluster: %d/%d, data %d",iclus+1,nCaloClusters,GetReader()->GetDataType()));
- AliVCluster* clus = (AliVCluster*)caloClusters->At(iclus);
+ AliVCluster* clus = (AliVCluster*) caloClusters->At(iclus);
// Get the fraction of the cluster energy that carries the cell with highest energy and its absId
Float_t maxCellFraction = 0.;
Double_t tof = clus->GetTOF()*1.e9;
if( tof < fTimeCutMin || tof > fTimeCutMax )
{
- if(GetDebug() > 0 )printf("AliAnaCalorimeterQA - Remove cluster with TOF %f\n",tof);
+ AliDebug(1,Form("Remove cluster with TOF %f",tof));
continue;
}
// Get cluster kinematics
- clus->GetMomentum(mom,v);
+ clus->GetMomentum(fClusterMomentum,v);
// Check only certain regions
Bool_t in = kTRUE;
- if(IsFiducialCutOn()) in = GetFiducialCut()->IsInFiducialCut(mom,fCalorimeter) ;
+ if(IsFiducialCutOn()) in = GetFiducialCut()->IsInFiducialCut(fClusterMomentum.Eta(),fClusterMomentum.Phi(),GetCalorimeter()) ;
if(!in) continue;
// MC labels
//Get time of max cell
Double_t tmax = cells->GetCellTime(absIdMax);
- GetCaloUtils()->RecalibrateCellTime(tmax, fCalorimeter, absIdMax,GetReader()->GetInputEvent()->GetBunchCrossNumber());
+ GetCaloUtils()->RecalibrateCellTime(tmax, GetCalorimeter(), absIdMax,GetReader()->GetInputEvent()->GetBunchCrossNumber());
tmax*=1.e9;
// Fill histograms related to single cluster
fhClusterMaxCellDiffNoCut->Fill(clus->E(),maxCellFraction);
Float_t ampMax = cells->GetCellAmplitude(absIdMax);
- GetCaloUtils()->RecalibrateCellAmplitude(ampMax,fCalorimeter, absIdMax);
+ GetCaloUtils()->RecalibrateCellAmplitude(ampMax,GetCalorimeter(), absIdMax);
if(fStudyExotic) ExoticHistograms(absIdMax, ampMax, clus, cells);
nCaloClustersAccepted++;
nModule = GetModuleNumber(clus);
- if(nModule >=0 && nModule < fNModules && mom.E() > 2*fCellAmpMin)
+ if(nModule >=0 && nModule < fNModules && fClusterMomentum.E() > 2*fCellAmpMin)
nClustersInModule[nModule]++;
// Cluster weights
Int_t mcOK = kFALSE;
Int_t pdg = -1;
if(IsDataMC() && nLabel > 0 && labels)
- mcOK = ClusterMCHistograms(mom, matched, labels, nLabel, pdg);
+ mcOK = ClusterMCHistograms(matched, labels, nLabel, pdg);
// Matched clusters with tracks, also do some MC comparison, needs input from ClusterMCHistograms
if( matched && fFillAllTMHisto)
- ClusterMatchedWithTrackHistograms(clus,mom,mcOK,pdg);
+ ClusterMatchedWithTrackHistograms(clus,mcOK,pdg);
// Invariant mass
// Try to reduce background with a mild shower shape cut and no more than 1 maxima
if(fFillAllPi0Histo && nCaloClusters > 1 && nCaloCellsPerCluster > 1 &&
GetCaloUtils()->GetNumberOfLocalMaxima(clus,cells) == 1 &&
clus->GetM02() < 0.5 && clus->E() > fMinInvMassECut)
- InvariantMassHistograms(iclus, mom, nModule, caloClusters,cells);
+ InvariantMassHistograms(iclus, nModule, caloClusters,cells);
}//cluster loop
// Number of clusters per module
for(Int_t imod = 0; imod < fNModules; imod++ )
{
- if(GetDebug() > 1)
- printf("AliAnaCalorimeterQA::ClusterLoopHistograms() - module %d calo %s clusters %d\n", imod, fCalorimeter.Data(), nClustersInModule[imod]);
+ AliDebug(1,Form("Module %d calo %s clusters %d", imod, GetCalorimeterString().Data(), nClustersInModule[imod]));
fhNClustersMod->Fill(nClustersInModule[imod],imod);
}
}
-//__________________________________________________________________________________________
-Bool_t AliAnaCalorimeterQA::ClusterMCHistograms(TLorentzVector mom, Bool_t matched,
- const Int_t * labels, Int_t nLabels, Int_t & pdg )
+//__________________________________________________________________________________
+Bool_t AliAnaCalorimeterQA::ClusterMCHistograms(Bool_t matched,const Int_t * labels,
+ Int_t nLabels, Int_t & pdg )
{
//Fill histograms only possible when simulation
if(!labels || nLabels<=0)
{
- if(GetDebug() > 1) printf("AliAnaCalorimeterQA::ClusterMCHistograms() - Strange, labels array %p, n labels %d \n", labels,nLabels);
+ AliWarning(Form("Strange, labels array %p, n labels %d", labels,nLabels));
return kFALSE;
}
- if(GetDebug() > 1)
- {
- printf("AliAnaCalorimeterQA::ClusterMCHistograms() - Primaries: nlabels %d\n",nLabels);
- }
+ AliDebug(1,Form("Primaries: nlabels %d",nLabels));
- Float_t e = mom.E();
- Float_t eta = mom.Eta();
- Float_t phi = mom.Phi();
+ Float_t e = fClusterMomentum.E();
+ Float_t eta = fClusterMomentum.Eta();
+ Float_t phi = fClusterMomentum.Phi();
if(phi < 0) phi +=TMath::TwoPi();
AliAODMCParticle * aodprimary = 0x0;
if(label < 0)
{
- if(GetDebug() >= 0) printf("AliAnaCalorimeterQA::ClusterMCHistograms() *** bad label ***: label %d \n", label);
+ AliDebug(1,Form(" *** bad label ***: label %d", label));
return kFALSE;
}
Int_t charge = 0;
//Check the origin.
- Int_t tag = GetMCAnalysisUtils()->CheckOrigin(labels,nLabels, GetReader());
+ Int_t tag = GetMCAnalysisUtils()->CheckOrigin(labels,nLabels, GetReader(),GetCalorimeter());
if ( GetReader()->ReadStack() &&
!GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCUnknown))
if( label >= GetMCStack()->GetNtrack())
{
- if(GetDebug() >= 0) printf("AliAnaCalorimeterQA::ClusterMCHistograms() *** large label ***: label %d, n tracks %d \n", label, GetMCStack()->GetNtrack());
+ AliDebug(1,Form("*** large label ***: label %d, n tracks %d", label, GetMCStack()->GetNtrack()));
return kFALSE;
}
vyMC = primary->Vy();
iParent = primary->GetFirstMother();
- if(GetDebug() > 1 )
- {
- printf("AliAnaCalorimeterQA::ClusterMCHistograms() - Cluster most contributing mother: \n");
- printf("\t Mother label %d, pdg %d, %s, status %d, parent %d \n",iMother, pdg0, primary->GetName(),status, iParent);
- }
+ AliDebug(1,"Cluster most contributing mother:");
+ AliDebug(1,Form("\t Mother label %d, pdg %d, %s, status %d, parent %d",iMother, pdg0, primary->GetName(),status, iParent));
+
//Get final particle, no conversion products
if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCConversion))
primary = GetMCStack()->Particle(iParent);
pdg = TMath::Abs(primary->GetPdgCode());
- if(GetDebug() > 1 ) printf("AliAnaCalorimeterQA::ClusterMCHistograms() - Converted cluster!. Find before conversion: \n");
+ AliDebug(2,"Converted cluster!. Find before conversion:");
while((pdg == 22 || pdg == 11) && status != 1)
{
break;
}
- if(GetDebug() > 1 )printf("\t pdg %d, index %d, %s, status %d \n",pdg, iMother, primary->GetName(),status);
+ AliDebug(2,Form("\t pdg %d, index %d, %s, status %d",pdg, iMother, primary->GetName(),status));
}
- if(GetDebug() > 1 )
- {
- printf("AliAnaCalorimeterQA::ClusterHistograms() - Converted Cluster mother before conversion: \n");
- printf("\t Mother label %d, pdg %d, %s, status %d, parent %d \n",iMother, pdg, primary->GetName(), status, iParent);
- }
+ AliDebug(1,"Converted Cluster mother before conversion:");
+ AliDebug(1,Form("\t Mother label %d, pdg %d, %s, status %d, parent %d",iMother, pdg, primary->GetName(), status, iParent));
}
if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPi0) ||
GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCEta))
{
- if(GetDebug() > 1 ) printf("AliAnaCalorimeterQA::ClusterHistograms() - Overlapped Meson decay!, Find it: \n");
+ AliDebug(2,"Overlapped Meson decay!, Find it:");
while(pdg != 111 && pdg != 221)
{
pdg = TMath::Abs(primary->GetPdgCode());
iParent = primary->GetFirstMother();
- if( iParent < 0 )break;
+ if( iParent < 0 ) break;
- if(GetDebug() > 1 ) printf("\t pdg %d, %s, index %d\n",pdg, primary->GetName(),iMother);
+ AliDebug(2,Form("\t pdg %d, %s, index %d",pdg, primary->GetName(),iMother));
if(iMother==-1)
{
- printf("AliAnaCalorimeterQA::ClusterHistograms() - Tagged as Overlapped photon but meson not found, why?\n");
+ AliWarning("Tagged as Overlapped photon but meson not found, why?");
//break;
}
}
- if(GetDebug() > 2 ) printf("AliAnaCalorimeterQA::ClusterHistograms() - Overlapped %s decay, label %d \n",
- primary->GetName(),iMother);
+ AliDebug(2,Form("Overlapped %s decay, label %d",primary->GetName(),iMother));
}
eMC = primary->Energy();
vyMC = aodprimary->Yv();
iParent = aodprimary->GetMother();
- if( GetDebug() > 1 )
- {
- printf("AliAnaCalorimeterQA::ClusterHistograms() - Cluster most contributing mother: \n");
- printf("\t Mother label %d, pdg %d, Primary? %d, Physical Primary? %d, parent %d \n",
- iMother, pdg0, aodprimary->IsPrimary(), aodprimary->IsPhysicalPrimary(), iParent);
- }
+ AliDebug(1,"Cluster most contributing mother:");
+ AliDebug(1,Form("\t Mother label %d, pdg %d, Primary? %d, Physical Primary? %d, parent %d",
+ iMother, pdg0, aodprimary->IsPrimary(), aodprimary->IsPhysicalPrimary(), iParent));
//Get final particle, no conversion products
if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCConversion) )
{
- if( GetDebug() > 1 )
- printf("AliAnaCalorimeterQA::ClusterHistograms() - Converted cluster!. Find before conversion: \n");
+ AliDebug(2,"Converted cluster!. Find before conversion:");
//Get the parent
aodprimary = (AliAODMCParticle*)(GetReader()->GetAODMCParticles())->At(iParent);
pdg = TMath::Abs(aodprimary->GetPdgCode());
break;
}
- if( GetDebug() > 1 )
- printf("\t pdg %d, index %d, Primary? %d, Physical Primary? %d \n",
- pdg, iMother, aodprimary->IsPrimary(), aodprimary->IsPhysicalPrimary());
+ AliDebug(2,Form("\t pdg %d, index %d, Primary? %d, Physical Primary? %d",
+ pdg, iMother, aodprimary->IsPrimary(), aodprimary->IsPhysicalPrimary()));
}
- if( GetDebug() > 1 )
- {
- printf("AliAnaCalorimeterQA::ClusterHistograms() - Converted Cluster mother before conversion: \n");
- printf("\t Mother label %d, pdg %d, parent %d, Primary? %d, Physical Primary? %d \n",
- iMother, pdg, iParent, aodprimary->IsPrimary(), aodprimary->IsPhysicalPrimary());
- }
+ AliDebug(1,"Converted Cluster mother before conversion:");
+ AliDebug(1,Form("\t Mother label %d, pdg %d, parent %d, Primary? %d, Physical Primary? %d",
+ iMother, pdg, iParent, aodprimary->IsPrimary(), aodprimary->IsPhysicalPrimary()));
+
}
//Overlapped pi0 (or eta, there will be very few), get the meson
if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPi0) ||
GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCEta))
{
- if(GetDebug() > 1 ) printf("AliAnaCalorimeterQA::ClusterHistograms() - Overlapped Meson decay!, Find it: PDG %d, mom %d \n",pdg, iMother);
+ AliDebug(2,Form("Overlapped Meson decay!, Find it: PDG %d, mom %d",pdg, iMother));
while(pdg != 111 && pdg != 221)
{
if( iParent < 0 ) break;
- if( GetDebug() > 1 ) printf("\t pdg %d, index %d\n",pdg, iMother);
+ AliDebug(2,Form("\t pdg %d, index %d",pdg, iMother));
if(iMother==-1)
{
- printf("AliAnaCalorimeterQA::ClusterHistograms() - Tagged as Overlapped photon but meson not found, why?\n");
+ AliWarning("Tagged as Overlapped photon but meson not found, why?");
//break;
}
}
- if(GetDebug() > 2 ) printf("AliAnaCalorimeterQA::ClusterHistograms() - Overlapped %s decay, label %d \n",
- aodprimary->GetName(),iMother);
+ AliDebug(2,Form("Overlapped %s decay, label %d",aodprimary->GetName(),iMother));
}
status = aodprimary->IsPrimary();
//printf("vertex: vx %f, vy %f, vz %f, r %f \n", vxMC, vyMC, vz, r);
//Overlapped pi0 (or eta, there will be very few)
- if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPi0))
- {
- fhRecoMCE [kmcPi0][matched] ->Fill(e,eMC);
- if(e > 0.5 && eMC > 0.5) fhRecoMCEta[kmcPi0][(matched)]->Fill(eta,etaMC);
- if(e > 0.5 && eMC > 0.5) fhRecoMCPhi[kmcPi0][(matched)]->Fill(phi,phiMC);
- if(eMC > 0) fhRecoMCRatioE [kmcPi0][(matched)]->Fill(e,e/eMC);
- fhRecoMCDeltaE [kmcPi0][(matched)]->Fill(e,eMC-e);
- fhRecoMCDeltaPhi[kmcPi0][(matched)]->Fill(e,phiMC-phi);
- fhRecoMCDeltaEta[kmcPi0][(matched)]->Fill(e,etaMC-eta);
+ Int_t mcIndex = -1;
+ if ( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPi0 ) )
+ {
+ mcIndex = kmcPi0;
}//Overlapped pizero decay
- else if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCEta))
- {
- fhRecoMCE [kmcEta][(matched)] ->Fill(e,eMC);
- if(e > 0.5 && eMC > 0.5) fhRecoMCEta[kmcEta][(matched)]->Fill(eta,etaMC);
- if(e > 0.5 && eMC > 0.5) fhRecoMCPhi[kmcEta][(matched)]->Fill(phi,phiMC);
- if(eMC > 0) fhRecoMCRatioE [kmcEta][(matched)]->Fill(e,e/eMC);
- fhRecoMCDeltaE [kmcEta][(matched)]->Fill(e,eMC-e);
- fhRecoMCDeltaPhi[kmcEta][(matched)]->Fill(e,phiMC-phi);
- fhRecoMCDeltaEta[kmcEta][(matched)]->Fill(e,etaMC-eta);
+ else if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCEta ) )
+ {
+ mcIndex = kmcEta;
}//Overlapped eta decay
- else if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPhoton) &&
- !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCConversion))
+ else if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPhoton ) )
{
- fhRecoMCE [kmcPhoton][(matched)] ->Fill(e,eMC);
- if(e > 0.5 && eMC > 0.5) fhRecoMCEta[kmcPhoton][(matched)]->Fill(eta,etaMC);
- if(e > 0.5 && eMC > 0.5) fhRecoMCPhi[kmcPhoton][(matched)]->Fill(phi,phiMC);
- if(eMC > 0) fhRecoMCRatioE [kmcPhoton][(matched)]->Fill(e,e/eMC);
-
- fhRecoMCDeltaE [kmcPhoton][(matched)]->Fill(e,eMC-e);
- fhRecoMCDeltaPhi[kmcPhoton][(matched)]->Fill(e,phiMC-phi);
- fhRecoMCDeltaEta[kmcPhoton][(matched)]->Fill(e,etaMC-eta);
+ if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCConversion))
+ mcIndex = kmcPhotonConv ;
+ else
+ mcIndex = kmcPhoton ;
}//photon
- else if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCElectron) &&
- !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCConversion))
- {
- fhRecoMCE [kmcElectron][(matched)] ->Fill(e,eMC);
- if(e > 0.5 && eMC > 0.5) fhRecoMCEta[kmcElectron][(matched)]->Fill(eta,etaMC);
- if(e > 0.5 && eMC > 0.5) fhRecoMCPhi[kmcElectron][(matched)]->Fill(phi,phiMC);
- if(eMC > 0) fhRecoMCRatioE [kmcElectron][(matched)]->Fill(e,e/eMC);
- fhRecoMCDeltaE [kmcElectron][(matched)]->Fill(e,eMC-e);
- fhRecoMCDeltaPhi[kmcElectron][(matched)]->Fill(e,phiMC-phi);
- fhRecoMCDeltaEta[kmcElectron][(matched)]->Fill(e,etaMC-eta);
- fhEMVxyz ->Fill(vxMC,vyMC);//,vz);
- fhEMR ->Fill(e,rVMC);
+ else if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCElectron) )
+ {
+ mcIndex = kmcElectron;
+ fhEMVxyz ->Fill(vxMC,vyMC);//,vz);
+ fhEMR ->Fill(e,rVMC);
}
else if(charge == 0)
{
- fhRecoMCE [kmcNeHadron][(matched)] ->Fill(e,eMC);
- if(e > 0.5 && eMC > 0.5) fhRecoMCEta[kmcNeHadron][(matched)]->Fill(eta,etaMC);
- if(e > 0.5 && eMC > 0.5) fhRecoMCPhi[kmcNeHadron][(matched)]->Fill(phi,phiMC);
- if(eMC > 0) fhRecoMCRatioE [kmcNeHadron][(matched)]->Fill(e,e/eMC);
- fhRecoMCDeltaE [kmcNeHadron][(matched)]->Fill(e,eMC-e);
- fhRecoMCDeltaPhi[kmcNeHadron][(matched)]->Fill(e,phiMC-phi);
- fhRecoMCDeltaEta[kmcNeHadron][(matched)]->Fill(e,etaMC-eta);
+ mcIndex = kmcNeHadron;
fhHaVxyz ->Fill(vxMC,vyMC);//,vz);
fhHaR ->Fill(e,rVMC);
}
else if(charge!=0)
{
- fhRecoMCE [kmcChHadron][(matched)] ->Fill(e,eMC);
- if(e > 0.5 && eMC > 0.5) fhRecoMCEta[kmcChHadron][(matched)]->Fill(eta,etaMC);
- if(e > 0.5 && eMC > 0.5) fhRecoMCPhi[kmcChHadron][(matched)]->Fill(phi,phiMC);
- if(eMC > 0) fhRecoMCRatioE [kmcChHadron][(matched)]->Fill(e,e/eMC);
- fhRecoMCDeltaE [kmcChHadron][(matched)]->Fill(e,eMC-e);
- fhRecoMCDeltaPhi[kmcChHadron][(matched)]->Fill(e,phiMC-phi);
- fhRecoMCDeltaEta[kmcChHadron][(matched)]->Fill(e,etaMC-eta);
- fhHaVxyz ->Fill(vxMC,vyMC);//,vz);
- fhHaR ->Fill(e,rVMC);
+ mcIndex = kmcChHadron;
+ fhHaVxyz ->Fill(vxMC,vyMC);//,vz);
+ fhHaR ->Fill(e,rVMC);
+ }
+
+ //printf("mc index %d\n",mcIndex);
+
+ if( mcIndex >= 0 && mcIndex < 7 )
+ {
+ fhRecoMCE [mcIndex][(matched)] ->Fill(e,eMC);
+ if(e > 0.5 && eMC > 0.5) fhRecoMCEta[mcIndex][(matched)]->Fill(eta,etaMC);
+ if(e > 0.5 && eMC > 0.5) fhRecoMCPhi[mcIndex][(matched)]->Fill(phi,phiMC);
+ if(eMC > 0) fhRecoMCRatioE [mcIndex][(matched)]->Fill(e,e/eMC);
+ fhRecoMCDeltaE [mcIndex][(matched)]->Fill(e,eMC-e);
+ fhRecoMCDeltaPhi[mcIndex][(matched)]->Fill(e,phiMC-phi);
+ fhRecoMCDeltaEta[mcIndex][(matched)]->Fill(e,etaMC-eta);
}
if( primary || aodprimary ) return kTRUE ;
}
-//________________________________________________________________________________________________
-void AliAnaCalorimeterQA::ClusterMatchedWithTrackHistograms(AliVCluster *clus, TLorentzVector mom,
- Bool_t okPrimary, Int_t pdg)
+//_________________________________________________________________________________________________________
+void AliAnaCalorimeterQA::ClusterMatchedWithTrackHistograms(AliVCluster *clus, Bool_t okPrimary, Int_t pdg)
{
//Histograms for clusters matched with tracks
- Float_t e = mom.E();
- Float_t pt = mom.Pt();
- Float_t eta = mom.Eta();
- Float_t phi = mom.Phi();
+ Float_t e = fClusterMomentum.E();
+ Float_t pt = fClusterMomentum.Pt();
+ Float_t eta = fClusterMomentum.Eta();
+ Float_t phi = fClusterMomentum.Phi();
if(phi < 0) phi +=TMath::TwoPi();
fhECharged ->Fill(e);
{
// Correlate information from PHOS and EMCAL and with V0 and track multiplicity
- //Clusters
+ //Clusters arrays
TObjArray * caloClustersEMCAL = GetEMCALClusters();
TObjArray * caloClustersPHOS = GetPHOSClusters();
+ if(!caloClustersEMCAL || !caloClustersPHOS)
+ {
+ AliDebug(1,Form("PHOS (%p) or EMCAL (%p) clusters array not available, do not correlate",caloClustersPHOS,caloClustersEMCAL));
+ return ;
+ }
+
+ //Cells arrays
+ AliVCaloCells * cellsEMCAL = GetEMCALCells();
+ AliVCaloCells * cellsPHOS = GetPHOSCells();
+
+ if(!cellsEMCAL || !cellsPHOS)
+ {
+ AliDebug(1,Form("PHOS (%p) or EMCAL (%p) cells array ot available, do not correlate",cellsPHOS,cellsEMCAL));
+ return ;
+ }
+
+ // Clusters parameters
Int_t nclEMCAL = caloClustersEMCAL->GetEntriesFast();
Int_t nclPHOS = caloClustersPHOS ->GetEntriesFast();
for(iclus = 0 ; iclus < caloClustersPHOS->GetEntriesFast(); iclus++)
sumClusterEnergyPHOS += ((AliVCluster*)caloClustersPHOS->At(iclus))->E();
- //Cells
-
- AliVCaloCells * cellsEMCAL = GetEMCALCells();
- AliVCaloCells * cellsPHOS = GetPHOSCells();
-
+ //Cells parameters
Int_t ncellsEMCAL = cellsEMCAL->GetNumberOfCells();
Int_t ncellsPHOS = cellsPHOS ->GetNumberOfCells();
Int_t v0S = GetV0Signal(0)+GetV0Signal(1);
Int_t v0M = GetV0Multiplicity(0)+GetV0Multiplicity(1);
Int_t trM = GetTrackMultiplicity();
- if(fCalorimeter=="PHOS")
+ if(GetCalorimeter()==kPHOS)
{
fhCaloV0MCorrNClusters ->Fill(v0M,nclPHOS);
fhCaloV0MCorrEClusters ->Fill(v0M,sumClusterEnergyPHOS);
fhCaloEvPECells ->Fill(ep ,sumCellEnergyEMCAL);
}
- if(GetDebug() > 0 )
- {
- printf("AliAnaCalorimeterQA::Correlate(): \n");
- printf("\t EMCAL: N cells %d, N clusters %d, summed E cells %f, summed E clusters %f \n",
- ncellsEMCAL,nclEMCAL, sumCellEnergyEMCAL,sumClusterEnergyEMCAL);
- printf("\t PHOS : N cells %d, N clusters %d, summed E cells %f, summed E clusters %f \n",
- ncellsPHOS,nclPHOS,sumCellEnergyPHOS,sumClusterEnergyPHOS);
- printf("\t V0 : Signal %d, Multiplicity %d, Track Multiplicity %d \n", v0S,v0M,trM);
- printf("\t centrality : %f, Event plane angle %f \n", cen,ep);
- }
-
+ AliDebug(1,"Correlate():");
+ AliDebug(1,Form("\t EMCAL: N cells %d, N clusters %d, summed E cells %f, summed E clusters %f",
+ ncellsEMCAL,nclEMCAL, sumCellEnergyEMCAL,sumClusterEnergyEMCAL));
+ AliDebug(1,Form("\t PHOS : N cells %d, N clusters %d, summed E cells %f, summed E clusters %f",
+ ncellsPHOS,nclPHOS,sumCellEnergyPHOS,sumClusterEnergyPHOS));
+ AliDebug(1,Form("\t V0 : Signal %d, Multiplicity %d, Track Multiplicity %d", v0S,v0M,trM));
+ AliDebug(1,Form("\t centrality : %f, Event plane angle %f", cen,ep));
+
}
//__________________________________________________
const Int_t buffersize = 255;
char onePar[buffersize] ;
- snprintf(onePar,buffersize,"--- AliAnaCalorimeterQA ---\n") ;
+ snprintf(onePar,buffersize,"--- AliAnaCalorimeterQA ---:") ;
parList+=onePar ;
- snprintf(onePar,buffersize,"Calorimeter: %s\n",fCalorimeter.Data()) ;
+ snprintf(onePar,buffersize,"Calorimeter: %s;",GetCalorimeterString().Data()) ;
parList+=onePar ;
- snprintf(onePar,buffersize,"Time Cut : %2.2f < T < %2.2f ns \n",fTimeCutMin, fTimeCutMax) ;
+ snprintf(onePar,buffersize,"Time Cut : %2.2f < T < %2.2f ns;",fTimeCutMin, fTimeCutMax) ;
parList+=onePar ;
- snprintf(onePar,buffersize,"PHOS Cell Amplitude > %2.2f GeV, EMCAL Cell Amplitude > %2.2f GeV \n",fPHOSCellAmpMin, fEMCALCellAmpMin) ;
+ snprintf(onePar,buffersize,"PHOS Cell Amplitude > %2.2f GeV, EMCAL Cell Amplitude > %2.2f GeV;",fPHOSCellAmpMin, fEMCALCellAmpMin) ;
parList+=onePar ;
- snprintf(onePar,buffersize,"Inv. Mass E1, E2 > %2.2f GeV \n",fMinInvMassECut) ;
+ snprintf(onePar,buffersize,"Inv. Mass E1, E2 > %2.2f GeV;",fMinInvMassECut) ;
parList+=onePar ;
//Get parameters set in base class.
if(ampMax < 0.01)
{
- printf("AliAnaCalorimeterQA::ExoticHistograms()- Low amplitude energy %f\n",ampMax);
+ AliDebug(1,Form("Low amplitude energy %f",ampMax));
return;
}
{
Int_t absId = clus->GetCellsAbsId()[icell];
Double_t time = cells->GetCellTime(absId);
- GetCaloUtils()->RecalibrateCellTime(time, fCalorimeter, absId,GetReader()->GetInputEvent()->GetBunchCrossNumber());
+ GetCaloUtils()->RecalibrateCellTime(time, GetCalorimeter(), absId,GetReader()->GetInputEvent()->GetBunchCrossNumber());
Float_t diff = (tmax-time)*1e9;
fhExoDTime[idt]->Fill(en, diff);
// Init the number of modules, set in the class AliCalorimeterUtils
fNModules = GetCaloUtils()->GetNumberOfSuperModulesUsed();
- if(fCalorimeter=="PHOS" && fNModules > 4) fNModules = 4;
+ if(GetCalorimeter()==kPHOS && fNModules > 4) fNModules = 4;
//Histograms
Int_t nptbins = GetHistogramRanges()->GetHistoPtBins(); Float_t ptmax = GetHistogramRanges()->GetHistoPtMax(); Float_t ptmin = GetHistogramRanges()->GetHistoPtMin();
fNMaxRows = 24;
fNRCU = 2 ;
//PHOS
- if(fCalorimeter=="PHOS")
+ if(GetCalorimeter()==kPHOS)
{
fNMaxCols = 56;
fNMaxRows = 64;
fhAmpId = new TH2F ("hAmpId","#it{E}_{cell}", nfineptbins,ptfinemin,ptfinemax,fNMaxRows*fNMaxCols*fNModules,0,fNMaxRows*fNMaxCols*fNModules);
fhAmpId->SetXTitle("#it{E}_{cell} (GeV)");
outputContainer->Add(fhAmpId);
+
+ fhAmpIdLowGain = new TH2F ("hAmpIdLG","Low gain: #it{E}_{cell}", nfineptbins,ptfinemin,ptfinemax,fNMaxRows*fNMaxCols*fNModules,0,fNMaxRows*fNMaxCols*fNModules);
+ fhAmpIdLowGain->SetXTitle("#it{E}_{cell} (GeV)");
+ outputContainer->Add(fhAmpIdLowGain);
- if(fFillAllCellTimeHisto)
+ if(fFillAllCellTimeHisto)
{
fhCellTimeSpreadRespectToCellMax = new TH2F ("hCellTimeSpreadRespectToCellMax","t_{cell max}-t_{cell i} per cluster", nptbins,ptmin,ptmax,tdbins,tdmin,tdmax);
fhCellTimeSpreadRespectToCellMax->SetXTitle("#it{E} (GeV)");
fhTimeAmp->SetXTitle("#it{E}_{cell} (GeV)");
outputContainer->Add(fhTimeAmp);
+ fhTimeIdLowGain = new TH2F ("hTimeIdLG","Low gain: #it{t}_{cell} vs Absolute Id",
+ ntimebins,timemin,timemax,fNMaxRows*fNMaxCols*fNModules,0,fNMaxRows*fNMaxCols*fNModules);
+ fhTimeIdLowGain->SetXTitle("#it{t}_{cell} (ns)");
+ fhTimeIdLowGain->SetYTitle("Cell Absolute Id");
+ outputContainer->Add(fhTimeIdLowGain);
+
+ fhTimeAmpLowGain = new TH2F ("hTimeAmpLG","Low gain: #it{t}_{cell} vs #it{E}_{cell}",nptbins*2,ptmin,ptmax,ntimebins,timemin,timemax);
+ fhTimeAmpLowGain->SetYTitle("#it{t}_{cell} (ns)");
+ fhTimeAmpLowGain->SetXTitle("#it{E}_{cell} (GeV)");
+ outputContainer->Add(fhTimeAmpLowGain);
+
}
fhCellECross = new TH2F ("hCellECross","1 - Energy in cross around cell / cell energy",
outputContainer->Add(fhCaloCorrECells);
//Calorimeter VS V0 signal
- fhCaloV0SCorrNClusters = new TH2F ("hCaloV0SNClusters",Form("# clusters in %s vs V0 signal",fCalorimeter.Data()), nv0sbins,nv0smin,nv0smax,nclbins,nclmin,nclmax);
+ fhCaloV0SCorrNClusters = new TH2F ("hCaloV0SNClusters",Form("# clusters in %s vs V0 signal",GetCalorimeterString().Data()), nv0sbins,nv0smin,nv0smax,nclbins,nclmin,nclmax);
fhCaloV0SCorrNClusters->SetXTitle("V0 signal");
- fhCaloV0SCorrNClusters->SetYTitle(Form("number of clusters in %s",fCalorimeter.Data()));
+ fhCaloV0SCorrNClusters->SetYTitle(Form("number of clusters in %s",GetCalorimeterString().Data()));
outputContainer->Add(fhCaloV0SCorrNClusters);
- fhCaloV0SCorrEClusters = new TH2F ("hCaloV0SEClusters",Form("summed energy of clusters in %s vs V0 signal",fCalorimeter.Data()), nv0sbins,nv0smin,nv0smax,nptbins,ptmin,ptmax*2);
+ fhCaloV0SCorrEClusters = new TH2F ("hCaloV0SEClusters",Form("summed energy of clusters in %s vs V0 signal",GetCalorimeterString().Data()), nv0sbins,nv0smin,nv0smax,nptbins,ptmin,ptmax*2);
fhCaloV0SCorrEClusters->SetXTitle("V0 signal");
- fhCaloV0SCorrEClusters->SetYTitle(Form("#Sigma #it{E} of clusters in %s (GeV)",fCalorimeter.Data()));
+ fhCaloV0SCorrEClusters->SetYTitle(Form("#Sigma #it{E} of clusters in %s (GeV)",GetCalorimeterString().Data()));
outputContainer->Add(fhCaloV0SCorrEClusters);
- fhCaloV0SCorrNCells = new TH2F ("hCaloV0SNCells",Form("# Cells in %s vs V0 signal",fCalorimeter.Data()), nv0sbins,nv0smin,nv0smax, ncebins,ncemin,ncemax);
+ fhCaloV0SCorrNCells = new TH2F ("hCaloV0SNCells",Form("# Cells in %s vs V0 signal",GetCalorimeterString().Data()), nv0sbins,nv0smin,nv0smax, ncebins,ncemin,ncemax);
fhCaloV0SCorrNCells->SetXTitle("V0 signal");
- fhCaloV0SCorrNCells->SetYTitle(Form("number of Cells in %s",fCalorimeter.Data()));
+ fhCaloV0SCorrNCells->SetYTitle(Form("number of Cells in %s",GetCalorimeterString().Data()));
outputContainer->Add(fhCaloV0SCorrNCells);
- fhCaloV0SCorrECells = new TH2F ("hCaloV0SECells",Form("summed energy of Cells in %s vs V0 signal",fCalorimeter.Data()), nv0sbins,nv0smin,nv0smax,nptbins,ptmin,ptmax*2);
+ fhCaloV0SCorrECells = new TH2F ("hCaloV0SECells",Form("summed energy of Cells in %s vs V0 signal",GetCalorimeterString().Data()), nv0sbins,nv0smin,nv0smax,nptbins,ptmin,ptmax*2);
fhCaloV0SCorrECells->SetXTitle("V0 signal");
- fhCaloV0SCorrECells->SetYTitle(Form("#Sigma #it{E} of Cells in %s (GeV)",fCalorimeter.Data()));
+ fhCaloV0SCorrECells->SetYTitle(Form("#Sigma #it{E} of Cells in %s (GeV)",GetCalorimeterString().Data()));
outputContainer->Add(fhCaloV0SCorrECells);
//Calorimeter VS V0 multiplicity
- fhCaloV0MCorrNClusters = new TH2F ("hCaloV0MNClusters",Form("# clusters in %s vs V0 signal",fCalorimeter.Data()), nv0mbins,nv0mmin,nv0mmax,nclbins,nclmin,nclmax);
+ fhCaloV0MCorrNClusters = new TH2F ("hCaloV0MNClusters",Form("# clusters in %s vs V0 signal",GetCalorimeterString().Data()), nv0mbins,nv0mmin,nv0mmax,nclbins,nclmin,nclmax);
fhCaloV0MCorrNClusters->SetXTitle("V0 signal");
- fhCaloV0MCorrNClusters->SetYTitle(Form("number of clusters in %s",fCalorimeter.Data()));
+ fhCaloV0MCorrNClusters->SetYTitle(Form("number of clusters in %s",GetCalorimeterString().Data()));
outputContainer->Add(fhCaloV0MCorrNClusters);
- fhCaloV0MCorrEClusters = new TH2F ("hCaloV0MEClusters",Form("summed energy of clusters in %s vs V0 signal",fCalorimeter.Data()), nv0mbins,nv0mmin,nv0mmax,nptbins,ptmin,ptmax*2);
+ fhCaloV0MCorrEClusters = new TH2F ("hCaloV0MEClusters",Form("summed energy of clusters in %s vs V0 signal",GetCalorimeterString().Data()), nv0mbins,nv0mmin,nv0mmax,nptbins,ptmin,ptmax*2);
fhCaloV0MCorrEClusters->SetXTitle("V0 signal");
- fhCaloV0MCorrEClusters->SetYTitle(Form("#Sigma #it{E} of clusters in %s (GeV)",fCalorimeter.Data()));
+ fhCaloV0MCorrEClusters->SetYTitle(Form("#Sigma #it{E} of clusters in %s (GeV)",GetCalorimeterString().Data()));
outputContainer->Add(fhCaloV0MCorrEClusters);
- fhCaloV0MCorrNCells = new TH2F ("hCaloV0MNCells",Form("# Cells in %s vs V0 signal",fCalorimeter.Data()), nv0mbins,nv0mmin,nv0mmax, ncebins,ncemin,ncemax);
+ fhCaloV0MCorrNCells = new TH2F ("hCaloV0MNCells",Form("# Cells in %s vs V0 signal",GetCalorimeterString().Data()), nv0mbins,nv0mmin,nv0mmax, ncebins,ncemin,ncemax);
fhCaloV0MCorrNCells->SetXTitle("V0 signal");
- fhCaloV0MCorrNCells->SetYTitle(Form("number of Cells in %s",fCalorimeter.Data()));
+ fhCaloV0MCorrNCells->SetYTitle(Form("number of Cells in %s",GetCalorimeterString().Data()));
outputContainer->Add(fhCaloV0MCorrNCells);
- fhCaloV0MCorrECells = new TH2F ("hCaloV0MECells",Form("summed energy of Cells in %s vs V0 signal",fCalorimeter.Data()), nv0mbins,nv0mmin,nv0mmax,nptbins,ptmin,ptmax*2);
+ fhCaloV0MCorrECells = new TH2F ("hCaloV0MECells",Form("summed energy of Cells in %s vs V0 signal",GetCalorimeterString().Data()), nv0mbins,nv0mmin,nv0mmax,nptbins,ptmin,ptmax*2);
fhCaloV0MCorrECells->SetXTitle("V0 signal");
- fhCaloV0MCorrECells->SetYTitle(Form("#Sigma #it{E} of Cells in %s (GeV)",fCalorimeter.Data()));
+ fhCaloV0MCorrECells->SetYTitle(Form("#Sigma #it{E} of Cells in %s (GeV)",GetCalorimeterString().Data()));
outputContainer->Add(fhCaloV0MCorrECells);
//Calorimeter VS Track multiplicity
- fhCaloTrackMCorrNClusters = new TH2F ("hCaloTrackMNClusters",Form("# clusters in %s vs # tracks",fCalorimeter.Data()), ntrmbins,ntrmmin,ntrmmax,nclbins,nclmin,nclmax);
+ fhCaloTrackMCorrNClusters = new TH2F ("hCaloTrackMNClusters",Form("# clusters in %s vs # tracks",GetCalorimeterString().Data()), ntrmbins,ntrmmin,ntrmmax,nclbins,nclmin,nclmax);
fhCaloTrackMCorrNClusters->SetXTitle("# tracks");
- fhCaloTrackMCorrNClusters->SetYTitle(Form("number of clusters in %s",fCalorimeter.Data()));
+ fhCaloTrackMCorrNClusters->SetYTitle(Form("number of clusters in %s",GetCalorimeterString().Data()));
outputContainer->Add(fhCaloTrackMCorrNClusters);
- fhCaloTrackMCorrEClusters = new TH2F ("hCaloTrackMEClusters",Form("summed energy of clusters in %s vs # tracks",fCalorimeter.Data()), ntrmbins,ntrmmin,ntrmmax,nptbins,ptmin,ptmax*2);
+ fhCaloTrackMCorrEClusters = new TH2F ("hCaloTrackMEClusters",Form("summed energy of clusters in %s vs # tracks",GetCalorimeterString().Data()), ntrmbins,ntrmmin,ntrmmax,nptbins,ptmin,ptmax*2);
fhCaloTrackMCorrEClusters->SetXTitle("# tracks");
- fhCaloTrackMCorrEClusters->SetYTitle(Form("#Sigma #it{E} of clusters in %s (GeV)",fCalorimeter.Data()));
+ fhCaloTrackMCorrEClusters->SetYTitle(Form("#Sigma #it{E} of clusters in %s (GeV)",GetCalorimeterString().Data()));
outputContainer->Add(fhCaloTrackMCorrEClusters);
- fhCaloTrackMCorrNCells = new TH2F ("hCaloTrackMNCells",Form("# Cells in %s vs # tracks",fCalorimeter.Data()), ntrmbins,ntrmmin,ntrmmax, ncebins,ncemin,ncemax);
+ fhCaloTrackMCorrNCells = new TH2F ("hCaloTrackMNCells",Form("# Cells in %s vs # tracks",GetCalorimeterString().Data()), ntrmbins,ntrmmin,ntrmmax, ncebins,ncemin,ncemax);
fhCaloTrackMCorrNCells->SetXTitle("# tracks");
- fhCaloTrackMCorrNCells->SetYTitle(Form("number of Cells in %s",fCalorimeter.Data()));
+ fhCaloTrackMCorrNCells->SetYTitle(Form("number of Cells in %s",GetCalorimeterString().Data()));
outputContainer->Add(fhCaloTrackMCorrNCells);
- fhCaloTrackMCorrECells = new TH2F ("hCaloTrackMECells",Form("summed energy of Cells in %s vs # tracks",fCalorimeter.Data()), ntrmbins,ntrmmin,ntrmmax,nptbins,ptmin,ptmax*2);
+ fhCaloTrackMCorrECells = new TH2F ("hCaloTrackMECells",Form("summed energy of Cells in %s vs # tracks",GetCalorimeterString().Data()), ntrmbins,ntrmmin,ntrmmax,nptbins,ptmin,ptmax*2);
fhCaloTrackMCorrECells->SetXTitle("# tracks");
- fhCaloTrackMCorrECells->SetYTitle(Form("#Sigma #it{E} of Cells in %s (GeV)",fCalorimeter.Data()));
+ fhCaloTrackMCorrECells->SetYTitle(Form("#Sigma #it{E} of Cells in %s (GeV)",GetCalorimeterString().Data()));
outputContainer->Add(fhCaloTrackMCorrECells);
fhCaloCenNClusters = new TH2F ("hCaloCenNClusters","# clusters in calorimeter vs centrality",100,0,100,nclbins,nclmin,nclmax);
Int_t colmaxs = fNMaxCols;
Int_t rowmaxs = fNMaxRows;
- if(fCalorimeter=="EMCAL")
+ if(GetCalorimeter()==kEMCAL)
{
colmaxs=2*fNMaxCols;
rowmaxs=Int_t(fNModules/2)*fNMaxRows;
fhGridCellsE->SetXTitle("column (eta direction)");
outputContainer->Add(fhGridCellsE);
+ fhGridCellsLowGain = new TH2F ("hGridCellsLG",Form("Low gain: Entries in grid of cells"),
+ colmaxs+2,-1.5,colmaxs+0.5, rowmaxs+2,-1.5,rowmaxs+0.5);
+ fhGridCellsLowGain->SetYTitle("row (phi direction)");
+ fhGridCellsLowGain->SetXTitle("column (eta direction)");
+ outputContainer->Add(fhGridCellsLowGain);
+
+ fhGridCellsELowGain = new TH2F ("hGridCellsELG","Low gain: Accumulated energy in grid of cells",
+ colmaxs+2,-1.5,colmaxs+0.5, rowmaxs+2,-1.5,rowmaxs+0.5);
+ fhGridCellsELowGain->SetYTitle("row (phi direction)");
+ fhGridCellsELowGain->SetXTitle("column (eta direction)");
+ outputContainer->Add(fhGridCellsELowGain);
+
+
if(fFillAllCellTimeHisto)
{
- fhGridCellsTime = new TH2F ("hGridCellsTime","Accumulated time in grid of cells",
- colmaxs+2,-1.5,colmaxs+0.5, rowmaxs+2,-1.5,rowmaxs+0.5);
+ fhGridCellsTime = new TH2F ("hGridCellsTime","Accumulated time in grid of cells",
+ colmaxs+2,-1.5,colmaxs+0.5, rowmaxs+2,-1.5,rowmaxs+0.5);
fhGridCellsTime->SetYTitle("row (phi direction)");
fhGridCellsTime->SetXTitle("column (eta direction)");
- outputContainer->Add(fhGridCellsTime);
+ outputContainer->Add(fhGridCellsTime);
+
+ fhGridCellsTimeLowGain = new TH2F ("hGridCellsTimeLG","Low gain: Accumulated time in grid of cells",
+ colmaxs+2,-1.5,colmaxs+0.5, rowmaxs+2,-1.5,rowmaxs+0.5);
+ fhGridCellsTimeLowGain->SetYTitle("row (phi direction)");
+ fhGridCellsTimeLowGain->SetXTitle("column (eta direction)");
+ outputContainer->Add(fhGridCellsTimeLowGain);
}
fhNCellsPerClusterMod = new TH2F*[fNModules];
// Monte Carlo Histograms
- TString particleName[] = { "Photon", "Pi0", "Eta", "Electron", "NeutralHadron", "ChargedHadron" };
+ TString particleName[] = { "Photon","PhotonConv","Pi0", "Eta", "Electron", "NeutralHadron", "ChargedHadron" };
if(IsDataMC())
{
- for(Int_t iPart = 0; iPart < 6; iPart++)
+ for(Int_t iPart = 0; iPart < 7; iPart++)
{
for(Int_t iCh = 0; iCh < 2; iCh++)
{
//Pure MC
for(Int_t iPart = 0; iPart < 4; iPart++)
{
- fhGenMCE[iPart] = new TH1F(Form("hGenMCE_%s",particleName[iPart].Data()) ,
+ fhGenMCE [iPart] = new TH1F(Form("hGenMCE_%s",particleName[iPart].Data()) ,
+ Form("#it{E} of generated %s",particleName[iPart].Data()),
+ nptbins,ptmin,ptmax);
+
+ fhGenMCPt[iPart] = new TH1F(Form("hGenMCPt_%s",particleName[iPart].Data()) ,
Form("#it{p}_{T} of generated %s",particleName[iPart].Data()),
nptbins,ptmin,ptmax);
+
fhGenMCEtaPhi[iPart] = new TH2F(Form("hGenMCEtaPhi_%s",particleName[iPart].Data()),
Form("Y vs #phi of generated %s",particleName[iPart].Data()),
- netabins,etamin,etamax,nphibins,phimin,phimax);
+ 200,-1,1,360,0,TMath::TwoPi());
- fhGenMCE[iPart] ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
+ fhGenMCE [iPart] ->SetXTitle("#it{E} (GeV)");
+ fhGenMCPt[iPart] ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
fhGenMCEtaPhi[iPart]->SetXTitle("#eta");
fhGenMCEtaPhi[iPart]->SetYTitle("#phi (rad)");
-
- outputContainer->Add(fhGenMCE[iPart]);
+
+ outputContainer->Add(fhGenMCE [iPart]);
+ outputContainer->Add(fhGenMCPt [iPart]);
outputContainer->Add(fhGenMCEtaPhi[iPart]);
- fhGenMCAccE[iPart] = new TH1F(Form("hGenMCAccE_%s",particleName[iPart].Data()) ,
+ fhGenMCAccE [iPart] = new TH1F(Form("hGenMCAccE_%s",particleName[iPart].Data()) ,
Form("#it{E} of generated %s",particleName[iPart].Data()),
nptbins,ptmin,ptmax);
+ fhGenMCAccPt[iPart] = new TH1F(Form("hGenMCAccPt_%s",particleName[iPart].Data()) ,
+ Form("#it{p}_{T} of generated %s",particleName[iPart].Data()),
+ nptbins,ptmin,ptmax);
fhGenMCAccEtaPhi[iPart] = new TH2F(Form("hGenMCAccEtaPhi_%s",particleName[iPart].Data()),
Form("Y vs #phi of generated %s",particleName[iPart].Data()),
netabins,etamin,etamax,nphibins,phimin,phimax);
- fhGenMCAccE[iPart] ->SetXTitle("#it{E} (GeV)");
+ fhGenMCAccE [iPart] ->SetXTitle("#it{E} (GeV)");
+ fhGenMCAccPt[iPart] ->SetXTitle("#it{p}_{T} (GeV/#it{c})");
fhGenMCAccEtaPhi[iPart]->SetXTitle("#eta");
fhGenMCAccEtaPhi[iPart]->SetYTitle("#phi (rad)");
- outputContainer->Add(fhGenMCAccE[iPart]);
+ outputContainer->Add(fhGenMCAccE [iPart]);
+ outputContainer->Add(fhGenMCAccPt [iPart]);
outputContainer->Add(fhGenMCAccEtaPhi[iPart]);
}
// Get energy in cross axis around maximum cell, for EMCAL only
Int_t icol =-1, irow=-1,iRCU = -1;
- Int_t imod = GetModuleNumberCellIndexes(absID, fCalorimeter, icol, irow, iRCU);
+ Int_t imod = GetModuleNumberCellIndexes(absID, GetCalorimeter(), icol, irow, iRCU);
- if(fCalorimeter=="EMCAL")
+ if(GetCalorimeter()==kEMCAL)
{
//Get close cells index, energy and time, not in corners
//Recalibrate cell energy if needed
//Float_t ecell = cells->GetCellAmplitude(absID);
- //GetCaloUtils()->RecalibrateCellAmplitude(ecell,fCalorimeter, absID);
+ //GetCaloUtils()->RecalibrateCellAmplitude(ecell,GetCalorimeter(), absID);
Double_t tcell = cells->GetCellTime(absID);
- GetCaloUtils()->RecalibrateCellTime(tcell, fCalorimeter, absID,GetReader()->GetInputEvent()->GetBunchCrossNumber());
+ GetCaloUtils()->RecalibrateCellTime(tcell, GetCalorimeter(), absID,GetReader()->GetInputEvent()->GetBunchCrossNumber());
Float_t ecell1 = 0, ecell2 = 0, ecell3 = 0, ecell4 = 0;
Double_t tcell1 = 0, tcell2 = 0, tcell3 = 0, tcell4 = 0;
if(absID1 > 0 )
{
ecell1 = cells->GetCellAmplitude(absID1);
- GetCaloUtils()->RecalibrateCellAmplitude(ecell1, fCalorimeter, absID1);
+ GetCaloUtils()->RecalibrateCellAmplitude(ecell1, GetCalorimeter(), absID1);
tcell1 = cells->GetCellTime(absID1);
- GetCaloUtils()->RecalibrateCellTime (tcell1, fCalorimeter, absID1,GetReader()->GetInputEvent()->GetBunchCrossNumber());
+ GetCaloUtils()->RecalibrateCellTime (tcell1, GetCalorimeter(), absID1,GetReader()->GetInputEvent()->GetBunchCrossNumber());
}
if(absID2 > 0 )
{
ecell2 = cells->GetCellAmplitude(absID2);
- GetCaloUtils()->RecalibrateCellAmplitude(ecell2, fCalorimeter, absID2);
+ GetCaloUtils()->RecalibrateCellAmplitude(ecell2, GetCalorimeter(), absID2);
tcell2 = cells->GetCellTime(absID2);
- GetCaloUtils()->RecalibrateCellTime (tcell2, fCalorimeter, absID2, GetReader()->GetInputEvent()->GetBunchCrossNumber());
+ GetCaloUtils()->RecalibrateCellTime (tcell2, GetCalorimeter(), absID2, GetReader()->GetInputEvent()->GetBunchCrossNumber());
}
if(absID3 > 0 )
{
ecell3 = cells->GetCellAmplitude(absID3);
- GetCaloUtils()->RecalibrateCellAmplitude(ecell3, fCalorimeter, absID3);
+ GetCaloUtils()->RecalibrateCellAmplitude(ecell3, GetCalorimeter(), absID3);
tcell3 = cells->GetCellTime(absID3);
- GetCaloUtils()->RecalibrateCellTime (tcell3, fCalorimeter, absID3, GetReader()->GetInputEvent()->GetBunchCrossNumber());
+ GetCaloUtils()->RecalibrateCellTime (tcell3, GetCalorimeter(), absID3, GetReader()->GetInputEvent()->GetBunchCrossNumber());
}
if(absID4 > 0 )
{
ecell4 = cells->GetCellAmplitude(absID4);
- GetCaloUtils()->RecalibrateCellAmplitude(ecell4, fCalorimeter, absID4);
+ GetCaloUtils()->RecalibrateCellAmplitude(ecell4, GetCalorimeter(), absID4);
tcell4 = cells->GetCellTime(absID4);
- GetCaloUtils()->RecalibrateCellTime (tcell4, fCalorimeter, absID4, GetReader()->GetInputEvent()->GetBunchCrossNumber());
+ GetCaloUtils()->RecalibrateCellTime (tcell4, GetCalorimeter(), absID4, GetReader()->GetInputEvent()->GetBunchCrossNumber());
}
if(TMath::Abs(tcell-tcell1)*1.e9 > dtcut) ecell1 = 0 ;
}
-//__________________________________________________________________________________________________
-void AliAnaCalorimeterQA::InvariantMassHistograms(Int_t iclus, TLorentzVector mom,
- Int_t nModule, const TObjArray* caloClusters,
+//___________________________________________________________________________________________________________
+void AliAnaCalorimeterQA::InvariantMassHistograms(Int_t iclus, Int_t nModule, const TObjArray* caloClusters,
AliVCaloCells * cells)
{
// Fill Invariant mass histograms
- if(GetDebug()>1) printf("AliAnaCalorimeterQA::InvariantMassHistograms() - Start \n");
+ AliDebug(1,"Start");
//Get vertex for photon momentum calculation and event selection
Double_t v[3] = {0,0,0}; //vertex ;
//GetReader()->GetVertex(v);
Int_t nModule2 = -1;
- TLorentzVector mom2 ;
Int_t nCaloClusters = caloClusters->GetEntriesFast();
for(Int_t jclus = iclus + 1 ; jclus < nCaloClusters ; jclus++)
clus2->GetM02() > 0.5 || clus2->E() < fMinInvMassECut ) continue;
//Get cluster kinematics
- clus2->GetMomentum(mom2,v);
+ clus2->GetMomentum(fClusterMomentum2,v);
//Check only certain regions
Bool_t in2 = kTRUE;
- if(IsFiducialCutOn()) in2 = GetFiducialCut()->IsInFiducialCut(mom2,fCalorimeter) ;
+ if(IsFiducialCutOn()) in2 = GetFiducialCut()->IsInFiducialCut(fClusterMomentum2.Eta(),fClusterMomentum2.Phi(),GetCalorimeter()) ;
if(!in2) continue;
//Get module of cluster
//Fill histograms
//All modules
- fhIM ->Fill((mom+mom2).Pt(),(mom+mom2).M());
+ fhIM ->Fill((fClusterMomentum+fClusterMomentum2).Pt(),(fClusterMomentum+fClusterMomentum2).M());
//Single module
if(nModule == nModule2 && nModule >= 0 && nModule < fNModules)
- fhIMMod[nModule]->Fill((mom+mom2).Pt(),(mom+mom2).M());
+ fhIMMod[nModule]->Fill((fClusterMomentum+fClusterMomentum2).Pt(),(fClusterMomentum+fClusterMomentum2).M());
//Asymetry histograms
- fhAsym->Fill((mom+mom2).Pt(),TMath::Abs((mom.E()-mom2.E())/(mom.E()+mom2.E())));
+ fhAsym->Fill((fClusterMomentum+fClusterMomentum2).Pt(),
+ TMath::Abs((fClusterMomentum.E()-fClusterMomentum2.E())/(fClusterMomentum.E()+fClusterMomentum2.E())));
}// 2nd cluster loop
{
//Check if the data or settings are ok
- if(fCalorimeter != "PHOS" && fCalorimeter !="EMCAL")
- AliFatal(Form("Wrong calorimeter name <%s>", fCalorimeter.Data()));
+ if(GetCalorimeter() != kPHOS && GetCalorimeter() !=kEMCAL)
+ AliFatal(Form("Wrong calorimeter name <%s>", GetCalorimeterString().Data()));
//if(GetReader()->GetDataType()== AliCaloTrackReader::kMC)
// AliFatal("Analysis of reconstructed data, MC reader not aplicable");
//Initialize the parameters of the analysis.
AddToHistogramsName("AnaCaloQA_");
- fCalorimeter = "EMCAL"; //or PHOS
fNModules = 22; // set maximum to maximum number of EMCAL modules
fNRCU = 2; // set maximum number of RCU in EMCAL per SM
if(!fStudyBadClusters) return kTRUE;
- if(fCalorimeter=="EMCAL")
+ if(GetCalorimeter()==kEMCAL)
{
if(!GetCaloUtils()->GetEMCALRecoUtils()->IsRejectExoticCluster())
{
else // PHOS
{
Float_t ampMax = cells->GetCellAmplitude(absIdMax);
- GetCaloUtils()->RecalibrateCellAmplitude(ampMax, fCalorimeter, absIdMax);
+ GetCaloUtils()->RecalibrateCellAmplitude(ampMax, GetCalorimeter(), absIdMax);
if(ampMax < 0.01) return kFALSE;
printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;
AliAnaCaloTrackCorrBaseClass::Print(" ");
- printf("Select Calorimeter %s \n",fCalorimeter.Data());
+ printf("Select Calorimeter %s \n",GetCalorimeterString().Data());
printf("Time Cut: %3.1f < TOF < %3.1f\n", fTimeCutMin, fTimeCutMax);
printf("EMCAL Min Amplitude : %2.1f GeV/c\n", fEMCALCellAmpMin) ;
printf("PHOS Min Amplitude : %2.1f GeV/c\n", fPHOSCellAmpMin) ;
//Play with the MC stack if available
if(IsDataMC()) MCHistograms();
+ // Correlate Calorimeters and V0 and track Multiplicity
+ if(fCorrelate) Correlate();
+
//Get List with CaloClusters , calo Cells, init min amplitude
TObjArray * caloClusters = NULL;
AliVCaloCells * cells = 0x0;
- if (fCalorimeter == "PHOS")
+ if (GetCalorimeter() == kPHOS)
{
fCellAmpMin = fPHOSCellAmpMin;
caloClusters = GetPHOSClusters();
cells = GetPHOSCells();
}
- else if (fCalorimeter == "EMCAL")
+ else if (GetCalorimeter() == kEMCAL)
{
fCellAmpMin = fEMCALCellAmpMin;
caloClusters = GetEMCALClusters();
cells = GetEMCALCells();
}
else
- AliFatal(Form("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - Wrong calorimeter name <%s>, END\n", fCalorimeter.Data()));
+ AliFatal(Form("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - Wrong calorimeter name <%s>, END", GetCalorimeterString().Data()));
if( !caloClusters || !cells )
{
- AliFatal(Form("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - No CaloClusters or CaloCells available\n"));
+ AliFatal(Form("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - No CaloClusters or CaloCells available"));
return; // trick coverity
}
//printf("QA: N cells %d, N clusters %d \n",cells->GetNumberOfCells(),caloClusters->GetEntriesFast());
- // Correlate Calorimeters and V0 and track Multiplicity
- if(fCorrelate) Correlate();
-
- // Clusters
+ // Clusters
ClusterLoopHistograms(caloClusters,cells);
// Cells
CellHistograms(cells);
- if(GetDebug() > 0)
- printf("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - End \n");
+ AliDebug(1,"End");
}
{
//Get the MC arrays and do some checks before filling MC histograms
- TLorentzVector mom ;
+ Int_t pdg = 0 ;
+ Int_t status = 0 ;
+ Int_t nprim = 0 ;
- if(GetReader()->ReadStack())
- {
- if(!GetMCStack())
- AliFatal("Stack not available, is the MC handler called?\n");
-
- //Fill some pure MC histograms, only primaries.
- for(Int_t i=0 ; i<GetMCStack()->GetNprimary(); i++)
- {//Only primary particles, for all MC transport put GetNtrack()
- TParticle *primary = GetMCStack()->Particle(i) ;
-
- if (primary->GetStatusCode() > 11) continue; //Working for PYTHIA and simple generators, check for HERWIG
- primary->Momentum(mom);
- MCHistograms(mom,TMath::Abs(primary->GetPdgCode()));
- } //primary loop
- } // ESD
- else if(GetReader()->ReadAODMCParticles())
- {
- if(!GetReader()->GetAODMCParticles())
- AliFatal("AODMCParticles not available!");
-
- //Fill some pure MC histograms, only primaries.
- for(Int_t i=0 ; i < (GetReader()->GetAODMCParticles())->GetEntriesFast(); i++)
- {
- AliAODMCParticle *aodprimary = (AliAODMCParticle*) (GetReader()->GetAODMCParticles())->At(i) ;
-
- if (!aodprimary->IsPrimary()) continue; //accept all which is not MC transport generated. Don't know how to avoid partons
-
- mom.SetPxPyPzE(aodprimary->Px(),aodprimary->Py(),aodprimary->Pz(),aodprimary->E());
- MCHistograms(mom,TMath::Abs(aodprimary->GetPdgCode()));
- } //primary loop
- } // AOD
-}
-
-//_______________________________________________________________________________
-void AliAnaCalorimeterQA::MCHistograms(TLorentzVector mom, Int_t pdg)
-{
- //Fill pure monte carlo related histograms
-
- Float_t eMC = mom.E();
- Float_t phiMC = mom.Phi();
- if(phiMC < 0)
- phiMC += TMath::TwoPi();
- Float_t etaMC = mom.Eta();
+ TParticle * primStack = 0;
+ AliAODMCParticle * primAOD = 0;
- if (TMath::Abs(etaMC) > 1) return;
+ // Get the ESD MC particles container
+ AliStack * stack = 0;
+ if( GetReader()->ReadStack() )
+ {
+ stack = GetMCStack();
+ if(!stack ) return;
+ nprim = stack->GetNtrack();
+ }
- Bool_t in = kFALSE;
+ // Get the AOD MC particles container
+ TClonesArray * mcparticles = 0;
+ if( GetReader()->ReadAODMCParticles() )
+ {
+ mcparticles = GetReader()->GetAODMCParticles();
+ if( !mcparticles ) return;
+ nprim = mcparticles->GetEntriesFast();
+ }
- //Rough stimate of acceptance for pi0, Eta and electrons
- if(fCalorimeter == "PHOS")
+ //printf("N primaries %d\n",nprim);
+ for(Int_t i=0 ; i < nprim; i++)
{
- if(GetFiducialCut()->IsInFiducialCut(mom,fCalorimeter))
- in = kTRUE ;
- if(GetDebug() > 2) printf("AliAnaCalorimeterQA::MCHistograms() - In %s fiducial cut acceptance? %d\n",fCalorimeter.Data(),in);
+ if(GetReader()->AcceptOnlyHIJINGLabels() && !GetReader()->IsHIJINGLabel(i)) continue ;
- }
- else if(fCalorimeter == "EMCAL" && GetCaloUtils()->IsEMCALGeoMatrixSet())
- {
- if(GetEMCALGeometry())
+ // Get the generated particles, check that it is primary (not parton, resonance)
+ // and get its momentum. Different way to recover from ESD or AOD
+ if(GetReader()->ReadStack())
{
- Int_t absID=0;
- GetEMCALGeometry()->GetAbsCellIdFromEtaPhi(mom.Eta(),mom.Phi(),absID);
+ primStack = stack->Particle(i) ;
+ if(!primStack)
+ {
+ AliWarning("ESD primaries pointer not available!!");
+ continue;
+ }
+
+ pdg = primStack->GetPdgCode();
+ status = primStack->GetStatusCode();
+
+ //printf("Input: i %d, %s, pdg %d, status %d \n",i, primStack->GetName(), pdg, status);
+
+ if ( status > 11 ) continue; //Working for PYTHIA and simple generators, check for HERWIG, HIJING?
- if( absID >= 0)
- in = kTRUE;
+ if ( primStack->Energy() == TMath::Abs(primStack->Pz()) ) continue ; //Protection against floating point exception
- if(GetDebug() > 2) printf("AliAnaCalorimeterQA::MCHistograms() - In %s Real acceptance? %d\n",fCalorimeter.Data(),in);
+ //printf("Take : i %d, %s, pdg %d, status %d \n",i, primStack->GetName(), pdg, status);
+
+ //Photon kinematics
+ primStack->Momentum(fPrimaryMomentum);
}
else
{
- if(GetFiducialCut()->IsInFiducialCut(mom,fCalorimeter))
- in = kTRUE ;
- if(GetDebug() > 2) printf("AliAnaCalorimeterQA::MCHistograms() - In %s fiducial cut acceptance? %d\n",fCalorimeter.Data(),in);
- }
- }
-
- if (pdg==22)
- {
- fhGenMCE[kmcPhoton] ->Fill(eMC);
- if(eMC > 0.5) fhGenMCEtaPhi[kmcPhoton]->Fill(etaMC,phiMC);
- if(in)
- {
- fhGenMCAccE[kmcPhoton] ->Fill(eMC);
- if(eMC > 0.5) fhGenMCAccEtaPhi[kmcPhoton]->Fill(etaMC,phiMC);
+ primAOD = (AliAODMCParticle *) mcparticles->At(i);
+ if(!primAOD)
+ {
+ AliWarning("AOD primaries pointer not available!!");
+ continue;
+ }
+
+ pdg = primAOD->GetPdgCode();
+ status = primAOD->GetStatus();
+
+ //printf("Input: i %d, %s, pdg %d, status %d \n",i, primAOD->GetName(), pdg, status);
+
+ if (!primAOD->IsPrimary()) continue; //accept all which is not MC transport generated. Don't know how to avoid partons
+
+ if ( status > 11 ) continue; //Working for PYTHIA and simple generators, check for HERWIG
+
+ if ( primAOD->E() == TMath::Abs(primAOD->Pz()) ) continue ; //Protection against floating point exception
+
+ //printf("Take : i %d, %s, pdg %d, status %d \n",i, primAOD->GetName(), pdg, status);
+
+ //kinematics
+ fPrimaryMomentum.SetPxPyPzE(primAOD->Px(),primAOD->Py(),primAOD->Pz(),primAOD->E());
}
- }
- else if (pdg==111)
- {
- fhGenMCE[kmcPi0] ->Fill(eMC);
- if(eMC > 0.5) fhGenMCEtaPhi[kmcPi0]->Fill(etaMC,phiMC);
- if(in)
+
+ Float_t eMC = fPrimaryMomentum.E();
+ if(eMC < 0.2) continue;
+ Float_t ptMC = fPrimaryMomentum.E();
+
+ Float_t etaMC = fPrimaryMomentum.Eta();
+ // Only particles in |eta| < 1
+ if (TMath::Abs(etaMC) > 1) continue;
+
+ Float_t phiMC = fPrimaryMomentum.Phi();
+ if(phiMC < 0)
+ phiMC += TMath::TwoPi();
+
+ Int_t mcIndex = -1;
+ if (pdg==22) mcIndex = kmcPhoton;
+ else if (pdg==111) mcIndex = kmcPi0;
+ else if (pdg==221) mcIndex = kmcEta;
+ else if (TMath::Abs(pdg)==11) mcIndex = kmcElectron;
+
+ if( mcIndex >=0 )
{
- fhGenMCAccE[kmcPi0] ->Fill(eMC);
- if(eMC > 0.5) fhGenMCAccEtaPhi[kmcPi0]->Fill(etaMC,phiMC);
+ fhGenMCE [mcIndex]->Fill( eMC);
+ fhGenMCPt[mcIndex]->Fill(ptMC);
+ if(eMC > 0.5) fhGenMCEtaPhi[mcIndex]->Fill(etaMC,phiMC);
+
+ Bool_t inacceptance = kTRUE;
+ // Check same fidutial borders as in data analysis on top of real acceptance if real was requested.
+ if( IsFiducialCutOn() && !GetFiducialCut()->IsInFiducialCut(fPrimaryMomentum.Eta(),fPrimaryMomentum.Phi(),GetCalorimeter()) )
+ inacceptance = kFALSE ;
+
+ if(IsRealCaloAcceptanceOn()) // defined on base class
+ {
+ if(GetReader()->ReadStack() &&
+ !GetCaloUtils()->IsMCParticleInCalorimeterAcceptance(GetCalorimeter(), primStack)) inacceptance = kFALSE ;
+ if(GetReader()->ReadAODMCParticles() &&
+ !GetCaloUtils()->IsMCParticleInCalorimeterAcceptance(GetCalorimeter(), primAOD )) inacceptance = kFALSE ;
+ }
+
+ if(!inacceptance) continue;
+
+ fhGenMCAccE [mcIndex]->Fill( eMC);
+ fhGenMCAccPt[mcIndex]->Fill(ptMC);
+ if(eMC > 0.5) fhGenMCAccEtaPhi[mcIndex]->Fill(etaMC,phiMC);
+
}
+
}
- else if (pdg==221)
- {
- fhGenMCE[kmcEta] ->Fill(eMC);
- if(eMC > 0.5) fhGenMCEtaPhi[kmcEta]->Fill(etaMC,phiMC);
- if(in)
- {
- fhGenMCAccE[kmcEta] ->Fill(eMC);
- if(eMC > 0.5) fhGenMCAccEtaPhi[kmcEta]->Fill(etaMC,phiMC);
- }
- }
- else if (TMath::Abs(pdg)==11)
- {
- fhGenMCE[kmcElectron] ->Fill(eMC);
- if(eMC > 0.5) fhGenMCEtaPhi[kmcElectron]->Fill(etaMC,phiMC);
- if(in)
- {
- fhGenMCAccE[kmcElectron] ->Fill(eMC);
- if(eMC > 0.5) fhGenMCAccEtaPhi[kmcElectron]->Fill(etaMC,phiMC);
- }
- }
}
//_________________________________________________________________________________
//Recalibrate cell energy if needed
Float_t amp = cells->GetCellAmplitude(id);
- GetCaloUtils()->RecalibrateCellAmplitude(amp, fCalorimeter, id);
+ GetCaloUtils()->RecalibrateCellAmplitude(amp, GetCalorimeter(), id);
energy += amp;
- if(amp> ampMax)
+ if ( amp > ampMax )
ampMax = amp;
} // energy loop
- if(energy <=0 )
+ if ( energy <=0 )
{
- printf("AliAnaCalorimeterQA::WeightHistograms()- Wrong calculated energy %f\n",energy);
+ AliWarning(Form("Wrong calculated energy %f",energy));
return;
}
//Recalibrate cell energy if needed
Float_t amp = cells->GetCellAmplitude(id);
- GetCaloUtils()->RecalibrateCellAmplitude(amp, fCalorimeter, id);
+ GetCaloUtils()->RecalibrateCellAmplitude(amp, GetCalorimeter(), id);
fhECellClusterRatio ->Fill(energy,amp/energy);
fhECellClusterLogRatio->Fill(energy,TMath::Log(amp/energy));
}
//Recalculate shower shape for different W0
- if(fCalorimeter=="EMCAL")
+ if(GetCalorimeter()==kEMCAL)
{
Float_t l0org = clus->GetM02();
Float_t l1org = clus->GetM20();
Int_t tagMC = -1;
if(IsDataMC() && clus->GetNLabels() > 0)
{
- Int_t tag = GetMCAnalysisUtils()->CheckOrigin(clus->GetLabels(),clus->GetNLabels(), GetReader());
+ Int_t tag = GetMCAnalysisUtils()->CheckOrigin(clus->GetLabels(),clus->GetNLabels(), GetReader(),GetCalorimeter());
if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPhoton) &&
!GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPi0) &&