//________________________________
AliAnaElectron::AliAnaElectron() :
- AliAnaCaloTrackCorrBaseClass(), fCalorimeter(""),
+ AliAnaCaloTrackCorrBaseClass(),
fMinDist(0.), fMinDist2(0.), fMinDist3(0.),
fTimeCutMin(-1), fTimeCutMax(999999),
- fNCellsCut(0), fFillSSHistograms(kFALSE),
+ fNCellsCut(0), fNLMCutMin(-1), fNLMCutMax(10),
+ fFillSSHistograms(kFALSE), fFillOnlySimpleSSHisto(1),
fFillWeightHistograms(kFALSE), fNOriginHistograms(8),
fdEdxMin(0.), fdEdxMax (200.),
fEOverPMin(0), fEOverPMax (2),
+ fAODParticle(0),
+ fMomentum(), fMomentumMC(), fProdVertex(),
// Histograms
fhdEdxvsE(0), fhdEdxvsP(0),
fhEOverPvsE(0), fhEOverPvsP(0),
+ fhdEdxvsECutM02(0), fhdEdxvsPCutM02(0),
+ fhEOverPvsECutM02(0), fhEOverPvsPCutM02(0),
+ fhdEdxvsECutEOverP(0), fhdEdxvsPCutEOverP(0),
+ fhEOverPvsECutM02CutdEdx(0), fhEOverPvsPCutM02CutdEdx(0),
// Weight studies
fhECellClusterRatio(0), fhECellClusterLogRatio(0),
fhEMaxCellClusterRatio(0), fhEMaxCellClusterLogRatio(0),
//default ctor
for(Int_t index = 0; index < 2; index++)
{
- fhNCellsE [index] = 0;
- fhTimeE [index] = 0;
+ fhNCellsE [index] = 0;
+ fhNLME [index] = 0;
+ fhTimeE [index] = 0;
fhMaxCellDiffClusterE[index] = 0;
fhE [index] = 0;
fhPt [index] = 0;
fhMCPhi [index][i] = 0;
fhMCEta [index][i] = 0;
fhMCDeltaE [index][i] = 0;
- fhMC2E [index][i] = 0;
+ fhMC2E [index][i] = 0;
+ fhMCdEdxvsE [i] = 0;
+ fhMCdEdxvsP [i] = 0;
+ fhMCEOverPvsE [i] = 0;
+ fhMCEOverPvsP [i] = 0;
}
for(Int_t i = 0; i < 6; i++)
for(Int_t i = 0; i < 5; i++)
{
fhDispEtaDispPhiEBin[index][i] = 0 ;
- for(Int_t j = 0; j < 6; j++)
- {
- fhMCDispEtaDispPhiEBin[index][i][j] = 0;
- }
}
}
}
//____________________________________________________________________________
-Bool_t AliAnaElectron::ClusterSelected(AliVCluster* calo, TLorentzVector mom)
+Bool_t AliAnaElectron::ClusterSelected(AliVCluster* calo, Int_t nMaxima)
{
- //Select clusters if they pass different cuts
- if(GetDebug() > 2)
- printf("AliAnaElectron::ClusterSelected() Current Event %d; Before selection : E %2.2f, pT %2.2f, Ecl %2.2f, phi %2.2f, eta %2.2f\n",
- GetReader()->GetEventNumber(),
- mom.E(), mom.Pt(),calo->E(),mom.Phi()*TMath::RadToDeg(),mom.Eta());
+ // Select clusters if they pass different cuts
+
+ AliDebug(1,Form("Current Event %d; Before selection : E %2.2f, pT %2.2f, Ecl %2.2f, phi %2.2f, eta %2.2f",
+ GetReader()->GetEventNumber(),fMomentum.E(),fMomentum.Pt(),calo->E(),fMomentum.Phi()*TMath::RadToDeg(),fMomentum.Eta()));
//.......................................
//If too small or big energy, skip it
- if(mom.E() < GetMinEnergy() || mom.E() > GetMaxEnergy() ) return kFALSE ;
- if(GetDebug() > 2) printf("\t Cluster %d Pass E Cut \n",calo->GetID());
+ if(fMomentum.E() < GetMinEnergy() || fMomentum.E() > GetMaxEnergy() ) return kFALSE ;
+ AliDebug(2,Form("\t Cluster %d Pass E Cut",calo->GetID()));
//.......................................
// TOF cut, BE CAREFUL WITH THIS CUT
Double_t tof = calo->GetTOF()*1e9;
if(tof < fTimeCutMin || tof > fTimeCutMax) return kFALSE;
- if(GetDebug() > 2) printf("\t Cluster %d Pass Time Cut \n",calo->GetID());
+ AliDebug(2,Form("\t Cluster %d Pass Time Cut",calo->GetID()));
//.......................................
if(calo->GetNCells() <= fNCellsCut && GetReader()->GetDataType() != AliCaloTrackReader::kMC) return kFALSE;
- if(GetDebug() > 2) printf("\t Cluster %d Pass NCell Cut \n",calo->GetID());
+ AliDebug(2,Form("\t Cluster %d Pass NCell Cut",calo->GetID()));
//.......................................
//Check acceptance selection
- if(IsFiducialCutOn()){
- Bool_t in = GetFiducialCut()->IsInFiducialCut(mom,fCalorimeter) ;
+ if(IsFiducialCutOn())
+ {
+ Bool_t in = GetFiducialCut()->IsInFiducialCut(fMomentum.Eta(),fMomentum.Phi(),GetCalorimeter()) ;
if(! in ) return kFALSE ;
}
- if(GetDebug() > 2) printf("Fiducial cut passed \n");
+ AliDebug(2,"\t Fiducial cut passed");
//.......................................
//Skip not matched clusters with tracks
- if(!IsTrackMatched(calo, GetReader()->GetInputEvent())) {
- if(GetDebug() > 2) printf("\t Reject non track-matched clusters\n");
+ if(!IsTrackMatched(calo, GetReader()->GetInputEvent()))
+ {
+ AliDebug(1,"\t Reject non track-matched clusters");
return kFALSE ;
}
- else if(GetDebug() > 2) printf(" Track-matching cut passed \n");
+ else AliDebug(2,"\t Track-matching cut passed");
+
+ //...........................................
+ // skip clusters with too many maxima
+ if(nMaxima < fNLMCutMin || nMaxima > fNLMCutMax) return kFALSE ;
+ AliDebug(2,Form("\t Cluster %d pass NLM %d of out of range",calo->GetID(), nMaxima));
//.......................................
//Check Distance to Bad channel, set bit.
if(distBad < fMinDist) {//In bad channel (PHOS cristal size 2.2x2.2 cm), EMCAL ( cell units )
return kFALSE ;
}
- else if(GetDebug() > 2) printf("\t Bad channel cut passed %4.2f > %2.2f \n",distBad, fMinDist);
+ else AliDebug(2,Form("\t Bad channel cut passed %4.2f > %2.2f",distBad, fMinDist));
//printf("Cluster %d Pass Bad Dist Cut \n",icalo);
- if(GetDebug() > 0)
- printf("AliAnaElectron::ClusterSelected() Current Event %d; After selection : E %2.2f, pT %2.2f, Ecl %2.2f, phi %2.2f, eta %2.2f\n",
+ AliDebug(1,Form("Current Event %d; After selection : E %2.2f, pT %2.2f, Ecl %2.2f, phi %2.2f, eta %2.2f",
GetReader()->GetEventNumber(),
- mom.E(), mom.Pt(),calo->E(),mom.Phi()*TMath::RadToDeg(),mom.Eta());
+ fMomentum.E(), fMomentum.Pt(),calo->E(),fMomentum.Phi()*TMath::RadToDeg(),fMomentum.Eta()));
//All checks passed, cluster selected
return kTRUE;
}
-//__________________________________________________________________________________________________________
-void AliAnaElectron::FillShowerShapeHistograms(AliVCluster* cluster, const Int_t mcTag, const Int_t pidTag)
+//______________________________________________________________________________________________
+void AliAnaElectron::FillShowerShapeHistograms(AliVCluster* cluster, Int_t mcTag, Int_t pidTag)
{
-
- //Fill cluster Shower Shape histograms
+ // Fill cluster Shower Shape histograms
if(!fFillSSHistograms || GetMixedEvent()) return;
Float_t lambda1 = cluster->GetM20();
Float_t disp = cluster->GetDispersion()*cluster->GetDispersion();
- TLorentzVector mom;
- if(GetReader()->GetDataType() != AliCaloTrackReader::kMC)
- {
- cluster->GetMomentum(mom,GetVertex(0)) ;}//Assume that come from vertex in straight line
- else{
- Double_t vertex[]={0,0,0};
- cluster->GetMomentum(mom,vertex) ;
- }
+ Float_t l0 = 0., l1 = 0.;
+ Float_t dispp= 0., dEta = 0., dPhi = 0.;
+ Float_t sEta = 0., sPhi = 0., sEtaPhi = 0.;
- Float_t eta = mom.Eta();
- Float_t phi = mom.Phi();
+ Float_t eta = fMomentum.Eta();
+ Float_t phi = fMomentum.Phi();
if(phi < 0) phi+=TMath::TwoPi();
fhLam0E[pidIndex] ->Fill(energy,lambda0);
fhLam1E[pidIndex] ->Fill(energy,lambda1);
fhDispE[pidIndex] ->Fill(energy,disp);
- if(fCalorimeter == "EMCAL" && GetModuleNumber(cluster) > 5)
+ if(GetCalorimeter() == kEMCAL && GetFirstSMCoveredByTRD() >= 0 &&
+ GetModuleNumber(cluster) >= GetFirstSMCoveredByTRD() )
{
fhLam0ETRD[pidIndex]->Fill(energy,lambda0);
fhLam1ETRD[pidIndex]->Fill(energy,lambda1);
fhDispETRD[pidIndex]->Fill(energy,disp);
}
- if(energy < 2)
- {
- fhNCellsLam0LowE[pidIndex] ->Fill(ncells,lambda0);
- fhEtaLam0LowE[pidIndex] ->Fill(eta, lambda0);
- fhPhiLam0LowE[pidIndex] ->Fill(phi, lambda0);
- }
- else
+ if(!fFillOnlySimpleSSHisto)
{
- fhNCellsLam0HighE[pidIndex]->Fill(ncells,lambda0);
- fhEtaLam0HighE[pidIndex] ->Fill(eta, lambda0);
- fhPhiLam0HighE[pidIndex] ->Fill(phi, lambda0);
- }
-
- Float_t l0 = 0., l1 = 0.;
- Float_t dispp= 0., dEta = 0., dPhi = 0.;
- Float_t sEta = 0., sPhi = 0., sEtaPhi = 0.;
- if(fCalorimeter == "EMCAL")
- {
- GetCaloUtils()->GetEMCALRecoUtils()->RecalculateClusterShowerShapeParameters(GetEMCALGeometry(), GetReader()->GetInputEvent()->GetEMCALCells(), cluster,
- l0, l1, dispp, dEta, dPhi, sEta, sPhi, sEtaPhi);
- fhDispEtaE [pidIndex]-> Fill(energy,dEta);
- fhDispPhiE [pidIndex]-> Fill(energy,dPhi);
- fhSumEtaE [pidIndex]-> Fill(energy,sEta);
- fhSumPhiE [pidIndex]-> Fill(energy,sPhi);
- fhSumEtaPhiE [pidIndex]-> Fill(energy,sEtaPhi);
- fhDispEtaPhiDiffE [pidIndex]-> Fill(energy,dPhi-dEta);
- if(dEta+dPhi>0)fhSphericityE [pidIndex]-> Fill(energy,(dPhi-dEta)/(dEta+dPhi));
-
- if (energy < 2 ) fhDispEtaDispPhiEBin[pidIndex][0]->Fill(dEta,dPhi);
- else if (energy < 4 ) fhDispEtaDispPhiEBin[pidIndex][1]->Fill(dEta,dPhi);
- else if (energy < 6 ) fhDispEtaDispPhiEBin[pidIndex][2]->Fill(dEta,dPhi);
- else if (energy < 10) fhDispEtaDispPhiEBin[pidIndex][3]->Fill(dEta,dPhi);
- else fhDispEtaDispPhiEBin[pidIndex][4]->Fill(dEta,dPhi);
+ if(energy < 2)
+ {
+ fhNCellsLam0LowE[pidIndex] ->Fill(ncells,lambda0);
+ fhEtaLam0LowE[pidIndex] ->Fill(eta, lambda0);
+ fhPhiLam0LowE[pidIndex] ->Fill(phi, lambda0);
+ }
+ else
+ {
+ fhNCellsLam0HighE[pidIndex]->Fill(ncells,lambda0);
+ fhEtaLam0HighE[pidIndex] ->Fill(eta, lambda0);
+ fhPhiLam0HighE[pidIndex] ->Fill(phi, lambda0);
+ }
+ if(GetCalorimeter() == kEMCAL)
+ {
+ GetCaloUtils()->GetEMCALRecoUtils()->RecalculateClusterShowerShapeParameters(GetEMCALGeometry(), GetReader()->GetInputEvent()->GetEMCALCells(), cluster,
+ l0, l1, dispp, dEta, dPhi, sEta, sPhi, sEtaPhi);
+ fhDispEtaE [pidIndex]-> Fill(energy,dEta);
+ fhDispPhiE [pidIndex]-> Fill(energy,dPhi);
+ fhSumEtaE [pidIndex]-> Fill(energy,sEta);
+ fhSumPhiE [pidIndex]-> Fill(energy,sPhi);
+ fhSumEtaPhiE [pidIndex]-> Fill(energy,sEtaPhi);
+ fhDispEtaPhiDiffE [pidIndex]-> Fill(energy,dPhi-dEta);
+ if(dEta+dPhi>0)fhSphericityE [pidIndex]-> Fill(energy,(dPhi-dEta)/(dEta+dPhi));
+
+ if (energy < 2 ) fhDispEtaDispPhiEBin[pidIndex][0]->Fill(dEta,dPhi);
+ else if (energy < 4 ) fhDispEtaDispPhiEBin[pidIndex][1]->Fill(dEta,dPhi);
+ else if (energy < 6 ) fhDispEtaDispPhiEBin[pidIndex][2]->Fill(dEta,dPhi);
+ else if (energy < 10) fhDispEtaDispPhiEBin[pidIndex][3]->Fill(dEta,dPhi);
+ else fhDispEtaDispPhiEBin[pidIndex][4]->Fill(dEta,dPhi);
+
+ }
}
if(IsDataMC())
{
AliVCaloCells* cells = 0;
- if(fCalorimeter == "EMCAL") cells = GetEMCALCells();
- else cells = GetPHOSCells();
+ if(GetCalorimeter() == kEMCAL) cells = GetEMCALCells();
+ else cells = GetPHOSCells();
//Fill histograms to check shape of embedded clusters
Float_t fraction = 0;
//Fraction of total energy due to the embedded signal
fraction/=clusterE;
- if(GetDebug() > 1 ) printf("AliAnaElectron::FillShowerShapeHistogram() - Energy fraction of embedded signal %2.3f, Energy %2.3f\n",fraction, clusterE);
+ AliDebug(1,Form("Energy fraction of embedded signal %2.3f, Energy %2.3f",fraction, clusterE));
fhEmbeddedSignalFractionEnergy->Fill(clusterE,fraction);
} // embedded fraction
- // Get the fraction of the cluster energy that carries the cell with highest energy
- Int_t absID =-1 ;
- Float_t maxCellFraction = 0.;
- Int_t index = 0 ;
- absID = GetCaloUtils()->GetMaxEnergyCell(cells, cluster,maxCellFraction);
-
// Check the origin and fill histograms
- if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) &&
+ Int_t index = -1;
+
+ if( GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPhoton) &&
!GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCConversion) &&
!GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCPi0) &&
!GetMCAnalysisUtils()->CheckTagBit(mcTag,AliMCAnalysisUtils::kMCEta))
//Compare the primary depositing more energy with the rest, if no photon/electron as comon ancestor (conversions), count as other particle
Int_t ancPDG = 0, ancStatus = -1;
- TLorentzVector momentum; TVector3 prodVertex;
Int_t ancLabel = 0;
Int_t noverlaps = 1;
- for (UInt_t ilab = 0; ilab < cluster->GetNLabels(); ilab++ ) {
- ancLabel = GetMCAnalysisUtils()->CheckCommonAncestor(cluster->GetLabels()[0],cluster->GetLabels()[ilab], GetReader(),ancPDG,ancStatus,momentum,prodVertex);
+ for (UInt_t ilab = 0; ilab < cluster->GetNLabels(); ilab++ )
+ {
+ ancLabel = GetMCAnalysisUtils()->CheckCommonAncestor(cluster->GetLabels()[0],cluster->GetLabels()[ilab], GetReader(),
+ ancPDG,ancStatus,fMomentumMC,fProdVertex);
if(ancPDG!=22 && TMath::Abs(ancPDG)!=11) noverlaps++;
}
else if(noverlaps > 2){
fhMCElectronELambda0NOverlap ->Fill(energy, lambda0);
}
- else {
- printf("AliAnaElectron::FillShowerShapeHistogram() - n overlaps = %d!!", noverlaps);
+ else
+ {
+ AliWarning(Form("N overlaps = %d for ancestor %d!!", noverlaps, ancLabel));
}
}//No embedding
fhMCELambda0[pidIndex][index] ->Fill(energy, lambda0);
- if(fCalorimeter == "EMCAL")
+ if(GetCalorimeter() == kEMCAL && !fFillOnlySimpleSSHisto)
{
fhMCEDispEta [pidIndex][index]-> Fill(energy,dEta);
fhMCEDispPhi [pidIndex][index]-> Fill(energy,dPhi);
fhMCESumEtaPhi [pidIndex][index]-> Fill(energy,sEtaPhi);
fhMCEDispEtaPhiDiff [pidIndex][index]-> Fill(energy,dPhi-dEta);
- if(dEta+dPhi>0)fhMCESphericity [pidIndex][index]-> Fill(energy,(dPhi-dEta)/(dEta+dPhi));
-
- if (energy < 2 ) fhMCDispEtaDispPhiEBin[pidIndex][0][index]->Fill(dEta,dPhi);
- else if (energy < 4 ) fhMCDispEtaDispPhiEBin[pidIndex][1][index]->Fill(dEta,dPhi);
- else if (energy < 6 ) fhMCDispEtaDispPhiEBin[pidIndex][2][index]->Fill(dEta,dPhi);
- else if (energy < 10) fhMCDispEtaDispPhiEBin[pidIndex][3][index]->Fill(dEta,dPhi);
- else fhMCDispEtaDispPhiEBin[pidIndex][4][index]->Fill(dEta,dPhi);
+ if(dEta+dPhi>0) fhMCESphericity[pidIndex][index]-> Fill(energy,(dPhi-dEta)/(dEta+dPhi));
}
-
}//MC data
}
const Int_t buffersize = 255;
char onePar[buffersize] ;
- snprintf(onePar,buffersize,"--- AliAnaElectron ---\n") ;
+ snprintf(onePar,buffersize,"--- AliAnaElectron ---: ") ;
parList+=onePar ;
- snprintf(onePar,buffersize,"Calorimeter: %s\n",fCalorimeter.Data()) ;
+ snprintf(onePar,buffersize,"Calorimeter: %s;",GetCalorimeterString().Data()) ;
parList+=onePar ;
- snprintf(onePar,buffersize," %2.2f < dEdx < %2.2f \n",fdEdxMin,fdEdxMax) ;
+ snprintf(onePar,buffersize," %2.2f < dEdx < %2.2f;",fdEdxMin,fdEdxMax) ;
parList+=onePar ;
- snprintf(onePar,buffersize," %2.2f < E/P < %2.2f \n",fEOverPMin, fEOverPMax) ;
+ snprintf(onePar,buffersize," %2.2f < E/P < %2.2f;",fEOverPMin, fEOverPMax) ;
parList+=onePar ;
- snprintf(onePar,buffersize,"fMinDist =%2.2f (Minimal distance to bad channel to accept cluster) \n",fMinDist) ;
+ snprintf(onePar,buffersize,"fMinDist =%2.2f (Minimal distance to bad channel to accept cluster);",fMinDist) ;
parList+=onePar ;
- snprintf(onePar,buffersize,"fMinDist2=%2.2f (Cuts on Minimal distance to study acceptance evaluation) \n",fMinDist2) ;
+ snprintf(onePar,buffersize,"fMinDist2=%2.2f (Cuts on Minimal distance to study acceptance evaluation);",fMinDist2) ;
parList+=onePar ;
- snprintf(onePar,buffersize,"fMinDist3=%2.2f (One more cut on distance used for acceptance-efficiency study) \n",fMinDist3) ;
+ snprintf(onePar,buffersize,"fMinDist3=%2.2f (One more cut on distance used for acceptance-efficiency study);",fMinDist3) ;
parList+=onePar ;
//Get parameters set in base class.
parList += GetCaloPID()->GetPIDParametersList() ;
//Get parameters set in FiducialCut class (not available yet)
- //parlist += GetFidCut()->GetFidCutParametersList()
+ //parlist += GetFidCut()->GetFidCutParametersList()
return new TObjString(parList) ;
}
Int_t nPoverEbins = GetHistogramRanges()->GetHistoPOverEBins(); Float_t pOverEmax = GetHistogramRanges()->GetHistoPOverEMax(); Float_t pOverEmin = GetHistogramRanges()->GetHistoPOverEMin();
Int_t tbins = GetHistogramRanges()->GetHistoTimeBins() ; Float_t tmax = GetHistogramRanges()->GetHistoTimeMax(); Float_t tmin = GetHistogramRanges()->GetHistoTimeMin();
- fhdEdxvsE = new TH2F ("hdEdxvsE","matched track <dE/dx> vs cluster E ", nptbins,ptmin,ptmax,ndedxbins, dedxmin, dedxmax);
+
+ // MC labels, titles, for originator particles
+ TString ptypess[] = { "#gamma","hadron?","#pi^{0}","#eta","#gamma->e^{#pm}","e^{#pm}"} ;
+ TString pnamess[] = { "Photon","Hadron" ,"Pi0" ,"Eta" ,"Conversion" ,"Electron"} ;
+ TString ptype[] = { "#gamma", "#gamma_{#pi decay}","#gamma_{other decay}", "#pi^{0}","#eta",
+ "e^{#pm}","#gamma->e^{#pm}","hadron?","Anti-N","Anti-P" } ;
+
+ TString pname[] = { "Photon","PhotonPi0Decay","PhotonOtherDecay","Pi0","Eta","Electron",
+ "Conversion", "Hadron", "AntiNeutron","AntiProton" } ;
+
+
+ fhdEdxvsE = new TH2F ("hdEdxvsE","matched track <dE/dx> vs cluster E ", nptbins,ptmin,ptmax,ndedxbins, dedxmin, dedxmax);
fhdEdxvsE->SetXTitle("E (GeV)");
fhdEdxvsE->SetYTitle("<dE/dx>");
outputContainer->Add(fhdEdxvsE);
outputContainer->Add(fhEOverPvsP);
+ fhdEdxvsECutM02 = new TH2F ("hdEdxvsECutM02","matched track <dE/dx> vs cluster E, mild #lambda_{0}^{2} cut", nptbins,ptmin,ptmax,ndedxbins, dedxmin, dedxmax);
+ fhdEdxvsECutM02->SetXTitle("E (GeV)");
+ fhdEdxvsECutM02->SetYTitle("<dE/dx>");
+ outputContainer->Add(fhdEdxvsECutM02);
+
+ fhdEdxvsPCutM02 = new TH2F ("hdEdxvsPCutM02","matched track <dE/dx> vs track P, mild #lambda_{0}^{2} cut", nptbins,ptmin,ptmax,ndedxbins, dedxmin, dedxmax);
+ fhdEdxvsPCutM02->SetXTitle("P (GeV/c)");
+ fhdEdxvsPCutM02->SetYTitle("<dE/dx>");
+ outputContainer->Add(fhdEdxvsPCutM02);
+
+ fhEOverPvsECutM02 = new TH2F ("hEOverPvsECutM02","matched track E/p vs cluster E, mild #lambda_{0}^{2} cut", nptbins,ptmin,ptmax,nPoverEbins,pOverEmin,pOverEmax);
+ fhEOverPvsECutM02->SetXTitle("E (GeV)");
+ fhEOverPvsECutM02->SetYTitle("E/p");
+ outputContainer->Add(fhEOverPvsECutM02);
+
+ fhEOverPvsPCutM02 = new TH2F ("hEOverPvsPCutM02","matched track E/p vs track P, mild #lambda_{0}^{2} cut", nptbins,ptmin,ptmax,nPoverEbins,pOverEmin,pOverEmax);
+ fhEOverPvsPCutM02->SetXTitle("P (GeV/c)");
+ fhEOverPvsPCutM02->SetYTitle("E/p");
+ outputContainer->Add(fhEOverPvsPCutM02);
+
+
+ fhdEdxvsECutEOverP = new TH2F ("hdEdxvsECutEOverP","matched track <dE/dx> vs cluster E, cut on E/p", nptbins,ptmin,ptmax,ndedxbins, dedxmin, dedxmax);
+ fhdEdxvsECutEOverP->SetXTitle("E (GeV)");
+ fhdEdxvsECutEOverP->SetYTitle("<dE/dx>");
+ outputContainer->Add(fhdEdxvsECutEOverP);
+
+ fhdEdxvsPCutEOverP = new TH2F ("hdEdxvsPCutEOverP","matched track <dE/dx> vs track P, cut on E/p", nptbins,ptmin,ptmax,ndedxbins, dedxmin, dedxmax);
+ fhdEdxvsPCutEOverP->SetXTitle("P (GeV/c)");
+ fhdEdxvsPCutEOverP->SetYTitle("<dE/dx>");
+ outputContainer->Add(fhdEdxvsPCutEOverP);
+
+ fhEOverPvsECutM02CutdEdx = new TH2F ("hEOverPvsECutM02CutdEdx","matched track E/p vs cluster E, dEdx cut, mild #lambda_{0}^{2} cut", nptbins,ptmin,ptmax,nPoverEbins,pOverEmin,pOverEmax);
+ fhEOverPvsECutM02CutdEdx->SetXTitle("E (GeV)");
+ fhEOverPvsECutM02CutdEdx->SetYTitle("E/p");
+ outputContainer->Add(fhEOverPvsECutM02CutdEdx);
+
+ fhEOverPvsPCutM02CutdEdx = new TH2F ("hEOverPvsPCutM02CutdEdx","matched track E/p vs track P, dEdx cut, mild #lambda_{0}^{2} cut ", nptbins,ptmin,ptmax,nPoverEbins,pOverEmin,pOverEmax);
+ fhEOverPvsPCutM02CutdEdx->SetXTitle("P (GeV/c)");
+ fhEOverPvsPCutM02CutdEdx->SetYTitle("E/p");
+ outputContainer->Add(fhEOverPvsPCutM02CutdEdx);
+
+ if(IsDataMC())
+ {
+ for(Int_t i = 0; i < fNOriginHistograms; i++)
+ {
+ fhMCdEdxvsE[i] = new TH2F(Form("hdEdxvsE_MC%s",pname[i].Data()),
+ Form("matched track <dE/dx> vs cluster E from %s : E ",ptype[i].Data()),
+ nptbins,ptmin,ptmax,ndedxbins, dedxmin, dedxmax);
+ fhMCdEdxvsE[i]->SetXTitle("E (GeV)");
+ fhMCdEdxvsE[i]->SetYTitle("<dE/dx>");
+ outputContainer->Add(fhMCdEdxvsE[i]) ;
+
+ fhMCdEdxvsP[i] = new TH2F(Form("hdEdxvsP_MC%s",pname[i].Data()),
+ Form("matched track <dE/dx> vs track P from %s : E ",ptype[i].Data()),
+ nptbins,ptmin,ptmax,ndedxbins, dedxmin, dedxmax);
+ fhMCdEdxvsP[i]->SetXTitle("E (GeV)");
+ fhMCdEdxvsP[i]->SetYTitle("<dE/dx>");
+ outputContainer->Add(fhMCdEdxvsP[i]) ;
+
+
+ fhMCEOverPvsE[i] = new TH2F(Form("hEOverPvsE_MC%s",pname[i].Data()),
+ Form("matched track E/p vs cluster E from %s : E ",ptype[i].Data()),
+ nptbins,ptmin,ptmax,nPoverEbins,pOverEmin,pOverEmax);
+ fhMCEOverPvsE[i]->SetXTitle("E (GeV)");
+ fhMCEOverPvsE[i]->SetYTitle("<dE/dx>");
+ outputContainer->Add(fhMCEOverPvsE[i]) ;
+
+ fhMCEOverPvsP[i] = new TH2F(Form("hEOverPvsP_MC%s",pname[i].Data()),
+ Form("matched track E/pvs track P from %s : E ",ptype[i].Data()),
+ nptbins,ptmin,ptmax,nPoverEbins,pOverEmin,pOverEmax);
+ fhMCEOverPvsP[i]->SetXTitle("E (GeV)");
+ fhMCEOverPvsP[i]->SetYTitle("<dE/dx>");
+ outputContainer->Add(fhMCEOverPvsP[i]) ;
+
+ }
+ }
+
TString pidParticle[] = {"Electron","ChargedHadron"} ;
if(fFillWeightHistograms)
fhDispE[pidIndex]->SetXTitle("E (GeV) ");
outputContainer->Add(fhDispE[pidIndex]);
- if(fCalorimeter == "EMCAL")
+ if(GetCalorimeter() == kEMCAL && GetFirstSMCoveredByTRD() >=0 )
{
fhLam0ETRD[pidIndex] = new TH2F (Form("h%sLam0ETRD",pidParticle[pidIndex].Data()),
Form("%s: #lambda_{0}^{2} vs E, EMCAL SM covered by TRD",pidParticle[pidIndex].Data()),
outputContainer->Add(fhDispETRD[pidIndex]);
}
- fhNCellsLam0LowE[pidIndex] = new TH2F (Form("h%sNCellsLam0LowE",pidParticle[pidIndex].Data()),
- Form("%s: N_{cells} in cluster vs #lambda_{0}^{2}, E < 2 GeV",pidParticle[pidIndex].Data()),
- nbins,nmin, nmax, ssbins,ssmin,ssmax);
- fhNCellsLam0LowE[pidIndex]->SetXTitle("N_{cells}");
- fhNCellsLam0LowE[pidIndex]->SetYTitle("#lambda_{0}^{2}");
- outputContainer->Add(fhNCellsLam0LowE[pidIndex]);
-
- fhNCellsLam0HighE[pidIndex] = new TH2F (Form("h%sNCellsLam0HighE",pidParticle[pidIndex].Data()),
- Form("%s: N_{cells} in cluster vs #lambda_{0}^{2}, E > 2 GeV",pidParticle[pidIndex].Data()),
- nbins,nmin, nmax, ssbins,ssmin,ssmax);
- fhNCellsLam0HighE[pidIndex]->SetXTitle("N_{cells}");
- fhNCellsLam0HighE[pidIndex]->SetYTitle("#lambda_{0}^{2}");
- outputContainer->Add(fhNCellsLam0HighE[pidIndex]);
-
-
- fhEtaLam0LowE[pidIndex] = new TH2F (Form("h%sEtaLam0LowE",pidParticle[pidIndex].Data()),
- Form("%s: #eta vs #lambda_{0}^{2}, E < 2 GeV",pidParticle[pidIndex].Data()),
- netabins,etamin,etamax, ssbins,ssmin,ssmax);
- fhEtaLam0LowE[pidIndex]->SetYTitle("#lambda_{0}^{2}");
- fhEtaLam0LowE[pidIndex]->SetXTitle("#eta");
- outputContainer->Add(fhEtaLam0LowE[pidIndex]);
-
- fhPhiLam0LowE[pidIndex] = new TH2F (Form("h%sPhiLam0LowE",pidParticle[pidIndex].Data()),
- Form("%s: #phi vs #lambda_{0}^{2}, E < 2 GeV",pidParticle[pidIndex].Data()),
- nphibins,phimin,phimax, ssbins,ssmin,ssmax);
- fhPhiLam0LowE[pidIndex]->SetYTitle("#lambda_{0}^{2}");
- fhPhiLam0LowE[pidIndex]->SetXTitle("#phi");
- outputContainer->Add(fhPhiLam0LowE[pidIndex]);
-
- fhEtaLam0HighE[pidIndex] = new TH2F (Form("h%sEtaLam0HighE",pidParticle[pidIndex].Data()),
- Form("%s: #eta vs #lambda_{0}^{2}, E > 2 GeV",pidParticle[pidIndex].Data()),
- netabins,etamin,etamax, ssbins,ssmin,ssmax);
- fhEtaLam0HighE[pidIndex]->SetYTitle("#lambda_{0}^{2}");
- fhEtaLam0HighE[pidIndex]->SetXTitle("#eta");
- outputContainer->Add(fhEtaLam0HighE[pidIndex]);
-
- fhPhiLam0HighE[pidIndex] = new TH2F (Form("h%sPhiLam0HighE",pidParticle[pidIndex].Data()),
- Form("%s: #phi vs #lambda_{0}^{2}, E > 2 GeV",pidParticle[pidIndex].Data()),
- nphibins,phimin,phimax, ssbins,ssmin,ssmax);
- fhPhiLam0HighE[pidIndex]->SetYTitle("#lambda_{0}^{2}");
- fhPhiLam0HighE[pidIndex]->SetXTitle("#phi");
- outputContainer->Add(fhPhiLam0HighE[pidIndex]);
-
- if(fCalorimeter == "EMCAL")
+ if(!fFillOnlySimpleSSHisto)
{
- fhDispEtaE[pidIndex] = new TH2F (Form("h%sDispEtaE",pidParticle[pidIndex].Data()),
- Form("%s: #sigma^{2}_{#eta #eta} = #Sigma w_{i}(#eta_{i} - <#eta>)^{2}/ #Sigma w_{i} vs E",pidParticle[pidIndex].Data()),
- nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
- fhDispEtaE[pidIndex]->SetXTitle("E (GeV)");
- fhDispEtaE[pidIndex]->SetYTitle("#sigma^{2}_{#eta #eta}");
- outputContainer->Add(fhDispEtaE[pidIndex]);
- fhDispPhiE[pidIndex] = new TH2F (Form("h%sDispPhiE",pidParticle[pidIndex].Data()),
- Form("%s: #sigma^{2}_{#phi #phi} = #Sigma w_{i}(#phi_{i} - <#phi>)^{2} / #Sigma w_{i} vs E",pidParticle[pidIndex].Data()),
- nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
- fhDispPhiE[pidIndex]->SetXTitle("E (GeV)");
- fhDispPhiE[pidIndex]->SetYTitle("#sigma^{2}_{#phi #phi}");
- outputContainer->Add(fhDispPhiE[pidIndex]);
+ fhNCellsLam0LowE[pidIndex] = new TH2F (Form("h%sNCellsLam0LowE",pidParticle[pidIndex].Data()),
+ Form("%s: N_{cells} in cluster vs #lambda_{0}^{2}, E < 2 GeV",pidParticle[pidIndex].Data()),
+ nbins,nmin, nmax, ssbins,ssmin,ssmax);
+ fhNCellsLam0LowE[pidIndex]->SetXTitle("N_{cells}");
+ fhNCellsLam0LowE[pidIndex]->SetYTitle("#lambda_{0}^{2}");
+ outputContainer->Add(fhNCellsLam0LowE[pidIndex]);
+
+ fhNCellsLam0HighE[pidIndex] = new TH2F (Form("h%sNCellsLam0HighE",pidParticle[pidIndex].Data()),
+ Form("%s: N_{cells} in cluster vs #lambda_{0}^{2}, E > 2 GeV",pidParticle[pidIndex].Data()),
+ nbins,nmin, nmax, ssbins,ssmin,ssmax);
+ fhNCellsLam0HighE[pidIndex]->SetXTitle("N_{cells}");
+ fhNCellsLam0HighE[pidIndex]->SetYTitle("#lambda_{0}^{2}");
+ outputContainer->Add(fhNCellsLam0HighE[pidIndex]);
- fhSumEtaE[pidIndex] = new TH2F (Form("h%sSumEtaE",pidParticle[pidIndex].Data()),
- Form("%s: #sigma^{2}_{#eta #eta} = #Sigma w_{i}(#eta_{i})^{2} / #Sigma w_{i} - <#eta>^{2} vs E",pidParticle[pidIndex].Data()),
- nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
- fhSumEtaE[pidIndex]->SetXTitle("E (GeV)");
- fhSumEtaE[pidIndex]->SetYTitle("#sigma'^{2}_{#eta #eta}");
- outputContainer->Add(fhSumEtaE[pidIndex]);
- fhSumPhiE[pidIndex] = new TH2F (Form("h%sSumPhiE",pidParticle[pidIndex].Data()),
- Form("%s: #sigma^{2}_{#phi #phi} = #Sigma w_{i}(#phi_{i})^{2}/ #Sigma w_{i} - <#phi>^{2} vs E",pidParticle[pidIndex].Data()),
- nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
- fhSumPhiE[pidIndex]->SetXTitle("E (GeV)");
- fhSumPhiE[pidIndex]->SetYTitle("#sigma'^{2}_{#phi #phi}");
- outputContainer->Add(fhSumPhiE[pidIndex]);
+ fhEtaLam0LowE[pidIndex] = new TH2F (Form("h%sEtaLam0LowE",pidParticle[pidIndex].Data()),
+ Form("%s: #eta vs #lambda_{0}^{2}, E < 2 GeV",pidParticle[pidIndex].Data()),
+ netabins,etamin,etamax, ssbins,ssmin,ssmax);
+ fhEtaLam0LowE[pidIndex]->SetYTitle("#lambda_{0}^{2}");
+ fhEtaLam0LowE[pidIndex]->SetXTitle("#eta");
+ outputContainer->Add(fhEtaLam0LowE[pidIndex]);
- fhSumEtaPhiE[pidIndex] = new TH2F (Form("h%sSumEtaPhiE",pidParticle[pidIndex].Data()),
- Form("%s: #sigma'^{2}_{#eta #phi} = #Sigma w_{i}(#phi_{i} #eta_{i} ) / #Sigma w_{i} - <#phi><#eta> vs E",pidParticle[pidIndex].Data()),
- nptbins,ptmin,ptmax, 2*ssbins,-ssmax,ssmax);
- fhSumEtaPhiE[pidIndex]->SetXTitle("E (GeV)");
- fhSumEtaPhiE[pidIndex]->SetYTitle("#sigma'^{2}_{#eta #phi}");
- outputContainer->Add(fhSumEtaPhiE[pidIndex]);
+ fhPhiLam0LowE[pidIndex] = new TH2F (Form("h%sPhiLam0LowE",pidParticle[pidIndex].Data()),
+ Form("%s: #phi vs #lambda_{0}^{2}, E < 2 GeV",pidParticle[pidIndex].Data()),
+ nphibins,phimin,phimax, ssbins,ssmin,ssmax);
+ fhPhiLam0LowE[pidIndex]->SetYTitle("#lambda_{0}^{2}");
+ fhPhiLam0LowE[pidIndex]->SetXTitle("#phi");
+ outputContainer->Add(fhPhiLam0LowE[pidIndex]);
- fhDispEtaPhiDiffE[pidIndex] = new TH2F (Form("h%sDispEtaPhiDiffE",pidParticle[pidIndex].Data()),
- Form("%s: #sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta} vs E",pidParticle[pidIndex].Data()),
- nptbins,ptmin,ptmax,200, -10,10);
- fhDispEtaPhiDiffE[pidIndex]->SetXTitle("E (GeV)");
- fhDispEtaPhiDiffE[pidIndex]->SetYTitle("#sigma^{2}_{#phi #phi}-#sigma^{2}_{#eta #eta}");
- outputContainer->Add(fhDispEtaPhiDiffE[pidIndex]);
+ fhEtaLam0HighE[pidIndex] = new TH2F (Form("h%sEtaLam0HighE",pidParticle[pidIndex].Data()),
+ Form("%s: #eta vs #lambda_{0}^{2}, E > 2 GeV",pidParticle[pidIndex].Data()),
+ netabins,etamin,etamax, ssbins,ssmin,ssmax);
+ fhEtaLam0HighE[pidIndex]->SetYTitle("#lambda_{0}^{2}");
+ fhEtaLam0HighE[pidIndex]->SetXTitle("#eta");
+ outputContainer->Add(fhEtaLam0HighE[pidIndex]);
- fhSphericityE[pidIndex] = new TH2F (Form("h%sSphericityE",pidParticle[pidIndex].Data()),
- Form("%s: (#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi}) vs E",pidParticle[pidIndex].Data()),
- nptbins,ptmin,ptmax, 200, -1,1);
- fhSphericityE[pidIndex]->SetXTitle("E (GeV)");
- fhSphericityE[pidIndex]->SetYTitle("s = (#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi})");
- outputContainer->Add(fhSphericityE[pidIndex]);
+ fhPhiLam0HighE[pidIndex] = new TH2F (Form("h%sPhiLam0HighE",pidParticle[pidIndex].Data()),
+ Form("%s: #phi vs #lambda_{0}^{2}, E > 2 GeV",pidParticle[pidIndex].Data()),
+ nphibins,phimin,phimax, ssbins,ssmin,ssmax);
+ fhPhiLam0HighE[pidIndex]->SetYTitle("#lambda_{0}^{2}");
+ fhPhiLam0HighE[pidIndex]->SetXTitle("#phi");
+ outputContainer->Add(fhPhiLam0HighE[pidIndex]);
- Int_t bin[] = {0,2,4,6,10,1000};
- for(Int_t i = 0; i < 5; i++)
+ if(GetCalorimeter() == kEMCAL)
{
- fhDispEtaDispPhiEBin[pidIndex][i] = new TH2F (Form("h%sDispEtaDispPhi_EBin%d",pidParticle[pidIndex].Data(),i),
- Form("%s: #sigma^{2}_{#phi #phi} vs #sigma^{2}_{#eta #eta} for %d < E < %d GeV",pidParticle[pidIndex].Data(),bin[i],bin[i+1]),
- ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
- fhDispEtaDispPhiEBin[pidIndex][i]->SetXTitle("#sigma^{2}_{#eta #eta}");
- fhDispEtaDispPhiEBin[pidIndex][i]->SetYTitle("#sigma^{2}_{#phi #phi}");
- outputContainer->Add(fhDispEtaDispPhiEBin[pidIndex][i]);
+ fhDispEtaE[pidIndex] = new TH2F (Form("h%sDispEtaE",pidParticle[pidIndex].Data()),
+ Form("%s: #sigma^{2}_{#eta #eta} = #Sigma w_{i}(#eta_{i} - <#eta>)^{2}/ #Sigma w_{i} vs E",pidParticle[pidIndex].Data()),
+ nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
+ fhDispEtaE[pidIndex]->SetXTitle("E (GeV)");
+ fhDispEtaE[pidIndex]->SetYTitle("#sigma^{2}_{#eta #eta}");
+ outputContainer->Add(fhDispEtaE[pidIndex]);
+
+ fhDispPhiE[pidIndex] = new TH2F (Form("h%sDispPhiE",pidParticle[pidIndex].Data()),
+ Form("%s: #sigma^{2}_{#phi #phi} = #Sigma w_{i}(#phi_{i} - <#phi>)^{2} / #Sigma w_{i} vs E",pidParticle[pidIndex].Data()),
+ nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
+ fhDispPhiE[pidIndex]->SetXTitle("E (GeV)");
+ fhDispPhiE[pidIndex]->SetYTitle("#sigma^{2}_{#phi #phi}");
+ outputContainer->Add(fhDispPhiE[pidIndex]);
+
+ fhSumEtaE[pidIndex] = new TH2F (Form("h%sSumEtaE",pidParticle[pidIndex].Data()),
+ Form("%s: #sigma^{2}_{#eta #eta} = #Sigma w_{i}(#eta_{i})^{2} / #Sigma w_{i} - <#eta>^{2} vs E",pidParticle[pidIndex].Data()),
+ nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
+ fhSumEtaE[pidIndex]->SetXTitle("E (GeV)");
+ fhSumEtaE[pidIndex]->SetYTitle("#delta^{2}_{#eta #eta}");
+ outputContainer->Add(fhSumEtaE[pidIndex]);
+
+ fhSumPhiE[pidIndex] = new TH2F (Form("h%sSumPhiE",pidParticle[pidIndex].Data()),
+ Form("%s: #sigma^{2}_{#phi #phi} = #Sigma w_{i}(#phi_{i})^{2}/ #Sigma w_{i} - <#phi>^{2} vs E",pidParticle[pidIndex].Data()),
+ nptbins,ptmin,ptmax, ssbins,ssmin,ssmax);
+ fhSumPhiE[pidIndex]->SetXTitle("E (GeV)");
+ fhSumPhiE[pidIndex]->SetYTitle("#delta^{2}_{#phi #phi}");
+ outputContainer->Add(fhSumPhiE[pidIndex]);
+
+ fhSumEtaPhiE[pidIndex] = new TH2F (Form("h%sSumEtaPhiE",pidParticle[pidIndex].Data()),
+ Form("%s: #delta^{2}_{#eta #phi} = #Sigma w_{i}(#phi_{i} #eta_{i} ) / #Sigma w_{i} - <#phi><#eta> vs E",pidParticle[pidIndex].Data()),
+ nptbins,ptmin,ptmax, 2*ssbins,-ssmax,ssmax);
+ fhSumEtaPhiE[pidIndex]->SetXTitle("E (GeV)");
+ fhSumEtaPhiE[pidIndex]->SetYTitle("#delta^{2}_{#eta #phi}");
+ outputContainer->Add(fhSumEtaPhiE[pidIndex]);
+
+ fhDispEtaPhiDiffE[pidIndex] = new TH2F (Form("h%sDispEtaPhiDiffE",pidParticle[pidIndex].Data()),
+ Form("%s: #sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta} vs E",pidParticle[pidIndex].Data()),
+ nptbins,ptmin,ptmax,200, -10,10);
+ fhDispEtaPhiDiffE[pidIndex]->SetXTitle("E (GeV)");
+ fhDispEtaPhiDiffE[pidIndex]->SetYTitle("#sigma^{2}_{#phi #phi}-#sigma^{2}_{#eta #eta}");
+ outputContainer->Add(fhDispEtaPhiDiffE[pidIndex]);
+
+ fhSphericityE[pidIndex] = new TH2F (Form("h%sSphericityE",pidParticle[pidIndex].Data()),
+ Form("%s: (#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi}) vs E",pidParticle[pidIndex].Data()),
+ nptbins,ptmin,ptmax, 200, -1,1);
+ fhSphericityE[pidIndex]->SetXTitle("E (GeV)");
+ fhSphericityE[pidIndex]->SetYTitle("s = (#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi})");
+ outputContainer->Add(fhSphericityE[pidIndex]);
+
+ Int_t bin[] = {0,2,4,6,10,1000};
+ for(Int_t i = 0; i < 5; i++)
+ {
+ fhDispEtaDispPhiEBin[pidIndex][i] = new TH2F (Form("h%sDispEtaDispPhi_EBin%d",pidParticle[pidIndex].Data(),i),
+ Form("%s: #sigma^{2}_{#phi #phi} vs #sigma^{2}_{#eta #eta} for %d < E < %d GeV",pidParticle[pidIndex].Data(),bin[i],bin[i+1]),
+ ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
+ fhDispEtaDispPhiEBin[pidIndex][i]->SetXTitle("#sigma^{2}_{#eta #eta}");
+ fhDispEtaDispPhiEBin[pidIndex][i]->SetYTitle("#sigma^{2}_{#phi #phi}");
+ outputContainer->Add(fhDispEtaDispPhiEBin[pidIndex][i]);
+ }
}
}
-
} // Shower shape
if(IsDataMC())
{
if(fFillSSHistograms)
{
-
- TString ptypess[] = { "#gamma","hadron?","#pi^{0}","#eta","#gamma->e^{#pm}","e^{#pm}"} ;
-
- TString pnamess[] = { "Photon","Hadron","Pi0","Eta","Conversion","Electron"} ;
-
for(Int_t i = 0; i < 6; i++)
{
fhMCELambda0[pidIndex][i] = new TH2F(Form("h%sELambda0_MC%s",pidParticle[pidIndex].Data(),pnamess[i].Data()),
fhMCELambda0[pidIndex][i]->SetXTitle("E (GeV)");
outputContainer->Add(fhMCELambda0[pidIndex][i]) ;
- if(fCalorimeter=="EMCAL")
+ if(GetCalorimeter()==kEMCAL && !fFillOnlySimpleSSHisto)
{
fhMCEDispEta[pidIndex][i] = new TH2F (Form("h%sEDispEtaE_MC%s",pidParticle[pidIndex].Data(),pnamess[i].Data()),
Form("cluster from %s : %s like, #sigma^{2}_{#eta #eta} = #Sigma w_{i}(#eta_{i} - <#eta>)^{2}/ #Sigma w_{i} vs E",ptypess[i].Data(),pidParticle[pidIndex].Data()),
outputContainer->Add(fhMCEDispPhi[pidIndex][i]);
fhMCESumEtaPhi[pidIndex][i] = new TH2F (Form("h%sESumEtaPhiE_MC%s",pidParticle[pidIndex].Data(),pnamess[i].Data()),
- Form("cluster from %s : %s like, #sigma'^{2}_{#eta #phi} = #Sigma w_{i}(#phi_{i} #eta_{i} ) / #Sigma w_{i} - <#phi><#eta> vs E",ptypess[i].Data(),pidParticle[pidIndex].Data()),
+ Form("cluster from %s : %s like, #delta^{2}_{#eta #phi} = #Sigma w_{i}(#phi_{i} #eta_{i} ) / #Sigma w_{i} - <#phi><#eta> vs E",ptypess[i].Data(),pidParticle[pidIndex].Data()),
nptbins,ptmin,ptmax, 2*ssbins,-ssmax,ssmax);
fhMCESumEtaPhi[pidIndex][i]->SetXTitle("E (GeV)");
- fhMCESumEtaPhi[pidIndex][i]->SetYTitle("#sigma'^{2}_{#eta #phi}");
+ fhMCESumEtaPhi[pidIndex][i]->SetYTitle("#delta^{2}_{#eta #phi}");
outputContainer->Add(fhMCESumEtaPhi[pidIndex][i]);
fhMCEDispEtaPhiDiff[pidIndex][i] = new TH2F (Form("h%sEDispEtaPhiDiffE_MC%s",pidParticle[pidIndex].Data(),pnamess[i].Data()),
fhMCESphericity[pidIndex][i]->SetXTitle("E (GeV)");
fhMCESphericity[pidIndex][i]->SetYTitle("s = (#sigma^{2}_{#phi #phi} - #sigma^{2}_{#eta #eta}) / (#sigma^{2}_{#eta #eta} + #sigma^{2}_{#phi #phi})");
outputContainer->Add(fhMCESphericity[pidIndex][i]);
-
- Int_t bin[] = {0,2,4,6,10,1000};
- for(Int_t ie = 0; ie < 5; ie++)
- {
- fhMCDispEtaDispPhiEBin[pidIndex][i][ie] = new TH2F (Form("h%sMCDispEtaDispPhi_EBin%d_MC%s",pidParticle[pidIndex].Data(),ie,pnamess[i].Data()),
- Form("cluster from %s : %s like, #sigma^{2}_{#phi #phi} vs #sigma^{2}_{#eta #eta} for %d < E < %d GeV",pnamess[i].Data(),pidParticle[pidIndex].Data(),bin[ie],bin[ie+1]),
- ssbins,ssmin,ssmax , ssbins,ssmin,ssmax);
- fhMCDispEtaDispPhiEBin[pidIndex][i][ie]->SetXTitle("#sigma^{2}_{#eta #eta}");
- fhMCDispEtaDispPhiEBin[pidIndex][i][ie]->SetYTitle("#sigma^{2}_{#phi #phi}");
- outputContainer->Add(fhMCDispEtaDispPhiEBin[pidIndex][i][ie]);
- }
-
}
}// loop
}
}
- if(IsCaloPIDOn() && pidIndex > 0) continue;
+ //if(IsCaloPIDOn() && pidIndex > 0) continue;
fhNCellsE[pidIndex] = new TH2F (Form("h%sNCellsE",pidParticle[pidIndex].Data()),
Form("N cells in %s cluster vs E ",pidParticle[pidIndex].Data()),
fhNCellsE[pidIndex]->SetYTitle("# of cells in cluster");
outputContainer->Add(fhNCellsE[pidIndex]);
+ fhNLME[pidIndex] = new TH2F (Form("h%sNLME",pidParticle[pidIndex].Data()),
+ Form("NLM in %s cluster vs E ",pidParticle[pidIndex].Data()),
+ nptbins,ptmin,ptmax, 10,0,10);
+ fhNLME[pidIndex]->SetXTitle("E (GeV)");
+ fhNLME[pidIndex]->SetYTitle("# of cells in cluster");
+ outputContainer->Add(fhNLME[pidIndex]);
+
fhTimeE[pidIndex] = new TH2F(Form("h%sTimeE",pidParticle[pidIndex].Data()),
Form("Time in %s cluster vs E ",pidParticle[pidIndex].Data())
,nptbins,ptmin,ptmax, tbins,tmin,tmax);
if(IsDataMC())
- {
- TString ptype[] = { "#gamma", "#gamma_{#pi decay}","#gamma_{other decay}", "#pi^{0}","#eta",
- "e^{#pm}","#gamma->e^{#pm}","hadron?","Anti-N","Anti-P" } ;
-
- TString pname[] = { "Photon","PhotonPi0Decay","PhotonOtherDecay","Pi0","Eta","Electron",
- "Conversion", "Hadron", "AntiNeutron","AntiProton" } ;
-
+ {
for(Int_t i = 0; i < fNOriginHistograms; i++)
{
fhMCE[pidIndex][i] = new TH1F(Form("h%sE_MC%s",pidParticle[pidIndex].Data(),pname[i].Data()),
//_________________________
void AliAnaElectron::Init()
{
+ // Init
- //Init
- //Do some checks
- if(fCalorimeter == "PHOS" && !GetReader()->IsPHOSSwitchedOn() && NewOutputAOD()){
- printf("AliAnaElectron::Init() - !!STOP: You want to use PHOS in analysis but it is not read!! \n!!Check the configuration file!!\n");
- abort();
- }
- else if(fCalorimeter == "EMCAL" && !GetReader()->IsEMCALSwitchedOn() && NewOutputAOD()){
- printf("AliAnaElectron::Init() - !!STOP: You want to use EMCAL in analysis but it is not read!! \n!!Check the configuration file!!\n");
- abort();
- }
+ // Do some checks
+
+ if ( GetCalorimeter() == kPHOS && !GetReader()->IsPHOSSwitchedOn() && NewOutputAOD() )
+ AliFatal("STOP: You want to use PHOS in analysis but it is not read!! \n!!Check the configuration file!!");
+ else if ( GetCalorimeter() == kEMCAL && !GetReader()->IsEMCALSwitchedOn() && NewOutputAOD() )
+ AliFatal("STOP: You want to use EMCAL in analysis but it is not read!! \n!!Check the configuration file!!");
}
//Initialize the parameters of the analysis.
AddToHistogramsName("AnaElectron_");
- fCalorimeter = "EMCAL" ;
fMinDist = 2.;
fMinDist2 = 4.;
fMinDist3 = 5.;
//Select the Calorimeter of the photon
TObjArray * pl = 0x0;
- if(fCalorimeter == "PHOS")
- pl = GetPHOSClusters();
- else if (fCalorimeter == "EMCAL")
- pl = GetEMCALClusters();
+ if (GetCalorimeter() == kPHOS ) pl = GetPHOSClusters ();
+ else if (GetCalorimeter() == kEMCAL) pl = GetEMCALClusters();
- if(!pl) {
- Info("MakeAnalysisFillAOD","TObjArray with %s clusters is NULL!\n",fCalorimeter.Data());
+ if(!pl)
+ {
+ AliWarning(Form("TObjArray with %s clusters is NULL!",GetCalorimeterString().Data()));
return;
}
//Init arrays, variables, get number of clusters
- TLorentzVector mom, mom2 ;
Int_t nCaloClusters = pl->GetEntriesFast();
//List to be used in conversion analysis, to tag the cluster as candidate for conversion
- if(GetDebug() > 0) printf("AliAnaElectron::MakeAnalysisFillAOD() - input %s cluster entries %d\n", fCalorimeter.Data(), nCaloClusters);
+ AliDebug(1,Form("Input %s cluster entries %d", GetCalorimeterString().Data(), nCaloClusters));
//----------------------------------------------------
// Fill AOD with PHOS/EMCAL AliAODPWG4Particle objects
//----------------------------------------------------
// Loop on clusters
- for(Int_t icalo = 0; icalo < nCaloClusters; icalo++){
-
+ for(Int_t icalo = 0; icalo < nCaloClusters; icalo++)
+ {
AliVCluster * calo = (AliVCluster*) (pl->At(icalo));
//printf("calo %d, %f\n",icalo,calo->E());
//Get the index where the cluster comes, to retrieve the corresponding vertex
Int_t evtIndex = 0 ;
- if (GetMixedEvent()) {
+ if (GetMixedEvent())
+ {
evtIndex=GetMixedEvent()->EventIndexForCaloCluster(calo->GetID()) ;
//Get the vertex and check it is not too large in z
if(TMath::Abs(GetVertex(evtIndex)[2])> GetZvertexCut()) continue;
}
//Cluster selection, not charged, with photon id and in fiducial cut
- if(GetReader()->GetDataType() != AliCaloTrackReader::kMC){
- calo->GetMomentum(mom,GetVertex(evtIndex)) ;}//Assume that come from vertex in straight line
- else{
+ if(GetReader()->GetDataType() != AliCaloTrackReader::kMC)
+ {
+ calo->GetMomentum(fMomentum,GetVertex(evtIndex)) ;
+ }//Assume that come from vertex in straight line
+ else
+ {
Double_t vertex[]={0,0,0};
- calo->GetMomentum(mom,vertex) ;
+ calo->GetMomentum(fMomentum,vertex) ;
}
//--------------------------------------
// Cluster selection
//--------------------------------------
- if(!ClusterSelected(calo,mom)) continue;
-
- //----------------------------
- //Create AOD for analysis
- //----------------------------
- AliAODPWG4Particle aodph = AliAODPWG4Particle(mom);
-
- //...............................................
- //Set the indeces of the original caloclusters (MC, ID), and calorimeter
- Int_t label = calo->GetLabel();
- aodph.SetLabel(label);
- aodph.SetCaloLabel(calo->GetID(),-1);
- aodph.SetDetector(fCalorimeter);
- //printf("Index %d, Id %d, iaod %d\n",icalo, calo->GetID(),GetOutputAODBranch()->GetEntriesFast());
-
- //...............................................
- //Set bad channel distance bit
- Double_t distBad=calo->GetDistanceToBadChannel() ; //Distance to bad channel
- if (distBad > fMinDist3) aodph.SetDistToBad(2) ;
- else if(distBad > fMinDist2) aodph.SetDistToBad(1) ;
- else aodph.SetDistToBad(0) ;
- //printf("DistBad %f Bit %d\n",distBad, aodph.DistToBad());
-
- //--------------------------------------------------------------------------------------
- //Play with the MC stack if available
- //--------------------------------------------------------------------------------------
-
- //Check origin of the candidates
- if(IsDataMC()){
- aodph.SetTag(GetMCAnalysisUtils()->CheckOrigin(calo->GetLabels(),calo->GetNLabels(),GetReader(), aodph.GetInputFileIndex()));
-
- if(GetDebug() > 0)
- printf("AliAnaElectron::MakeAnalysisFillAOD() - Origin of candidate, bit map %d\n",aodph.GetTag());
- }//Work with stack also
+ AliVCaloCells* cells = 0;
+ if(GetCalorimeter() == kEMCAL) cells = GetEMCALCells();
+ else cells = GetPHOSCells();
+ Int_t nMaxima = GetCaloUtils()->GetNumberOfLocalMaxima(calo, cells); // NLM
+ if(!ClusterSelected(calo,nMaxima)) continue;
//-------------------------------------
- //PID selection via dEdx
+ // PID selection via dE/dx
//-------------------------------------
AliVTrack *track = GetCaloUtils()->GetMatchedTrack(calo, GetReader()->GetInputEvent());
- if(!track) {
- printf("AliAnaElectron::MakeAnalysisFillAOD() - Null track");
+ if(!track)
+ {
+ AliWarning("Null track");
continue;
}
+ //printf("track dedx %f, p %f, cluster E %f\n",track->GetTPCsignal(),track->P(),calo->E());
Float_t dEdx = track->GetTPCsignal();
+ Float_t eOverp = calo->E()/track->P();
+
fhdEdxvsE->Fill(calo->E(), dEdx);
fhdEdxvsP->Fill(track->P(),dEdx);
+ if( eOverp < fEOverPMax && eOverp > fEOverPMin)
+ {
+ fhdEdxvsECutEOverP ->Fill(calo->E(), dEdx);
+ fhdEdxvsPCutEOverP ->Fill(track->P(),dEdx);
+ }
+
+ // Apply a mild cut on the cluster SS and check the value of dEdX and EOverP
+ Float_t m02 = calo->GetM02();
+ if(m02 > 0.1 && m02 < 0.4)
+ {
+ fhdEdxvsECutM02 ->Fill(calo->E(), dEdx);
+ fhdEdxvsPCutM02 ->Fill(track->P(),dEdx);
+ fhEOverPvsECutM02->Fill(calo->E(), eOverp);
+ fhEOverPvsPCutM02->Fill(track->P(), eOverp);
+ }
+
Int_t pid = AliCaloPID::kChargedHadron;
- if( dEdx < fdEdxMax && dEdx > fdEdxMin) {
-
- Float_t eOverp = calo->E()/track->P();
+ if( dEdx < fdEdxMax && dEdx > fdEdxMin)
+ {
fhEOverPvsE->Fill(calo->E(), eOverp);
fhEOverPvsP->Fill(track->P(), eOverp);
- if( eOverp < fEOverPMax && eOverp > fEOverPMin) {
-
+ if(m02 > 0.1 && m02 < 0.4)
+ {
+ fhEOverPvsECutM02CutdEdx->Fill(calo->E(), eOverp);
+ fhEOverPvsPCutM02CutdEdx->Fill(track->P(), eOverp);
+ }
+
+ if( eOverp < fEOverPMax && eOverp > fEOverPMin)
+ {
pid = AliCaloPID::kElectron;
- } //E/p
+ } // E/p
- }// dEdx
-
- aodph.SetIdentifiedParticleType(pid);
+ }// dE/dx
Int_t pidIndex = 0;// Electron
if(pid == AliCaloPID::kChargedHadron) pidIndex = 1;
+
+ //--------------------------------------------------------------------------------------
+ // Play with the MC stack if available
+ //--------------------------------------------------------------------------------------
+
+ //Check origin of the candidates
+ Int_t tag = -1 ;
+ if(IsDataMC())
+ {
+ tag = GetMCAnalysisUtils()->CheckOrigin(calo->GetLabels(),calo->GetNLabels(),GetReader(),GetCalorimeter());
+
+ AliDebug(1,Form("Origin of candidate, bit map %d",tag));
+
+ if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton) && fhMCE[pidIndex][kmcPhoton])
+ {
+ fhMCdEdxvsE [kmcPhoton]->Fill(calo ->E(), dEdx);
+ fhMCdEdxvsP [kmcPhoton]->Fill(track->P(), dEdx);
+ fhMCEOverPvsE[kmcPhoton]->Fill(calo ->E(), eOverp);
+ fhMCEOverPvsP[kmcPhoton]->Fill(track->P(), eOverp);
+
+ if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCConversion) && fhMCE[pidIndex][kmcConversion])
+ {
+ fhMCdEdxvsE [kmcConversion]->Fill(calo ->E(), dEdx);
+ fhMCdEdxvsP [kmcConversion]->Fill(track->P(), dEdx);
+ fhMCEOverPvsE[kmcConversion]->Fill(calo ->E(), eOverp);
+ fhMCEOverPvsP[kmcConversion]->Fill(track->P(), eOverp);
+ }
+ else if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0Decay) &&
+ !GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) && fhMCE[pidIndex][kmcPi0Decay])
+ {
+ fhMCdEdxvsE [kmcPi0Decay]->Fill(calo ->E(), dEdx);
+ fhMCdEdxvsP [kmcPi0Decay]->Fill(track->P(), dEdx);
+ fhMCEOverPvsE[kmcPi0Decay]->Fill(calo ->E(), eOverp);
+ fhMCEOverPvsP[kmcPi0Decay]->Fill(track->P(), eOverp);
+ }
+ else if( (GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEtaDecay) ||
+ GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCOtherDecay) ) && fhMCE[pidIndex][kmcOtherDecay])
+ {
+ fhMCdEdxvsE [kmcOtherDecay]->Fill(calo ->E(), dEdx);
+ fhMCdEdxvsP [kmcOtherDecay]->Fill(track->P(), dEdx);
+ fhMCEOverPvsE[kmcOtherDecay]->Fill(calo ->E(), eOverp);
+ fhMCEOverPvsP[kmcOtherDecay]->Fill(track->P(), eOverp);
+ }
+ else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) && fhMCE [pidIndex][kmcPi0])
+ {
+ fhMCdEdxvsE [kmcPi0]->Fill(calo ->E(), dEdx);
+ fhMCdEdxvsP [kmcPi0]->Fill(track->P(), dEdx);
+ fhMCEOverPvsE[kmcPi0]->Fill(calo ->E(), eOverp);
+ fhMCEOverPvsP[kmcPi0]->Fill(track->P(), eOverp);
+ }
+ else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCEta) && fhMCE[pidIndex][kmcEta])
+ {
+ fhMCdEdxvsE [kmcEta]->Fill(calo ->E(), dEdx);
+ fhMCdEdxvsP [kmcEta]->Fill(track->P(), dEdx);
+ fhMCEOverPvsE[kmcEta]->Fill(calo ->E(), eOverp);
+ fhMCEOverPvsP[kmcEta]->Fill(track->P(), eOverp);
+ }
+ }
+ else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCAntiNeutron) && fhMCE[pidIndex][kmcAntiNeutron])
+ {
+ fhMCdEdxvsE [kmcAntiNeutron]->Fill(calo ->E(), dEdx);
+ fhMCdEdxvsP [kmcAntiNeutron]->Fill(track->P(), dEdx);
+ fhMCEOverPvsE[kmcAntiNeutron]->Fill(calo ->E(), eOverp);
+ fhMCEOverPvsP[kmcAntiNeutron]->Fill(track->P(), eOverp);
+ }
+ else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCAntiProton) && fhMCE[pidIndex][kmcAntiProton])
+ {
+ fhMCdEdxvsE [kmcAntiProton]->Fill(calo ->E(), dEdx);
+ fhMCdEdxvsP [kmcAntiProton]->Fill(track->P(), dEdx);
+ fhMCEOverPvsE[kmcAntiProton]->Fill(calo ->E(), eOverp);
+ fhMCEOverPvsP[kmcAntiProton]->Fill(track->P(), eOverp);
+ }
+ else if(GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCElectron) && fhMCE[pidIndex][kmcElectron])
+ {
+ fhMCdEdxvsE [kmcElectron]->Fill(calo ->E(), dEdx);
+ fhMCdEdxvsP [kmcElectron]->Fill(track->P(), dEdx);
+ fhMCEOverPvsE[kmcElectron]->Fill(calo ->E(), eOverp);
+ fhMCEOverPvsP[kmcElectron]->Fill(track->P(), eOverp);
+ }
+ else if( fhMCE[pidIndex][kmcOther])
+ {
+ fhMCdEdxvsE [kmcOther]->Fill(calo ->E(), dEdx);
+ fhMCdEdxvsP [kmcOther]->Fill(track->P(), dEdx);
+ fhMCEOverPvsE[kmcOther]->Fill(calo ->E(), eOverp);
+ fhMCEOverPvsP[kmcOther]->Fill(track->P(), eOverp);
+ }
+ }// set MC tag and fill Histograms with MC
//---------------------------------
//Fill some shower shape histograms
//---------------------------------
- FillShowerShapeHistograms(calo,aodph.GetTag(),pid);
-
+ FillShowerShapeHistograms(calo,tag,pid);
+
if(pid == AliCaloPID::kElectron)
WeightHistograms(calo);
//-----------------------------------------
- //PID Shower Shape selection or bit setting
+ // PID Shower Shape selection or bit setting
//-----------------------------------------
// Data, PID check on
// Get most probable PID, 2 options check bayesian PID weights or redo PID
// By default, redo PID
- if(GetCaloPID()->GetIdentifiedParticleType(calo)!=AliCaloPID::kPhoton) continue;
-
- if(GetDebug() > 1) printf("AliAnaPhoton::MakeAnalysisFillAOD() - PDG of identified particle %d\n",aodph.GetIdentifiedParticleType());
+ if(GetCaloPID()->GetIdentifiedParticleType(calo)!=AliCaloPID::kPhoton)
+ {
+ if(fAODParticle == AliCaloPID::kElectron)
+ continue;
+
+ if(fAODParticle == 0 )
+ pid = AliCaloPID::kChargedHadron ;
+ }
+ AliDebug(1,Form("PDG of identified particle %d",pid));
}
- if(GetDebug() > 1) printf("AliAnaElectron::MakeAnalysisFillAOD() - Photon selection cuts passed: pT %3.2f, pdg %d\n",
- aodph.Pt(), aodph.GetIdentifiedParticleType());
+ AliDebug(1,Form("Photon selection cuts passed: pT %3.2f, pdg %d",fMomentum.Pt(),pid));
- //FIXME, this to MakeAnalysisFillHistograms ...
- Int_t absID = 0;
Float_t maxCellFraction = 0;
- AliVCaloCells* cells = 0;
-
- if(fCalorimeter == "EMCAL") cells = GetEMCALCells();
- else cells = GetPHOSCells();
+ Int_t absID = GetCaloUtils()->GetMaxEnergyCell(cells, calo,maxCellFraction);
+ if ( absID >= 0 )fhMaxCellDiffClusterE[pidIndex]->Fill(fMomentum.E(),maxCellFraction);
- absID = GetCaloUtils()->GetMaxEnergyCell(cells, calo,maxCellFraction);
+ fhNCellsE[pidIndex] ->Fill(fMomentum.E(),calo->GetNCells());
+ fhNLME [pidIndex] ->Fill(fMomentum.E(),nMaxima);
+ fhTimeE [pidIndex] ->Fill(fMomentum.E(),calo->GetTOF()*1.e9);
- fhMaxCellDiffClusterE[pidIndex]->Fill(aodph.E(),maxCellFraction);
- fhNCellsE[pidIndex] ->Fill(aodph.E(),calo->GetNCells());
- fhTimeE[pidIndex] ->Fill(aodph.E(),calo->GetTOF()*1.e9);
+ //----------------------------
+ // Create AOD for analysis
+ //----------------------------
+
+ //Add AOD with electron/hadron object to aod branch
+ if ( pid == fAODParticle || fAODParticle == 0 )
+ {
+ AliAODPWG4Particle aodpart = AliAODPWG4Particle(fMomentum);
+
+ //...............................................
+ //Set the indeces of the original caloclusters (MC, ID), and calorimeter
+ Int_t label = calo->GetLabel();
+ aodpart.SetLabel(label);
+ aodpart.SetCaloLabel (calo ->GetID(),-1);
+ aodpart.SetTrackLabel(track->GetID(),-1);
+
+ aodpart.SetDetectorTag(GetCalorimeter());
+ //printf("Index %d, Id %d, iaod %d\n",icalo, calo->GetID(),GetOutputAODBranch()->GetEntriesFast());
+
+ aodpart.SetM02(calo->GetM02());
+ aodpart.SetNLM(nMaxima);
+ aodpart.SetTime(calo->GetTOF()*1e9);
+ aodpart.SetNCells(calo->GetNCells());
+ Int_t nSM = GetModuleNumber(calo);
+ aodpart.SetSModNumber(nSM);
+
+ //...............................................
+ //Set bad channel distance bit
+ Double_t distBad=calo->GetDistanceToBadChannel() ; //Distance to bad channel
+ if (distBad > fMinDist3) aodpart.SetDistToBad(2) ;
+ else if(distBad > fMinDist2) aodpart.SetDistToBad(1) ;
+ else aodpart.SetDistToBad(0) ;
+ //printf("DistBad %f Bit %d\n",distBad, aodpart.DistToBad());
+
+ // MC tag
+ aodpart.SetTag(tag);
+
+ // PID tag
+ aodpart.SetIdentifiedParticleType(pid);
+
+ AddAODParticle(aodpart);
+ }
- //Add AOD with photon object to aod branch
- AddAODParticle(aodph);
-
}//loop
- if(GetDebug() > 1) printf("AliAnaElectron::MakeAnalysisFillAOD() End fill AODs, with %d entries \n",GetOutputAODBranch()->GetEntriesFast());
+ AliDebug(1,Form("End fill AODs, with %d entries",GetOutputAODBranch()->GetEntriesFast()));
}
TClonesArray * mcparticles = 0x0;
AliAODMCParticle * aodprimary = 0x0;
- if(IsDataMC()){
-
- if(GetReader()->ReadStack()){
+ if(IsDataMC())
+ {
+ if(GetReader()->ReadStack())
+ {
stack = GetMCStack() ;
- if(!stack) {
- printf("AliAnaElectron::MakeAnalysisFillHistograms() - Stack not available, is the MC handler called? STOP\n");
- abort();
- }
-
+ if ( !stack ) AliFatal("Stack not available, is the MC handler called? STOP");
}
- else if(GetReader()->ReadAODMCParticles()){
-
+ else if(GetReader()->ReadAODMCParticles())
+ {
//Get the list of MC particles
- mcparticles = GetReader()->GetAODMCParticles(0);
- if(!mcparticles && GetDebug() > 0) {
- printf("AliAnaElectron::MakeAnalysisFillHistograms() - Standard MCParticles not available!\n");
- }
+ mcparticles = GetReader()->GetAODMCParticles();
+ if ( !mcparticles ) AliFatal("Standard MCParticles not available! STOP");
}
}// is data and MC
//----------------------------------
//Loop on stored AOD photons
Int_t naod = GetOutputAODBranch()->GetEntriesFast();
- if(GetDebug() > 0) printf("AliAnaElectron::MakeAnalysisFillHistograms() - aod branch entries %d\n", naod);
+ AliDebug(1,Form("AOD branch entries %d", naod));
for(Int_t iaod = 0; iaod < naod ; iaod++)
{
else if(pdg == AliCaloPID::kChargedHadron) pidIndex = 1;
else continue ;
- if(ph->GetDetector() != fCalorimeter) continue;
+ if(((Int_t) ph->GetDetectorTag()) != GetCalorimeter()) continue;
- if(GetDebug() > 2)
- printf("AliAnaElectron::MakeAnalysisFillHistograms() - ID Electron: pt %f, phi %f, eta %f\n", ph->Pt(),ph->Phi(),ph->Eta()) ;
+ AliDebug(1,Form("ID Electron: pt %f, phi %f, eta %f", ph->Pt(),ph->Phi(),ph->Eta())) ;
//................................
//Fill photon histograms
fhPt[pidIndex] ->Fill(ptcluster);
fhPhi[pidIndex] ->Fill(ptcluster,phicluster);
fhEta[pidIndex] ->Fill(ptcluster,etacluster);
- if (ecluster > 0.5) fhEtaPhi[pidIndex] ->Fill(etacluster, phicluster);
+ if (ecluster > 0.5) fhEtaPhi[pidIndex] ->Fill(etacluster, phicluster);
else if(GetMinPt() < 0.5) fhEtaPhi05[pidIndex]->Fill(etacluster, phicluster);
//.......................................
//Play with the MC data if available
- if(IsDataMC()){
-
+ if(IsDataMC())
+ {
//....................................................................
// Access MC information in stack if requested, check that it exists.
Int_t label =ph->GetLabel();
- if(label < 0) {
- if(GetDebug() > 1) printf("AliAnaElectron::MakeAnalysisFillHistograms() *** bad label ***: label %d \n", label);
+ if(label < 0)
+ {
+ AliDebug(1,Form("*** bad label ***: label %d", label));
continue;
}
Float_t eprim = 0;
- Float_t ptprim = 0;
- if(GetReader()->ReadStack()){
-
- if(label >= stack->GetNtrack()) {
- if(GetDebug() > 2) printf("AliAnaElectron::MakeAnalysisFillHistograms() *** large label ***: label %d, n tracks %d \n", label, stack->GetNtrack());
+ //Float_t ptprim = 0;
+ if(GetReader()->ReadStack())
+ {
+ if(label >= stack->GetNtrack())
+ {
+ AliDebug(1,Form("*** large label ***: label %d, n tracks %d", label, stack->GetNtrack()));
continue ;
}
primary = stack->Particle(label);
- if(!primary){
- printf("AliAnaElectron::MakeAnalysisFillHistograms() *** no primary ***: label %d \n", label);
- continue;
+ if(!primary)
+ {
+ AliWarning(Form("*** no primary ***: label %d", label));
+ continue ;
}
eprim = primary->Energy();
- ptprim = primary->Pt();
+ //ptprim = primary->Pt();
}
- else if(GetReader()->ReadAODMCParticles()){
+ else if(GetReader()->ReadAODMCParticles())
+ {
//Check which is the input
- if(ph->GetInputFileIndex() == 0){
+ if(ph->GetInputFileIndex() == 0)
+ {
if(!mcparticles) continue;
- if(label >= mcparticles->GetEntriesFast()) {
- if(GetDebug() > 2) printf("AliAnaElectron::MakeAnalysisFillHistograms() *** large label ***: label %d, n tracks %d \n",
- label, mcparticles->GetEntriesFast());
+
+ if(label >= mcparticles->GetEntriesFast())
+ {
+ AliDebug(1,Form("*** large label ***: label %d, n tracks %d",label, mcparticles->GetEntriesFast()));
continue ;
}
//Get the particle
}
- if(!aodprimary){
- printf("AliAnaElectron::MakeAnalysisFillHistograms() *** no primary ***: label %d \n", label);
+ if(!aodprimary)
+ {
+ AliWarning(Form("*** no primary ***: label %d", label));
continue;
}
eprim = aodprimary->E();
- ptprim = aodprimary->Pt();
-
+ //ptprim = aodprimary->Pt();
}
Int_t tag =ph->GetTag();
fhMCDeltaE[pidIndex][kmcElectron] ->Fill(ecluster,eprim-ecluster);
}
- else if( fhMCE[pidIndex][kmcOther]){
+ else if( fhMCE[pidIndex][kmcOther])
+ {
fhMCE [pidIndex][kmcOther] ->Fill(ecluster);
fhMCPt [pidIndex][kmcOther] ->Fill(ptcluster);
fhMCPhi[pidIndex][kmcOther] ->Fill(ecluster,phicluster);
printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;
AliAnaCaloTrackCorrBaseClass::Print(" ");
- printf("Calorimeter = %s\n", fCalorimeter.Data()) ;
+ printf("Calorimeter = %s\n", GetCalorimeterString().Data()) ;
printf(" %2.2f < dEdx < %2.2f \n",fdEdxMin,fdEdxMax) ;
printf(" %2.2f < E/P < %2.2f \n",fEOverPMin,fEOverPMax) ;
printf("Min Distance to Bad Channel = %2.1f\n",fMinDist);
if(!fFillWeightHistograms || GetMixedEvent()) return;
AliVCaloCells* cells = 0;
- if(fCalorimeter == "EMCAL") cells = GetEMCALCells();
- else cells = GetPHOSCells();
+ if(GetCalorimeter() == kEMCAL) cells = GetEMCALCells();
+ else cells = GetPHOSCells();
// First recalculate energy in case non linearity was applied
Float_t energy = 0;
//Recalibrate cell energy if needed
Float_t amp = cells->GetCellAmplitude(id);
- GetCaloUtils()->RecalibrateCellAmplitude(amp,fCalorimeter, id);
+ GetCaloUtils()->RecalibrateCellAmplitude(amp,GetCalorimeter(), id);
energy += amp;
} // energy loop
- if(energy <=0 ) {
- printf("AliAnaCalorimeterQA::WeightHistograms()- Wrong calculated energy %f\n",energy);
+ if ( energy <= 0 )
+ {
+ 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);
//printf("energy %f, amp %f, rat %f, lograt %f\n",energy,amp,amp/energy,TMath::Log(amp/energy));
fhECellClusterRatio ->Fill(energy,amp/energy);
}
//Recalculate shower shape for different W0
- if(fCalorimeter=="EMCAL"){
-
+ if(GetCalorimeter()==kEMCAL)
+ {
Float_t l0org = clus->GetM02();
Float_t l1org = clus->GetM20();
Float_t dorg = clus->GetDispersion();