Skip to content

Commit

Permalink
Please consider the following formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alibuild committed Jun 9, 2024
1 parent d3a1836 commit b5f6e32
Showing 1 changed file with 47 additions and 47 deletions.
94 changes: 47 additions & 47 deletions PWGJE/Tasks/phiInJets.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ struct phiInJets {
Configurable<int> cfgnTOFPID{"cfgnTOFPID", 4, "nTOF PID"};
Configurable<float> cfgjetPtMin{"cfgjetPtMin", 5.0, "minimum jet pT cut"};
Configurable<float> cfgjetR{"cfgjetR", 0.4, "jet resolution parameter"};
Configurable<float> cfgVtxCut{"cfgVtxCut", 10.0, "V_z cut selection"};
Configurable<float> cfgVtxCut{"cfgVtxCut", 10.0, "V_z cut selection"};
Configurable<int> cDebugLevel{"cDebugLevel", 0, "Resolution of Debug"};
Configurable<bool> cfgBR{"cfgBR", false, "Forces Gen. Charged BR Only"};
Configurable<bool> cfgBR{"cfgBR", false, "Forces Gen. Charged BR Only"};
// CONFIG DONE
///////////////////////////////////////// //INIT

Expand All @@ -108,9 +108,9 @@ struct phiInJets {
JEhistos.add("ptJEHistogramPhi_JetTrigger", "ptJEHistogramPhi_JetTrigger", kTH1F, {PtAxis});
JEhistos.add("minvJEHistogramPhi", "minvJEHistogramPhi", kTH1F, {MinvAxis});

JEhistos.add("Resp_Matrix", "Resp_Matrix", HistType::kTHnSparseD , {PtAxis,axisPt,PtAxis,axisPt});//REC(Phi,Jet), GEN(Phi,Jet)
JEhistos.add("Resp_Matrix_MATCHED", "Resp_Matrix_MATCHED", HistType::kTHnSparseD , {PtAxis,axisPt,PtAxis,axisPt});//REC(Phi,Jet), GEN(Phi,Jet)
JEhistos.add("Resp_Matrix", "Resp_Matrix", HistType::kTHnSparseD, {PtAxis, axisPt, PtAxis, axisPt}); // REC(Phi,Jet), GEN(Phi,Jet)
JEhistos.add("Resp_Matrix_MATCHED", "Resp_Matrix_MATCHED", HistType::kTHnSparseD, {PtAxis, axisPt, PtAxis, axisPt}); // REC(Phi,Jet), GEN(Phi,Jet)

JEhistos.add("ptGeneratedPion", "ptGeneratedPion", kTH1F, {PtAxis});
JEhistos.add("ptGeneratedKaon", "ptGeneratedKaon", kTH1F, {PtAxis});
JEhistos.add("ptGeneratedProton", "ptGeneratedProton", kTH1F, {PtAxis});
Expand Down Expand Up @@ -701,8 +701,8 @@ struct phiInJets {
JEhistos.fill(HIST("nEvents_MCGen"), 2.5);

// Check pikp and phi
for (const auto& mcParticle : mcParticles) {
if (mcParticle.isPhysicalPrimary() && fabs(mcParticle.eta()) <= cfgtrkMaxEta) { // watch out for context!!!
for (const auto& mcParticle : mcParticles) {
if (mcParticle.isPhysicalPrimary() && fabs(mcParticle.eta()) <= cfgtrkMaxEta) { // watch out for context!!!
if (abs(mcParticle.pdgCode()) == 211)
JEhistos.fill(HIST("ptGeneratedPion"), mcParticle.pt());
if (abs(mcParticle.pdgCode()) == 321)
Expand All @@ -714,20 +714,20 @@ struct phiInJets {
TLorentzVector lResonance;
lResonance.SetPxPyPzE(mcParticle.px(), mcParticle.py(), mcParticle.pz(), mcParticle.e());
if (abs(mcParticle.pdgCode()) == 333) {
JEhistos.fill(HIST("ptGeneratedPhi_ALLBR"), mcParticle.pt());
bool skip =false;
//First we check for Forced BR
if(mcParticle.has_daughters())
for (auto& dgth : mcParticle.daughters_as<aod::JMcParticles>())
if(fabs(dgth.pdgCode())!= 321)
skip=true;

if(skip && cfgBR)
continue;
JEhistos.fill(HIST("ptGeneratedPhi"), mcParticle.pt());
JEhistos.fill(HIST("ptGeneratedPhi_ALLBR"), mcParticle.pt());

bool skip = false;
// First we check for Forced BR
if (mcParticle.has_daughters())
for (auto& dgth : mcParticle.daughters_as<aod::JMcParticles>())
if (fabs(dgth.pdgCode()) != 321)
skip = true;

if (skip && cfgBR)
continue;
JEhistos.fill(HIST("ptGeneratedPhi"), mcParticle.pt());
JEhistos.fill(HIST("mGeneratedPhi"), lResonance.M());

////////////////////////////Implementation of phi finding

TLorentzVector lResonance;
Expand Down Expand Up @@ -863,15 +863,15 @@ struct phiInJets {
continue;

if (fabs(mcParticle.pdgCode()) == 333) {
bool skip =false;
//First we check for Forced BR
if(mcParticle.has_daughters())
for (auto& dgth : mcParticle.daughters_as<aod::JMcParticles>())
if(fabs(dgth.pdgCode())!= 321)
skip=true;

if(skip && cfgBR)
continue;
bool skip = false;
// First we check for Forced BR
if (mcParticle.has_daughters())
for (auto& dgth : mcParticle.daughters_as<aod::JMcParticles>())
if (fabs(dgth.pdgCode()) != 321)
skip = true;

if (skip && cfgBR)
continue;
TLorentzVector lResonance;
lResonance.SetPxPyPzE(mcParticle.px(), mcParticle.py(), mcParticle.pz(), mcParticle.e());
bool jetFlag = false;
Expand All @@ -888,7 +888,7 @@ struct phiInJets {
if (lResonance.Pt() > 2.0 && lResonance.Pt() < 3)
JEhistos.fill(HIST("hMCTrue_hUSS_INSIDE_1D_2_3"), lResonance.M());
JEhistos.fill(HIST("hMCTrue_hUSS_INSIDE"), 1.0, lResonance.Pt(), lResonance.M());

} else if (!jetFlag && mcp_pt.size() > 0) {
JEhistos.fill(HIST("hMCTrue_hUSS_OUTSIDE_TRIG_1D"), lResonance.M());

Expand Down Expand Up @@ -1003,20 +1003,20 @@ struct phiInJets {

std::vector<int> mothers1{};
std::vector<int> mothers1PDG{};
std::vector<int> mothers1Pt{};
std::vector<int> mothers1Pt{};
for (auto& part1_mom : part1.mothers_as<aod::McParticles>()) {
mothers1.push_back(part1_mom.globalIndex());
mothers1PDG.push_back(part1_mom.pdgCode());
mothers1Pt.push_back(part1_mom.pt());
mothers1Pt.push_back(part1_mom.pt());
}

std::vector<int> mothers2{};
std::vector<int> mothers2PDG{};
std::vector<int> mothers2Pt{};
std::vector<int> mothers2Pt{};
for (auto& part2_mom : part2.mothers_as<aod::McParticles>()) {
mothers2.push_back(part2_mom.globalIndex());
mothers2PDG.push_back(part2_mom.pdgCode());
mothers2Pt.push_back(part2_mom.pt());
mothers2Pt.push_back(part2_mom.pt());
}
if (mothers1PDG[0] != 333)
continue; // mother not phi
Expand All @@ -1040,21 +1040,21 @@ struct phiInJets {
double R = TMath::Sqrt((etadiff * etadiff) + (phidiff * phidiff));
if (R < cfgjetR)
jetFlag = true;
if(jetFlag){ //Fill Resp. Matrix
if(cDebugLevel > 0 ){
std::cout<<"******************************************"<<std::endl;
std::cout<<"Rec. Phi Pt: "<<lResonance.Pt()<<std::endl;
std::cout<<"Rec. Jet Pt: "<<mcd_pt[i]<<std::endl;
std::cout<<"Gen. Phi Pt: "<<mothers1Pt[0]<<std::endl;
std::cout<<"Gen. Jet Pt: "<<mcp_pt[i]<<std::endl;
std::cout<<"******************************************"<<std::endl;
}
JEhistos.fill(HIST("Resp_Matrix_MATCHED"), lResonance.Pt(), mcd_pt[i], mothers1Pt[0], mcp_pt[i]);
}

if (jetFlag) { // Fill Resp. Matrix
if (cDebugLevel > 0) {
std::cout << "******************************************" << std::endl;
std::cout << "Rec. Phi Pt: " << lResonance.Pt() << std::endl;
std::cout << "Rec. Jet Pt: " << mcd_pt[i] << std::endl;
std::cout << "Gen. Phi Pt: " << mothers1Pt[0] << std::endl;
std::cout << "Gen. Jet Pt: " << mcp_pt[i] << std::endl;
std::cout << "******************************************" << std::endl;
}
JEhistos.fill(HIST("Resp_Matrix_MATCHED"), lResonance.Pt(), mcd_pt[i], mothers1Pt[0], mcp_pt[i]);
}
}

if (jetFlag) {
if (jetFlag) {
JEhistos.fill(HIST("hMCRec_hUSS_INSIDE_1D"), lResonance.M());
if (lResonance.Pt() > 2.0 && lResonance.Pt() < 3)
JEhistos.fill(HIST("hMCRec_hUSS_INSIDE_1D_2_3"), lResonance.M());
Expand Down

0 comments on commit b5f6e32

Please sign in to comment.