//MC tagging: reasons of partner loss etc.
fOutputContainer->Add(new TH1F(Form("hMCDecWMisPartnStack_%s_cent%d",cPID[iPID],cen),"Decay photons with partner not in Stack", nPt,0.,ptMax )) ;
- fOutputContainer->Add(new TH1F(Form("hMCDecWithFoundPartn_%s_cent%d",cPID[iPID],cen),"Decay photon with found partner", nPt,0.,ptMax )) ;
+ for(Int_t iType=0; iType<9; iType++)
+ fOutputContainer->Add(new TH1F(Form("hMCDecWithFoundPartnType%d_%s_cent%d",iType,cPID[iPID],cen),"Decay photon with found partner", nPt,0.,ptMax )) ;
fOutputContainer->Add(new TH1F(Form("hMCDecWithWrongMass_%s_cent%d",cPID[iPID],cen),"Decay photon with wrong mass", nPt,0.,ptMax )) ;
fOutputContainer->Add(new TH1F(Form("hMCDecWMisPartnAccept_%s_cent%d",cPID[iPID],cen),"Decay photon with parttner not in PHOS acc", nPt,0.,ptMax )) ;
fOutputContainer->Add(new TH1F(Form("hMCDecWMisPartnAcceptFA1_%s_cent%d",cPID[iPID],cen),"Decay photons with partner missed due geometry Fid. area. 1", nPt,0.,ptMax )) ;
fOutputContainer->Add(new TH1F(Form("hMCDecWMisPartnAll_%s_cent%d",cPID[iPID],cen),"Decay photons with partner missed due to any reason", nPt,0.,ptMax )) ;
fOutputContainer->Add(new TH1F(Form("hMCDecWMisPartnNPhot_%s_cent%d",cPID[iPID],cen),"pi0 decay photon with non-photon partner", nPt,0.,ptMax )) ;
-
fOutputContainer->Add(new TH1F(Form("hMCDecWMisPartnCutEmin_%s_cent%d",cPID[iPID],cen),"Decay photons with rec. partner but failed Emin cut", nPt,0.,ptMax )) ;
fOutputContainer->Add(new TH1F(Form("hMCDecWMisPartnCutNcell_%s_cent%d",cPID[iPID],cen),"Decay photons with rec. partner but failed Ncell cut", nPt,0.,ptMax )) ;
fOutputContainer->Add(new TH1F(Form("hMCDecWMisPartnCutEcross_%s_cent%d",cPID[iPID],cen),"Decay photons with rec. partner but failed Ecross cut", nPt,0.,ptMax )) ;
fOutputContainer->Add(new TH1F(Form("hMCDecWMisPartnCutM02_%s_cent%d",cPID[iPID],cen),"Decay photons with rec. partner but failed M02 cut", nPt,0.,ptMax )) ;
fOutputContainer->Add(new TH1F(Form("hMCDecWMisPartnDefCuts_%s_cent%d",cPID[iPID],cen),"Decay photons with rec. partner but failed default cuts", nPt,0.,ptMax )) ;
fOutputContainer->Add(new TH1F(Form("hMCDecWRecPartn_%s_cent%d",cPID[iPID],cen),"Decay photons with rec partner", nPt,0.,ptMax )) ;
+ fOutputContainer->Add(new TH1F(Form("hMCDecWRecUniqPartn_%s_cent%d",cPID[iPID],cen),"Decay photons with rec partner", nPt,0.,ptMax )) ;
fOutputContainer->Add(new TH2F(Form("hMC_InvM_Re_%s_cent%d",cPID[iPID],cen),"Two-photon inv. mass vs first photon pt",nM,0.,mMax,nPt,0.,ptMax)) ;
fOutputContainer->Add(new TH2F(Form("hMC_InvM_Re_Strict_%s_cent%d",cPID[iPID],cen),"Two-photon inv. mass vs first photon pt",nM,0.,mMax,nPt,0.,ptMax)) ;
p->SetIsolationTag(isolation) ;
p->SetDistToBad((Int_t)(1.+clu->GetDistanceToBadChannel()/2.2));
-
+ p->SetBC(i) ; //reference to CaloCluster
p->SetTagInfo(0); //Strict PID pi0 partner not found
p->SetTagged(kFALSE); //Reconstructed pairs found
const Double_t rcut=1. ; //cut on vertex to consider particle as "primary"
const Double_t phiMin=260.*TMath::Pi()/180. ;
const Double_t phiMax=320.*TMath::Pi()/180. ;
+
+ AliVEvent* event = (AliVEvent*)InputEvent();
Int_t nPrim = fStack->GetEntriesFast() ;
//Fill Primary particl yields
break ;
}
}
+ if(pp){
+ //Partner reconstructed, but did not pass cuts
+ FillPIDHistograms("hMCDecWRecUniqPartn",p) ;
+ }
+ //Partner not found. Check if it is not dominant contributor?
+ if(!pp){
+ for(Int_t ii=0;(ii<n) && (!pp);ii++){
+ if(i==ii) continue;
+ AliCaloPhoton * tmp = static_cast<AliCaloPhoton*>(fPHOSEvent->At(ii));
+ Int_t iCaloCluster=tmp->GetBC();//index of AODCaloCluster
+ AliVCluster * clu = event->GetCaloCluster(iCaloCluster);
+ Int_t nCluPrimaries = clu->GetNLabels() ;
+ for(Int_t iAODLabel=0; (iAODLabel<nCluPrimaries) && (!pp); iAODLabel++){
+ Int_t ipartnPrim = clu->GetLabelAt(iAODLabel) ;
+ while(ipartnPrim>-1){
+ if(ipartnPrim==ipartner)
+ break ;
+ ipartnPrim = ((AliAODMCParticle *)fStack->At(ipartnPrim))->GetMother();
+ }
+ if(ipartnPrim==ipartner){
+ pp=tmp ;
+ break ;
+ }
+ }
+ }
+ }
if(pp){
//Partner reconstructed, but did not pass cuts
FillPIDHistograms("hMCDecWRecPartn",p) ;
Double_t invMass=(*p+ *pp).M() ;
FillHistogram("hMCmass",invMass,p->Pt(),p->GetWeight()) ;
- if(IsInPi0Band(invMass,p->Pt())){
- FillPIDHistograms("hMCDecWithFoundPartn",p) ;
+ Double_t nSigma=InPi0Band(invMass,p->Pt()) ;
+ // analog to Tag
+ for(Int_t eminType=0; eminType<3; eminType++){
+ if(pp->E()>0.1*(eminType+1)){
+ for(Int_t isigma=0; isigma<3; isigma++){
+ if(nSigma<1.+isigma){
+ Int_t iType=3*eminType+isigma ;
+ FillPIDHistograms(Form("hMCDecWithFoundPartnType%d",iType),p) ;
+ }
+ }
+ }
}
- else{
+ if(nSigma>3.){
FillPIDHistograms("hMCDecWithWrongMass",p) ;
}
}
}
if(!isPartnerLost){ //Reason not found!!!!!
FillPIDHistograms("hMCDecWMisPartnOther",p);
+ Int_t multClust = event->GetNumberOfCaloClusters();
+ for (Int_t iclu=0; (iclu<multClust) && (!isPartnerLost); iclu++) {
+ AliVCluster * clu = event->GetCaloCluster(iclu);
+ if(!clu->IsPHOS())
+ continue ;
+ Int_t nCluPrimaries = clu->GetNLabels() ;
+ for(Int_t iAODLabel=0; (iAODLabel<nCluPrimaries) && (!isPartnerLost); iAODLabel++){
+ Int_t ipartnPrim = clu->GetLabelAt(iAODLabel) ;
+ while(ipartnPrim>-1){
+ if(ipartnPrim==ipartner)
+ break ;
+ ipartnPrim = ((AliAODMCParticle *)fStack->At(ipartnPrim))->GetMother();
+ }
+ if(ipartnPrim==ipartner){
+ isPartnerLost=kTRUE;
+ break ;
+ }
+ }
+ }
+ if(isPartnerLost){//Did not pass default cuts
+ FillPIDHistograms("hMCDecWMisPartnDefCuts",p);
+ }
}
else{//Sum of all missed partners
FillPIDHistograms("hMCDecWMisPartnAll",p);
FillPIDHistograms("hInvM_Re_Emin3",p1,p2,invMass,kTRUE) ;
//Fill izolated pi0s
- Double_t nsigma1 = IsInPi0Band(invMass,p1->Pt()) ; //in band with n sigmas
- Double_t nsigma2 = IsInPi0Band(invMass,p2->Pt()) ; //in band with n sigmas
+ Double_t nsigma1 = InPi0Band(invMass,p1->Pt()) ; //in band with n sigmas
+ Double_t nsigma2 = InPi0Band(invMass,p2->Pt()) ; //in band with n sigmas
if(nsigma1<2 || nsigma2<2){ //2 sigma band
TLorentzVector pi0=*p1+*p2 ;
Int_t isolation=EvalIsolation(&pi0,0) ;
//Tagging: 1,2,3 sigma
//Emin=100,200,300 Mev
- //IsInPi0Band(mass, Ptphoton, type Emin cut
+ //InPi0Band(mass, Ptphoton, type Emin cut
Int_t tag1=0 ;
for(Int_t eminType=0; eminType<3; eminType++){
if(p2->E()>0.1*(eminType+1)){
//Set corresponding bit
- Double_t nsigma = IsInPi0Band(invMass,p1->Pt()) ; //in band with n sigmas
+ Double_t nsigma = InPi0Band(invMass,p1->Pt()) ; //in band with n sigmas
for(Int_t isigma=0; isigma<3; isigma++){
if(nsigma<1+isigma){
tag1|= (1 << (3*eminType+isigma)) ;
for(Int_t eminType=0; eminType<3; eminType++){
if(p1->E()>0.1*(eminType+1)){
//Set corresponding bit
- Double_t nsigma = IsInPi0Band(invMass,p2->Pt()) ; //in band with n sigmas
+ Double_t nsigma = InPi0Band(invMass,p2->Pt()) ; //in band with n sigmas
for(Int_t isigma=0; isigma<3; isigma++){
if(nsigma<1+isigma){
tag2|= (1 << (3*eminType+isigma)) ;
if (fDebug > 1) Printf("Terminate()");
}
//______________________________________________________________________________
-Bool_t AliAnalysisTaskTaggedPhotons::IsInPi0Band(Double_t m, Double_t pt)const
+Double_t AliAnalysisTaskTaggedPhotons::InPi0Band(Double_t m, Double_t pt)const
{
//Parameterization of the pi0 peak region
//for LHC13bcdef
Double_t mpi0sigma=TMath::Sqrt(5.22245e-03*5.22245e-03 +2.86851e-03*2.86851e-03/pt) + 9.09932e-05*pt ;
- return (m>mpi0mean-2*mpi0sigma && m<mpi0mean+2*mpi0sigma) ;
+ return TMath::Abs(m-mpi0mean)/mpi0sigma ;
}
//______________________________________________________________________________
Int_t AliAnalysisTaskTaggedPhotons::IsSameParent(const AliCaloPhoton *p1, const AliCaloPhoton *p2)const{
}
//_____________________________________________________________________________
-void AliAnalysisTaskTaggedPhotons::FillPIDHistograms(const char * name, const AliCaloPhoton * p1,const AliCaloPhoton * p2,Double_t x, Bool_t isRe) const{
+void AliAnalysisTaskTaggedPhotons::FillPIDHistograms(const char * name, const AliCaloPhoton * p1,const AliCaloPhoton * p2,Double_t x, Bool_t /*isRe*/) const{
Double_t ptPi = (*p1 + *p2).Pt() ;
Double_t w=TMath::Sqrt(p1->GetWeight()*p2->GetWeight()) ;