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 )
// {
// 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));
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 && 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());
}
}
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());
}
}
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(GetCalorimeter() == "EMCAL") cells = GetEMCALCells();
+ if(GetCalorimeter() == kEMCAL) cells = GetEMCALCells();
else cells = GetPHOSCells();
// First recalculate energy in case non linearity was applied
}
//Recalculate shower shape for different W0
- if(GetCalorimeter()=="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", GetCalorimeter().Data()) ;
+ snprintf(onePar,buffersize,"Calorimeter: %s\n", GetCalorimeterString().Data()) ;
parList+=onePar ;
snprintf(onePar,buffersize,"fNLocMaxCutE =%2.2f \n", GetCaloUtils()->GetLocalMaximaCutE()) ;
parList+=onePar ;
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(GetCalorimeter() == "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(GetCalorimeter() == "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");
}
AliVCaloCells* cells = 0x0;
//Select the Calorimeter of the photon
- if(GetCalorimeter() == "PHOS")
+ if(GetCalorimeter() == kPHOS)
{
pl = GetPHOSClusters();
cells = GetPHOSCells();
}
- else if (GetCalorimeter() == "EMCAL")
+ else if (GetCalorimeter() == kEMCAL)
{
pl = GetEMCALClusters();
cells = GetEMCALCells();
if(!pl || !cells)
{
- Info("MakeAnalysisFillHistograms","TObjArray with %s clusters is NULL!\n",GetCalorimeter().Data());
+ Info("MakeAnalysisFillHistograms","TObjArray with %s clusters is NULL!\n",GetCalorimeterString().Data());
return;
}
- if(GetCalorimeter() == "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, GetCalorimeter(), absId1,GetReader()->GetInputEvent()->GetBunchCrossNumber());
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", GetCalorimeter().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) ;