//__________________________________________________________________
AliAnaInsideClusterInvariantMass::AliAnaInsideClusterInvariantMass() :
- AliAnaCaloTrackCorrBaseClass(), fCalorimeter(""),
+ AliAnaCaloTrackCorrBaseClass(),
fMinNCells(0), fMinBadDist(0),
fHistoECut(0), fCheckSplitDistToBad(0), fFillAngleHisto(kFALSE),
fFillTMHisto(kFALSE), fFillTMResidualHisto(kFALSE), fFillSSExtraHisto(kFALSE),
fFillArmenterosHisto(0), fFillThetaStarHisto(0),
fSSWeightN(0), fSSECellCutN(0),
fNLMSettingN(0), fWSimu(),
+ fClusterMomentum(), fSubClusterMom1(), fSubClusterMom2(),
+ fSubClusterMomSum(), fSubClusterMomBoost(),
+ fPrimaryMom(), fGrandMotherMom(),
+ fMCDaughMom1(), fMCDaughMom2(),
+ fProdVertex(),
+// Histograms
fhMassAsyCutNLocMax1(0), fhMassAsyCutNLocMax2(0), fhMassAsyCutNLocMaxN(0),
fhM02AsyCutNLocMax1(0), fhM02AsyCutNLocMax2(0), fhM02AsyCutNLocMaxN(0),
fhMassM02CutNLocMax1(0), fhMassM02CutNLocMax2(0), fhMassM02CutNLocMaxN(0),
// Int_t mpdg = -999999;
// Int_t mstatus = -1;
// Int_t grandLabel = -1;
-// TLorentzVector mother = GetMCAnalysisUtils()->GetMother(mclabel,GetReader(),mpdg,mstatus,mOK,grandLabel);
+// fPrimaryMom = GetMCAnalysisUtils()->GetMother(mclabel,GetReader(),mpdg,mstatus,mOK,grandLabel);
//
// printf("******** mother %d : Label %d, pdg %d; status %d, E %2.2f, Eta %2.2f, Phi %2.2f, ok %d, mother label %d\n",
-// ilab, mclabel, mpdg, mstatus,mother.E(), mother.Eta(),mother.Phi()*TMath::RadToDeg(),mOK,grandLabel);
+// ilab, mclabel, mpdg, mstatus,fPrimaryMom.E(), fPrimaryMom.Eta(),fPrimaryMom.Phi()*TMath::RadToDeg(),mOK,grandLabel);
//
// if( ( mpdg == 22 || TMath::Abs(mpdg)==11 ) && grandLabel >=0 )
// {
// Int_t mcLabel = GetEMCALCells()->GetCellMCLabel(absIdCell);
// GetReader()->RemapMCLabelForAODs(mcLabel);
// Int_t ietac=-1; Int_t iphic = 0; Int_t rcuc = 0;
-// Int_t smc = GetModuleNumberCellIndexes(absIdCell,fCalorimeter, ietac, iphic, rcuc);
+// Int_t smc = GetModuleNumberCellIndexes(absIdCell,GetCalorimeter(), ietac, iphic, rcuc);
//
// printf(" \t cell i %d, abs %d, amp %2.3f, mclabel %d, (sm,ieta,iphi)=(%d,%d,%d)\n",icell,absIdCell,GetEMCALCells()->GetCellAmplitude(absIdCell),mcLabel,smc,ietac,iphic);
// }
// Compare the common ancestors of the 2 highest energy local maxima
Int_t ancPDG = 0, ancStatus = -1;
- TLorentzVector momentum; TVector3 prodVertex;
Int_t ancLabel = 0;
Bool_t high = kFALSE;
Bool_t low = kFALSE;
}
ancLabel = GetMCAnalysisUtils()->CheckCommonAncestor(mcLabel1,mcLabel2,
- GetReader(),ancPDG,ancStatus,momentum,prodVertex);
+ GetReader(),ancPDG,ancStatus,fPrimaryMom,fProdVertex);
if(ancPDG==111)
{
if((i==imax && j==imax2) || (j==imax && i==imax2))
Bool_t ok =kFALSE;
Int_t pdg = -22222, status = -1;
- TLorentzVector primary =GetMCAnalysisUtils()->GetMother(ancLabel,GetReader(), pdg, status, ok);
+ fPrimaryMom = GetMCAnalysisUtils()->GetMother(ancLabel,GetReader(), pdg, status, ok);
//printf("\t i %d label %d - j %d label %d; ancestor label %d, PDG %d-%d; E %2.2f; high %d, any %d \n",i,mcLabel1,j,mcLabel2, ancLabel, ancPDG,pdg, primary.E(), high, low);
}
Int_t gLabel = -1;
Int_t label = cluster->GetLabel();
- TLorentzVector pi0Kine;
-
+
while( pdg!=111 && label>=0 )
{
- pi0Kine = GetMCAnalysisUtils()->GetGrandMother(label,GetReader(),pdg,status,ok, label,gLabel);
+ fPrimaryMom = GetMCAnalysisUtils()->GetGrandMother(label,GetReader(),pdg,status,ok, label,gLabel);
}
if(pdg!=111 || label < 0)
// Get daughter photon kinematics
Int_t pdg0 = -22222, status0 = -1; Int_t label0 = -1;
- TLorentzVector photon0Kine = GetMCAnalysisUtils()->GetDaughter(0,label,GetReader(),pdg0,status0,ok,label0);
+ fMCDaughMom1 = GetMCAnalysisUtils()->GetDaughter(0,label,GetReader(),pdg0,status0,ok,label0);
Int_t pdg1 = -22222, status1 = -1; Int_t label1 = -1;
- TLorentzVector photon1Kine = GetMCAnalysisUtils()->GetDaughter(1,label,GetReader(),pdg1,status1,ok,label1);
+ fMCDaughMom2 = GetMCAnalysisUtils()->GetDaughter(1,label,GetReader(),pdg1,status1,ok,label1);
if(pdg1!=22 || pdg0 != 22)
{
}
// In what cells did the photons hit
- Float_t eta0 = photon0Kine.Eta();
- Float_t eta1 = photon1Kine.Eta();
+ Float_t eta0 = fMCDaughMom1.Eta();
+ Float_t eta1 = fMCDaughMom2.Eta();
- Float_t phi0 = photon0Kine.Phi();
- Float_t phi1 = photon1Kine.Phi();
+ Float_t phi0 = fMCDaughMom1.Phi();
+ Float_t phi1 = fMCDaughMom2.Phi();
// if((mass < 0.06 || mass > 1.8) && mcindex==kmcPi0 && noverlaps == 0)
// {
// printf("MC pi0 label %d E %2.2f, eta %2.2f, phi %2.2f, mass (ph1, ph2) %2.2f: \n \t photon0 label %d E %2.2f, eta %2.2f, phi %2.2f \n \t photon1 label %d E %2.2f eta %2.2f, phi %2.2f\n",
-// label , pi0Kine.E() , pi0Kine.Eta(),pi0Kine.Phi()*TMath::RadToDeg(), (photon0Kine+photon1Kine).M(),
-// label0, photon0Kine.E(), eta0, phi0*TMath::RadToDeg(),
-// label1, photon1Kine.E(), eta1, phi1*TMath::RadToDeg());
+// label , fPrimaryMom.E() , fPrimaryMom.Eta(),fPrimaryMom.Phi()*TMath::RadToDeg(), (fMCDaughMom1+fMCDaughMom2).M(),
+// label0, fMCDaughMom1.E(), eta0, phi0*TMath::RadToDeg(),
+// label1, fMCDaughMom2.E(), eta1, phi1*TMath::RadToDeg());
//
// TLorentzVector momclus;
// cluster->GetMomentum(momclus,GetVertex(0));
// printf("Photon1 (eta,phi)=(%f,%f); Photon2 (eta,phi)=(%f,%f);\n",eta0,phi0*TMath::RadToDeg(),eta1,phi1*TMath::RadToDeg());
//
// Int_t ieta0=-1; Int_t iphi0 = 0; Int_t rcu0 = 0;
-// Int_t sm0 = GetModuleNumberCellIndexes(absId0,fCalorimeter, ieta0, iphi0, rcu0);
+// Int_t sm0 = GetModuleNumberCellIndexes(absId0,GetCalorimeter(), ieta0, iphi0, rcu0);
// Int_t ieta1=-1; Int_t iphi1 = 0; Int_t rcu1 = 0;
-// Int_t sm1 = GetModuleNumberCellIndexes(absId1,fCalorimeter, ieta1, iphi1, rcu1);
+// Int_t sm1 = GetModuleNumberCellIndexes(absId1,GetCalorimeter(), ieta1, iphi1, rcu1);
//
// printf("Photon1 (id,sm,eta,phi)=(%d,%d,%d,%d), Photon2 (id,sm,eta,phi)=(%d,%d,%d,%d)\n",
// absId0,sm0,ieta0,iphi0,absId1,sm1,ieta1,iphi1);
//
// Int_t ietam0=-1; Int_t iphim0 = 0; Int_t rcum0 = 0; Int_t smm0 = -1 ;
-// if(imax >= 0) smm0 = GetModuleNumberCellIndexes(list[imax] ,fCalorimeter, ietam0, iphim0, rcum0);
+// if(imax >= 0) smm0 = GetModuleNumberCellIndexes(list[imax] ,GetCalorimeter(), ietam0, iphim0, rcum0);
// Int_t ietam1=-1; Int_t iphim1 = 0; Int_t rcum1 = 0; Int_t smm1 = -1 ;
-// if(imax2 >= 0) smm1 = GetModuleNumberCellIndexes(list[imax2],fCalorimeter, ietam1, iphim1, rcum1);
+// if(imax2 >= 0) smm1 = GetModuleNumberCellIndexes(list[imax2],GetCalorimeter(), ietam1, iphim1, rcum1);
//
// printf("Max (id, sm,eta,phi)=(%d,%d,%d,%d), Max2 (id, sm,eta,phi)=(%d,%d,%d,%d)\n",
// list[imax],smm0,ietam0,iphim0,list[imax2],smm1,ietam1,iphim1);
Int_t tmplabel = mclabel;
while((secLabel0 < 0 || secLabel1 < 0) && tmplabel > 0 )
{
- TLorentzVector mother = GetMCAnalysisUtils()->GetMother(tmplabel,GetReader(),secpdg,secstatus,secOK,secgrandLabel);
+ fPrimaryMom = GetMCAnalysisUtils()->GetMother(tmplabel,GetReader(),secpdg,secstatus,secOK,secgrandLabel);
//printf("\t \t while secLabel %d, mom %d, granmom %d\n",mclabel,tmplabel,secgrandLabel);
// Get the position of the found secondaries mother
if(!match0 && secLabel0 > 0)
{
- TLorentzVector mother = GetMCAnalysisUtils()->GetMother(secLabel0,GetReader(),secpdg,secstatus,secOK,secgrandLabel);
+ fPrimaryMom = GetMCAnalysisUtils()->GetMother(secLabel0,GetReader(),secpdg,secstatus,secOK,secgrandLabel);
- //Float_t eta = mother.Eta();
- //Float_t phi = mother.Phi();
+ //Float_t eta = fPrimaryMom.Eta();
+ //Float_t phi = fPrimaryMom.Phi();
//if(phi < 0 ) phi+=TMath::TwoPi();
//GetEMCALGeometry()->GetAbsCellIdFromEtaPhi(eta, phi, absId0second);
- //printf("Secondary MC0 label %d, absId %d E %2.2F eta %2.2f, phi %f\n", secLabel0,absId0second, mother.E(),mother.Eta(),mother.Phi()*TMath::RadToDeg());
+ //printf("Secondary MC0 label %d, absId %d E %2.2F eta %2.2f, phi %f\n", secLabel0,absId0second, fPrimaryMom.E(),fPrimaryMom.Eta(),fPrimaryMom.Phi()*TMath::RadToDeg());
if(absId0second == list[imax] ) { match0 = kTRUE ; imatch0 = imax ; }
if(absId0second == list[imax2]) { match0 = kTRUE ; imatch0 = imax2 ; }
if(!match1 && secLabel1 > 0)
{
- TLorentzVector mother = GetMCAnalysisUtils()->GetMother(secLabel1,GetReader(),secpdg,secstatus,secOK,secgrandLabel);
+ fPrimaryMom = GetMCAnalysisUtils()->GetMother(secLabel1,GetReader(),secpdg,secstatus,secOK,secgrandLabel);
- //Float_t eta = mother.Eta();
- //Float_t phi = mother.Phi();
+ //Float_t eta = fPrimaryMom.Eta();
+ //Float_t phi = fPrimaryMom.Phi();
//if(phi < 0 ) phi+=TMath::TwoPi();
//GetEMCALGeometry()->GetAbsCellIdFromEtaPhi(eta, phi, absId1second);
- //printf("Secondary MC1 label %d absId %d E %2.2F eta %2.2f, phi %f\n",secLabel1, absId1second, mother.E(),mother.Eta(),mother.Phi()*TMath::RadToDeg());
+ //printf("Secondary MC1 label %d absId %d E %2.2F eta %2.2f, phi %f\n",secLabel1, absId1second, fPrimaryMom.E(),fPrimaryMom.Eta(),fPrimaryMom.Phi()*TMath::RadToDeg());
if(absId1second == list[imax] ) { match1 = kTRUE ; imatch1 = imax ; }
if(absId1second == list[imax2]) { match1 = kTRUE ; imatch1 = imax2 ; }
fhMCPi0DecayPhotonHitHighLMMass[inlm]->Fill(en,mass);
if(match0 && imatch0 == imax)
{
- if(photon0Kine.E()>0)fhMCPi0DecayPhotonHitHighLMDiffELM1[inlm]->Fill(en,(e1-photon0Kine.E())/photon0Kine.E());
- if(photon1Kine.E()>0)fhMCPi0DecayPhotonHitHighLMDiffELM2[inlm]->Fill(en,(e2-photon1Kine.E())/photon1Kine.E());
- if(photon0Kine.E()>0)fhMCPi0DecayPhotonHitHighLMDiffELM1vsELM1[inlm]->Fill(e1,(e1-photon0Kine.E())/photon0Kine.E());
- if(photon1Kine.E()>0)fhMCPi0DecayPhotonHitHighLMDiffELM2vsELM2[inlm]->Fill(e2,(e2-photon1Kine.E())/photon1Kine.E());
+ if(fMCDaughMom1.E()>0)fhMCPi0DecayPhotonHitHighLMDiffELM1[inlm]->Fill(en,(e1-fMCDaughMom1.E())/fMCDaughMom1.E());
+ if(fMCDaughMom2.E()>0)fhMCPi0DecayPhotonHitHighLMDiffELM2[inlm]->Fill(en,(e2-fMCDaughMom2.E())/fMCDaughMom2.E());
+ if(fMCDaughMom1.E()>0)fhMCPi0DecayPhotonHitHighLMDiffELM1vsELM1[inlm]->Fill(e1,(e1-fMCDaughMom1.E())/fMCDaughMom1.E());
+ if(fMCDaughMom2.E()>0)fhMCPi0DecayPhotonHitHighLMDiffELM2vsELM2[inlm]->Fill(e2,(e2-fMCDaughMom2.E())/fMCDaughMom2.E());
}
else
{
- if(photon1Kine.E()>0)fhMCPi0DecayPhotonHitHighLMDiffELM1[inlm]->Fill(en,(e1-photon1Kine.E())/photon1Kine.E());
- if(photon0Kine.E()>0)fhMCPi0DecayPhotonHitHighLMDiffELM2[inlm]->Fill(en,(e2-photon0Kine.E())/photon0Kine.E());
- if(photon1Kine.E()>0)fhMCPi0DecayPhotonHitHighLMDiffELM1vsELM1[inlm]->Fill(e1,(e1-photon1Kine.E())/photon1Kine.E());
- if(photon0Kine.E()>0)fhMCPi0DecayPhotonHitHighLMDiffELM2vsELM2[inlm]->Fill(e2,(e2-photon0Kine.E())/photon0Kine.E());
+ if(fMCDaughMom2.E()>0)fhMCPi0DecayPhotonHitHighLMDiffELM1[inlm]->Fill(en,(e1-fMCDaughMom2.E())/fMCDaughMom2.E());
+ if(fMCDaughMom1.E()>0)fhMCPi0DecayPhotonHitHighLMDiffELM2[inlm]->Fill(en,(e2-fMCDaughMom1.E())/fMCDaughMom1.E());
+ if(fMCDaughMom2.E()>0)fhMCPi0DecayPhotonHitHighLMDiffELM1vsELM1[inlm]->Fill(e1,(e1-fMCDaughMom2.E())/fMCDaughMom2.E());
+ if(fMCDaughMom1.E()>0)fhMCPi0DecayPhotonHitHighLMDiffELM2vsELM2[inlm]->Fill(e2,(e2-fMCDaughMom1.E())/fMCDaughMom1.E());
}
}
else
fhMCPi0DecayPhotonHitHighLMOverlapMass[inlm]->Fill(en,mass);
if(match0 && imatch0 == imax )
{
- if(photon0Kine.E()>0)fhMCPi0DecayPhotonHitHighLMOverlapDiffELM1[inlm]->Fill(en,(e1-photon0Kine.E())/photon0Kine.E());
- if(photon1Kine.E()>0)fhMCPi0DecayPhotonHitHighLMOverlapDiffELM2[inlm]->Fill(en,(e2-photon1Kine.E())/photon1Kine.E());
- if(photon0Kine.E()>0)fhMCPi0DecayPhotonHitHighLMOverlapDiffELM1vsELM1[inlm]->Fill(e1,(e1-photon0Kine.E())/photon0Kine.E());
- if(photon1Kine.E()>0)fhMCPi0DecayPhotonHitHighLMOverlapDiffELM2vsELM2[inlm]->Fill(e2,(e2-photon1Kine.E())/photon1Kine.E());
+ if(fMCDaughMom1.E()>0)fhMCPi0DecayPhotonHitHighLMOverlapDiffELM1[inlm]->Fill(en,(e1-fMCDaughMom1.E())/fMCDaughMom1.E());
+ if(fMCDaughMom2.E()>0)fhMCPi0DecayPhotonHitHighLMOverlapDiffELM2[inlm]->Fill(en,(e2-fMCDaughMom2.E())/fMCDaughMom2.E());
+ if(fMCDaughMom1.E()>0)fhMCPi0DecayPhotonHitHighLMOverlapDiffELM1vsELM1[inlm]->Fill(e1,(e1-fMCDaughMom1.E())/fMCDaughMom1.E());
+ if(fMCDaughMom2.E()>0)fhMCPi0DecayPhotonHitHighLMOverlapDiffELM2vsELM2[inlm]->Fill(e2,(e2-fMCDaughMom2.E())/fMCDaughMom2.E());
}
else
{
- if(photon1Kine.E()>0)fhMCPi0DecayPhotonHitHighLMOverlapDiffELM1[inlm]->Fill(en,(e1-photon1Kine.E())/photon1Kine.E());
- if(photon0Kine.E()>0)fhMCPi0DecayPhotonHitHighLMOverlapDiffELM2[inlm]->Fill(en,(e2-photon0Kine.E())/photon0Kine.E());
- if(photon1Kine.E()>0)fhMCPi0DecayPhotonHitHighLMOverlapDiffELM1vsELM1[inlm]->Fill(e1,(e1-photon1Kine.E())/photon1Kine.E());
- if(photon0Kine.E()>0)fhMCPi0DecayPhotonHitHighLMOverlapDiffELM2vsELM2[inlm]->Fill(e2,(e2-photon0Kine.E())/photon0Kine.E());
+ if(fMCDaughMom2.E()>0)fhMCPi0DecayPhotonHitHighLMOverlapDiffELM1[inlm]->Fill(en,(e1-fMCDaughMom2.E())/fMCDaughMom2.E());
+ if(fMCDaughMom1.E()>0)fhMCPi0DecayPhotonHitHighLMOverlapDiffELM2[inlm]->Fill(en,(e2-fMCDaughMom1.E())/fMCDaughMom1.E());
+ if(fMCDaughMom2.E()>0)fhMCPi0DecayPhotonHitHighLMOverlapDiffELM1vsELM1[inlm]->Fill(e1,(e1-fMCDaughMom2.E())/fMCDaughMom2.E());
+ if(fMCDaughMom1.E()>0)fhMCPi0DecayPhotonHitHighLMOverlapDiffELM2vsELM2[inlm]->Fill(e2,(e2-fMCDaughMom1.E())/fMCDaughMom1.E());
}
}
if(!match0)
{
- if(imatch1!=imax && GetCaloUtils()->AreNeighbours(fCalorimeter,absId0,list[imax])) { match0 = kTRUE; imatch0 = imax ; }
+ if(imatch1!=imax && GetCaloUtils()->AreNeighbours(GetCalorimeter(),absId0,list[imax])) { match0 = kTRUE; imatch0 = imax ; }
//printf("imax - match0? (%d-%d)=%d, (%d-%d)=%d\n",ieta0,ietam0,ieta0-ietam0, iphi0,iphim0,iphi0-iphim0);
- if(imatch1!=imax2 && GetCaloUtils()->AreNeighbours(fCalorimeter,absId0,list[imax2]) ) { match0 = kTRUE; imatch0 = imax2 ; }
+ if(imatch1!=imax2 && GetCaloUtils()->AreNeighbours(GetCalorimeter(),absId0,list[imax2]) ) { match0 = kTRUE; imatch0 = imax2 ; }
//printf("imax2 - match0? (%d-%d)=%d, (%d-%d)=%d\n",ieta0,ietam1,ieta0-ietam1, iphi0,iphim1,iphi0-iphim1);
}
if(!match1)
{
- if(imatch0!=imax && GetCaloUtils()->AreNeighbours(fCalorimeter,absId1,list[imax]) ) { match1 = kTRUE; imatch1 = imax ; }
+ if(imatch0!=imax && GetCaloUtils()->AreNeighbours(GetCalorimeter(),absId1,list[imax]) ) { match1 = kTRUE; imatch1 = imax ; }
//printf("imax - match1? (%d-%d)=%d, (%d-%d)=%d\n",ieta1,ietam0,ieta1-ietam0, iphi1,iphim0,iphi1-iphim0);
- if(imatch0!=imax2 && GetCaloUtils()->AreNeighbours(fCalorimeter,absId1,list[imax2])) { match1 = kTRUE; imatch1 = imax2 ; }
+ if(imatch0!=imax2 && GetCaloUtils()->AreNeighbours(GetCalorimeter(),absId1,list[imax2])) { match1 = kTRUE; imatch1 = imax2 ; }
//printf("imax2 - match1? (%d-%d)=%d, (%d-%d)=%d\n",ieta1,ietam1,ieta1-ietam1, iphi1,iphim1,iphi1-iphim1);
}
if(match0 && imatch0 == imax)
{
- if(photon0Kine.E()>0)fhMCPi0DecayPhotonAdjHighLMDiffELM1[inlm]->Fill(en,(e1-photon0Kine.E())/photon0Kine.E());
- if(photon1Kine.E()>0)fhMCPi0DecayPhotonAdjHighLMDiffELM2[inlm]->Fill(en,(e2-photon1Kine.E())/photon1Kine.E());
- if(photon0Kine.E()>0)fhMCPi0DecayPhotonAdjHighLMDiffELM1vsELM1[inlm]->Fill(e1,(e1-photon0Kine.E())/photon0Kine.E());
- if(photon1Kine.E()>0)fhMCPi0DecayPhotonAdjHighLMDiffELM2vsELM2[inlm]->Fill(e2,(e2-photon1Kine.E())/photon1Kine.E());
+ if(fMCDaughMom1.E()>0)fhMCPi0DecayPhotonAdjHighLMDiffELM1[inlm]->Fill(en,(e1-fMCDaughMom1.E())/fMCDaughMom1.E());
+ if(fMCDaughMom2.E()>0)fhMCPi0DecayPhotonAdjHighLMDiffELM2[inlm]->Fill(en,(e2-fMCDaughMom2.E())/fMCDaughMom2.E());
+ if(fMCDaughMom1.E()>0)fhMCPi0DecayPhotonAdjHighLMDiffELM1vsELM1[inlm]->Fill(e1,(e1-fMCDaughMom1.E())/fMCDaughMom1.E());
+ if(fMCDaughMom2.E()>0)fhMCPi0DecayPhotonAdjHighLMDiffELM2vsELM2[inlm]->Fill(e2,(e2-fMCDaughMom2.E())/fMCDaughMom2.E());
}
else
{
- if(photon1Kine.E()>0)fhMCPi0DecayPhotonAdjHighLMDiffELM1[inlm]->Fill(en,(e1-photon1Kine.E())/photon1Kine.E());
- if(photon0Kine.E()>0)fhMCPi0DecayPhotonAdjHighLMDiffELM2[inlm]->Fill(en,(e2-photon0Kine.E())/photon0Kine.E());
- if(photon1Kine.E()>0)fhMCPi0DecayPhotonAdjHighLMDiffELM1vsELM1[inlm]->Fill(e1,(e1-photon1Kine.E())/photon1Kine.E());
- if(photon0Kine.E()>0)fhMCPi0DecayPhotonAdjHighLMDiffELM2vsELM2[inlm]->Fill(e2,(e2-photon0Kine.E())/photon0Kine.E());
+ if(fMCDaughMom2.E()>0)fhMCPi0DecayPhotonAdjHighLMDiffELM1[inlm]->Fill(en,(e1-fMCDaughMom2.E())/fMCDaughMom2.E());
+ if(fMCDaughMom1.E()>0)fhMCPi0DecayPhotonAdjHighLMDiffELM2[inlm]->Fill(en,(e2-fMCDaughMom1.E())/fMCDaughMom1.E());
+ if(fMCDaughMom2.E()>0)fhMCPi0DecayPhotonAdjHighLMDiffELM1vsELM1[inlm]->Fill(e1,(e1-fMCDaughMom2.E())/fMCDaughMom2.E());
+ if(fMCDaughMom1.E()>0)fhMCPi0DecayPhotonAdjHighLMDiffELM2vsELM2[inlm]->Fill(e2,(e2-fMCDaughMom1.E())/fMCDaughMom1.E());
}
}
else
fhMCPi0DecayPhotonAdjHighLMOverlapMass[inlm]->Fill(en,mass);
if(match0 && imatch0 == imax)
{
- if(photon0Kine.E()>0)fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM1[inlm]->Fill(en,(e1-photon0Kine.E())/photon0Kine.E());
- if(photon1Kine.E()>0)fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM2[inlm]->Fill(en,(e2-photon1Kine.E())/photon1Kine.E());
- if(photon0Kine.E()>0)fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM1vsELM1[inlm]->Fill(e1,(e1-photon0Kine.E())/photon0Kine.E());
- if(photon1Kine.E()>0)fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM2vsELM2[inlm]->Fill(e2,(e2-photon1Kine.E())/photon1Kine.E());
+ if(fMCDaughMom1.E()>0)fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM1[inlm]->Fill(en,(e1-fMCDaughMom1.E())/fMCDaughMom1.E());
+ if(fMCDaughMom2.E()>0)fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM2[inlm]->Fill(en,(e2-fMCDaughMom2.E())/fMCDaughMom2.E());
+ if(fMCDaughMom1.E()>0)fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM1vsELM1[inlm]->Fill(e1,(e1-fMCDaughMom1.E())/fMCDaughMom1.E());
+ if(fMCDaughMom2.E()>0)fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM2vsELM2[inlm]->Fill(e2,(e2-fMCDaughMom2.E())/fMCDaughMom2.E());
}
else
{
- if(photon1Kine.E()>0)fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM1[inlm]->Fill(en,(e1-photon1Kine.E())/photon1Kine.E());
- if(photon0Kine.E()>0)fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM2[inlm]->Fill(en,(e2-photon0Kine.E())/photon0Kine.E());
- if(photon1Kine.E()>0)fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM1vsELM1[inlm]->Fill(e1,(e1-photon1Kine.E())/photon1Kine.E());
- if(photon0Kine.E()>0)fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM2vsELM2[inlm]->Fill(e2,(e2-photon0Kine.E())/photon0Kine.E());
+ if(fMCDaughMom2.E()>0)fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM1[inlm]->Fill(en,(e1-fMCDaughMom2.E())/fMCDaughMom2.E());
+ if(fMCDaughMom1.E()>0)fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM2[inlm]->Fill(en,(e2-fMCDaughMom1.E())/fMCDaughMom1.E());
+ if(fMCDaughMom2.E()>0)fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM1vsELM1[inlm]->Fill(e1,(e1-fMCDaughMom2.E())/fMCDaughMom2.E());
+ if(fMCDaughMom1.E()>0)fhMCPi0DecayPhotonAdjHighLMOverlapDiffELM2vsELM2[inlm]->Fill(e2,(e2-fMCDaughMom1.E())/fMCDaughMom1.E());
}
}
// Decay photon cells are adjacent?
- if( (match0 || match1) && GetCaloUtils()->AreNeighbours(fCalorimeter,absId0,absId1) )
+ if( (match0 || match1) && GetCaloUtils()->AreNeighbours(GetCalorimeter(),absId0,absId1) )
{
// if((mass < 0.06 || mass > 1.8) && mcindex==kmcPi0 && noverlaps == 0)
// printf("c) Both Photons hit a local maxima and in adjacent cells \n");
fhMCPi0DecayPhotonHitOtherLMMass[inlm]->Fill(en,mass);
if(match0 && imatch0 == imax)
{
- if(photon0Kine.E()>0)fhMCPi0DecayPhotonHitOtherLMDiffELM1[inlm]->Fill(en,(e1-photon0Kine.E())/photon0Kine.E());
- if(photon1Kine.E()>0)fhMCPi0DecayPhotonHitOtherLMDiffELM2[inlm]->Fill(en,(e2-photon1Kine.E())/photon1Kine.E());
+ if(fMCDaughMom1.E()>0)fhMCPi0DecayPhotonHitOtherLMDiffELM1[inlm]->Fill(en,(e1-fMCDaughMom1.E())/fMCDaughMom1.E());
+ if(fMCDaughMom2.E()>0)fhMCPi0DecayPhotonHitOtherLMDiffELM2[inlm]->Fill(en,(e2-fMCDaughMom2.E())/fMCDaughMom2.E());
}
else
{
- if(photon1Kine.E()>0)fhMCPi0DecayPhotonHitOtherLMDiffELM1[inlm]->Fill(en,(e1-photon1Kine.E())/photon1Kine.E());
- if(photon0Kine.E()>0)fhMCPi0DecayPhotonHitOtherLMDiffELM2[inlm]->Fill(en,(e2-photon0Kine.E())/photon0Kine.E());
+ if(fMCDaughMom2.E()>0)fhMCPi0DecayPhotonHitOtherLMDiffELM1[inlm]->Fill(en,(e1-fMCDaughMom2.E())/fMCDaughMom2.E());
+ if(fMCDaughMom1.E()>0)fhMCPi0DecayPhotonHitOtherLMDiffELM2[inlm]->Fill(en,(e2-fMCDaughMom1.E())/fMCDaughMom1.E());
}
}
else
fhMCPi0DecayPhotonHitOtherLMMass[inlm]->Fill(en,mass);
if(match0 && imatch0 == imax)
{
- if(photon0Kine.E()>0)fhMCPi0DecayPhotonHitOtherLMOverlapDiffELM1[inlm]->Fill(en,(e1-photon0Kine.E())/photon0Kine.E());
- if(photon1Kine.E()>0)fhMCPi0DecayPhotonHitOtherLMOverlapDiffELM2[inlm]->Fill(en,(e2-photon1Kine.E())/photon1Kine.E());
+ if(fMCDaughMom1.E()>0)fhMCPi0DecayPhotonHitOtherLMOverlapDiffELM1[inlm]->Fill(en,(e1-fMCDaughMom1.E())/fMCDaughMom1.E());
+ if(fMCDaughMom2.E()>0)fhMCPi0DecayPhotonHitOtherLMOverlapDiffELM2[inlm]->Fill(en,(e2-fMCDaughMom2.E())/fMCDaughMom2.E());
}
else
{
- if(photon1Kine.E()>0)fhMCPi0DecayPhotonHitOtherLMOverlapDiffELM1[inlm]->Fill(en,(e1-photon1Kine.E())/photon1Kine.E());
- if(photon0Kine.E()>0)fhMCPi0DecayPhotonHitOtherLMOverlapDiffELM2[inlm]->Fill(en,(e2-photon0Kine.E())/photon0Kine.E());
+ if(fMCDaughMom2.E()>0)fhMCPi0DecayPhotonHitOtherLMOverlapDiffELM1[inlm]->Fill(en,(e1-fMCDaughMom2.E())/fMCDaughMom2.E());
+ if(fMCDaughMom1.E()>0)fhMCPi0DecayPhotonHitOtherLMOverlapDiffELM2[inlm]->Fill(en,(e2-fMCDaughMom1.E())/fMCDaughMom1.E());
}
}
for(Int_t i = 0; i < nmaxima; i++)
{
Int_t ieta=-1; Int_t iphi = 0; Int_t rcu = 0;
- GetModuleNumberCellIndexes(list[i] ,fCalorimeter, ieta, iphi, rcu);
+ GetModuleNumberCellIndexes(list[i] ,GetCalorimeter(), ieta, iphi, rcu);
//printf(" Other Max (eta,phi)=(%d,%d)\n",ieta,iphi);
- if(GetCaloUtils()->AreNeighbours(fCalorimeter,absId1,list[i]) ) adjacentOther1 = kTRUE;
+ if(GetCaloUtils()->AreNeighbours(GetCalorimeter(),absId1,list[i]) ) adjacentOther1 = kTRUE;
//printf("Other Maxima: adjacentOther1 %d\n",adjacentOther1);
}
for(Int_t i = 0; i < nmaxima; i++)
{
Int_t ieta=-1; Int_t iphi = 0; Int_t rcu = 0;
- GetModuleNumberCellIndexes(list[i] ,fCalorimeter, ieta, iphi, rcu);
+ GetModuleNumberCellIndexes(list[i] ,GetCalorimeter(), ieta, iphi, rcu);
//printf(" Other Max (eta,phi)=(%d,%d)\n",ieta,iphi);
- if(GetCaloUtils()->AreNeighbours(fCalorimeter,absId0,list[i]) ) adjacentOther0 = kTRUE;
+ if(GetCaloUtils()->AreNeighbours(GetCalorimeter(),absId0,list[i]) ) adjacentOther0 = kTRUE;
//printf("Other Maxima: adjacentOther0 %d\n",adjacentOther0);
}
fhMCPi0DecayPhotonAdjOtherLMMass[inlm]->Fill(en,mass);
if(match0 && imatch0 == imax)
{
- if(photon0Kine.E()>0)fhMCPi0DecayPhotonAdjOtherLMDiffELM1[inlm]->Fill(en,(e1-photon0Kine.E())/photon0Kine.E());
- if(photon1Kine.E()>0)fhMCPi0DecayPhotonAdjOtherLMDiffELM2[inlm]->Fill(en,(e2-photon1Kine.E())/photon1Kine.E());
+ if(fMCDaughMom1.E()>0)fhMCPi0DecayPhotonAdjOtherLMDiffELM1[inlm]->Fill(en,(e1-fMCDaughMom1.E())/fMCDaughMom1.E());
+ if(fMCDaughMom2.E()>0)fhMCPi0DecayPhotonAdjOtherLMDiffELM2[inlm]->Fill(en,(e2-fMCDaughMom2.E())/fMCDaughMom2.E());
}
else
{
- if(photon1Kine.E()>0)fhMCPi0DecayPhotonAdjOtherLMDiffELM1[inlm]->Fill(en,(e1-photon1Kine.E())/photon1Kine.E());
- if(photon0Kine.E()>0)fhMCPi0DecayPhotonAdjOtherLMDiffELM2[inlm]->Fill(en,(e2-photon0Kine.E())/photon0Kine.E());
+ if(fMCDaughMom2.E()>0)fhMCPi0DecayPhotonAdjOtherLMDiffELM1[inlm]->Fill(en,(e1-fMCDaughMom2.E())/fMCDaughMom2.E());
+ if(fMCDaughMom1.E()>0)fhMCPi0DecayPhotonAdjOtherLMDiffELM2[inlm]->Fill(en,(e2-fMCDaughMom1.E())/fMCDaughMom1.E());
}
}
else
fhMCPi0DecayPhotonAdjOtherLMOverlapMass[inlm]->Fill(en,mass);
if(match0 && imatch0 == imax)
{
- if(photon0Kine.E()>0)fhMCPi0DecayPhotonAdjOtherLMOverlapDiffELM1[inlm]->Fill(en,(e1-photon0Kine.E())/photon0Kine.E());
- if(photon1Kine.E()>0)fhMCPi0DecayPhotonAdjOtherLMOverlapDiffELM2[inlm]->Fill(en,(e2-photon1Kine.E())/photon1Kine.E());
+ if(fMCDaughMom1.E()>0)fhMCPi0DecayPhotonAdjOtherLMOverlapDiffELM1[inlm]->Fill(en,(e1-fMCDaughMom1.E())/fMCDaughMom1.E());
+ if(fMCDaughMom2.E()>0)fhMCPi0DecayPhotonAdjOtherLMOverlapDiffELM2[inlm]->Fill(en,(e2-fMCDaughMom2.E())/fMCDaughMom2.E());
}
else
{
- if(photon1Kine.E()>0)fhMCPi0DecayPhotonAdjOtherLMOverlapDiffELM1[inlm]->Fill(en,(e1-photon1Kine.E())/photon1Kine.E());
- if(photon0Kine.E()>0)fhMCPi0DecayPhotonAdjOtherLMOverlapDiffELM2[inlm]->Fill(en,(e2-photon0Kine.E())/photon0Kine.E());
+ if(fMCDaughMom2.E()>0)fhMCPi0DecayPhotonAdjOtherLMOverlapDiffELM1[inlm]->Fill(en,(e1-fMCDaughMom2.E())/fMCDaughMom2.E());
+ if(fMCDaughMom1.E()>0)fhMCPi0DecayPhotonAdjOtherLMOverlapDiffELM2[inlm]->Fill(en,(e2-fMCDaughMom1.E())/fMCDaughMom1.E());
}
}
//______________________________________________________________________________________________________________________
void AliAnaInsideClusterInvariantMass::FillArmenterosHistograms(Int_t nMax, Int_t ebin, Int_t mcIndex,
- Float_t en, TLorentzVector g1, TLorentzVector g2,
- Float_t m02, Int_t pid)
+ Float_t en, Float_t m02, Int_t pid)
{
// Fill Armeteros type histograms
// Get pTArm and AlphaArm
- TLorentzVector pi0 = g1+g2;
- Float_t momentumSquaredMother = pi0.P()*pi0.P();
+ fSubClusterMomSum = fSubClusterMom1+fSubClusterMom2;
+ Float_t momentumSquaredMother = fSubClusterMomSum.P()*fSubClusterMomSum.P();
Float_t momentumDaughter1AlongMother = 0.;
Float_t momentumDaughter2AlongMother = 0.;
if (momentumSquaredMother > 0.)
{
- momentumDaughter1AlongMother = (g1.Px()*pi0.Px() + g1.Py()*pi0.Py()+ g1.Pz()*pi0.Pz()) / sqrt(momentumSquaredMother);
- momentumDaughter2AlongMother = (g2.Px()*pi0.Px() + g2.Py()*pi0.Py()+ g2.Pz()*pi0.Pz()) / sqrt(momentumSquaredMother);
+ momentumDaughter1AlongMother = (fSubClusterMom1.Px()*fSubClusterMomSum.Px() + fSubClusterMom1.Py()*fSubClusterMomSum.Py()+ fSubClusterMom1.Pz()*fSubClusterMomSum.Pz()) / sqrt(momentumSquaredMother);
+ momentumDaughter2AlongMother = (fSubClusterMom2.Px()*fSubClusterMomSum.Px() + fSubClusterMom2.Py()*fSubClusterMomSum.Py()+ fSubClusterMom2.Pz()*fSubClusterMomSum.Pz()) / sqrt(momentumSquaredMother);
}
- Float_t momentumSquaredDaughter1 = g1.P()*g1.P();
+ Float_t momentumSquaredDaughter1 = fSubClusterMom1.P()*fSubClusterMom1.P();
Float_t ptArmSquared = momentumSquaredDaughter1 - momentumDaughter1AlongMother*momentumDaughter1AlongMother;
Float_t pTArm = 0.;
if(momentumDaughter1AlongMother +momentumDaughter2AlongMother > 0)
alphaArm = (momentumDaughter1AlongMother -momentumDaughter2AlongMother) / (momentumDaughter1AlongMother + momentumDaughter2AlongMother);
- Float_t asym = TMath::Abs( g1.Energy()-g2.Energy() )/( g1.Energy()+g2.Energy() ) ;
+ Float_t asym = TMath::Abs( fSubClusterMom1.Energy()-fSubClusterMom2.Energy() )/( fSubClusterMom1.Energy()+fSubClusterMom2.Energy() ) ;
if(GetDebug() > 2 ) Info("FillArmenterosHistograms()","E %f, alphaArm %f, pTArm %f\n",en,alphaArm,pTArm);
Int_t inlm = nMax-1;
if(inlm > 2 ) inlm = 2;
Float_t ensubcut = GetCaloPID()->GetSubClusterEnergyMinimum(inlm);
- if (ensubcut > 0.1 && ensubcut < g1.E() && ensubcut < g2.E() ) eCutOK = kTRUE;
+ if (ensubcut > 0.1 && ensubcut < fSubClusterMom1.E() && ensubcut < fSubClusterMom2.E() ) eCutOK = kTRUE;
else if(ensubcut < 0.1) eCutOK = kTRUE;
//______________________________________________________________________________________________________________
void AliAnaInsideClusterInvariantMass::FillThetaStarHistograms(Int_t nMax, Bool_t matched, Int_t mcIndex,
- Float_t en, TLorentzVector g1, TLorentzVector g2,
- Float_t m02, Int_t pid)
+ Float_t en, Float_t m02, Int_t pid)
{
// Fill cos Theta^star histograms
// Get cos Theta^star
- TLorentzVector pi0 = g1+g2;
- TLorentzVector g1Boost = g1;
- g1Boost.Boost(-pi0.BoostVector());
- Float_t cosThStar=TMath::Cos(g1Boost.Vect().Angle(pi0.Vect()));
+ fSubClusterMomSum = fSubClusterMom1+fSubClusterMom2;
+ fSubClusterMomBoost = fSubClusterMom1;
+ fSubClusterMomBoost.Boost(-fSubClusterMomSum.BoostVector());
+ Float_t cosThStar=TMath::Cos(fSubClusterMomBoost.Vect().Angle(fSubClusterMomSum.Vect()));
- Float_t asym = TMath::Abs( g1.Energy()-g2.Energy() )/( g1.Energy()+g2.Energy() ) ;
+ Float_t asym = TMath::Abs( fSubClusterMom1.Energy()-fSubClusterMom2.Energy() )/( fSubClusterMom1.Energy()+fSubClusterMom2.Energy() ) ;
Bool_t m02OK = GetCaloPID()->IsInPi0M02Range(en,m02,nMax);
Bool_t asyOK = GetCaloPID()->IsInPi0SplitAsymmetryRange(en,asym,nMax);
Int_t inlm = nMax-1;
if(inlm > 2 ) inlm = 2;
Float_t ensubcut = GetCaloPID()->GetSubClusterEnergyMinimum(inlm);
- if (ensubcut > 0.1 && ensubcut < g1.E() && ensubcut < g2.E() ) eCutOK = kTRUE;
+ if (ensubcut > 0.1 && ensubcut < fSubClusterMom1.E() && ensubcut < fSubClusterMom2.E() ) eCutOK = kTRUE;
else if(ensubcut < 0.1) eCutOK = kTRUE;
//printf("Reco cos %f, asy %f\n",cosThStar,asym);
Int_t nlm = 0;
Double_t mass = 0., angle = 0.;
- TLorentzVector lv1, lv2;
Int_t absId1 =-1; Int_t absId2 =-1;
Float_t distbad1 =-1; Float_t distbad2 =-1;
Bool_t fidcut1 = 0; Bool_t fidcut2 = 0;
pidTag = GetCaloPID()->GetIdentifiedParticleTypeFromClusterSplitting(clus,cells,GetCaloUtils(),
GetVertex(0), nlm, mass, angle,
- lv1,lv2,absId1,absId2,
+ fSubClusterMom1,fSubClusterMom2,absId1,absId2,
distbad1,distbad2,fidcut1,fidcut2);
if (nlm <= 0)
{
// Calculate weights and fill histograms
AliVCaloCells* cells = 0;
- if(fCalorimeter == "EMCAL") cells = GetEMCALCells();
+ if(GetCalorimeter() == kEMCAL) cells = GetEMCALCells();
else cells = GetPHOSCells();
// First recalculate energy in case non linearity was applied
//Get amplitude of main local maxima, recalibrate if needed
Float_t amp1 = cells->GetCellAmplitude(absId1);
- GetCaloUtils()->RecalibrateCellAmplitude(amp1,fCalorimeter, absId1);
+ GetCaloUtils()->RecalibrateCellAmplitude(amp1,GetCalorimeter(), absId1);
Float_t amp2 = cells->GetCellAmplitude(absId2);
- GetCaloUtils()->RecalibrateCellAmplitude(amp2,fCalorimeter, absId2);
+ GetCaloUtils()->RecalibrateCellAmplitude(amp2,GetCalorimeter(), absId2);
if(amp1 < amp2) Info("FillSSWeightHistograms","Bad local maxima E ordering : id1 E %f, id2 E %f\n ",amp1,amp2);
if(amp1==0 || amp2==0) Info("FillSSWeightHistograms","Null E local maxima : id1 E %f, id2 E %f\n " ,amp1,amp2);
//Recalibrate cell energy if needed
Float_t amp = cells->GetCellAmplitude(id);
- GetCaloUtils()->RecalibrateCellAmplitude(amp,fCalorimeter, id);
+ GetCaloUtils()->RecalibrateCellAmplitude(amp,GetCalorimeter(), id);
if(GetCaloUtils()->IsMCECellClusFracCorrectionOn())
{
//printf("eCell a) %f",amp);
}
//Recalculate shower shape for different W0
- if(fCalorimeter=="EMCAL")
+ if(GetCalorimeter()==kEMCAL)
{
Float_t l0org = clus->GetM02();
Float_t l1org = clus->GetM20();
snprintf(onePar,buffersize,"--- AliAnaInsideClusterInvariantMass ---\n") ;
parList+=onePar ;
- snprintf(onePar,buffersize,"Calorimeter: %s\n", fCalorimeter.Data()) ;
+ snprintf(onePar,buffersize,"Calorimeter: %s\n", GetCalorimeterString().Data()) ;
parList+=onePar ;
snprintf(onePar,buffersize,"fNLocMaxCutE =%2.2f \n", GetCaloUtils()->GetLocalMaximaCutE()) ;
parList+=onePar ;
// Assign mc index depending on MC bit set, to be used in histograms arrays
- tag = GetMCAnalysisUtils()->CheckOrigin(cluster->GetLabels(),cluster->GetNLabels(), GetReader());
+ tag = GetMCAnalysisUtils()->CheckOrigin(cluster->GetLabels(),cluster->GetNLabels(), GetReader(),GetCalorimeter());
if ( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPi0) &&
!GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCConversion)) mcindex = kmcPi0;
Bool_t ok = kFALSE;
Int_t mcLabel = cluster->GetLabel();
- TLorentzVector primary = GetMCAnalysisUtils()->GetMother(mcLabel,GetReader(),ok);
- eprim = primary.E();
+ fPrimaryMom = GetMCAnalysisUtils()->GetMother(mcLabel,GetReader(),ok);
+ eprim = fPrimaryMom.E();
Int_t mesonLabel = -1;
{
GetMCAnalysisUtils()->GetMCDecayAsymmetryAngleForPDG(mcLabel,111,GetReader(),asymGen,angleGen,ok);
asymGen = TMath::Abs(asymGen);
- TLorentzVector grandmom = GetMCAnalysisUtils()->GetMotherWithPDG(mcLabel,111,GetReader(),ok,mesonLabel);
- if(grandmom.E() > 0 && ok) eprim = grandmom.E();
+ fGrandMotherMom = GetMCAnalysisUtils()->GetMotherWithPDG(mcLabel,111,GetReader(),ok,mesonLabel);
+ if(fGrandMotherMom.E() > 0 && ok) eprim = fGrandMotherMom.E();
}
else
{
GetMCAnalysisUtils()->GetMCDecayAsymmetryAngleForPDG(mcLabel,221,GetReader(),asymGen,angleGen,ok);
asymGen = TMath::Abs(asymGen);
- TLorentzVector grandmom = GetMCAnalysisUtils()->GetMotherWithPDG(mcLabel,221,GetReader(),ok,mesonLabel);
- if(grandmom.E() > 0 && ok) eprim = grandmom.E();
+ fGrandMotherMom = GetMCAnalysisUtils()->GetMotherWithPDG(mcLabel,221,GetReader(),ok,mesonLabel);
+ if(fGrandMotherMom.E() > 0 && ok) eprim = fGrandMotherMom.E();
}
}
//Init
//Do some checks
- if(fCalorimeter == "PHOS" && !GetReader()->IsPHOSSwitchedOn() && NewOutputAOD())
+ 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!!\n");
}
- else if(fCalorimeter == "EMCAL" && !GetReader()->IsEMCALSwitchedOn() && NewOutputAOD())
+ 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!!\n");
}
//Initialize the parameters of the analysis.
AddToHistogramsName("AnaPi0InsideClusterInvariantMass_");
- fCalorimeter = "EMCAL" ;
-
fMinNCells = 4 ;
fMinBadDist = 2 ;
//__________________________________________________________________
void AliAnaInsideClusterInvariantMass::MakeAnalysisFillHistograms()
{
- //Search for pi0 in fCalorimeter with shower shape analysis
+ //Search for pi0 in GetCalorimeter() with shower shape analysis
TObjArray * pl = 0x0;
AliVCaloCells* cells = 0x0;
//Select the Calorimeter of the photon
- if(fCalorimeter == "PHOS")
+ if(GetCalorimeter() == kPHOS)
{
pl = GetPHOSClusters();
cells = GetPHOSCells();
}
- else if (fCalorimeter == "EMCAL")
+ else if (GetCalorimeter() == kEMCAL)
{
pl = GetEMCALClusters();
cells = GetEMCALCells();
if(!pl || !cells)
{
- Info("MakeAnalysisFillHistograms","TObjArray with %s clusters is NULL!\n",fCalorimeter.Data());
+ Info("MakeAnalysisFillHistograms","TObjArray with %s clusters is NULL!\n",GetCalorimeterString().Data());
return;
}
- if(fCalorimeter == "PHOS") return; // Not implemented for PHOS yet
+ if(GetCalorimeter() == kPHOS) return; // Not implemented for PHOS yet
for(Int_t icluster = 0; icluster < pl->GetEntriesFast(); icluster++)
{
// Get cluster angles
- TLorentzVector lv;
- cluster->GetMomentum(lv, GetVertex(0));
- Float_t eta = lv.Eta();
- Float_t phi = lv.Phi();
+ cluster->GetMomentum(fClusterMomentum, GetVertex(0));
+ Float_t eta = fClusterMomentum.Eta();
+ Float_t phi = fClusterMomentum.Phi();
if(phi<0) phi=+TMath::TwoPi();
//printf("en %2.2f, GetMinEnergy() %2.2f, GetMaxEnergy() %2.2f, nc %d, fMinNCells %d, bd %2.2f, fMinBadDist %2.2f\n",
Int_t nMax = 0;
Double_t mass = 0., angle = 0.;
- TLorentzVector lv1, lv2;
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 pidTag = GetCaloPID()->GetIdentifiedParticleTypeFromClusterSplitting(cluster,cells,GetCaloUtils(),
GetVertex(0), nMax, mass, angle,
- lv1,lv2,absId1,absId2,
- distbad1,distbad2,fidcut1,fidcut2);
+ fSubClusterMom1,fSubClusterMom2,
+ absId1,absId2,
+ distbad1,distbad2,
+ fidcut1,fidcut2);
if (nMax <= 0)
{
if(GetDebug() > 0 )
// Get sub-cluster parameters
- Float_t e1 = lv1.Energy();
- Float_t e2 = lv2.Energy();
+ Float_t e1 = fSubClusterMom1.Energy();
+ Float_t e2 = fSubClusterMom2.Energy();
Double_t tof1 = cells->GetCellTime(absId1);
- GetCaloUtils()->RecalibrateCellTime(tof1, fCalorimeter, absId1,GetReader()->GetInputEvent()->GetBunchCrossNumber());
+ GetCaloUtils()->RecalibrateCellTime(tof1, GetCalorimeter(), absId1,GetReader()->GetInputEvent()->GetBunchCrossNumber());
tof1*=1.e9;
Double_t tof2 = cells->GetCellTime(absId2);
- GetCaloUtils()->RecalibrateCellTime(tof2, fCalorimeter, absId2,GetReader()->GetInputEvent()->GetBunchCrossNumber());
+ GetCaloUtils()->RecalibrateCellTime(tof2, GetCalorimeter(), absId2,GetReader()->GetInputEvent()->GetBunchCrossNumber());
tof2*=1.e9;
Double_t t12diff = tof1-tof2;
FillAngleHistograms(nMax,matched,mcindex,en,e1,e2,angle,mass,angleGen,l0, asym,pidTag,noverlaps);
if(fFillArmenterosHisto && ebin >= 0)
- FillArmenterosHistograms(nMax, ebin, mcindex, en, lv1, lv2, l0, pidTag);
+ FillArmenterosHistograms(nMax, ebin, mcindex, en, l0, pidTag);
if(fFillThetaStarHisto)
- FillThetaStarHistograms(nMax,matched,mcindex, en, lv1, lv2, l0, pidTag);
+ FillThetaStarHistograms(nMax,matched,mcindex, en, l0, pidTag);
//---------------------------------------------------------------------
printf("**** Print %s %s ****\n", GetName(), GetTitle() ) ;
AliAnaCaloTrackCorrBaseClass::Print("");
- printf("Calorimeter = %s\n", fCalorimeter.Data()) ;
+ printf("Calorimeter = %s\n", GetCalorimeterString().Data()) ;
if(GetCaloUtils()) printf("Loc. Max. E > %2.2f\n", GetCaloUtils()->GetLocalMaximaCutE());
if(GetCaloUtils()) printf("Loc. Max. E Diff > %2.2f\n", GetCaloUtils()->GetLocalMaximaCutEDiff());
printf("Min. N Cells =%d \n", fMinNCells) ;