//________________________________________
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),
//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];
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;
}
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);
Int_t icols = icol;
Int_t irows = irow;
- if(fCalorimeter=="EMCAL")
+ if(GetCalorimeter()==kEMCAL)
{
icols = (nModule % 2) ? icol + fNMaxCols : icol;
if(nModule < 10 )
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);
//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++)
{
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(IsDataMC())
{
- Int_t tag = GetMCAnalysisUtils()->CheckOrigin(labels,nLabel, GetReader(),fCalorimeter);
+ 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) &&
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() ;
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);
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(),fCalorimeter);
+ 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();
}
-//________________________________________________________________________________________________
-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);
if(!caloClustersEMCAL || !caloClustersPHOS)
{
- if( GetDebug() > 0 ) printf("AliAnaCalorimeterQA::Correlate() - PHOS (%p) or EMCAL (%p) clusters array not available, do not correlate\n",
- caloClustersPHOS,caloClustersEMCAL);
+ AliDebug(1,Form("PHOS (%p) or EMCAL (%p) clusters array not available, do not correlate",caloClustersPHOS,caloClustersEMCAL));
return ;
}
if(!cellsEMCAL || !cellsPHOS)
{
- if( GetDebug() > 0 ) printf("AliAnaCalorimeterQA::Correlate() - PHOS (%p) or EMCAL (%p) cells array ot available, do not correlate\n",
- cellsPHOS,cellsEMCAL);
+ AliDebug(1,Form("PHOS (%p) or EMCAL (%p) cells array ot available, do not correlate",cellsPHOS,cellsEMCAL));
return ;
}
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;
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;
// 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) ;
//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
}
// Cells
CellHistograms(cells);
- if(GetDebug() > 0)
- printf("AliAnaCalorimeterQA::MakeAnalysisFillHistograms() - End \n");
+ AliDebug(1,"End");
}
TParticle * primStack = 0;
AliAODMCParticle * primAOD = 0;
- TLorentzVector mom ;
// Get the ESD MC particles container
AliStack * stack = 0;
primStack = stack->Particle(i) ;
if(!primStack)
{
- printf("AliAnaCalorimeterQA::MCHistograms() - ESD primaries pointer not available!!\n");
+ AliWarning("ESD primaries pointer not available!!");
continue;
}
//printf("Take : i %d, %s, pdg %d, status %d \n",i, primStack->GetName(), pdg, status);
//Photon kinematics
- primStack->Momentum(mom);
+ primStack->Momentum(fPrimaryMomentum);
}
else
{
primAOD = (AliAODMCParticle *) mcparticles->At(i);
if(!primAOD)
{
- printf("AliAnaCalorimeterQA::MCHistograms() - AOD primaries pointer not available!!\n");
+ AliWarning("AOD primaries pointer not available!!");
continue;
}
//printf("Take : i %d, %s, pdg %d, status %d \n",i, primAOD->GetName(), pdg, status);
//kinematics
- mom.SetPxPyPzE(primAOD->Px(),primAOD->Py(),primAOD->Pz(),primAOD->E());
+ fPrimaryMomentum.SetPxPyPzE(primAOD->Px(),primAOD->Py(),primAOD->Pz(),primAOD->E());
}
- Float_t eMC = mom.E();
+ Float_t eMC = fPrimaryMomentum.E();
if(eMC < 0.2) continue;
- Float_t ptMC = mom.E();
+ Float_t ptMC = fPrimaryMomentum.E();
- Float_t etaMC = mom.Eta();
+ Float_t etaMC = fPrimaryMomentum.Eta();
// Only particles in |eta| < 1
if (TMath::Abs(etaMC) > 1) continue;
- Float_t phiMC = mom.Phi();
+ Float_t phiMC = fPrimaryMomentum.Phi();
if(phiMC < 0)
phiMC += TMath::TwoPi();
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(mom,fCalorimeter) ) inacceptance = kFALSE ;
+ if( IsFiducialCutOn() && !GetFiducialCut()->IsInFiducialCut(fPrimaryMomentum.Eta(),fPrimaryMomentum.Phi(),GetCalorimeter()) )
+ inacceptance = kFALSE ;
if(IsRealCaloAcceptanceOn()) // defined on base class
{
if(GetReader()->ReadStack() &&
- !GetCaloUtils()->IsMCParticleInCalorimeterAcceptance(fCalorimeter, primStack)) inacceptance = kFALSE ;
+ !GetCaloUtils()->IsMCParticleInCalorimeterAcceptance(GetCalorimeter(), primStack)) inacceptance = kFALSE ;
if(GetReader()->ReadAODMCParticles() &&
- !GetCaloUtils()->IsMCParticleInCalorimeterAcceptance(fCalorimeter, primAOD )) inacceptance = kFALSE ;
+ !GetCaloUtils()->IsMCParticleInCalorimeterAcceptance(GetCalorimeter(), primAOD )) inacceptance = kFALSE ;
}
if(!inacceptance) continue;
//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(),fCalorimeter);
+ Int_t tag = GetMCAnalysisUtils()->CheckOrigin(clus->GetLabels(),clus->GetNLabels(), GetReader(),GetCalorimeter());
if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPhoton) &&
!GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPi0) &&