//____________________________
AliAnaPi0EbE::AliAnaPi0EbE() :
-AliAnaCaloTrackCorrBaseClass(),fAnaType(kIMCalo), fCalorimeter(""),
-fMinDist(0.),fMinDist2(0.), fMinDist3(0.),
-fNLMCutMin(-1), fNLMCutMax(10),
-fTimeCutMin(-10000), fTimeCutMax(10000),
+AliAnaCaloTrackCorrBaseClass(), fAnaType(kIMCalo), fCalorimeter(""),
+fMinDist(0.),fMinDist2(0.), fMinDist3(0.),
+fNLMCutMin(-1), fNLMCutMax(10),
+fTimeCutMin(-10000), fTimeCutMax(10000),
fRejectTrackMatch(kTRUE),
fFillPileUpHistograms(0),
-fFillWeightHistograms(kFALSE), fFillTMHisto(0),
-fFillSelectClHisto(0), fFillOnlySimpleSSHisto(1), fFillEMCALBCHistograms(0),
+fFillWeightHistograms(kFALSE), fFillTMHisto(0),
+fFillSelectClHisto(0), fFillOnlySimpleSSHisto(1), fFillEMCALBCHistograms(0),
fInputAODGammaConvName(""),
fCheckSplitDistToBad(0),
// Histograms
-fhPt(0), fhE(0),
-fhEEta(0), fhEPhi(0),
-fhPtEta(0), fhPtPhi(0), fhEtaPhi(0),
-fhEtaPhiEMCALBC0(0), fhEtaPhiEMCALBC1(0), fhEtaPhiEMCALBCN(0),
+fhPt(0), fhE(0),
+fhEEta(0), fhEPhi(0),
+fhPtEta(0), fhPtPhi(0), fhEtaPhi(0),
+fhEtaPhiEMCALBC0(0), fhEtaPhiEMCALBC1(0), fhEtaPhiEMCALBCN(0),
fhTimeTriggerEMCALBC0UMReMatchOpenTime(0),
fhTimeTriggerEMCALBC0UMReMatchCheckNeigh(0),
fhTimeTriggerEMCALBC0UMReMatchBoth(0),
-fhPtCentrality(), fhPtEventPlane(0),
-fhPtReject(0), fhEReject(0),
-fhEEtaReject(0), fhEPhiReject(0), fhEtaPhiReject(0),
-fhMass(0), fhMassPt(0), fhMassSplitPt(0),
-fhSelectedMass(0), fhSelectedMassPt(0), fhSelectedMassSplitPt(0),
-fhMassNoOverlap(0), fhMassPtNoOverlap(0), fhMassSplitPtNoOverlap(0),
-fhSelectedMassNoOverlap(0), fhSelectedMassPtNoOverlap(0), fhSelectedMassSplitPtNoOverlap(0),
+fhPtCentrality(), fhPtEventPlane(0),
+fhPtReject(0), fhEReject(0),
+fhEEtaReject(0), fhEPhiReject(0), fhEtaPhiReject(0),
+fhMass(0), fhMassPt(0), fhMassSplitPt(0),
+fhSelectedMass(0), fhSelectedMassPt(0), fhSelectedMassSplitPt(0),
+fhMassNoOverlap(0), fhMassPtNoOverlap(0), fhMassSplitPtNoOverlap(0),
+fhSelectedMassNoOverlap(0), fhSelectedMassPtNoOverlap(0), fhSelectedMassSplitPtNoOverlap(0),
fhMCPi0PtRecoPtPrim(0), fhMCEtaPtRecoPtPrim(0),
fhMCPi0PtRecoPtPrimNoOverlap(0), fhMCEtaPtRecoPtPrimNoOverlap(0),
fhMCPi0SplitPtRecoPtPrim(0), fhMCEtaSplitPtRecoPtPrim(0),
fhMCPi0SelectedPtRecoPtPrimNoOverlap(0), fhMCEtaSelectedPtRecoPtPrimNoOverlap(0),
fhMCPi0SelectedSplitPtRecoPtPrim(0), fhMCEtaSelectedSplitPtRecoPtPrim(0),
fhMCPi0SelectedSplitPtRecoPtPrimNoOverlap(0), fhMCEtaSelectedSplitPtRecoPtPrimNoOverlap(0),
-fhAsymmetry(0), fhSelectedAsymmetry(0),
-fhSplitE(0), fhSplitPt(0),
-fhSplitPtEta(0), fhSplitPtPhi(0),
+fhAsymmetry(0), fhSelectedAsymmetry(0),
+fhSplitE(0), fhSplitPt(0),
+fhSplitPtEta(0), fhSplitPtPhi(0),
fhNLocMaxSplitPt(0),
-fhPtDecay(0), fhEDecay(0),
+fhPtDecay(0), fhEDecay(0),
// Shower shape histos
-fhEDispersion(0), fhELambda0(0), fhELambda1(0),
-fhELambda0NoTRD(0), fhELambda0FracMaxCellCut(0),
-fhEFracMaxCell(0), fhEFracMaxCellNoTRD(0),
-fhENCells(0), fhETime(0), fhEPairDiffTime(0),
-fhDispEtaE(0), fhDispPhiE(0),
-fhSumEtaE(0), fhSumPhiE(0), fhSumEtaPhiE(0),
-fhDispEtaPhiDiffE(0), fhSphericityE(0),
+fhEDispersion(0), fhELambda0(0), fhELambda1(0),
+fhELambda0NoTRD(0), fhELambda0FracMaxCellCut(0),
+fhEFracMaxCell(0), fhEFracMaxCellNoTRD(0),
+fhENCells(0), fhETime(0), fhEPairDiffTime(0),
+fhDispEtaE(0), fhDispPhiE(0),
+fhSumEtaE(0), fhSumPhiE(0), fhSumEtaPhiE(0),
+fhDispEtaPhiDiffE(0), fhSphericityE(0),
// MC histos
-fhMCE(), fhMCPt(),
-fhMCPhi(), fhMCEta(),
-fhMCEReject(), fhMCPtReject(),
+fhMCE(), fhMCPt(),
+fhMCPhi(), fhMCEta(),
+fhMCEReject(), fhMCPtReject(),
fhMCPtCentrality(),
-fhMCPi0PtGenRecoFraction(0), fhMCEtaPtGenRecoFraction(0),
-fhMCPi0DecayPt(0), fhMCPi0DecayPtFraction(0),
-fhMCEtaDecayPt(0), fhMCEtaDecayPtFraction(0),
+fhMCPi0PtGenRecoFraction(0), fhMCEtaPtGenRecoFraction(0),
+fhMCPi0DecayPt(0), fhMCPi0DecayPtFraction(0),
+fhMCEtaDecayPt(0), fhMCEtaDecayPtFraction(0),
fhMCOtherDecayPt(0),
-fhMassPairMCPi0(0), fhMassPairMCEta(0),
-fhAnglePairMCPi0(0), fhAnglePairMCEta(0),
+fhMassPairMCPi0(0), fhMassPairMCEta(0),
+fhAnglePairMCPi0(0), fhAnglePairMCEta(0),
// Weight studies
-fhECellClusterRatio(0), fhECellClusterLogRatio(0),
-fhEMaxCellClusterRatio(0), fhEMaxCellClusterLogRatio(0),
-fhTrackMatchedDEta(0), fhTrackMatchedDPhi(0), fhTrackMatchedDEtaDPhi(0),
-fhTrackMatchedDEtaPos(0), fhTrackMatchedDPhiPos(0), fhTrackMatchedDEtaDPhiPos(0),
-fhTrackMatchedDEtaNeg(0), fhTrackMatchedDPhiNeg(0), fhTrackMatchedDEtaDPhiNeg(0),
+fhECellClusterRatio(0), fhECellClusterLogRatio(0),
+fhEMaxCellClusterRatio(0), fhEMaxCellClusterLogRatio(0),
+fhTrackMatchedDEta(0), fhTrackMatchedDPhi(0), fhTrackMatchedDEtaDPhi(0),
+fhTrackMatchedDEtaPos(0), fhTrackMatchedDPhiPos(0), fhTrackMatchedDEtaDPhiPos(0),
+fhTrackMatchedDEtaNeg(0), fhTrackMatchedDPhiNeg(0), fhTrackMatchedDEtaDPhiNeg(0),
fhTrackMatchedMCParticleE(0),
-fhTrackMatchedMCParticleDEta(0), fhTrackMatchedMCParticleDPhi(0),
-fhdEdx(0), fhEOverP(0), fhEOverPNoTRD(0),
+fhTrackMatchedMCParticleDEta(0), fhTrackMatchedMCParticleDPhi(0),
+fhdEdx(0), fhEOverP(0), fhEOverPNoTRD(0),
// Number of local maxima in cluster
-fhNLocMaxE(0), fhNLocMaxPt(0),
+fhNLocMaxE(0), fhNLocMaxPt(0), fhNLocMaxPtReject(0),
// PileUp
-fhTimePtNoCut(0), fhTimePtSPD(0), fhTimePtSPDMulti(0),
+fhTimePtNoCut(0), fhTimePtSPD(0), fhTimePtSPDMulti(0),
fhTimeNPileUpVertSPD(0), fhTimeNPileUpVertTrack(0),
fhTimeNPileUpVertContributors(0),
fhTimePileUpMainVertexZDistance(0), fhTimePileUpMainVertexZDiamond(0),
{
fhMCE [i] = 0;
fhMCPt [i] = 0;
- fhMCNLocMaxPt [i] = 0;
fhMCPhi [i] = 0;
fhMCEta [i] = 0;
fhMCPtCentrality [i] = 0;
fhMCSplitPt [i] = 0;
fhMCSplitPtPhi [i] = 0;
fhMCSplitPtEta [i] = 0;
+
+ fhMCNLocMaxPt [i] = 0;
fhMCNLocMaxSplitPt [i] = 0;
+ fhMCNLocMaxPtReject[i] = 0;
fhEMCLambda0 [i] = 0;
fhEMCLambda0NoTRD [i] = 0;
//___________________________________________________________________________________________
-void AliAnaPi0EbE::FillRejectedClusterHistograms(const TLorentzVector mom, const Int_t mctag)
+void AliAnaPi0EbE::FillRejectedClusterHistograms(const TLorentzVector mom, const Int_t mctag, const Int_t nMaxima)
{
// Fill histograms that do not pass the identification (SS case only)
fhEPhiReject ->Fill(ener,phi);
fhEtaPhiReject ->Fill(eta,phi);
+ fhNLocMaxPtReject->Fill(pt,nMaxima);
+
if(IsDataMC())
{
Int_t mcIndex = GetMCIndex(mctag);
fhMCEReject [mcIndex] ->Fill(ener);
fhMCPtReject [mcIndex] ->Fill(pt);
+ fhMCNLocMaxPtReject[mcIndex]->Fill(pt,nMaxima);
}
}
if(fAnaType == kSSCalo)
{
- fhNLocMaxPt = new TH2F("hNLocMaxPt","Number of local maxima in cluster",
+ fhNLocMaxPt = new TH2F("hNLocMaxPt","Number of local maxima in cluster, selected clusters",
nptbins,ptmin,ptmax,10,0,10);
fhNLocMaxPt ->SetYTitle("N maxima");
fhNLocMaxPt ->SetXTitle("p_{T} (GeV/c)");
outputContainer->Add(fhNLocMaxPt) ;
+
+ fhNLocMaxPtReject = new TH2F("hNLocMaxPtReject","Number of local maxima in cluster, rejected clusters",
+ nptbins,ptmin,ptmax,10,0,10);
+ fhNLocMaxPtReject ->SetYTitle("N maxima");
+ fhNLocMaxPtReject ->SetXTitle("p_{T} (GeV/c)");
+ outputContainer->Add(fhNLocMaxPtReject) ;
}
for (Int_t i = 0; i < 3; i++)
if(fAnaType == kSSCalo)
{
-
fhMCNLocMaxPt[i] = new TH2F
(Form("hNLocMaxPt_MC%s",pname[i].Data()),
- Form("cluster from %s, pT of cluster, for NLM",ptype[i].Data()),
+ Form("cluster from %s, pT of cluster vs NLM, accepted",ptype[i].Data()),
nptbins,ptmin,ptmax,10,0,10);
fhMCNLocMaxPt[i] ->SetYTitle("N maxima");
fhMCNLocMaxPt[i] ->SetXTitle("p_{T} (GeV/c)");
outputContainer->Add(fhMCNLocMaxPt[i]) ;
+
+ fhMCNLocMaxPtReject[i] = new TH2F
+ (Form("hNLocMaxPtReject_MC%s",pname[i].Data()),
+ Form("cluster from %s, pT of cluster vs NLM, rejected",ptype[i].Data()),
+ nptbins,ptmin,ptmax,10,0,10);
+ fhMCNLocMaxPtReject[i] ->SetYTitle("N maxima");
+ fhMCNLocMaxPtReject[i] ->SetXTitle("p_{T} (GeV/c)");
+ outputContainer->Add(fhMCNLocMaxPtReject[i]) ;
fhMCEReject[i] = new TH1F
(Form("hEReject_MC%s",pname[i].Data()),
if(GetDebug() > 1)
printf("AliAnaPi0EbE::MakeShowerShapeIdentification() - FillAOD: Min pt cut and fiducial cut passed: pt %3.2f, phi %2.2f, eta %1.2f\n",mom.Pt(),mom.Phi(),mom.Eta());
+ //Play with the MC stack if available
+ //Check origin of the candidates
+ Int_t tag = 0 ;
+ if(IsDataMC())
+ {
+ tag = GetMCAnalysisUtils()->CheckOrigin(calo->GetLabels(),calo->GetNLabels(),GetReader());
+ //GetMCAnalysisUtils()->CheckMultipleOrigin(calo->GetLabels(),calo->GetNLabels(), GetReader(), aodpi0.GetInputFileIndex(), tag);
+ if(GetDebug() > 0) printf("AliAnaPi0EbE::MakeShowerShapeIdentification() - Origin of candidate %d\n",tag);
+ }
+
+ //Int_t nMaxima = GetCaloUtils()->GetNumberOfLocalMaxima(calo, cells); // NLM
+
//Check Distance to Bad channel, set bit.
Double_t distBad=calo->GetDistanceToBadChannel() ; //Distance to bad channel
if(distBad < 0.) distBad=9999. ; //workout strange convension dist = -1. ;
- if(distBad < fMinDist) //In bad channel (PHOS cristal size 2.2x2.2 cm)
+ if(distBad < fMinDist){ //In bad channel (PHOS cristal size 2.2x2.2 cm)
+ //FillRejectedClusterHistograms(mom,tag,nMaxima);
continue ;
-
+ }
if(GetDebug() > 1) printf("AliAnaPi0EbE::MakeShowerShapeIdentification() - FillAOD: Bad channel cut passed %4.2f\n",distBad);
//If too low number of cells, skip it
- if ( calo->GetNCells() < GetCaloPID()->GetClusterSplittingMinNCells()) continue ;
+ if ( calo->GetNCells() < GetCaloPID()->GetClusterSplittingMinNCells())
+ {
+ //FillRejectedClusterHistograms(mom,tag,nMaxima);
+ continue ;
+ }
if(GetDebug() > 1)
printf("AliAnaPi0EbE::MakeShowerShapeIdentification() - FillAOD: N cells cut passed %d > %d\n",
//.......................................
// TOF cut, BE CAREFUL WITH THIS CUT
Double_t tof = calo->GetTOF()*1e9;
- if(tof < fTimeCutMin || tof > fTimeCutMax) continue ;
-
- //Play with the MC stack if available
- //Check origin of the candidates
- Int_t tag = 0 ;
- if(IsDataMC())
+ if(tof < fTimeCutMin || tof > fTimeCutMax)
{
- tag = GetMCAnalysisUtils()->CheckOrigin(calo->GetLabels(),calo->GetNLabels(),GetReader());
- //GetMCAnalysisUtils()->CheckMultipleOrigin(calo->GetLabels(),calo->GetNLabels(), GetReader(), aodpi0.GetInputFileIndex(), tag);
- if(GetDebug() > 0) printf("AliAnaPi0EbE::MakeShowerShapeIdentification() - Origin of candidate %d\n",tag);
+ //FillRejectedClusterHistograms(mom,tag,nMaxima);
+ continue ;
}
-
//Check PID
//PID selection or bit setting
- Int_t nMaxima = 0 ;
- Double_t mass = 0 , angle = 0;
+ Int_t nMaxima = 0;
+ Double_t mass = 0, angle = 0;
+ Int_t absId1 =-1, absId2 =-1;
+ Float_t distbad1 =-1, distbad2 =-1;
+ Bool_t fidcut1 = 0, fidcut2 = 0;
TLorentzVector l1, l2;
- Int_t absId1 =-1; Int_t absId2 =-1;
- Float_t distbad1 =-1; Float_t distbad2 =-1;
- Bool_t fidcut1 = 0; Bool_t fidcut2 = 0;
-
+
Int_t idPartType = GetCaloPID()->GetIdentifiedParticleTypeFromClusterSplitting(calo,cells,GetCaloUtils(),
GetVertex(evtIndex),nMaxima,
mass,angle,l1,l2,absId1,absId2,
Info("MakeShowerShapeIdentification", "Dist to bad channel cl %f, cl1 %f, cl2 %f; fid cl1 %d, cl2 %d \n",
calo->GetDistanceToBadChannel(),distbad1,distbad2, fidcut1,fidcut2);
+ //FillRejectedClusterHistograms(mom,tag,nMaxima);
continue ;
}
//Skip events with too few or too many NLM
if(nMaxima < fNLMCutMin || nMaxima > fNLMCutMax)
{
- FillRejectedClusterHistograms(mom,tag);
+ //FillRejectedClusterHistograms(mom,tag,nMaxima);
continue ;
}
- if(nMaxima == 1 && fNLMECutMin[0] > mom.E()) continue;
- if(nMaxima == 2 && fNLMECutMin[1] > mom.E()) continue;
- if(nMaxima > 2 && fNLMECutMin[2] > mom.E()) continue;
-
if(GetDebug() > 1)
printf("AliAnaPi0EbE::MakeShowerShapeIdentification() - NLM %d accepted \n",nMaxima);
//Skip matched clusters with tracks
if(fRejectTrackMatch && IsTrackMatched(calo, GetReader()->GetInputEvent()))
{
- FillRejectedClusterHistograms(mom,tag);
+ FillRejectedClusterHistograms(mom,tag,nMaxima);
continue ;
}
if(e1+e2 > 0) asy = (e1-e2) / (e1+e2);
fhAsymmetry->Fill(mom.E(),asy);
-
if(IsDataMC())
{
fhMCEAsymmetry[mcIndex]->Fill(mom.E(),asy);
if (GetOutputAODName().Contains("Pi0") && idPartType != AliCaloPID::kPi0)
{
if(GetDebug() > 1) Info("MakeShowerShapeIdentification","Cluster is not Pi0\n");
- FillRejectedClusterHistograms(mom,tag);
+ FillRejectedClusterHistograms(mom,tag,nMaxima);
continue ;
}
else if(GetOutputAODName().Contains("Eta") && idPartType != AliCaloPID::kEta)
{
if(GetDebug() > 1) Info("MakeShowerShapeIdentification","Cluster is not Eta\n");
- FillRejectedClusterHistograms(mom,tag);
+ FillRejectedClusterHistograms(mom,tag,nMaxima);
continue ;
}
//-----------------------
//Create AOD for analysis
+ if(nMaxima == 1 && fNLMECutMin[0] > mom.E()) continue;
+ if(nMaxima == 2 && fNLMECutMin[1] > mom.E()) continue;
+ if(nMaxima > 2 && fNLMECutMin[2] > mom.E()) continue;
+
AliAODPWG4Particle aodpi0 = AliAODPWG4Particle(mom);
aodpi0.SetLabel(calo->GetLabel());