// --- ROOT system ---
-//#include "Riostream.h"
-#include "TObjArray.h"
-#include "TParticle.h"
-#include "TDatabasePDG.h"
-#include "TCanvas.h"
-#include "TPad.h"
-#include "TROOT.h"
-#include "TH3F.h"
-#include "TH2F.h"
-#include "TLegend.h"
+#include <TObjArray.h>
+#include <TParticle.h>
+#include <TDatabasePDG.h>
+#include <TH3F.h>
#include <TObjString.h>
//---- AliRoot system ----
#include "AliStack.h"
#include "AliVCaloCells.h"
#include "AliFiducialCut.h"
-#include "AliAODTrack.h"
#include "AliVCluster.h"
+#include "AliVTrack.h"
#include "AliVEvent.h"
#include "AliVEventHandler.h"
-#include "AliAnalysisManager.h"
#include "AliAODMCParticle.h"
#include "AliMCAnalysisUtils.h"
-#include "AliAODPid.h"
-#include "AliExternalTrackParam.h"
// --- Detectors ---
#include "AliPHOSGeoUtils.h"
//________________________________________
AliAnaCalorimeterQA::AliAnaCalorimeterQA() :
-AliAnaCaloTrackCorrBaseClass(), fCalorimeter(""),
+AliAnaCaloTrackCorrBaseClass(), fCalorimeter(""),
//Switches
+fFillAllCellTimeHisto(kTRUE),
fFillAllPosHisto(kFALSE), fFillAllPosHisto2(kTRUE),
fFillAllTH12(kFALSE), fFillAllTH3(kTRUE),
fFillAllTMHisto(kTRUE), fFillAllPi0Histo(kTRUE),
fCorrelate(kTRUE), fStudyBadClusters(kFALSE),
-fStudyClustersAsymmetry(kFALSE), fStudyWeight(kFALSE),
+fStudyClustersAsymmetry(kFALSE), fStudyExotic(kFALSE),
+fStudyWeight(kFALSE),
//Parameters and cuts
fNModules(12), fNRCU(2),
fTimeCutMin(-10000), fTimeCutMax(10000),
fEMCALCellAmpMin(0), fPHOSCellAmpMin(0),
+// Exotic
+fExoNECrossCuts(0), fExoECrossCuts(),
+fExoNDTimeCuts(0), fExoDTimeCuts(),
+
//Histograms
fhE(0), fhPt(0),
fhPhi(0), fhEta(0), fhEtaPhiE(0),
fhCaloV0MCorrNCells(0), fhCaloV0MCorrECells(0),
fhCaloTrackMCorrNClusters(0), fhCaloTrackMCorrEClusters(0),
fhCaloTrackMCorrNCells(0), fhCaloTrackMCorrECells(0),
-
+fhCaloCenNClusters(0), fhCaloCenEClusters(0),
+fhCaloCenNCells(0), fhCaloCenECells(0),
+fhCaloEvPNClusters(0), fhCaloEvPEClusters(0),
+fhCaloEvPNCells(0), fhCaloEvPECells(0),
//Super-Module dependent histgrams
fhEMod(0), fhAmpMod(0), fhTimeMod(0),
fhNClustersMod(0), fhNCellsMod(0),
fhECellClusterRatio(0), fhECellClusterLogRatio(0),
fhEMaxCellClusterRatio(0), fhEMaxCellClusterLogRatio(0),
+fhExoL0ECross(0), fhExoL1ECross(0),
+
// MC and reco
fhRecoMCE(), fhRecoMCPhi(), fhRecoMCEta(),
fhRecoMCDeltaE(), fhRecoMCRatioE(),
//matched MC
fhEMVxyz(0), fhEMR(0),
fhHaVxyz(0), fhHaR(0),
-fh1pOverE(0), fh1dR(0),
+fh1EOverP(0), fh2dR(0),
fh2EledEdx(0), fh2MatchdEdx(0),
-fhMCEle1pOverE(0), fhMCEle1dR(0), fhMCEle2MatchdEdx(0),
-fhMCChHad1pOverE(0), fhMCChHad1dR(0), fhMCChHad2MatchdEdx(0),
-fhMCNeutral1pOverE(0), fhMCNeutral1dR(0), fhMCNeutral2MatchdEdx(0), fh1pOverER02(0),
-fhMCEle1pOverER02(0), fhMCChHad1pOverER02(0), fhMCNeutral1pOverER02(0)
+fhMCEle1EOverP(0), fhMCEle1dR(0), fhMCEle2MatchdEdx(0),
+fhMCChHad1EOverP(0), fhMCChHad1dR(0), fhMCChHad2MatchdEdx(0),
+fhMCNeutral1EOverP(0), fhMCNeutral1dR(0), fhMCNeutral2MatchdEdx(0), fh1EOverPR02(0),
+fhMCEle1EOverPR02(0), fhMCChHad1EOverPR02(0), fhMCNeutral1EOverPR02(0),
+fh1EleEOverP(0), fhMCEle1EleEOverP(0),
+fhMCChHad1EleEOverP(0), fhMCNeutral1EleEOverP(0),
+fhTrackMatchedDEta(0), fhTrackMatchedDPhi(0), fhTrackMatchedDEtaDPhi(0),
+fhTrackMatchedDEtaPos(0), fhTrackMatchedDPhiPos(0), fhTrackMatchedDEtaDPhiPos(0)
{
//Default Ctor
fhDeltaIAMC[0] = 0 ; fhDeltaIAMC[1] = 0;
fhDeltaIAMC[2] = 0 ; fhDeltaIAMC[3] = 0;
+ // Exotic
+ for (Int_t ie = 0; ie < 10 ; ie++)
+ {
+ fhExoDTime[ie] = 0;
+ for (Int_t idt = 0; idt < 5 ; idt++)
+ {
+ fhExoNCell [ie][idt] = 0;
+ fhExoL0 [ie][idt] = 0;
+ fhExoL1 [ie][idt] = 0;
+ fhExoECross [ie][idt] = 0;
+ fhExoTime [ie][idt] = 0;
+ fhExoL0NCell [ie][idt] = 0;
+ fhExoL1NCell [ie][idt] = 0;
+ }
+ }
+
// MC
for(Int_t i = 0; i < 6; i++){
InitParameters();
}
-//____________________________________________________________________________________________________________________________
+//______________________________________________________________________________________________________________________
void AliAnaCalorimeterQA::BadClusterHistograms(AliVCluster* clus, const TObjArray *caloClusters, AliVCaloCells * cells,
- const Int_t absIdMax, const Double_t maxCellFraction, const Float_t eCrossFrac,
- const Double_t tmax, Double_t timeAverages[2]
- )
+ Int_t absIdMax, Double_t maxCellFraction, Float_t eCrossFrac,
+ Double_t tmax, Double_t timeAverages[2] )
{
//Bad cluster histograms
} // loop
// Max cell compared to other cells in cluster
- if(GetReader()->GetDataType()==AliCaloTrackReader::kESD) {
+ if(fFillAllCellTimeHisto)
+ {
fhBadClusterMaxCellDiffAverageTime ->Fill(clus->E(),tmax-timeAverages[0]);
fhBadClusterMaxCellDiffWeightedTime ->Fill(clus->E(),tmax-timeAverages[1]);
}
- for (Int_t ipos = 0; ipos < clus->GetNCells(); ipos++) {
+ for (Int_t ipos = 0; ipos < clus->GetNCells(); ipos++)
+ {
Int_t absId = clus->GetCellsAbsId()[ipos];
- if(absId!=absIdMax){
-
+ if(absId!=absIdMax && cells->GetCellAmplitude(absIdMax) > 0.01)
+ {
Float_t frac = cells->GetCellAmplitude(absId)/cells->GetCellAmplitude(absIdMax);
fhBadClusterMaxCellCloseCellRatio->Fill(clus->E(),frac);
fhBadClusterMaxCellCloseCellDiff ->Fill(clus->E(),cells->GetCellAmplitude(absIdMax)-cells->GetCellAmplitude(absId));
- if(GetReader()->GetDataType()==AliCaloTrackReader::kESD) {
+ if(fFillAllCellTimeHisto)
+ {
Double_t time = cells->GetCellTime(absId);
- RecalibrateCellTime(time,absId);
-
+ GetCaloUtils()->RecalibrateCellTime(time, fCalorimeter, absId,GetReader()->GetInputEvent()->GetBunchCrossNumber());
+
Float_t diff = (tmax-time*1e9);
fhBadCellTimeSpreadRespectToCellMax->Fill(clus->E(), diff);
- } // ESD
+ }
}// Not max
}//loop
// First recalculate energy in case non linearity was applied
Float_t energy = 0;
Float_t ampMax = 0, amp = 0;
- Int_t absIdMax =-1;
- for (Int_t ipos = 0; ipos < clus->GetNCells(); ipos++) {
-
+// Int_t absIdMax =-1;
+ for (Int_t ipos = 0; ipos < clus->GetNCells(); ipos++)
+ {
Int_t id = clus->GetCellsAbsId()[ipos];
//Recalibrate cell energy if needed
amp = cells->GetCellAmplitude(id);
- RecalibrateCellAmplitude(amp,id);
+ GetCaloUtils()->RecalibrateCellAmplitude(amp,fCalorimeter, id);
energy += amp;
- if(amp> ampMax) {
+ if(amp> ampMax)
+ {
ampMax = amp;
- absIdMax = id;
+// absIdMax = id;
}
} // energy loop
Int_t id =-1;
Double_t w = 0;
Int_t ncells = clus->GetNCells();
- for (Int_t ipos = 0; ipos < ncells; ipos++) {
-
+ for (Int_t ipos = 0; ipos < ncells; ipos++)
+ {
id = clus ->GetCellsAbsId()[ipos];
amp = cells->GetCellAmplitude(id);
time = cells->GetCellTime(id);
//Recalibrate energy and time
- RecalibrateCellAmplitude(amp, id);
- RecalibrateCellTime (time,id);
-
+ GetCaloUtils()->RecalibrateCellAmplitude(amp , fCalorimeter, id);
+ GetCaloUtils()->RecalibrateCellTime (time, fCalorimeter, id, GetReader()->GetInputEvent()->GetBunchCrossNumber());
+
w = GetCaloUtils()->GetEMCALRecoUtils()->GetCellWeight(cells->GetCellAmplitude(id),energy);
aTime += time*1e9;
wTime += time*1e9 * w;
if(GetDebug() > 2)
printf("\t module %d, column %d, row %d \n", nModule,icol,irow);
- if(nModule < fNModules) {
-
+ if(nModule < fNModules)
+ {
//Check if the cell is a bad channel
if(GetCaloUtils()->IsBadChannelsRemovalSwitchedOn()){
if(fCalorimeter=="EMCAL")
id = cells->GetCellNumber(iCell);
// Amplitude recalibration if set
- RecalibrateCellAmplitude(amp,id);
+ GetCaloUtils()->RecalibrateCellAmplitude(amp, fCalorimeter, id);
// Time recalibration if set
- RecalibrateCellTime(time,id);
+ GetCaloUtils()->RecalibrateCellTime (time, fCalorimeter, id, GetReader()->GetInputEvent()->GetBunchCrossNumber());
//Transform time to ns
time *= 1.0e9;
- // Remove noisy channels, only possible in ESDs
- if(GetReader()->GetDataType() == AliCaloTrackReader::kESD){
- if(time < fTimeCutMin || time > fTimeCutMax){
- if(GetDebug() > 0 )printf("AliAnaCalorimeterQA - Remove cell with Time %f\n",time);
+ if(time < fTimeCutMin || time > fTimeCutMax)
+ {
+ if(GetDebug() > 0 )
+ printf("AliAnaCalorimeterQA - Remove cell with Time %f\n",time);
continue;
- }
- }
-
- //E cross for exotic cells
- fhCellECross->Fill(amp,1-GetECross(id,cells)/amp);
+ }
// Remove exotic cells, defined only for EMCAL
if(fCalorimeter=="EMCAL" &&
fhAmpMod ->Fill(amp,nModule);
if ((fCalorimeter=="EMCAL" && amp > fEMCALCellAmpMin) ||
- (fCalorimeter=="PHOS" && amp > fPHOSCellAmpMin ) ) {
+ (fCalorimeter=="PHOS" && amp > fPHOSCellAmpMin ) )
+ {
+ //E cross for exotic cells
+ if(amp > 0.01) fhCellECross->Fill(amp,1-GetECross(id,cells)/amp);
+
nCellsInModule[nModule]++ ;
Int_t icols = icol;
Int_t irows = irow;
- if(fCalorimeter=="EMCAL"){
+
+ if(fCalorimeter=="EMCAL")
+ {
icols = (nModule % 2) ? icol + fNMaxCols : icol;
- irows = irow + fNMaxRows * Int_t(nModule / 2);
+ if(nModule < 10 )
+ irows = irow + fNMaxRows * Int_t(nModule / 2);
+ else // 1/3 SM
+ irows = irow + (fNMaxRows / 3) * Int_t(nModule / 2);
}
- else {
+ else
+ {
irows = irow + fNMaxRows * nModule;
}
fhGridCells ->Fill(icols,irows);
fhGridCellsE->Fill(icols,irows,amp);
- if(GetReader()->GetDataType() == AliCaloTrackReader::kESD){
+ if(fFillAllCellTimeHisto)
+ {
//printf("%s: time %g\n",fCalorimeter.Data(), time);
Double_t v[3] = {0,0,0}; //vertex ;
}
//___________________________________________________________________________________________
-void AliAnaCalorimeterQA::ClusterAsymmetryHistograms(AliVCluster* clus, const Int_t absIdMax,
- const Bool_t goodCluster)
+void AliAnaCalorimeterQA::ClusterAsymmetryHistograms(AliVCluster* clus, Int_t absIdMax,
+ Bool_t goodCluster)
{
// Study the shape of the cluster in cell units terms
Int_t nLabel = clus->GetNLabels();
Int_t* labels = clus->GetLabels();
if(IsDataMC()){
- Int_t tag = GetMCAnalysisUtils()->CheckOrigin(labels,nLabel, GetReader(),0);
+ Int_t tag = GetMCAnalysisUtils()->CheckOrigin(labels,nLabel, GetReader());
if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPhoton) &&
!GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPi0) &&
!GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCEta) &&
}
}
-//_________________________________________________________________________________________________________________________
-void AliAnaCalorimeterQA::ClusterHistograms(AliVCluster* clus,const TObjArray *caloClusters, AliVCaloCells * cells,
- const Int_t absIdMax, const Double_t maxCellFraction, const Float_t eCrossFrac,
- const Double_t tmax, Double_t timeAverages[2])
+//__________________________________________________________________________________________________________________
+void AliAnaCalorimeterQA::ClusterHistograms(AliVCluster* clus, const TObjArray *caloClusters, AliVCaloCells * cells,
+ Int_t absIdMax, Double_t maxCellFraction, Float_t eCrossFrac,
+ Double_t tmax, Double_t timeAverages[2])
{
//Fill CaloCluster related histograms
if(clus->GetID()==clus2->GetID()) continue;
- if(clus->GetM02() > 0.01 && clus2->GetM02() > 0.01) {
+ if(clus->GetM02() > 0.01 && clus2->GetM02() > 0.01)
+ {
Double_t tof2 = clus2->GetTOF()*1.e9;
fhClusterPairDiffTimeE ->Fill(clus->E(), tof-tof2);
}
// check time of cells respect to max energy cell
- if(GetReader()->GetDataType()==AliCaloTrackReader::kESD) {
+ if(fFillAllCellTimeHisto)
+ {
fhClusterMaxCellDiffAverageTime ->Fill(clus->E(),tmax-timeAverages[0]);
fhClusterMaxCellDiffWeightedTime ->Fill(clus->E(),tmax-timeAverages[1]);
}
- for (Int_t ipos = 0; ipos < nCaloCellsPerCluster; ipos++) {
-
+ for (Int_t ipos = 0; ipos < nCaloCellsPerCluster; ipos++)
+ {
Int_t absId = clus->GetCellsAbsId()[ipos];
- if(absId == absIdMax) continue;
+ if(absId == absIdMax || cells->GetCellAmplitude(absIdMax) < 0.01) continue;
Float_t frac = cells->GetCellAmplitude(absId)/cells->GetCellAmplitude(absIdMax);
fhClusterMaxCellCloseCellRatio->Fill(clus->E(),frac);
fhClusterMaxCellCloseCellDiff ->Fill(clus->E(),cells->GetCellAmplitude(absIdMax)-cells->GetCellAmplitude(absId));
- if(GetReader()->GetDataType()==AliCaloTrackReader::kESD) {
-
+ if(fFillAllCellTimeHisto)
+ {
Double_t time = cells->GetCellTime(absId);
- RecalibrateCellTime(time,absId);
+ GetCaloUtils()->RecalibrateCellTime(time, fCalorimeter, absId,GetReader()->GetInputEvent()->GetBunchCrossNumber());
Float_t diff = (tmax-time*1.0e9);
fhCellTimeSpreadRespectToCellMax->Fill(clus->E(), diff);
//Cut on time of clusters
Double_t tof = clus->GetTOF()*1.e9;
- if(tof < fTimeCutMin || tof > fTimeCutMax){
+ if(tof < fTimeCutMin || tof > fTimeCutMax)
+ {
if(GetDebug() > 0 )printf("AliAnaCalorimeterQA - Remove cluster with TOF %f\n",tof);
continue;
}
//Get time of max cell
Double_t tmax = cells->GetCellTime(absIdMax);
- RecalibrateCellTime(tmax,absIdMax);
+ GetCaloUtils()->RecalibrateCellTime(tmax, fCalorimeter, absIdMax,GetReader()->GetInputEvent()->GetBunchCrossNumber());
tmax*=1.e9;
// Fill histograms related to single cluster
fhClusterMaxCellDiffNoCut->Fill(clus->E(),maxCellFraction);
Float_t ampMax = cells->GetCellAmplitude(absIdMax);
- RecalibrateCellAmplitude(ampMax,absIdMax);
- Float_t eCrossFrac = 1-GetECross(absIdMax,cells)/ampMax;
+ GetCaloUtils()->RecalibrateCellAmplitude(ampMax,fCalorimeter, absIdMax);
+
+ if(fStudyExotic) ExoticHistograms(absIdMax, ampMax, clus, cells);
//Check bad clusters if requested and rejection was not on
Bool_t goodCluster = IsGoodCluster(absIdMax, cells);
+ Float_t eCrossFrac = 0;
+ if(ampMax > 0.01) eCrossFrac = 1-GetECross(absIdMax,cells)/ampMax;
+
if(!goodCluster)
{
BadClusterHistograms(clus, caloClusters, cells, absIdMax,
nCaloClustersAccepted++;
nModule = GetModuleNumber(clus);
- if(nModule >=0 && nModule < fNModules) {
+ if(nModule >=0 && nModule < fNModules)
+ {
if (fCalorimeter=="EMCAL" && mom.E() > 2*fEMCALCellAmpMin) nClustersInModule[nModule]++;
else if(fCalorimeter=="PHOS" && mom.E() > 2*fPHOSCellAmpMin ) nClustersInModule[nModule]++;
}
Int_t pdg = -1;
if(IsDataMC() && nLabel > 0 && labels)
mcOK = ClusterMCHistograms(mom, 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);
// Invariant mass
- if(fFillAllPi0Histo && nCaloClusters > 1 && nCaloCellsPerCluster > 1)
+ // Try to reduce background with a mild shower shape cut and no more than 1 maxima
+ // in cluster and remove low energy clusters
+ if(fFillAllPi0Histo && nCaloClusters > 1 && nCaloCellsPerCluster > 1 &&
+ GetCaloUtils()->GetNumberOfLocalMaxima(clus,cells) == 1 &&
+ clus->GetM02() < 0.5 && clus->E() > 0.3)
InvariantMassHistograms(iclus, mom, nModule, caloClusters,cells);
}//cluster loop
if(nCaloClustersAccepted > 0) fhNClusters->Fill(nCaloClustersAccepted);
// Number of clusters per module
- for(Int_t imod = 0; imod < fNModules; imod++ ){
+ 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]);
fhNClustersMod->Fill(nClustersInModule[imod],imod);
}
-//_____________________________________________________________________________________________
-Bool_t AliAnaCalorimeterQA::ClusterMCHistograms(const TLorentzVector mom, const Bool_t matched,
- const Int_t * labels, const Int_t nLabels, Int_t & pdg )
+//__________________________________________________________________________________________
+Bool_t AliAnaCalorimeterQA::ClusterMCHistograms(TLorentzVector mom, Bool_t matched,
+ const Int_t * labels, Int_t nLabels, Int_t & pdg )
{
//Fill histograms only possible when simulation
- if(!labels || nLabels<=0){
+ if(!labels || nLabels<=0)
+ {
if(GetDebug() > 1) printf("AliAnaCalorimeterQA::ClusterMCHistograms() - Strange, labels array %p, n labels %d \n", labels,nLabels);
return kFALSE;
}
- if(GetDebug() > 1) {
+ if(GetDebug() > 1)
+ {
printf("AliAnaCalorimeterQA::ClusterMCHistograms() - Primaries: nlabels %d\n",nLabels);
}
//Play with the MC stack if available
Int_t label = labels[0];
- if(label < 0) {
- if(GetDebug() >= 0) printf("AliAnaCalorimeterQA::ClusterHistograms() *** bad label ***: label %d \n", label);
+ if(label < 0)
+ {
+ if(GetDebug() >= 0) printf("AliAnaCalorimeterQA::ClusterMCHistograms() *** bad label ***: label %d \n", label);
return kFALSE;
}
Int_t pdg0 =-1;Int_t status = -1; Int_t iMother = -1; Int_t iParent = -1;
Float_t vxMC= 0; Float_t vyMC = 0;
- Float_t eMC = 0; Float_t ptMC= 0; Float_t phiMC =0; Float_t etaMC = 0;
+ Float_t eMC = 0; //Float_t ptMC= 0;
+ Float_t phiMC =0; Float_t etaMC = 0;
Int_t charge = 0;
//Check the origin.
- Int_t tag = GetMCAnalysisUtils()->CheckOrigin(labels,nLabels, GetReader(),0);
+ Int_t tag = GetMCAnalysisUtils()->CheckOrigin(labels,nLabels, GetReader());
- if(GetReader()->ReadStack() && !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCUnknown)){ //it MC stack and known tag
+ if ( GetReader()->ReadStack() &&
+ !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCUnknown))
+ { //it MC stack and known tag
- if( label >= GetMCStack()->GetNtrack()) {
- if(GetDebug() >= 0) printf("AliAnaCalorimeterQA::ClusterHistograms() *** large label ***: label %d, n tracks %d \n", label, GetMCStack()->GetNtrack());
+ if( label >= GetMCStack()->GetNtrack())
+ {
+ if(GetDebug() >= 0) printf("AliAnaCalorimeterQA::ClusterMCHistograms() *** large label ***: label %d, n tracks %d \n", label, GetMCStack()->GetNtrack());
return kFALSE;
}
vyMC = primary->Vy();
iParent = primary->GetFirstMother();
- if(GetDebug() > 1 ) {
- printf("AliAnaCalorimeterQA::ClusterHistograms() - Cluster most contributing mother: \n");
+ 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);
}
//Get final particle, no conversion products
- if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCConversion)){
+ if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCConversion))
+ {
//Get the parent
primary = GetMCStack()->Particle(iParent);
pdg = TMath::Abs(primary->GetPdgCode());
- if(GetDebug() > 1 ) printf("AliAnaCalorimeterQA::ClusterHistograms() - Converted cluster!. Find before conversion: \n");
- while((pdg == 22 || pdg == 11) && status != 1){
+
+ if(GetDebug() > 1 ) printf("AliAnaCalorimeterQA::ClusterMCHistograms() - Converted cluster!. Find before conversion: \n");
+
+ while((pdg == 22 || pdg == 11) && status != 1)
+ {
+ Int_t iMotherOrg = iMother;
iMother = iParent;
primary = GetMCStack()->Particle(iMother);
status = primary->GetStatusCode();
- iParent = primary->GetFirstMother();
pdg = TMath::Abs(primary->GetPdgCode());
+ iParent = primary->GetFirstMother();
+
+ // If gone too back and non stable, assign the decay photon/electron
+ // there are other possible decays, ignore them for the moment
+ if(pdg==111 || pdg==221)
+ {
+ primary = GetMCStack()->Particle(iMotherOrg);
+ break;
+ }
+
+ if( iParent < 0 )
+ {
+ iParent = iMother;
+ break;
+ }
+
if(GetDebug() > 1 )printf("\t pdg %d, index %d, %s, status %d \n",pdg, iMother, primary->GetName(),status);
}
-
- if(GetDebug() > 1 ) {
+
+ 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);
}
//Overlapped pi0 (or eta, there will be very few), get the meson
if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPi0) ||
- GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCEta)){
+ GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCEta))
+ {
if(GetDebug() > 1 ) printf("AliAnaCalorimeterQA::ClusterHistograms() - Overlapped Meson decay!, Find it: \n");
- while(pdg != 111 && pdg != 221){
+
+ while(pdg != 111 && pdg != 221)
+ {
+ //printf("iMother %d, pdg %d, iParent %d, pdg %d\n",iMother,pdg,iParent,GetMCStack()->Particle(iParent)->GetPdgCode());
iMother = iParent;
primary = GetMCStack()->Particle(iMother);
status = primary->GetStatusCode();
- iParent = primary->GetFirstMother();
pdg = TMath::Abs(primary->GetPdgCode());
+ iParent = primary->GetFirstMother();
+
+ if( iParent < 0 )break;
+
if(GetDebug() > 1 ) printf("\t pdg %d, %s, index %d\n",pdg, primary->GetName(),iMother);
- if(iMother==-1) {
+
+ if(iMother==-1)
+ {
printf("AliAnaCalorimeterQA::ClusterHistograms() - Tagged as Overlapped photon but meson not found, why?\n");
//break;
}
}
-
+
if(GetDebug() > 2 ) printf("AliAnaCalorimeterQA::ClusterHistograms() - Overlapped %s decay, label %d \n",
primary->GetName(),iMother);
}
eMC = primary->Energy();
- ptMC = primary->Pt();
+ //ptMC = primary->Pt();
phiMC = primary->Phi();
etaMC = primary->Eta();
pdg = TMath::Abs(primary->GetPdgCode());
charge = (Int_t) TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
}
- else if(GetReader()->ReadAODMCParticles() && !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCUnknown)){//it MC AOD and known tag
+ else if( GetReader()->ReadAODMCParticles() &&
+ !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCUnknown))
+ {//it MC AOD and known tag
//Get the list of MC particles
- if(!GetReader()->GetAODMCParticles(0))
+ if(!GetReader()->GetAODMCParticles())
AliFatal("MCParticles not available!");
- aodprimary = (AliAODMCParticle*) (GetReader()->GetAODMCParticles(0))->At(label);
+ aodprimary = (AliAODMCParticle*) (GetReader()->GetAODMCParticles())->At(label);
iMother = label;
pdg0 = TMath::Abs(aodprimary->GetPdgCode());
pdg = pdg0;
vyMC = aodprimary->Yv();
iParent = aodprimary->GetMother();
- if(GetDebug() > 1 ) {
+ 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);
}
//Get final particle, no conversion products
- if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCConversion)){
+ if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCConversion))
+ {
if(GetDebug() > 1 )
printf("AliAnaCalorimeterQA::ClusterHistograms() - Converted cluster!. Find before conversion: \n");
//Get the parent
- aodprimary = (AliAODMCParticle*)(GetReader()->GetAODMCParticles(0))->At(iParent);
+ aodprimary = (AliAODMCParticle*)(GetReader()->GetAODMCParticles())->At(iParent);
pdg = TMath::Abs(aodprimary->GetPdgCode());
- while ((pdg == 22 || pdg == 11) && !aodprimary->IsPhysicalPrimary()) {
+ while ((pdg == 22 || pdg == 11) && !aodprimary->IsPhysicalPrimary())
+ {
+ Int_t iMotherOrg = iMother;
iMother = iParent;
- aodprimary = (AliAODMCParticle*)(GetReader()->GetAODMCParticles(0))->At(iMother);
+ aodprimary = (AliAODMCParticle*)(GetReader()->GetAODMCParticles())->At(iMother);
status = aodprimary->IsPrimary();
iParent = aodprimary->GetMother();
pdg = TMath::Abs(aodprimary->GetPdgCode());
+
+ // If gone too back and non stable, assign the decay photon/electron
+ // there are other possible decays, ignore them for the moment
+ if(pdg==111 || pdg==221)
+ {
+ aodprimary = (AliAODMCParticle*)(GetReader()->GetAODMCParticles())->At(iMotherOrg);
+ break;
+ }
+
+ if(iParent < 0 )
+ {
+ iParent = iMother;
+ break;
+ }
+
if(GetDebug() > 1 )
printf("\t pdg %d, index %d, Primary? %d, Physical Primary? %d \n",
pdg, iMother, aodprimary->IsPrimary(), aodprimary->IsPhysicalPrimary());
}
- if(GetDebug() > 1 ) {
+ 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());
//Overlapped pi0 (or eta, there will be very few), get the meson
if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPi0) ||
- GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCEta)){
+ GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCEta))
+ {
if(GetDebug() > 1 ) printf("AliAnaCalorimeterQA::ClusterHistograms() - Overlapped Meson decay!, Find it: PDG %d, mom %d \n",pdg, iMother);
- while(pdg != 111 && pdg != 221){
-
+ while(pdg != 111 && pdg != 221)
+ {
iMother = iParent;
- aodprimary = (AliAODMCParticle*)(GetReader()->GetAODMCParticles(0))->At(iMother);
+ aodprimary = (AliAODMCParticle*)(GetReader()->GetAODMCParticles())->At(iMother);
status = aodprimary->IsPrimary();
iParent = aodprimary->GetMother();
pdg = TMath::Abs(aodprimary->GetPdgCode());
+
+ if(iParent < 0 ) break;
if(GetDebug() > 1 ) printf("\t pdg %d, index %d\n",pdg, iMother);
- if(iMother==-1) {
+ if(iMother==-1)
+ {
printf("AliAnaCalorimeterQA::ClusterHistograms() - Tagged as Overlapped photon but meson not found, why?\n");
//break;
}
status = aodprimary->IsPrimary();
eMC = aodprimary->E();
- ptMC = aodprimary->Pt();
+ //ptMC = aodprimary->Pt();
phiMC = aodprimary->Phi();
etaMC = aodprimary->Eta();
pdg = TMath::Abs(aodprimary->GetPdgCode());
//Float_t vz = primary->Vz();
Float_t rVMC = TMath::Sqrt(vxMC*vxMC + vyMC*vyMC);
- if((pdg == 22 || TMath::Abs(pdg)==11) && status!=1) {
+ if((pdg == 22 || TMath::Abs(pdg)==11) && status!=1)
+ {
fhEMVxyz ->Fill(vxMC,vyMC);//,vz);
fhEMR ->Fill(e,rVMC);
}
//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)){
+ 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);
fhRecoMCDeltaPhi[kmcPi0][(matched)]->Fill(e,phiMC-phi);
fhRecoMCDeltaEta[kmcPi0][(matched)]->Fill(e,etaMC-eta);
}//Overlapped pizero decay
- else if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCEta)){
+ 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);
fhRecoMCDeltaPhi[kmcEta][(matched)]->Fill(e,phiMC-phi);
fhRecoMCDeltaEta[kmcEta][(matched)]->Fill(e,etaMC-eta);
}//Overlapped eta decay
- else if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPhoton)){
+ else if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPhoton) &&
+ !GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCConversion))
+ {
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);
}//photon
- else if(GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCElectron)){
+ 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);
fhEMVxyz ->Fill(vxMC,vyMC);//,vz);
fhEMR ->Fill(e,rVMC);
}
- else if(charge == 0){
+ 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);
fhHaVxyz ->Fill(vxMC,vyMC);//,vz);
fhHaR ->Fill(e,rVMC);
}
- else if(charge!=0){
+ 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);
//________________________________________________________________________________________________
void AliAnaCalorimeterQA::ClusterMatchedWithTrackHistograms(AliVCluster *clus, TLorentzVector mom,
- const Bool_t okPrimary, const Int_t pdg)
+ Bool_t okPrimary, Int_t pdg)
{
//Histograms for clusters matched with tracks
Float_t phi = mom.Phi();
if(phi < 0) phi +=TMath::TwoPi();
- if(fFillAllTH12){
+ if(fFillAllTH12)
+ {
fhECharged ->Fill(e);
fhPtCharged ->Fill(pt);
fhPhiCharged ->Fill(phi);
AliVTrack *track = GetCaloUtils()->GetMatchedTrack(clus, GetReader()->GetInputEvent());
if(!track) return ;
-
- Double_t emcpos[3] = {0.,0.,0.};
- Double_t emcmom[3] = {0.,0.,0.};
- Double_t radius = 441.0; //[cm] EMCAL radius +13cm
- Double_t bfield = 0.;
- Double_t tphi = 0;
- Double_t teta = 0;
- Double_t tmom = 0;
- Double_t tpt = 0;
- Double_t tmom2 = 0;
- Double_t tpcSignal = 0;
- Bool_t okpos = kFALSE;
- Bool_t okmom = kFALSE;
- Bool_t okout = kFALSE;
- Int_t nITS = 0;
- Int_t nTPC = 0;
-
- //In case of ESDs get the parameters in this way
- if(GetReader()->GetDataType()==AliCaloTrackReader::kESD) {
- if (track->GetOuterParam() ) {
- okout = kTRUE;
-
- bfield = GetReader()->GetInputEvent()->GetMagneticField();
- okpos = track->GetOuterParam()->GetXYZAt(radius,bfield,emcpos);
- okmom = track->GetOuterParam()->GetPxPyPzAt(radius,bfield,emcmom);
- if(!(okpos && okmom)) return;
-
- TVector3 position(emcpos[0],emcpos[1],emcpos[2]);
- TVector3 momentum(emcmom[0],emcmom[1],emcmom[2]);
- tphi = position.Phi();
- teta = position.Eta();
- tmom = momentum.Mag();
-
- tpt = track->Pt();
- tmom2 = track->P();
- tpcSignal = track->GetTPCsignal();
-
- nITS = track->GetNcls(0);
- nTPC = track->GetNcls(1);
- }//Outer param available
- }// ESDs
- else if(GetReader()->GetDataType()==AliCaloTrackReader::kAOD) {
- AliAODPid* pid = (AliAODPid*) ((AliAODTrack *) track)->GetDetPid();
- if (pid) {
- okout = kTRUE;
- pid->GetEMCALPosition(emcpos);
- pid->GetEMCALMomentum(emcmom);
-
- TVector3 position(emcpos[0],emcpos[1],emcpos[2]);
- TVector3 momentum(emcmom[0],emcmom[1],emcmom[2]);
- tphi = position.Phi();
- teta = position.Eta();
- tmom = momentum.Mag();
-
- tpt = track->Pt();
- tmom2 = track->P();
- tpcSignal = pid->GetTPCsignal();
-
- }//pid
- }//AODs
-
- if(okout){
- //printf("okout\n");
- Double_t deta = teta - eta;
- Double_t dphi = tphi - phi;
- if(dphi > TMath::Pi()) dphi -= 2*TMath::Pi();
- if(dphi < -TMath::Pi()) dphi += 2*TMath::Pi();
- Double_t dR = sqrt(dphi*dphi + deta*deta);
-
- Double_t pOverE = tmom/e;
- fh1pOverE->Fill(tpt, pOverE);
- if(dR < 0.02) fh1pOverER02->Fill(tpt,pOverE);
-
- fh1dR->Fill(dR);
- fh2MatchdEdx->Fill(tmom2,tpcSignal);
+ Double_t tpt = track->Pt();
+ Double_t tmom = track->P();
+ Double_t dedx = track->GetTPCsignal();
+ Int_t nITS = track->GetNcls(0);
+ Int_t nTPC = track->GetNcls(1);
+ Bool_t positive = kFALSE;
+ if(track) positive = (track->Charge()>0);
+
+ // Residuals
+ Float_t deta = clus->GetTrackDz();
+ Float_t dphi = clus->GetTrackDx();
+ Double_t dR = TMath::Sqrt(dphi*dphi + deta*deta);
+
+ if(TMath::Abs(dphi) < 999)
+ {
+ fhTrackMatchedDEta->Fill(e,deta);
+ fhTrackMatchedDPhi->Fill(e,dphi);
+ if(e > 0.5) fhTrackMatchedDEtaDPhi->Fill(deta,dphi);
- if(IsDataMC() && okPrimary){
- Double_t charge = TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
+ if(track && positive)
+ {
- if(TMath::Abs(pdg) == 11){
- fhMCEle1pOverE->Fill(tpt,pOverE);
- fhMCEle1dR->Fill(dR);
- fhMCEle2MatchdEdx->Fill(tmom2,tpcSignal);
- if(dR < 0.02) fhMCEle1pOverER02->Fill(tpt,pOverE);
+ fhTrackMatchedDEtaPos->Fill(e,deta);
+ fhTrackMatchedDPhiPos->Fill(e,dphi);
+ if(e > 0.5) fhTrackMatchedDEtaDPhiPos->Fill(deta,dphi);
+ }
+ }
+
+ Double_t eOverP = e/tmom;
+ fh1EOverP->Fill(tpt, eOverP);
+ if(dR < 0.02)
+ {
+ fh1EOverPR02->Fill(tpt,eOverP);
+ if(dedx > 60 && dedx < 100) fh1EleEOverP->Fill(tpt,eOverP);
+ }
+
+ fh2dR->Fill(e,dR);
+ fh2MatchdEdx->Fill(tmom,dedx);
+
+ if(IsDataMC() && okPrimary)
+ {
+ Double_t charge = TDatabasePDG::Instance()->GetParticle(pdg)->Charge();
+
+ if(TMath::Abs(pdg) == 11)
+ {
+ fhMCEle1EOverP->Fill(tpt,eOverP);
+ fhMCEle1dR->Fill(dR);
+ fhMCEle2MatchdEdx->Fill(tmom,dedx);
+ if(dR < 0.02)
+ {
+ fhMCEle1EOverPR02->Fill(tpt,eOverP);
+ if(dedx > 60 && dedx < 100) fhMCEle1EleEOverP->Fill(tpt,eOverP);
}
- else if(charge!=0){
- fhMCChHad1pOverE->Fill(tpt,pOverE);
- fhMCChHad1dR->Fill(dR);
- fhMCChHad2MatchdEdx->Fill(tmom2,tpcSignal);
- if(dR < 0.02) fhMCChHad1pOverER02->Fill(tpt,pOverE);
+ }
+ else if(charge!=0)
+ {
+ fhMCChHad1EOverP->Fill(tpt,eOverP);
+ fhMCChHad1dR->Fill(dR);
+ fhMCChHad2MatchdEdx->Fill(tmom,dedx);
+ if(dR < 0.02)
+ {
+ fhMCChHad1EOverPR02->Fill(tpt,eOverP);
+ if(dedx > 60 && dedx < 100) fhMCChHad1EleEOverP->Fill(tpt,eOverP);
}
- else if(charge == 0){
- fhMCNeutral1pOverE->Fill(tpt,pOverE);
- fhMCNeutral1dR->Fill(dR);
- fhMCNeutral2MatchdEdx->Fill(tmom2,tpcSignal);
- if(dR < 0.02) fhMCNeutral1pOverER02->Fill(tpt,pOverE);
+ }
+ else if(charge == 0)
+ {
+ fhMCNeutral1EOverP->Fill(tpt,eOverP);
+ fhMCNeutral1dR->Fill(dR);
+ fhMCNeutral2MatchdEdx->Fill(tmom,dedx);
+ if(dR < 0.02)
+ {
+ fhMCNeutral1EOverPR02->Fill(tpt,eOverP);
+ if(dedx > 60 && dedx < 100) fhMCNeutral1EleEOverP->Fill(tpt,eOverP);
}
- }//DataMC
-
- if(dR < 0.02 && pOverE > 0.5 && pOverE < 1.5
- && clus->GetNCells() > 1 && nITS > 3 && nTPC > 20) {
- fh2EledEdx->Fill(tmom2,tpcSignal);
}
+ }//DataMC
+
+ if(dR < 0.02 && eOverP > 0.6 && eOverP< 1.2
+ && clus->GetNCells() > 1 && nITS > 3 && nTPC > 20)
+ {
+ fh2EledEdx->Fill(tmom,dedx);
}
- else{//no ESD external param or AODPid
-
- if(GetDebug() >= 0) printf("No ESD external param or AliAODPid \n");
-
- }//No out params
+
}
//___________________________________
Int_t nclEMCAL = caloClustersEMCAL->GetEntriesFast();
Int_t nclPHOS = caloClustersPHOS ->GetEntriesFast();
+ Float_t cen = GetEventCentrality();
+ Float_t ep = GetEventPlaneAngle();
+
Float_t sumClusterEnergyEMCAL = 0;
Float_t sumClusterEnergyPHOS = 0;
Int_t iclus = 0;
for(iclus = 0 ; iclus < caloClustersPHOS->GetEntriesFast(); iclus++)
sumClusterEnergyPHOS += ((AliVCluster*)caloClustersPHOS->At(iclus))->E();
-
//Cells
AliVCaloCells * cellsEMCAL = GetEMCALCells();
Int_t v0S = GetV0Signal(0)+GetV0Signal(1);
Int_t v0M = GetV0Multiplicity(0)+GetV0Multiplicity(1);
Int_t trM = GetTrackMultiplicity();
- if(fCalorimeter=="PHOS"){
+ if(fCalorimeter=="PHOS")
+ {
fhCaloV0MCorrNClusters ->Fill(v0M,nclPHOS);
fhCaloV0MCorrEClusters ->Fill(v0M,sumClusterEnergyPHOS);
fhCaloV0MCorrNCells ->Fill(v0M,ncellsPHOS);
fhCaloTrackMCorrEClusters->Fill(trM,sumClusterEnergyPHOS);
fhCaloTrackMCorrNCells ->Fill(trM,ncellsPHOS);
fhCaloTrackMCorrECells ->Fill(trM,sumCellEnergyPHOS);
+
+ fhCaloCenNClusters ->Fill(cen,nclPHOS);
+ fhCaloCenEClusters ->Fill(cen,sumClusterEnergyPHOS);
+ fhCaloCenNCells ->Fill(cen,ncellsPHOS);
+ fhCaloCenECells ->Fill(cen,sumCellEnergyPHOS);
+
+ fhCaloEvPNClusters ->Fill(ep ,nclPHOS);
+ fhCaloEvPEClusters ->Fill(ep ,sumClusterEnergyPHOS);
+ fhCaloEvPNCells ->Fill(ep ,ncellsPHOS);
+ fhCaloEvPECells ->Fill(ep ,sumCellEnergyPHOS);
}
- else{
+ else
+ {
fhCaloV0MCorrNClusters ->Fill(v0M,nclEMCAL);
fhCaloV0MCorrEClusters ->Fill(v0M,sumClusterEnergyEMCAL);
fhCaloV0MCorrNCells ->Fill(v0M,ncellsEMCAL);
fhCaloTrackMCorrEClusters->Fill(trM,sumClusterEnergyEMCAL);
fhCaloTrackMCorrNCells ->Fill(trM,ncellsEMCAL);
fhCaloTrackMCorrECells ->Fill(trM,sumCellEnergyEMCAL);
+
+ fhCaloCenNClusters ->Fill(cen,nclEMCAL);
+ fhCaloCenEClusters ->Fill(cen,sumClusterEnergyEMCAL);
+ fhCaloCenNCells ->Fill(cen,ncellsEMCAL);
+ fhCaloCenECells ->Fill(cen,sumCellEnergyEMCAL);
+
+ fhCaloEvPNClusters ->Fill(ep ,nclEMCAL);
+ fhCaloEvPEClusters ->Fill(ep ,sumClusterEnergyEMCAL);
+ fhCaloEvPNCells ->Fill(ep ,ncellsEMCAL);
+ fhCaloEvPECells ->Fill(ep ,sumCellEnergyEMCAL);
}
if(GetDebug() > 0 )
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);
}
}
return new TObjString(parList) ;
}
+//_________________________________________________________________________________
+void AliAnaCalorimeterQA::ExoticHistograms(Int_t absIdMax, Float_t ampMax,
+ AliVCluster *clus, AliVCaloCells* cells)
+{
+ // Calculate weights
+
+ if(ampMax < 0.01)
+ {
+ printf("AliAnaCalorimeterQA::ExoticHistograms()- Low amplitude energy %f\n",ampMax);
+ return;
+ }
+
+ Float_t l0 = clus->GetM02();
+ Float_t l1 = clus->GetM20();
+ Float_t en = clus->E();
+ Int_t nc = clus->GetNCells();
+ Double_t tmax = clus->GetTOF()*1.e9; // recalibrated elsewhere
+
+ Float_t eCrossFrac = 1-GetECross(absIdMax,cells, 10000000)/ampMax;
+
+ if(en > 5)
+ {
+ fhExoL0ECross->Fill(eCrossFrac,l0);
+ fhExoL1ECross->Fill(eCrossFrac,l1);
+ }
+
+ for(Int_t ie = 0; ie < fExoNECrossCuts; ie++)
+ {
+ for(Int_t idt = 0; idt < fExoNDTimeCuts; idt++)
+ {
+ eCrossFrac = 1-GetECross(absIdMax,cells, fExoDTimeCuts[idt])/ampMax;
+
+ if(eCrossFrac > fExoECrossCuts[ie])
+ {
+ //Exotic
+ fhExoL0 [ie][idt]->Fill(en,l0 );
+ fhExoL1 [ie][idt]->Fill(en,l1 );
+ fhExoTime [ie][idt]->Fill(en,tmax);
+
+ if(en > 5)
+ {
+ fhExoL0NCell[ie][idt]->Fill(nc,l0);
+ fhExoL1NCell[ie][idt]->Fill(nc,l1);
+ }
+
+ // Diff time, do for one cut in e cross
+ if(ie == 0)
+ {
+ for (Int_t icell = 0; icell < clus->GetNCells(); icell++)
+ {
+ Int_t absId = clus->GetCellsAbsId()[icell];
+ Double_t time = cells->GetCellTime(absId);
+ GetCaloUtils()->RecalibrateCellTime(time, fCalorimeter, absId,GetReader()->GetInputEvent()->GetBunchCrossNumber());
+
+ Float_t diff = (tmax-time)*1e9;
+ fhExoDTime[idt]->Fill(en, diff);
+ }
+ }
+ }
+ else
+ {
+ fhExoECross[ie][idt]->Fill(en,eCrossFrac);
+ fhExoNCell [ie][idt]->Fill(en,nc);
+ }
+ } // D time cut loop
+ } // e cross cut loop
+}
+
//____________________________________________________
TList * AliAnaCalorimeterQA::GetCreateOutputObjects()
{
TList * outputContainer = new TList() ;
outputContainer->SetName("QAHistos") ;
+ // Init the number of modules, set in the class AliCalorimeterUtils
+ fNModules = GetCaloUtils()->GetNumberOfSuperModulesUsed();
+ if(fCalorimeter=="PHOS" && fNModules > 4) fNModules = 4;
+
//Histograms
Int_t nptbins = GetHistogramRanges()->GetHistoPtBins(); Float_t ptmax = GetHistogramRanges()->GetHistoPtMax(); Float_t ptmin = GetHistogramRanges()->GetHistoPtMin();
Int_t nfineptbins = GetHistogramRanges()->GetHistoFinePtBins(); Float_t ptfinemax = GetHistogramRanges()->GetHistoFinePtMax(); Float_t ptfinemin = GetHistogramRanges()->GetHistoFinePtMin();
Int_t netabins = GetHistogramRanges()->GetHistoEtaBins(); Float_t etamax = GetHistogramRanges()->GetHistoEtaMax(); Float_t etamin = GetHistogramRanges()->GetHistoEtaMin();
Int_t nmassbins = GetHistogramRanges()->GetHistoMassBins(); Float_t massmax = GetHistogramRanges()->GetHistoMassMax(); Float_t massmin = GetHistogramRanges()->GetHistoMassMin();
Int_t nasymbins = GetHistogramRanges()->GetHistoAsymmetryBins(); Float_t asymmax = GetHistogramRanges()->GetHistoAsymmetryMax(); Float_t asymmin = GetHistogramRanges()->GetHistoAsymmetryMin();
- Int_t nPoverEbins = GetHistogramRanges()->GetHistoPOverEBins(); Float_t pOverEmax = GetHistogramRanges()->GetHistoPOverEMax(); Float_t pOverEmin = GetHistogramRanges()->GetHistoPOverEMin();
+ Int_t nPoverEbins = GetHistogramRanges()->GetHistoPOverEBins(); Float_t eOverPmax = GetHistogramRanges()->GetHistoPOverEMax(); Float_t eOverPmin = GetHistogramRanges()->GetHistoPOverEMin();
Int_t ndedxbins = GetHistogramRanges()->GetHistodEdxBins(); Float_t dedxmax = GetHistogramRanges()->GetHistodEdxMax(); Float_t dedxmin = GetHistogramRanges()->GetHistodEdxMin();
Int_t ndRbins = GetHistogramRanges()->GetHistodRBins(); Float_t dRmax = GetHistogramRanges()->GetHistodRMax(); Float_t dRmin = GetHistogramRanges()->GetHistodRMin();
Int_t ntimebins = GetHistogramRanges()->GetHistoTimeBins(); Float_t timemax = GetHistogramRanges()->GetHistoTimeMax(); Float_t timemin = GetHistogramRanges()->GetHistoTimeMin();
fNMaxRows = 24;
fNRCU = 2 ;
//PHOS
- if(fCalorimeter=="PHOS"){
+ if(fCalorimeter=="PHOS")
+ {
fNMaxCols = 56;
fNMaxRows = 64;
fNRCU = 4 ;
fhE->SetXTitle("E (GeV)");
outputContainer->Add(fhE);
- if(fFillAllTH12){
+ if(fFillAllTH12)
+ {
fhPt = new TH1F ("hPt","p_{T} reconstructed clusters", nptbins,ptmin,ptmax);
fhPt->SetXTitle("p_{T} (GeV/c)");
outputContainer->Add(fhPt);
outputContainer->Add(fhEta);
}
- if(fFillAllTH3){
+ if(fFillAllTH3)
+ {
fhEtaPhiE = new TH3F ("hEtaPhiE","#eta vs #phi vs energy, reconstructed clusters",
netabins,etamin,etamax,nphibins,phimin,phimax,nptbins,ptmin,ptmax);
fhEtaPhiE->SetXTitle("#eta ");
fhClusterMaxCellECross->SetYTitle("1- E_{cross}/E_{cell max}");
outputContainer->Add(fhClusterMaxCellECross);
+ fhNCellsPerClusterNoCut = new TH2F ("hNCellsPerClusterNoCut","# cells per cluster vs energy, no bad clusters cut",
+ nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
+ fhNCellsPerClusterNoCut->SetXTitle("E (GeV)");
+ fhNCellsPerClusterNoCut->SetYTitle("n cells");
+ outputContainer->Add(fhNCellsPerClusterNoCut);
+
+ fhNCellsPerCluster = new TH2F ("hNCellsPerCluster","# cells per cluster vs energy",nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
+ fhNCellsPerCluster->SetXTitle("E (GeV)");
+ fhNCellsPerCluster->SetYTitle("n cells");
+ outputContainer->Add(fhNCellsPerCluster);
+
+ fhNClusters = new TH1F ("hNClusters","# clusters", nclbins,nclmin,nclmax);
+ fhNClusters->SetXTitle("number of clusters");
+ outputContainer->Add(fhNClusters);
+
if(fStudyBadClusters)
{
-
fhBadClusterEnergy = new TH1F ("hBadClusterEnergy","Bad cluster energy", nptbins,ptmin,ptmax);
fhBadClusterEnergy->SetXTitle("E_{cluster} (GeV) ");
outputContainer->Add(fhBadClusterEnergy);
fhBadClusterMaxCellECross->SetYTitle("1- E_{cross}/E_{cell max}");
outputContainer->Add(fhBadClusterMaxCellECross);
- if(GetReader()->GetDataType()==AliCaloTrackReader::kESD) {
+ if(fFillAllCellTimeHisto)
+ {
fhBadCellTimeSpreadRespectToCellMax = new TH2F ("hBadCellTimeSpreadRespectToCellMax","t_{cell max}-t_{cell i} from bad cluster", nptbins,ptmin,ptmax, tdbins,tdmin,tdmax);
fhBadCellTimeSpreadRespectToCellMax->SetXTitle("E (GeV)");
fhBadCellTimeSpreadRespectToCellMax->SetYTitle("#Delta t_{cell max - i} (ns)");
}
+ if(fStudyExotic)
+ {
+ fhExoL0ECross = new TH2F("hExoL0_ECross",
+ "#lambda^{2}_{0} vs 1-E_{+}/E_{max} for E > 5 GeV",
+ 400,0,1,ssbins,ssmin,ssmax);
+ fhExoL0ECross ->SetXTitle("1-E_{+}/E_{cell max}");
+ fhExoL0ECross ->SetYTitle("#lambda^{2}_{0}");
+ outputContainer->Add(fhExoL0ECross) ;
+
+ fhExoL1ECross = new TH2F("hExoL1_ECross",
+ "#lambda^{2}_{1} vs 1-E_{+}/E_{max} for E > 5 GeV",
+ 400,0,1,ssbins,ssmin,ssmax);
+ fhExoL1ECross ->SetXTitle("1-E_{+}/E_{cell max}");
+ fhExoL1ECross ->SetYTitle("#lambda^{2}_{1}");
+ outputContainer->Add(fhExoL1ECross) ;
+
+ for(Int_t ie = 0; ie <fExoNECrossCuts; ie++)
+ {
+
+ fhExoDTime[ie] = new TH2F(Form("hExoDTime_ECross%d",ie),
+ Form("#Delta time = t_{max}-t_{cells} vs E_{cluster} for exotic, 1-E_{+}/E_{max} < %2.2f",fExoECrossCuts[ie]),
+ nptbins,ptmin,ptmax,tdbins,tdmin,tdmax);
+ fhExoDTime[ie] ->SetYTitle("#Delta t (ns)");
+ fhExoDTime[ie] ->SetXTitle("E (GeV)");
+ outputContainer->Add(fhExoDTime[ie]) ;
+
+ for(Int_t idt = 0; idt < fExoNDTimeCuts; idt++)
+ {
+ fhExoNCell[ie][idt] = new TH2F(Form("hExoNCell_ECross%d_DT%d",ie,idt),
+ Form("N cells per cluster vs E cluster, 1-E_{+}/E_{max} < %2.2f, #Delta t < %2.0f",fExoECrossCuts[ie],fExoDTimeCuts[idt]),
+ nptbins,ptmin,ptmax,nceclbins,nceclmin,nceclmax);
+ fhExoNCell[ie][idt] ->SetYTitle("N cells");
+ fhExoNCell[ie][idt] ->SetXTitle("E (GeV)");
+ outputContainer->Add(fhExoNCell[ie][idt]) ;
+
+ fhExoL0 [ie][idt] = new TH2F(Form("hExoL0_ECross%d_DT%d",ie,idt),
+ Form("#lambda^{2}_{0} vs E cluster for exotic, 1-E_{+}/E_{max} < %2.2f, #Delta t = %2.0f",fExoECrossCuts[ie],fExoDTimeCuts[idt]),
+ nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
+ fhExoL0 [ie][idt] ->SetYTitle("#lambda^{2}_{0}");
+ fhExoL0 [ie][idt] ->SetXTitle("E (GeV)");
+ outputContainer->Add(fhExoL0[ie][idt]) ;
+
+ fhExoL1 [ie][idt] = new TH2F(Form("hExoL1_ECross%d_DT%d",ie,idt),
+ Form("#lambda^{2}_{1} vs E cluster for exotic, 1-E_{+}/E_{max} < %2.2f, #Delta t = %2.0f",fExoECrossCuts[ie],fExoDTimeCuts[idt]),
+ nptbins,ptmin,ptmax,ssbins,ssmin,ssmax);
+ fhExoL1 [ie][idt] ->SetYTitle("#lambda^{2}_{1}");
+ fhExoL1 [ie][idt] ->SetXTitle("E (GeV)");
+ outputContainer->Add(fhExoL1[ie][idt]) ;
+
+ fhExoECross[ie][idt] = new TH2F(Form("hExoECross_ECross%d_DT%d",ie,idt),
+ Form("E cross for cells vs E cell, 1-E_{+}/E_{max} < %2.2f, #Delta t < %2.0f",fExoECrossCuts[ie],fExoDTimeCuts[idt]),
+ nptbins,ptmin,ptmax,400,0,1);
+ fhExoECross[ie][idt] ->SetYTitle("1-E_{+}/E_{cell max}");
+ fhExoECross[ie][idt] ->SetXTitle("E_{cell} (GeV)");
+ outputContainer->Add(fhExoECross[ie][idt]) ;
+
+ fhExoTime [ie][idt] = new TH2F(Form("hExoTime_ECross%d_DT%d",ie,idt),
+ Form("Time of cluster (max cell) vs E cluster for exotic, 1-E_{+}/E_{max} < %2.2f, #Delta t = %2.0f",fExoECrossCuts[ie],fExoDTimeCuts[idt]),
+ nptbins,ptmin,ptmax,ntimebins,timemin,timemax);
+ fhExoTime [ie][idt] ->SetYTitle("time_{max} (ns)");
+ fhExoTime [ie][idt] ->SetXTitle("E (GeV)");
+ outputContainer->Add(fhExoTime[ie][idt]) ;
+
+ fhExoL0NCell[ie][idt] = new TH2F(Form("hExoL0_NCell%d_DT%d",ie,idt),
+ Form("#lambda^{2}_{0} vs N cells per clusters for E > 5 GeV, 1-E_{+}/E_{max} < %2.2f, #Delta t = %2.0f",fExoECrossCuts[ie],fExoDTimeCuts[idt]),
+ nptbins,ptmin,ptmax,ntimebins,timemin,timemax);
+ fhExoL0NCell[ie][idt] ->SetYTitle("N cells");
+ fhExoL0NCell[ie][idt] ->SetXTitle("#lambda^{2}_{0}");
+ outputContainer->Add(fhExoL0NCell[ie][idt]) ;
+
+ fhExoL1NCell[ie][idt] = new TH2F(Form("hExoL1_NCell%d_DT%d",ie,idt),
+ Form("#lambda^{2}_{1} vs N cells per clusters for E > 5 GeV, 1-E_{+}/E_{max} < %2.2f, #Delta t = %2.0f",fExoECrossCuts[ie],fExoDTimeCuts[idt]),
+ nptbins,ptmin,ptmax,ntimebins,timemin,timemax);
+ fhExoL1NCell[ie][idt] ->SetYTitle("N cells");
+ fhExoL1NCell[ie][idt] ->SetXTitle("#lambda^{2}_{1}");
+ outputContainer->Add(fhExoL1NCell[ie][idt]) ;
+
+ }
+ }
+ }
+
// Cluster size in terms of cells
- if(fStudyClustersAsymmetry){
+ if(fStudyClustersAsymmetry)
+ {
fhDeltaIEtaDeltaIPhiE0[0] = new TH2F ("hDeltaIEtaDeltaIPhiE0"," Cluster size in columns vs rows for E < 2 GeV, n cells > 3",
50,0,50,50,0,50);
fhDeltaIEtaDeltaIPhiE0[0]->SetXTitle("#Delta Column");
outputContainer->Add(fhDeltaIAMC[iPart]);
}
}
+
if(fStudyBadClusters)
{
fhBadClusterDeltaIEtaDeltaIPhiE0 = new TH2F ("hBadClusterDeltaIEtaDeltaIPhiE0"," Cluster size in columns vs rows for E < 2 GeV, n cells > 3",
}
}
- if(fStudyWeight){
-
+ if(fStudyWeight)
+ {
fhECellClusterRatio = new TH2F ("hECellClusterRatio"," cell energy / cluster energy vs cluster energy",
nptbins,ptmin,ptmax, 100,0,1.);
fhECellClusterRatio->SetXTitle("E_{cluster} (GeV) ");
// outputContainer->Add(fhLambda1ForW0MC[iw][imc]);
}
}
-
- }
-
+ }
}
//Track Matching
- if(fFillAllTMHisto){
- if(fFillAllTH12){
- fhECharged = new TH1F ("hECharged","E reconstructed clusters, matched with track", nptbins,ptmin,ptmax);
+ if(fFillAllTMHisto)
+ {
+ Int_t nresetabins = GetHistogramRanges()->GetHistoTrackResidualEtaBins();
+ Float_t resetamax = GetHistogramRanges()->GetHistoTrackResidualEtaMax();
+ Float_t resetamin = GetHistogramRanges()->GetHistoTrackResidualEtaMin();
+ Int_t nresphibins = GetHistogramRanges()->GetHistoTrackResidualPhiBins();
+ Float_t resphimax = GetHistogramRanges()->GetHistoTrackResidualPhiMax();
+ Float_t resphimin = GetHistogramRanges()->GetHistoTrackResidualPhiMin();
+
+ fhTrackMatchedDEta = new TH2F("hTrackMatchedDEta","d#eta of cluster-track vs cluster energy",
+ nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
+ fhTrackMatchedDEta->SetYTitle("d#eta");
+ fhTrackMatchedDEta->SetXTitle("E_{cluster} (GeV)");
+
+ fhTrackMatchedDPhi = new TH2F("hTrackMatchedDPhi","d#phi of cluster-track vs cluster energy",
+ nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
+ fhTrackMatchedDPhi->SetYTitle("d#phi (rad)");
+ fhTrackMatchedDPhi->SetXTitle("E_{cluster} (GeV)");
+
+ fhTrackMatchedDEtaDPhi = new TH2F("hTrackMatchedDEtaDPhi","d#eta vs d#phi of cluster-track vs cluster energy",
+ nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax);
+ fhTrackMatchedDEtaDPhi->SetYTitle("d#phi (rad)");
+ fhTrackMatchedDEtaDPhi->SetXTitle("d#eta");
+
+ fhTrackMatchedDEtaPos = new TH2F("hTrackMatchedDEtaPos","d#eta of cluster-track vs cluster energy",
+ nptbins,ptmin,ptmax,nresetabins,resetamin,resetamax);
+ fhTrackMatchedDEtaPos->SetYTitle("d#eta");
+ fhTrackMatchedDEtaPos->SetXTitle("E_{cluster} (GeV)");
+
+ fhTrackMatchedDPhiPos = new TH2F("hTrackMatchedDPhiPos","d#phi of cluster-track vs cluster energy",
+ nptbins,ptmin,ptmax,nresphibins,resphimin,resphimax);
+ fhTrackMatchedDPhiPos->SetYTitle("d#phi (rad)");
+ fhTrackMatchedDPhiPos->SetXTitle("E_{cluster} (GeV)");
+
+ fhTrackMatchedDEtaDPhiPos = new TH2F("hTrackMatchedDEtaDPhiPos","d#eta vs d#phi of cluster-track vs cluster energy",
+ nresetabins,resetamin,resetamax,nresphibins,resphimin,resphimax);
+ fhTrackMatchedDEtaDPhiPos->SetYTitle("d#phi (rad)");
+ fhTrackMatchedDEtaDPhiPos->SetXTitle("d#eta");
+
+ outputContainer->Add(fhTrackMatchedDEta) ;
+ outputContainer->Add(fhTrackMatchedDPhi) ;
+ outputContainer->Add(fhTrackMatchedDEtaDPhi) ;
+ outputContainer->Add(fhTrackMatchedDEtaPos) ;
+ outputContainer->Add(fhTrackMatchedDPhiPos) ;
+ outputContainer->Add(fhTrackMatchedDEtaDPhiPos) ;
+
+ if(fFillAllTH12)
+ {
+ fhECharged = new TH1F ("hECharged","E reconstructed clusters, matched with track", nptbins,ptmin,ptmax);
fhECharged->SetXTitle("E (GeV)");
outputContainer->Add(fhECharged);
outputContainer->Add(fhEtaPhiECharged);
}
- fh1pOverE = new TH2F("h1pOverE","TRACK matches p/E",nptbins,ptmin,ptmax, nPoverEbins,pOverEmin,pOverEmax);
- fh1pOverE->SetYTitle("p/E");
- fh1pOverE->SetXTitle("p_{T} (GeV/c)");
- outputContainer->Add(fh1pOverE);
+ fh1EOverP = new TH2F("h1EOverP","TRACK matches E/p",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
+ fh1EOverP->SetYTitle("E/p");
+ fh1EOverP->SetXTitle("p_{T} (GeV/c)");
+ outputContainer->Add(fh1EOverP);
- fh1dR = new TH1F("h1dR","TRACK matches dR",ndRbins,dRmin,dRmax);
- fh1dR->SetXTitle("#Delta R (rad)");
- outputContainer->Add(fh1dR) ;
+ fh2dR = new TH2F("h2dR","TRACK matches dR",nptbins,ptmin,ptmax,ndRbins,dRmin,dRmax);
+ fh2dR->SetXTitle("#Delta R (rad)");
+ fh2dR->SetXTitle("E cluster (GeV)");
+ outputContainer->Add(fh2dR) ;
fh2MatchdEdx = new TH2F("h2MatchdEdx","dE/dx vs. p for all matches",nptbins,ptmin,ptmax,ndedxbins,dedxmin,dedxmax);
fh2MatchdEdx->SetXTitle("p (GeV/c)");
fh2EledEdx->SetYTitle("<dE/dx>");
outputContainer->Add(fh2EledEdx) ;
- fh1pOverER02 = new TH2F("h1pOverER02","TRACK matches p/E, all",nptbins,ptmin,ptmax, nPoverEbins,pOverEmin,pOverEmax);
- fh1pOverER02->SetYTitle("p/E");
- fh1pOverER02->SetXTitle("p_{T} (GeV/c)");
- outputContainer->Add(fh1pOverER02);
+ fh1EOverPR02 = new TH2F("h1EOverPR02","TRACK matches E/p, all",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
+ fh1EOverPR02->SetYTitle("E/p");
+ fh1EOverPR02->SetXTitle("p_{T} (GeV/c)");
+ outputContainer->Add(fh1EOverPR02);
+
+ fh1EleEOverP = new TH2F("h1EleEOverP","Electron candidates E/p (60<dEdx<100)",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
+ fh1EleEOverP->SetYTitle("E/p");
+ fh1EleEOverP->SetXTitle("p_{T} (GeV/c)");
+ outputContainer->Add(fh1EleEOverP);
}
- if(fFillAllPi0Histo){
+ if(fFillAllPi0Histo)
+ {
fhIM = new TH2F ("hIM","Cluster pairs Invariant mass vs reconstructed pair energy, ncell > 1",nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
fhIM->SetXTitle("p_{T, cluster pairs} (GeV) ");
fhIM->SetYTitle("M_{cluster pairs} (GeV/c^{2})");
fhAsym->SetXTitle("p_{T, cluster pairs} (GeV) ");
fhAsym->SetYTitle("Asymmetry");
outputContainer->Add(fhAsym);
-
}
- fhNCellsPerClusterNoCut = new TH2F ("hNCellsPerClusterNoCut","# cells per cluster vs energy, no bad clusters cut",
- nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
- fhNCellsPerClusterNoCut->SetXTitle("E (GeV)");
- fhNCellsPerClusterNoCut->SetYTitle("n cells");
- outputContainer->Add(fhNCellsPerClusterNoCut);
- fhNCellsPerCluster = new TH2F ("hNCellsPerCluster","# cells per cluster vs energy",nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
- fhNCellsPerCluster->SetXTitle("E (GeV)");
- fhNCellsPerCluster->SetYTitle("n cells");
- outputContainer->Add(fhNCellsPerCluster);
-
- fhNClusters = new TH1F ("hNClusters","# clusters", nclbins,nclmin,nclmax);
- fhNClusters->SetXTitle("number of clusters");
- outputContainer->Add(fhNClusters);
-
- if(fFillAllPosHisto2){
-
- if(fFillAllTH3){
+ if(fFillAllPosHisto2)
+ {
+ if(fFillAllTH3)
+ {
fhXYZ = new TH3F ("hXYZ","Cluster: x vs y vs z",xbins,xmin,xmax,ybins,ymin,ymax,zbins,zmin,zmax);
fhXYZ->SetXTitle("x (cm)");
fhXYZ->SetYTitle("y (cm)");
fhYE->SetYTitle("E (GeV)");
outputContainer->Add(fhYE);
}
- if(fFillAllPosHisto){
-
+
+ if(fFillAllPosHisto)
+ {
fhRCellE = new TH2F ("hRCellE","Cell R position vs cell energy",rbins,rmin,rmax,nptbins,ptmin,ptmax);
fhRCellE->SetXTitle("r = #sqrt{x^{2}+y^{2}} (cm)");
fhRCellE->SetYTitle("E (GeV)");
}
//Calo cells
- fhNCells = new TH1F ("hNCells","# cells", ncebins,ncemin,ncemax);
+ fhNCells = new TH1F ("hNCells","# cells", ncebins,ncemin+0.5,ncemax);
fhNCells->SetXTitle("n cells");
outputContainer->Add(fhNCells);
fhAmpId->SetXTitle("Cell Energy (GeV)");
outputContainer->Add(fhAmpId);
- //Cell Time histograms, time only available in ESDs
- if(GetReader()->GetDataType()==AliCaloTrackReader::kESD) {
-
+ if(fFillAllCellTimeHisto)
+ {
fhCellTimeSpreadRespectToCellMax = new TH2F ("hCellTimeSpreadRespectToCellMax","t_{cell max}-t_{cell i} per cluster", nptbins,ptmin,ptmax,tdbins,tdmin,tdmax);
fhCellTimeSpreadRespectToCellMax->SetXTitle("E (GeV)");
fhCellTimeSpreadRespectToCellMax->SetYTitle("#Delta t_{cell max-i} (ns)");
outputContainer->Add(fhCellECross);
- if(fCorrelate){
+ if(fCorrelate)
+ {
//PHOS vs EMCAL
fhCaloCorrNClusters = new TH2F ("hCaloCorrNClusters","# clusters in EMCAL vs PHOS", nclbins,nclmin,nclmax,nclbins,nclmin,nclmax);
fhCaloCorrNClusters->SetXTitle("number of clusters in EMCAL");
fhCaloCorrNClusters->SetYTitle("number of clusters in PHOS");
outputContainer->Add(fhCaloCorrNClusters);
- fhCaloCorrEClusters = new TH2F ("hCaloCorrEClusters","summed energy of clusters in EMCAL vs PHOS", nptbins,ptmin,ptmax,nptbins,ptmin,ptmax);
+ fhCaloCorrEClusters = new TH2F ("hCaloCorrEClusters","summed energy of clusters in EMCAL vs PHOS", nptbins,ptmin,ptmax*2,nptbins,ptmin,ptmax*2);
fhCaloCorrEClusters->SetXTitle("#Sigma E of clusters in EMCAL (GeV)");
fhCaloCorrEClusters->SetYTitle("#Sigma E of clusters in PHOS (GeV)");
outputContainer->Add(fhCaloCorrEClusters);
fhCaloCorrNCells->SetYTitle("number of Cells in PHOS");
outputContainer->Add(fhCaloCorrNCells);
- fhCaloCorrECells = new TH2F ("hCaloCorrECells","summed energy of Cells in EMCAL vs PHOS", nptbins*2,ptmin,ptmax*2,nptbins*2,ptmin,ptmax*2);
+ fhCaloCorrECells = new TH2F ("hCaloCorrECells","summed energy of Cells in EMCAL vs PHOS", nptbins*2,ptmin,ptmax*4,nptbins*2,ptmin,ptmax*4);
fhCaloCorrECells->SetXTitle("#Sigma E of Cells in EMCAL (GeV)");
fhCaloCorrECells->SetYTitle("#Sigma E of Cells in PHOS (GeV)");
outputContainer->Add(fhCaloCorrECells);
fhCaloV0SCorrNClusters->SetYTitle(Form("number of clusters in %s",fCalorimeter.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);
+ fhCaloV0SCorrEClusters = new TH2F ("hCaloV0SEClusters",Form("summed energy of clusters in %s vs V0 signal",fCalorimeter.Data()), nv0sbins,nv0smin,nv0smax,nptbins,ptmin,ptmax*2);
fhCaloV0SCorrEClusters->SetXTitle("V0 signal");
fhCaloV0SCorrEClusters->SetYTitle(Form("#Sigma E of clusters in %s (GeV)",fCalorimeter.Data()));
outputContainer->Add(fhCaloV0SCorrEClusters);
fhCaloV0SCorrNCells->SetYTitle(Form("number of Cells in %s",fCalorimeter.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);
+ fhCaloV0SCorrECells = new TH2F ("hCaloV0SECells",Form("summed energy of Cells in %s vs V0 signal",fCalorimeter.Data()), nv0sbins,nv0smin,nv0smax,nptbins,ptmin,ptmax*2);
fhCaloV0SCorrECells->SetXTitle("V0 signal");
fhCaloV0SCorrECells->SetYTitle(Form("#Sigma E of Cells in %s (GeV)",fCalorimeter.Data()));
outputContainer->Add(fhCaloV0SCorrECells);
fhCaloV0MCorrNClusters->SetYTitle(Form("number of clusters in %s",fCalorimeter.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);
+ fhCaloV0MCorrEClusters = new TH2F ("hCaloV0MEClusters",Form("summed energy of clusters in %s vs V0 signal",fCalorimeter.Data()), nv0mbins,nv0mmin,nv0mmax,nptbins,ptmin,ptmax*2);
fhCaloV0MCorrEClusters->SetXTitle("V0 signal");
fhCaloV0MCorrEClusters->SetYTitle(Form("#Sigma E of clusters in %s (GeV)",fCalorimeter.Data()));
outputContainer->Add(fhCaloV0MCorrEClusters);
fhCaloV0MCorrNCells->SetYTitle(Form("number of Cells in %s",fCalorimeter.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);
+ fhCaloV0MCorrECells = new TH2F ("hCaloV0MECells",Form("summed energy of Cells in %s vs V0 signal",fCalorimeter.Data()), nv0mbins,nv0mmin,nv0mmax,nptbins,ptmin,ptmax*2);
fhCaloV0MCorrECells->SetXTitle("V0 signal");
fhCaloV0MCorrECells->SetYTitle(Form("#Sigma E of Cells in %s (GeV)",fCalorimeter.Data()));
outputContainer->Add(fhCaloV0MCorrECells);
fhCaloTrackMCorrNClusters->SetYTitle(Form("number of clusters in %s",fCalorimeter.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);
+ fhCaloTrackMCorrEClusters = new TH2F ("hCaloTrackMEClusters",Form("summed energy of clusters in %s vs # tracks",fCalorimeter.Data()), ntrmbins,ntrmmin,ntrmmax,nptbins,ptmin,ptmax*2);
fhCaloTrackMCorrEClusters->SetXTitle("# tracks");
fhCaloTrackMCorrEClusters->SetYTitle(Form("#Sigma E of clusters in %s (GeV)",fCalorimeter.Data()));
outputContainer->Add(fhCaloTrackMCorrEClusters);
fhCaloTrackMCorrNCells->SetYTitle(Form("number of Cells in %s",fCalorimeter.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);
+ fhCaloTrackMCorrECells = new TH2F ("hCaloTrackMECells",Form("summed energy of Cells in %s vs # tracks",fCalorimeter.Data()), ntrmbins,ntrmmin,ntrmmax,nptbins,ptmin,ptmax*2);
fhCaloTrackMCorrECells->SetXTitle("# tracks");
fhCaloTrackMCorrECells->SetYTitle(Form("#Sigma E of Cells in %s (GeV)",fCalorimeter.Data()));
outputContainer->Add(fhCaloTrackMCorrECells);
+ fhCaloCenNClusters = new TH2F ("hCaloCenNClusters","# clusters in calorimeter vs centrality",100,0,100,nclbins,nclmin,nclmax);
+ fhCaloCenNClusters->SetYTitle("number of clusters in calorimeter");
+ fhCaloCenNClusters->SetXTitle("Centrality");
+ outputContainer->Add(fhCaloCenNClusters);
+
+ fhCaloCenEClusters = new TH2F ("hCaloCenEClusters","summed energy of clusters in calorimeter vs centrality",100,0,100,nptbins,ptmin,ptmax*2);
+ fhCaloCenEClusters->SetYTitle("#Sigma E of clusters in calorimeter (GeV)");
+ fhCaloCenEClusters->SetXTitle("Centrality");
+ outputContainer->Add(fhCaloCenEClusters);
+
+ fhCaloCenNCells = new TH2F ("hCaloCenNCells","# Cells in calorimeter vs centrality",100,0,100,ncebins,ncemin,ncemax);
+ fhCaloCenNCells->SetYTitle("number of Cells in calorimeter");
+ fhCaloCenNCells->SetXTitle("Centrality");
+ outputContainer->Add(fhCaloCenNCells);
+
+ fhCaloCenECells = new TH2F ("hCaloCenECells","summed energy of Cells in calorimeter vs centrality",100,0,100,nptbins*2,ptmin,ptmax*4);
+ fhCaloCenECells->SetYTitle("#Sigma E of Cells in calorimeter (GeV)");
+ fhCaloCenECells->SetXTitle("Centrality");
+ outputContainer->Add(fhCaloCenECells);
+
+ fhCaloEvPNClusters = new TH2F ("hCaloEvPNClusters","# clusters in calorimeter vs event plane angle",100,0,TMath::Pi(),nclbins,nclmin,nclmax);
+ fhCaloEvPNClusters->SetYTitle("number of clusters in calorimeter");
+ fhCaloEvPNClusters->SetXTitle("Event plane angle (rad)");
+ outputContainer->Add(fhCaloEvPNClusters);
+
+ fhCaloEvPEClusters = new TH2F ("hCaloEvPEClusters","summed energy of clusters in calorimeter vs event plane angle",100,0,TMath::Pi(),nptbins,ptmin,ptmax*2);
+ fhCaloEvPEClusters->SetYTitle("#Sigma E of clusters in calorimeter (GeV)");
+ fhCaloEvPEClusters->SetXTitle("Event plane angle (rad)");
+ outputContainer->Add(fhCaloEvPEClusters);
+
+ fhCaloEvPNCells = new TH2F ("hCaloEvPNCells","# Cells in calorimeter vs event plane angle",100,0,TMath::Pi(),ncebins,ncemin,ncemax);
+ fhCaloEvPNCells->SetYTitle("number of Cells in calorimeter");
+ fhCaloEvPNCells->SetXTitle("Event plane angle (rad)");
+ outputContainer->Add(fhCaloEvPNCells);
+
+ fhCaloEvPECells = new TH2F ("hCaloEvPECells","summed energy of Cells in calorimeter vs event plane angle",100,0,TMath::Pi(),nptbins*2,ptmin,ptmax*4);
+ fhCaloEvPECells->SetYTitle("#Sigma E of Cells in calorimeter (GeV)");
+ fhCaloEvPECells->SetXTitle("Event plane angle (rad)");
+ outputContainer->Add(fhCaloEvPECells);
+
}//correlate calorimeters
fhAmpMod->SetYTitle("Module");
outputContainer->Add(fhAmpMod);
- if(GetReader()->GetDataType()==AliCaloTrackReader::kESD) {
+ if(fFillAllCellTimeHisto)
+ {
fhTimeMod = new TH2F ("hTime_Mod","Cell time in each present Module",ntimebins,timemin,timemax,fNModules,0,fNModules);
fhTimeMod->SetXTitle("t (ns)");
fhTimeMod->SetYTitle("Module");
outputContainer->Add(fhTimeMod);
}
- fhNClustersMod = new TH2F ("hNClusters_Mod","# clusters vs Module", nclbins,nclmin,nclmax,fNModules,0,fNModules);
+ fhNClustersMod = new TH2F ("hNClusters_Mod","# clusters vs Module", nclbins,nclmin+0.5,nclmax,fNModules,0,fNModules);
fhNClustersMod->SetXTitle("number of clusters");
fhNClustersMod->SetYTitle("Module");
outputContainer->Add(fhNClustersMod);
- fhNCellsMod = new TH2F ("hNCells_Mod","# cells vs Module", ncebins,ncemin,ncemax,fNModules,0,fNModules);
+ fhNCellsMod = new TH2F ("hNCells_Mod","# cells vs Module", ncebins,ncemin+0.5,ncemax,fNModules,0,fNModules);
fhNCellsMod->SetXTitle("n cells");
fhNCellsMod->SetYTitle("Module");
outputContainer->Add(fhNCellsMod);
Int_t colmaxs = fNMaxCols;
Int_t rowmaxs = fNMaxRows;
- if(fCalorimeter=="EMCAL"){
+ if(fCalorimeter=="EMCAL")
+ {
colmaxs=2*fNMaxCols;
rowmaxs=Int_t(fNModules/2)*fNMaxRows;
}
- else{
+ else
+ {
rowmaxs=fNModules*fNMaxRows;
}
fhGridCellsE->SetXTitle("column (eta direction)");
outputContainer->Add(fhGridCellsE);
- if(GetReader()->GetDataType()==AliCaloTrackReader::kESD){
+ 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->SetYTitle("row (phi direction)");
outputContainer->Add(fhGridCellsTime);
}
- fhNCellsPerClusterMod = new TH2F*[fNModules];
+ fhNCellsPerClusterMod = new TH2F*[fNModules];
fhNCellsPerClusterModNoCut = new TH2F*[fNModules];
- fhIMMod = new TH2F*[fNModules];
- if(GetReader()->GetDataType()==AliCaloTrackReader::kESD) fhTimeAmpPerRCU = new TH2F*[fNModules*fNRCU];
+ fhIMMod = new TH2F*[fNModules];
+ if(fFillAllCellTimeHisto) fhTimeAmpPerRCU = new TH2F*[fNModules*fNRCU];
- for(Int_t imod = 0; imod < fNModules; imod++){
-
+ for(Int_t imod = 0; imod < fNModules; imod++)
+ {
fhNCellsPerClusterMod[imod] = new TH2F (Form("hNCellsPerCluster_Mod%d",imod),
Form("# cells per cluster vs cluster energy in Module %d",imod),
nptbins,ptmin,ptmax, nceclbins,nceclmin,nceclmax);
fhNCellsPerClusterModNoCut[imod]->SetYTitle("n cells");
outputContainer->Add(fhNCellsPerClusterModNoCut[imod]);
- if(GetReader()->GetDataType()==AliCaloTrackReader::kESD) {
-
- for(Int_t ircu = 0; ircu < fNRCU; ircu++){
+ if(fFillAllCellTimeHisto)
+ {
+ for(Int_t ircu = 0; ircu < fNRCU; ircu++)
+ {
fhTimeAmpPerRCU[imod*fNRCU+ircu] = new TH2F (Form("hTimeAmp_Mod%d_RCU%d",imod,ircu),
Form("Cell Energy vs Cell Time in Module %d, RCU %d ",imod,ircu),
nptbins,ptmin,ptmax,ntimebins,timemin,timemax);
}
}
- if(fFillAllPi0Histo){
+ if(fFillAllPi0Histo)
+ {
fhIMMod[imod] = new TH2F (Form("hIM_Mod%d",imod),
Form("Cluster pairs Invariant mass vs reconstructed pair energy in Module %d, n cell > 1",imod),
nptbins,ptmin,ptmax,nmassbins,massmin,massmax);
TString particleName[] = { "Photon", "Pi0", "Eta", "Electron", "NeutralHadron", "ChargedHadron" };
- if(IsDataMC()){
- for(Int_t iPart = 0; iPart < 6; iPart++){
-
- for(Int_t iCh = 0; iCh < 2; iCh++){
-
+ if(IsDataMC())
+ {
+ for(Int_t iPart = 0; iPart < 6; iPart++)
+ {
+ for(Int_t iCh = 0; iCh < 2; iCh++)
+ {
fhRecoMCRatioE[iPart][iCh] = new TH2F (Form("hRecoMCRatioE_%s_Match%d",particleName[iPart].Data(),iCh),
- Form("Reco/Gen E, %s, Matched %d",particleName[iPart].Data(),iCh),
+ Form("Reconstructed/Generated E, %s, Matched %d",particleName[iPart].Data(),iCh),
nptbins, ptmin, ptmax, 200,0,2);
- fhRecoMCRatioE[iPart][iCh]->SetXTitle("E_{reconstructed}/E_{generated}");
+ fhRecoMCRatioE[iPart][iCh]->SetYTitle("E_{reconstructed}/E_{generated}");
+ fhRecoMCRatioE[iPart][iCh]->SetXTitle("E_{reconstructed} (GeV)");
outputContainer->Add(fhRecoMCRatioE[iPart][iCh]);
fhRecoMCDeltaE[iPart][iCh] = new TH2F (Form("hRecoMCDeltaE_%s_Match%d",particleName[iPart].Data(),iCh),
- Form("MC - Reco E, %s, Matched %d",particleName[iPart].Data(),iCh),
+ Form("Generated - Reconstructed E, %s, Matched %d",particleName[iPart].Data(),iCh),
nptbins, ptmin, ptmax, nptbins*2,-ptmax,ptmax);
- fhRecoMCDeltaE[iPart][iCh]->SetXTitle("#Delta E (GeV)");
+ fhRecoMCDeltaE[iPart][iCh]->SetYTitle("#Delta E (GeV)");
+ fhRecoMCDeltaE[iPart][iCh]->SetXTitle("E_{reconstructed} (GeV)");
outputContainer->Add(fhRecoMCDeltaE[iPart][iCh]);
fhRecoMCDeltaPhi[iPart][iCh] = new TH2F (Form("hRecoMCDeltaPhi_%s_Match%d",particleName[iPart].Data(),iCh),
- Form("MC - Reco #phi, %s, Matched %d",particleName[iPart].Data(),iCh),
+ Form("Generated - Reconstructed #phi, %s, Matched %d",particleName[iPart].Data(),iCh),
nptbins, ptmin, ptmax, nphibins*2,-phimax,phimax);
- fhRecoMCDeltaPhi[iPart][iCh]->SetXTitle("#Delta #phi (rad)");
+ fhRecoMCDeltaPhi[iPart][iCh]->SetYTitle("#Delta #phi (rad)");
+ fhRecoMCDeltaPhi[iPart][iCh]->SetXTitle("E_{reconstructed} (GeV)");
outputContainer->Add(fhRecoMCDeltaPhi[iPart][iCh]);
fhRecoMCDeltaEta[iPart][iCh] = new TH2F (Form("hRecoMCDeltaEta_%s_Match%d",particleName[iPart].Data(),iCh),
- Form("MC- Reco #eta, %s, Matched %d",particleName[iPart].Data(),iCh),
+ Form("Generated - Reconstructed #eta, %s, Matched %d",particleName[iPart].Data(),iCh),
nptbins, ptmin, ptmax,netabins*2,-etamax,etamax);
- fhRecoMCDeltaEta[iPart][iCh]->SetXTitle("#Delta #eta ");
+ fhRecoMCDeltaEta[iPart][iCh]->SetYTitle("#Delta #eta ");
+ fhRecoMCDeltaEta[iPart][iCh]->SetXTitle("E_{reconstructed} (GeV)");
outputContainer->Add(fhRecoMCDeltaEta[iPart][iCh]);
fhRecoMCE[iPart][iCh] = new TH2F (Form("hRecoMCE_%s_Match%d",particleName[iPart].Data(),iCh),
fhRecoMCPhi[iPart][iCh] = new TH2F (Form("hRecoMCPhi_%s_Match%d",particleName[iPart].Data(),iCh),
Form("#phi distribution, reconstructed vs generated, %s, Matched %d",particleName[iPart].Data(),iCh),
nphibins,phimin,phimax, nphibins,phimin,phimax);
- fhRecoMCPhi[iPart][iCh]->SetXTitle("#phi_{rec} (rad)");
- fhRecoMCPhi[iPart][iCh]->SetYTitle("#phi_{gen} (rad)");
+ fhRecoMCPhi[iPart][iCh]->SetXTitle("#phi_{reconstructed} (rad)");
+ fhRecoMCPhi[iPart][iCh]->SetYTitle("#phi_{generated} (rad)");
outputContainer->Add(fhRecoMCPhi[iPart][iCh]);
fhRecoMCEta[iPart][iCh] = new TH2F (Form("hRecoMCEta_%s_Match%d",particleName[iPart].Data(),iCh),
Form("#eta distribution, reconstructed vs generated, %s, Matched %d",particleName[iPart].Data(),iCh),
netabins,etamin,etamax,netabins,etamin,etamax);
- fhRecoMCEta[iPart][iCh]->SetXTitle("#eta_{rec} ");
- fhRecoMCEta[iPart][iCh]->SetYTitle("#eta_{gen} ");
+ fhRecoMCEta[iPart][iCh]->SetXTitle("#eta_{reconstructed} ");
+ fhRecoMCEta[iPart][iCh]->SetYTitle("#eta_{generated} ");
outputContainer->Add(fhRecoMCEta[iPart][iCh]);
}
}
//Pure MC
- for(Int_t iPart = 0; iPart < 4; iPart++){
+ for(Int_t iPart = 0; iPart < 4; iPart++)
+ {
fhGenMCE[iPart] = new TH1F(Form("hGenMCE_%s",particleName[iPart].Data()) ,
Form("p_{T} of generated %s",particleName[iPart].Data()),
nptbins,ptmin,ptmax);
//Track Matching
- fhMCEle1pOverE = new TH2F("hMCEle1pOverE","TRACK matches p/E, MC electrons",nptbins,ptmin,ptmax, nPoverEbins,pOverEmin,pOverEmax);
- fhMCEle1pOverE->SetYTitle("p/E");
- fhMCEle1pOverE->SetXTitle("p_{T} (GeV/c)");
- outputContainer->Add(fhMCEle1pOverE);
+ fhMCEle1EOverP = new TH2F("hMCEle1EOverP","TRACK matches E/p, MC electrons",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
+ fhMCEle1EOverP->SetYTitle("E/p");
+ fhMCEle1EOverP->SetXTitle("p_{T} (GeV/c)");
+ outputContainer->Add(fhMCEle1EOverP);
fhMCEle1dR = new TH1F("hMCEle1dR","TRACK matches dR, MC electrons",ndRbins,dRmin,dRmax);
fhMCEle1dR->SetXTitle("#Delta R (rad)");
fhMCEle2MatchdEdx->SetYTitle("<dE/dx>");
outputContainer->Add(fhMCEle2MatchdEdx);
- fhMCChHad1pOverE = new TH2F("hMCChHad1pOverE","TRACK matches p/E, MC charged hadrons",nptbins,ptmin,ptmax, nPoverEbins,pOverEmin,pOverEmax);
- fhMCChHad1pOverE->SetYTitle("p/E");
- fhMCChHad1pOverE->SetXTitle("p_{T} (GeV/c)");
- outputContainer->Add(fhMCChHad1pOverE);
+ fhMCChHad1EOverP = new TH2F("hMCChHad1EOverP","TRACK matches E/p, MC charged hadrons",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
+ fhMCChHad1EOverP->SetYTitle("E/p");
+ fhMCChHad1EOverP->SetXTitle("p_{T} (GeV/c)");
+ outputContainer->Add(fhMCChHad1EOverP);
fhMCChHad1dR = new TH1F("hMCChHad1dR","TRACK matches dR, MC charged hadrons",ndRbins,dRmin,dRmax);
fhMCChHad1dR->SetXTitle("#Delta R (rad)");
fhMCChHad2MatchdEdx->SetYTitle("<dE/dx>");
outputContainer->Add(fhMCChHad2MatchdEdx);
- fhMCNeutral1pOverE = new TH2F("hMCNeutral1pOverE","TRACK matches p/E, MC neutrals",nptbins,ptmin,ptmax, nPoverEbins,pOverEmin,pOverEmax);
- fhMCNeutral1pOverE->SetYTitle("p/E");
- fhMCNeutral1pOverE->SetXTitle("p_{T} (GeV/c)");
- outputContainer->Add(fhMCNeutral1pOverE);
+ fhMCNeutral1EOverP = new TH2F("hMCNeutral1EOverP","TRACK matches E/p, MC neutrals",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
+ fhMCNeutral1EOverP->SetYTitle("E/p");
+ fhMCNeutral1EOverP->SetXTitle("p_{T} (GeV/c)");
+ outputContainer->Add(fhMCNeutral1EOverP);
fhMCNeutral1dR = new TH1F("hMCNeutral1dR","TRACK matches dR, MC neutrals",ndRbins,dRmin,dRmax);
fhMCNeutral1dR->SetXTitle("#Delta R (rad)");
fhMCNeutral2MatchdEdx->SetYTitle("<dE/dx>");
outputContainer->Add(fhMCNeutral2MatchdEdx);
- fhMCEle1pOverER02 = new TH2F("hMCEle1pOverER02","TRACK matches p/E, MC electrons",nptbins,ptmin,ptmax, nPoverEbins,pOverEmin,pOverEmax);
- fhMCEle1pOverER02->SetYTitle("p/E");
- fhMCEle1pOverER02->SetXTitle("p_{T} (GeV/c)");
- outputContainer->Add(fhMCEle1pOverER02);
-
- fhMCChHad1pOverER02 = new TH2F("hMCChHad1pOverER02","TRACK matches p/E, MC charged hadrons",nptbins,ptmin,ptmax, nPoverEbins,pOverEmin,pOverEmax);
- fhMCChHad1pOverER02->SetYTitle("p/E");
- fhMCChHad1pOverER02->SetXTitle("p_{T} (GeV/c)");
- outputContainer->Add(fhMCChHad1pOverER02);
+ fhMCEle1EOverPR02 = new TH2F("hMCEle1EOverPR02","TRACK matches E/p, MC electrons",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
+ fhMCEle1EOverPR02->SetYTitle("E/p");
+ fhMCEle1EOverPR02->SetXTitle("p_{T} (GeV/c)");
+ outputContainer->Add(fhMCEle1EOverPR02);
+
+ fhMCChHad1EOverPR02 = new TH2F("hMCChHad1EOverPR02","TRACK matches E/p, MC charged hadrons",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
+ fhMCChHad1EOverPR02->SetYTitle("E/p");
+ fhMCChHad1EOverPR02->SetXTitle("p_{T} (GeV/c)");
+ outputContainer->Add(fhMCChHad1EOverPR02);
+
+ fhMCNeutral1EOverPR02 = new TH2F("hMCNeutral1EOverPR02","TRACK matches E/p, MC neutrals",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
+ fhMCNeutral1EOverPR02->SetYTitle("E/p");
+ fhMCNeutral1EOverPR02->SetXTitle("p_{T} (GeV/c)");
+ outputContainer->Add(fhMCNeutral1EOverPR02);
+
+ fhMCEle1EleEOverP = new TH2F("hMCEle1EleEOverP","Electron candidates E/p (60<dEdx<100), MC electrons",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
+ fhMCEle1EleEOverP->SetYTitle("E/p");
+ fhMCEle1EleEOverP->SetXTitle("p_{T} (GeV/c)");
+ outputContainer->Add(fhMCEle1EleEOverP);
+
+ fhMCChHad1EleEOverP = new TH2F("hMCEle1EleEOverP","Electron candidates E/p (60<dEdx<100), MC charged hadrons",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
+ fhMCChHad1EleEOverP->SetYTitle("E/p");
+ fhMCChHad1EleEOverP->SetXTitle("p_{T} (GeV/c)");
+ outputContainer->Add(fhMCChHad1EleEOverP);
+
+ fhMCNeutral1EleEOverP = new TH2F("hMCNeutral1EleEOverP","Electron candidates E/p (60<dEdx<100), MC neutrals",nptbins,ptmin,ptmax, nPoverEbins,eOverPmin,eOverPmax);
+ fhMCNeutral1EleEOverP->SetYTitle("E/p");
+ fhMCNeutral1EleEOverP->SetXTitle("p_{T} (GeV/c)");
+ outputContainer->Add(fhMCNeutral1EleEOverP);
- fhMCNeutral1pOverER02 = new TH2F("hMCNeutral1pOverER02","TRACK matches p/E, MC neutrals",nptbins,ptmin,ptmax, nPoverEbins,pOverEmin,pOverEmax);
- fhMCNeutral1pOverER02->SetYTitle("p/E");
- fhMCNeutral1pOverER02->SetXTitle("p_{T} (GeV/c)");
- outputContainer->Add(fhMCNeutral1pOverER02);
}
// for(Int_t i = 0; i < outputContainer->GetEntries() ; i++)
return outputContainer;
}
-//_____________________________________________________________________________________________
-Float_t AliAnaCalorimeterQA::GetECross(const Int_t absID, AliVCaloCells* cells)
+//______________________________________________________________________________________
+Float_t AliAnaCalorimeterQA::GetECross(Int_t absID, AliVCaloCells* cells, Float_t dtcut)
{
// 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);
-
- if(fCalorimeter=="EMCAL"){
+
+ if(fCalorimeter=="EMCAL")
+ {
//Get close cells index, energy and time, not in corners
- Int_t absID1 = GetCaloUtils()->GetEMCALGeometry()-> GetAbsCellIdFromCellIndexes(imod, irow+1, icol);
- Int_t absID2 = GetCaloUtils()->GetEMCALGeometry()-> GetAbsCellIdFromCellIndexes(imod, irow-1, icol);
- Int_t absID3 = GetCaloUtils()->GetEMCALGeometry()-> GetAbsCellIdFromCellIndexes(imod, irow, icol+1);
- Int_t absID4 = GetCaloUtils()->GetEMCALGeometry()-> GetAbsCellIdFromCellIndexes(imod, irow, icol-1);
+
+ Int_t absID1 = -1;
+ Int_t absID2 = -1;
+
+ if( irow < AliEMCALGeoParams::fgkEMCALRows-1) absID1 = GetCaloUtils()->GetEMCALGeometry()->GetAbsCellIdFromCellIndexes(imod, irow+1, icol);
+ if( irow > 0 ) absID2 = GetCaloUtils()->GetEMCALGeometry()->GetAbsCellIdFromCellIndexes(imod, irow-1, icol);
+
+ // In case of cell in eta = 0 border, depending on SM shift the cross cell index
+ Int_t absID3 = -1;
+ Int_t absID4 = -1;
+
+ if ( icol == AliEMCALGeoParams::fgkEMCALCols - 1 && !(imod%2) )
+ {
+ absID3 = GetCaloUtils()->GetEMCALGeometry()-> GetAbsCellIdFromCellIndexes(imod+1, irow, 0);
+ absID4 = GetCaloUtils()->GetEMCALGeometry()-> GetAbsCellIdFromCellIndexes(imod , irow, icol-1);
+ }
+ else if( icol == 0 && imod%2 )
+ {
+ absID3 = GetCaloUtils()->GetEMCALGeometry()-> GetAbsCellIdFromCellIndexes(imod , irow, icol+1);
+ absID4 = GetCaloUtils()->GetEMCALGeometry()-> GetAbsCellIdFromCellIndexes(imod-1, irow, AliEMCALGeoParams::fgkEMCALCols-1);
+ }
+ else
+ {
+ if( icol < AliEMCALGeoParams::fgkEMCALCols-1 )
+ absID3 = GetCaloUtils()->GetEMCALGeometry()-> GetAbsCellIdFromCellIndexes(imod, irow, icol+1);
+ if( icol > 0 )
+ absID4 = GetCaloUtils()->GetEMCALGeometry()-> GetAbsCellIdFromCellIndexes(imod, irow, icol-1);
+ }
//Recalibrate cell energy if needed
//Float_t ecell = cells->GetCellAmplitude(absID);
- //RecalibrateCellAmplitude(ecell,absID);
+ //GetCaloUtils()->RecalibrateCellAmplitude(ecell,fCalorimeter, absID);
Double_t tcell = cells->GetCellTime(absID);
- RecalibrateCellTime(tcell,absID);
+ GetCaloUtils()->RecalibrateCellTime(tcell, fCalorimeter, 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 ){
+ if(absID1 >0 )
+ {
ecell1 = cells->GetCellAmplitude(absID1);
- RecalibrateCellAmplitude(ecell1,absID1);
+ GetCaloUtils()->RecalibrateCellAmplitude(ecell1, fCalorimeter, absID1);
tcell1 = cells->GetCellTime(absID1);
- RecalibrateCellTime(tcell1,absID1);
+ GetCaloUtils()->RecalibrateCellTime (tcell1, fCalorimeter, absID1,GetReader()->GetInputEvent()->GetBunchCrossNumber());
}
- if(absID2 >0 ){
+ if(absID2 >0 )
+ {
ecell2 = cells->GetCellAmplitude(absID2);
- RecalibrateCellAmplitude(ecell2,absID2);
+ GetCaloUtils()->RecalibrateCellAmplitude(ecell2, fCalorimeter, absID2);
tcell2 = cells->GetCellTime(absID2);
- RecalibrateCellTime(tcell2,absID2);
+ GetCaloUtils()->RecalibrateCellTime (tcell2, fCalorimeter, absID2, GetReader()->GetInputEvent()->GetBunchCrossNumber());
}
- if(absID3 >0 ){
+ if(absID3 >0 )
+ {
ecell3 = cells->GetCellAmplitude(absID3);
- RecalibrateCellAmplitude(ecell3,absID3);
+ GetCaloUtils()->RecalibrateCellAmplitude(ecell3, fCalorimeter, absID3);
tcell3 = cells->GetCellTime(absID3);
- RecalibrateCellTime(tcell3,absID3);
+ GetCaloUtils()->RecalibrateCellTime (tcell3, fCalorimeter, absID3, GetReader()->GetInputEvent()->GetBunchCrossNumber());
}
- if(absID4 >0 ){
+ if(absID4 >0 )
+ {
ecell4 = cells->GetCellAmplitude(absID4);
- RecalibrateCellAmplitude(ecell4,absID4);
+ GetCaloUtils()->RecalibrateCellAmplitude(ecell4, fCalorimeter, absID4);
tcell4 = cells->GetCellTime(absID4);
- RecalibrateCellTime(tcell4,absID4);
+ GetCaloUtils()->RecalibrateCellTime (tcell4, fCalorimeter, absID4, GetReader()->GetInputEvent()->GetBunchCrossNumber());
}
-
- if(TMath::Abs(tcell-tcell1)*1.e9 > 50) ecell1 = 0 ;
- if(TMath::Abs(tcell-tcell2)*1.e9 > 50) ecell2 = 0 ;
- if(TMath::Abs(tcell-tcell3)*1.e9 > 50) ecell3 = 0 ;
- if(TMath::Abs(tcell-tcell4)*1.e9 > 50) ecell4 = 0 ;
+
+ if(TMath::Abs(tcell-tcell1)*1.e9 > dtcut) ecell1 = 0 ;
+ if(TMath::Abs(tcell-tcell2)*1.e9 > dtcut) ecell2 = 0 ;
+ if(TMath::Abs(tcell-tcell3)*1.e9 > dtcut) ecell3 = 0 ;
+ if(TMath::Abs(tcell-tcell4)*1.e9 > dtcut) ecell4 = 0 ;
return ecell1+ecell2+ecell3+ecell4;
}
- else { //PHOS
+ else //PHOS
+ {
Int_t absId1 = -1, absId2 = -1, absId3 = -1, absId4 = -1;
}
//__________________________________________________________________________________________________
-void AliAnaCalorimeterQA::InvariantMassHistograms(const Int_t iclus, const TLorentzVector mom,
- const Int_t nModule, const TObjArray* caloClusters,
+void AliAnaCalorimeterQA::InvariantMassHistograms(Int_t iclus, TLorentzVector mom,
+ Int_t nModule, const TObjArray* caloClusters,
AliVCaloCells * cells)
{
// Fill Invariant mass histograms
TLorentzVector mom2 ;
Int_t nCaloClusters = caloClusters->GetEntriesFast();
- for(Int_t jclus = iclus + 1 ; jclus < nCaloClusters ; jclus++) {
+ for(Int_t jclus = iclus + 1 ; jclus < nCaloClusters ; jclus++)
+ {
AliVCluster* clus2 = (AliVCluster*)caloClusters->At(jclus);
Float_t maxCellFraction = 0.;
Int_t absIdMax = GetCaloUtils()->GetMaxEnergyCell(cells, clus2,maxCellFraction);
- if( clus2->GetNCells() <= 1 || !IsGoodCluster(absIdMax,cells)) continue;
+ // Try to rediuce background with a mild shower shape cut and no more than 1 maxima
+ // in cluster and remove low energy clusters
+ if( clus2->GetNCells() <= 1 || !IsGoodCluster(absIdMax,cells) ||
+ GetCaloUtils()->GetNumberOfLocalMaxima(clus2,cells) > 1 ||
+ clus2->GetM02() > 0.5 || clus2->E() < 0.3) continue;
//Get cluster kinematics
clus2->GetMomentum(mom2,v);
fhIM ->Fill((mom+mom2).Pt(),(mom+mom2).M());
//Single module
- if(nModule == nModule2 && nModule >=0 && nModule < fNModules){
+ if(nModule == nModule2 && nModule >=0 && nModule < fNModules)
fhIMMod[nModule]->Fill((mom+mom2).Pt(),(mom+mom2).M());
- }
+
//Asymetry histograms
fhAsym->Fill((mom+mom2).Pt(),TMath::Abs((mom.E()-mom2.E())/(mom.E()+mom2.E())));
if(fCalorimeter != "PHOS" && fCalorimeter !="EMCAL")
AliFatal(Form("Wrong calorimeter name <%s>", fCalorimeter.Data()));
- if(GetReader()->GetDataType()== AliCaloTrackReader::kMC)
- AliFatal("Analysis of reconstructed data, MC reader not aplicable");
+ //if(GetReader()->GetDataType()== AliCaloTrackReader::kMC)
+ // AliFatal("Analysis of reconstructed data, MC reader not aplicable");
}
AddToHistogramsName("AnaCaloQA_");
fCalorimeter = "EMCAL"; //or PHOS
- fNModules = 12; // set maximum to maximum number of EMCAL modules
+ fNModules = 22; // set maximum to maximum number of EMCAL modules
fNRCU = 2; // set maximum number of RCU in EMCAL per SM
- fTimeCutMin = -1;
- fTimeCutMax = 9999999;
+ fTimeCutMin = -9999999;
+ fTimeCutMax = 9999999;
fEMCALCellAmpMin = 0.2;
fPHOSCellAmpMin = 0.2;
+ // Exotic studies
+ fExoNECrossCuts = 10 ;
+ fExoNDTimeCuts = 4 ;
+
+ fExoDTimeCuts [0] = 1.e4 ; fExoDTimeCuts [1] = 50.0 ; fExoDTimeCuts [2] = 25.0 ; fExoDTimeCuts [3] = 10.0 ;
+ fExoECrossCuts[0] = 0.80 ; fExoECrossCuts[1] = 0.85 ; fExoECrossCuts[2] = 0.90 ; fExoECrossCuts[3] = 0.92 ; fExoECrossCuts[4] = 0.94 ;
+ fExoECrossCuts[5] = 0.95 ; fExoECrossCuts[6] = 0.96 ; fExoECrossCuts[7] = 0.97 ; fExoECrossCuts[8] = 0.98 ; fExoECrossCuts[9] = 0.99 ;
+
}
-//___________________________________________________________________________________
-Bool_t AliAnaCalorimeterQA::IsGoodCluster(const Int_t absIdMax, AliVCaloCells* cells)
+//_____________________________________________________________________________
+Bool_t AliAnaCalorimeterQA::IsGoodCluster(Int_t absIdMax, AliVCaloCells* cells)
{
//Identify cluster as exotic or not
if(!fStudyBadClusters) return kTRUE;
- if(fCalorimeter=="EMCAL") {
+ if(fCalorimeter=="EMCAL")
+ {
if(!GetCaloUtils()->GetEMCALRecoUtils()->IsRejectExoticCluster())
+ {
return !( GetCaloUtils()->GetEMCALRecoUtils()->IsExoticCell(absIdMax,cells,(GetReader()->GetInputEvent())->GetBunchCrossNumber()) );
- else
+ }
+ else
+ {
return kTRUE;
+ }
}
else // PHOS
{
Float_t ampMax = cells->GetCellAmplitude(absIdMax);
- RecalibrateCellAmplitude(ampMax,absIdMax);
+ GetCaloUtils()->RecalibrateCellAmplitude(ampMax, fCalorimeter, absIdMax);
+
+ if(ampMax < 0.01) return kFALSE;
+
if(1-GetECross(absIdMax,cells)/ampMax > 0.95) return kFALSE;
else return kTRUE;
}
}
-//____________________________________________________________________________
-void AliAnaCalorimeterQA::RecalibrateCellTime(Double_t & time, const Int_t id)
-{
- // Recalculate time if time recalibration available
-
- if(fCalorimeter == "EMCAL" && GetCaloUtils()->GetEMCALRecoUtils()->IsTimeRecalibrationOn()) {
- GetCaloUtils()->GetEMCALRecoUtils()->RecalibrateCellTime(id,GetReader()->GetInputEvent()->GetBunchCrossNumber(),time);
- }
-
-}
-
-//___________________________________________________________________________________
-void AliAnaCalorimeterQA::RecalibrateCellAmplitude(Float_t & amp, const Int_t id)
-{
- //Recaculate cell energy if recalibration factor
-
- Int_t icol = -1; Int_t irow = -1; Int_t iRCU = -1;
- Int_t nModule = GetModuleNumberCellIndexes(id,fCalorimeter, icol, irow, iRCU);
-
- if (GetCaloUtils()->IsRecalibrationOn()) {
- if(fCalorimeter == "PHOS") {
- amp *= GetCaloUtils()->GetPHOSChannelRecalibrationFactor(nModule,icol,irow);
- }
- else {
- amp *= GetCaloUtils()->GetEMCALChannelRecalibrationFactor(nModule,icol,irow);
- }
- }
-}
-
//_____________________________________________________
void AliAnaCalorimeterQA::MakeAnalysisFillHistograms()
{
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()
+ 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
}
else if(GetReader()->ReadAODMCParticles()){
- if(!GetReader()->GetAODMCParticles(0))
+ if(!GetReader()->GetAODMCParticles())
AliFatal("AODMCParticles not available!");
//Fill some pure MC histograms, only primaries.
- for(Int_t i=0 ; i < (GetReader()->GetAODMCParticles(0))->GetEntriesFast(); i++){
- AliAODMCParticle *aodprimary = (AliAODMCParticle*) (GetReader()->GetAODMCParticles(0))->At(i) ;
+ 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
}
//_______________________________________________________________________________
-void AliAnaCalorimeterQA::MCHistograms(const TLorentzVector mom, const Int_t pdg)
+void AliAnaCalorimeterQA::MCHistograms(TLorentzVector mom, Int_t pdg)
{
//Fill pure monte carlo related histograms
Bool_t in = kFALSE;
//Rough stimate of acceptance for pi0, Eta and electrons
- if(fCalorimeter == "PHOS"){
-
+ if(fCalorimeter == "PHOS")
+ {
if(GetFiducialCut()->IsInFiducialCut(mom,fCalorimeter))
in = kTRUE ;
if(GetDebug() > 2) printf("AliAnaCalorimeterQA::MCHistograms() - In %s fiducial cut acceptance? %d\n",fCalorimeter.Data(),in);
}
- else if(fCalorimeter == "EMCAL" && GetCaloUtils()->IsEMCALGeoMatrixSet()){
- if(GetEMCALGeometry()){
-
+ else if(fCalorimeter == "EMCAL" && GetCaloUtils()->IsEMCALGeoMatrixSet())
+ {
+ if(GetEMCALGeometry())
+ {
Int_t absID=0;
GetEMCALGeometry()->GetAbsCellIdFromEtaPhi(mom.Eta(),mom.Phi(),absID);
if(GetDebug() > 2) printf("AliAnaCalorimeterQA::MCHistograms() - In %s Real acceptance? %d\n",fCalorimeter.Data(),in);
}
- else{
+ 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) {
+ if (pdg==22)
+ {
fhGenMCE[kmcPhoton] ->Fill(eMC);
if(eMC > 0.5) fhGenMCEtaPhi[kmcPhoton]->Fill(etaMC,phiMC);
- if(in){
+ if(in)
+ {
fhGenMCAccE[kmcPhoton] ->Fill(eMC);
if(eMC > 0.5) fhGenMCAccEtaPhi[kmcPhoton]->Fill(etaMC,phiMC);
}
}
- else if (pdg==111) {
+ else if (pdg==111)
+ {
fhGenMCE[kmcPi0] ->Fill(eMC);
if(eMC > 0.5) fhGenMCEtaPhi[kmcPi0]->Fill(etaMC,phiMC);
- if(in){
+ if(in)
+ {
fhGenMCAccE[kmcPi0] ->Fill(eMC);
if(eMC > 0.5) fhGenMCAccEtaPhi[kmcPi0]->Fill(etaMC,phiMC);
}
}
- else if (pdg==221) {
+ else if (pdg==221)
+ {
fhGenMCE[kmcEta] ->Fill(eMC);
if(eMC > 0.5) fhGenMCEtaPhi[kmcEta]->Fill(etaMC,phiMC);
- if(in){
+ if(in)
+ {
fhGenMCAccE[kmcEta] ->Fill(eMC);
if(eMC > 0.5) fhGenMCAccEtaPhi[kmcEta]->Fill(etaMC,phiMC);
}
}
- else if (TMath::Abs(pdg)==11) {
+ else if (TMath::Abs(pdg)==11)
+ {
fhGenMCE[kmcElectron] ->Fill(eMC);
if(eMC > 0.5) fhGenMCEtaPhi[kmcElectron]->Fill(etaMC,phiMC);
- if(in){
+ if(in)
+ {
fhGenMCAccE[kmcElectron] ->Fill(eMC);
if(eMC > 0.5) fhGenMCAccEtaPhi[kmcElectron]->Fill(etaMC,phiMC);
}
// First recalculate energy in case non linearity was applied
Float_t energy = 0;
Float_t ampMax = 0;
- for (Int_t ipos = 0; ipos < clus->GetNCells(); ipos++) {
-
+ for (Int_t ipos = 0; ipos < clus->GetNCells(); ipos++)
+ {
Int_t id = clus->GetCellsAbsId()[ipos];
//Recalibrate cell energy if needed
Float_t amp = cells->GetCellAmplitude(id);
- RecalibrateCellAmplitude(amp,id);
+ GetCaloUtils()->RecalibrateCellAmplitude(amp, fCalorimeter, id);
energy += amp;
} // energy loop
- if(energy <=0 ) {
+ if(energy <=0 )
+ {
printf("AliAnaCalorimeterQA::WeightHistograms()- Wrong calculated energy %f\n",energy);
return;
}
fhEMaxCellClusterLogRatio->Fill(energy,TMath::Log(ampMax/energy));
//Get the ratio and log ratio to all cells in cluster
- for (Int_t ipos = 0; ipos < clus->GetNCells(); ipos++) {
+ for (Int_t ipos = 0; ipos < clus->GetNCells(); ipos++)
+ {
Int_t id = clus->GetCellsAbsId()[ipos];
//Recalibrate cell energy if needed
Float_t amp = cells->GetCellAmplitude(id);
- RecalibrateCellAmplitude(amp,id);
+ GetCaloUtils()->RecalibrateCellAmplitude(amp, fCalorimeter, id);
fhECellClusterRatio ->Fill(energy,amp/energy);
fhECellClusterLogRatio->Fill(energy,TMath::Log(amp/energy));
}
//Recalculate shower shape for different W0
- if(fCalorimeter=="EMCAL"){
-
+ if(fCalorimeter=="EMCAL")
+ {
Float_t l0org = clus->GetM02();
Float_t l1org = clus->GetM20();
Float_t dorg = clus->GetDispersion();
if(IsDataMC()){
- Int_t tag = GetMCAnalysisUtils()->CheckOrigin(clus->GetLabels(),clus->GetNLabels(), GetReader(),0);
+ Int_t tag = GetMCAnalysisUtils()->CheckOrigin(clus->GetLabels(),clus->GetNLabels(), GetReader());
if( GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPhoton) &&
!GetMCAnalysisUtils()->CheckTagBit(tag, AliMCAnalysisUtils::kMCPi0) &&