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 May 9, 2024
1 parent da169da commit fb8a235
Showing 1 changed file with 26 additions and 31 deletions.
57 changes: 26 additions & 31 deletions PWGJE/Tasks/phiInJets.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ struct phiInJets {
JEhistos.add("nEvents_MCGen", "nEvents_MCGen", kTH1F, {{4, 0.0, 4.0}});
JEhistos.add("nEvents_MCRec_MATCHED", "nEvents_MCRec_MATCHED", kTH1F, {{4, 0.0, 4.0}});
JEhistos.add("nEvents_MCGen_MATCHED", "nEvents_MCGen_MATCHED", kTH1F, {{4, 0.0, 4.0}});
JEhistos.add("JetVsPhi_GEN","JetVsPhi_GEN",kTH2F,{{4000, 0., 200.},{200, 0, 20.0}});
JEhistos.add("JetVsPhi_REC","JetVsPhi_REC",kTH2F,{{4000, 0., 200.},{200, 0, 20.0}});

JEhistos.add("JetVsPhi_GEN", "JetVsPhi_GEN", kTH2F, {{4000, 0., 200.}, {200, 0, 20.0}});
JEhistos.add("JetVsPhi_REC", "JetVsPhi_REC", kTH2F, {{4000, 0., 200.}, {200, 0, 20.0}});

JEhistos.add("nJetsPerEvent", "nJetsPerEvent", kTH1F, {{10, 0.0, 10.0}});

JEhistos.add("hDCArToPv", "DCArToPv", kTH1F, {{300, 0.0, 3.0}});
Expand Down Expand Up @@ -462,7 +462,7 @@ struct phiInJets {

if (!trackSelection(originalTrack))
continue;

JEhistos.fill(HIST("etaHistogram"), trackC.eta());
JEhistos.fill(HIST("phiHistogram"), trackC.phi());
} // JTrack Loop
Expand Down Expand Up @@ -625,13 +625,12 @@ struct phiInJets {
JEhistos.fill(HIST("hMCRec_nonmatch_hUSS_OUTSIDE"), 1.0, lResonance.Pt(), lResonance.M());
} //! jetflag

if (hasJets){
if (hasJets) {
JEhistos.fill(HIST("ptJEHistogramPhi_JetTrigger"), lResonance.Pt());
auto triggerjet = std::min_element(mcd_pt.begin(), mcd_pt.end());
double triggerjet_pt = *triggerjet;
JEhistos.fill(HIST("JetVsPhi_REC"), triggerjet_pt, lResonance.Pt());

}
auto triggerjet = std::min_element(mcd_pt.begin(), mcd_pt.end());
double triggerjet_pt = *triggerjet;
JEhistos.fill(HIST("JetVsPhi_REC"), triggerjet_pt, lResonance.Pt());
}
JEhistos.fill(HIST("minvJEHistogramPhi"), lResonance.M());
} // mcpart check
} // tracks2
Expand All @@ -644,8 +643,8 @@ struct phiInJets {
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
int nprocessSimEvents = 0;
// Preslice<aod::JCollisions> slice = o2::aod::JCollision::collisionId;
void processSim(o2::aod::JMcCollision const& collision, soa::SmallGroups<soa::Join<aod::JMcCollisionLbs,aod::JCollisions>> const& recocolls, aod::JMcParticles const& mcParticles, soa::Filtered<aod::ChargedMCParticleLevelJets> const& mcpjets)
{
void processSim(o2::aod::JMcCollision const& collision, soa::SmallGroups<soa::Join<aod::JMcCollisionLbs, aod::JCollisions>> const& recocolls, aod::JMcParticles const& mcParticles, soa::Filtered<aod::ChargedMCParticleLevelJets> const& mcpjets)
{
if (cDebugLevel > 0) {
nprocessSimEvents++;
if ((nprocessSimEvents + 1) % 10000 == 0)
Expand All @@ -654,17 +653,15 @@ struct phiInJets {

JEhistos.fill(HIST("nEvents_MCGen"), 0.5);

if(recocolls.size()<=0)//not reconstructed
if (recocolls.size() <= 0) // not reconstructed
return;
for(auto& recocoll : recocolls){ //poorly reconstructed

for (auto& recocoll : recocolls) { // poorly reconstructed
if (!jetderiveddatautilities::selectCollision(recocoll, jetderiveddatautilities::JCollisionSel::sel8))
return;
return;
}



if (fabs(collision.posZ()) > 10)//bad vertex
if (fabs(collision.posZ()) > 10) // bad vertex
return;
bool INELgt0 = false;
for (const auto& mcParticle : mcParticles) {
Expand All @@ -673,10 +670,9 @@ struct phiInJets {
break;
}
}
if (!INELgt0) //not INEL
if (!INELgt0) // not INEL
return;


std::vector<double> mcp_pt{};
std::vector<double> mcp_phi{};
std::vector<double> mcp_eta{};
Expand Down Expand Up @@ -753,9 +749,9 @@ struct phiInJets {
////////////////////////////Phi found
if (hasJets) {
JEhistos.fill(HIST("ptGeneratedPhi_JetTrigger"), mcParticle.pt());
auto triggerjet = std::min_element(mcp_pt.begin(), mcp_pt.end());
double triggerjet_pt = *triggerjet;
JEhistos.fill(HIST("JetVsPhi_GEN"), triggerjet_pt, mcParticle.pt());
auto triggerjet = std::min_element(mcp_pt.begin(), mcp_pt.end());
double triggerjet_pt = *triggerjet;
JEhistos.fill(HIST("JetVsPhi_GEN"), triggerjet_pt, mcParticle.pt());
} // check for jets

} // check for phi
Expand All @@ -773,7 +769,7 @@ struct phiInJets {
// void processMatchedGen(o2::aod::JMcCollision const& collision, aod::JMcParticles const& mcParticles, soa::Filtered<aod::ChargedMCParticleLevelJets> const& mcpjets)
int nprocessSimJEEvents = 0;
void processMatchedGen(aod::JMcCollision const& collision,
soa::SmallGroups<soa::Join<aod::JMcCollisionLbs,aod::JCollisions>> const& recocolls,
soa::SmallGroups<soa::Join<aod::JMcCollisionLbs, aod::JCollisions>> const& recocolls,
JetMCDTable const& mcdjets,
JetMCPTable const& mcpjets,
aod::JMcParticles const& mcParticles)
Expand All @@ -790,14 +786,13 @@ struct phiInJets {
if (fabs(collision.posZ()) > 10)
return;

if(recocolls.size()<=0)//not reconstructed
if (recocolls.size() <= 0) // not reconstructed
return;
for(auto& recocoll : recocolls){ //poorly reconstructed
for (auto& recocoll : recocolls) { // poorly reconstructed
if (!jetderiveddatautilities::selectCollision(recocoll, jetderiveddatautilities::JCollisionSel::sel8))
return;
return;
}


bool INELgt0 = false;
for (const auto& mcParticle : mcParticles) {
if (TMath::Abs(mcParticle.eta()) < cfgtrkMaxEta) {
Expand Down Expand Up @@ -847,7 +842,7 @@ struct phiInJets {
for (const auto& mcParticle : mcParticles) {
if (fabs(mcParticle.eta()) > cfgtrkMaxEta)
continue;

if (fabs(mcParticle.pdgCode()) == 333) {

TLorentzVector lResonance;
Expand Down

0 comments on commit fb8a235

Please sign in to comment.