Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions MC/config/PWGGAJE/hooks/jets_hook.C
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,20 @@ class UserHooks_jets : public Pythia8::UserHooks

// Check the first jet
//
bool acc1 = detector_acceptance(mAcceptance, event[id1].phi(), event[id1].eta());
Float_t phi_j1 = event[id1].phi();
if (phi_j1 < 0) phi_j1 += 2 * TMath::Pi();

bool acc1 = detector_acceptance(mAcceptance, phi_j1, event[id1].eta());
bool okpdg1 = true;

if (mOutPartonPDG > 0 && TMath::Abs(event[id1].id()) != mOutPartonPDG)
okpdg1 = false;

// Check the second jet
//
bool acc2 = detector_acceptance(mAcceptance, event[id2].phi(), event[id2].eta());
Float_t phi_j2 = event[id2].phi();
if (phi_j2 < 0) phi_j2 += 2 * TMath::Pi();
bool acc2 = detector_acceptance(mAcceptance, phi_j2, event[id2].eta());
bool okpdg2 = true;

if (mOutPartonPDG > 0 && TMath::Abs(event[id2].id()) != mOutPartonPDG)
Expand Down
10 changes: 5 additions & 5 deletions MC/config/PWGGAJE/hooks/prompt_gamma_hook.C
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,17 @@ class UserHooks_promptgamma : public Pythia8::UserHooks
return true;
}
}

// Select photons within acceptance
//
if (detector_acceptance(mAcceptance, event[idGam].phi(), event[idGam].eta())) {
Float_t phiGam = event[idGam].phi();
if (phiGam < 0) phiGam += 2 * TMath::Pi();

if (detector_acceptance(mAcceptance, phiGam, event[idGam].eta())) {
// printf("+++ Accepted event +++ \n");
printf("Selected gamma, id %d, PDG %d, status %d, mother %d, E %2.2f, pT %2.2f, eta %2.2f, phi %2.2f\n", idGam,
event[idGam].id(), event[idGam].status(), event[idGam].mother1(),
event[idGam].e(), event[idGam].pT(),
event[idGam].eta(), event[idGam].phi() * TMath::RadToDeg());

event[idGam].eta(), phiGam * TMath::RadToDeg());
// printf("Back-to-back parton, id %d, PDG %d, status %d, mother %d, E %2.2f, pT %2.2f, eta %2.2f, phi %2.2f\n", idPar,
// event[idPar].id() , event[idPar].status(), event[idPar].mother1(),
// event[idPar].e() , event[idPar].pT(),
Expand All @@ -83,7 +84,6 @@ class UserHooks_promptgamma : public Pythia8::UserHooks
// event[idPar].pT() - event[idGam].pT(),
// event[idPar].eta()- event[idGam].eta(),
// event[idPar].phi()*TMath::RadToDeg()-event[idGam].phi()*TMath::RadToDeg());

return false;
} else {
// printf("--- Rejected event ---\n");
Expand Down
Loading