ATLAS Offline Software
Loading...
Searching...
No Matches
UserPhotonFlux.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4#include "UserPhotonFlux.h"
5
7 ATH_MSG_INFO( "Initialisation of " << name() << " was successful" );
8 return StatusCode::SUCCESS;
9 }
10
11 StatusCode UserPhotonFlux::InitializePythiaInfo(Pythia8::Pythia& pythia) const {
12
13 ATH_MSG_INFO( "InitializePythiaInfo " << name() << " with process " << m_process);
14 if (m_process == 1) {
15 PDFPtr photonFlux = PNEW(Lepton2gamma2, -11);
16 pythia.setPhotonFluxPtr(std::move(photonFlux), 0);
17 return StatusCode::SUCCESS;
18 }
19 else if(m_process ==2 || m_process ==3) {
20 ATH_MSG_INFO( "InitializePythiaInfo " << name() << " using nuclear photon flux with Z = " << m_flux_Z << ", bmin = " << m_flux_min_b);
21 Nucleus2gammaPtr photonFlux = PNEW(Nucleus2gamma2,-11);
22 photonFlux->setZ(m_flux_Z);
23 photonFlux->setMinB(m_flux_min_b);
24 photonFlux->setMinX(m_flux_min_x);
25 Nucleus2gammaPtr photonFlux2 = nullptr; PNEW(Nucleus2gamma2,-11);
26 if(m_process==3) photonFlux2=photonFlux;
27 pythia.setPhotonFluxPtr(photonFlux, photonFlux2);
28 return StatusCode::SUCCESS;
29 }
30 else {
31 ATH_MSG_ERROR("Unknown process: "<< m_process);
32 return StatusCode::FAILURE;
33 }
34
35 }
36
38 ATH_MSG_INFO( "Finalize" << name());
39 return StatusCode::SUCCESS;
40 }
41
42
43StatusCode UserPhotonFlux::ModifyPythiaEvent(Pythia8::Pythia& /*pythia*/) const {
44 return StatusCode::SUCCESS;
45 }
46
48 ATH_MSG_INFO( "CrossSectionScaleFactor" << name());
49 return 1.0;
50 }
51
52
53
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
Pythia8::PDF * PDFPtr
#define PNEW(X, Y)
Nucleus2gamma2 * Nucleus2gammaPtr
void setMinB(double in_min_b)
void setMinX(double in_min_x)
void setZ(double in_Z)
Gaudi::Property< double > m_flux_Z
StatusCode InitializePythiaInfo(Pythia8::Pythia &) const override
Gaudi::Property< int > m_process
StatusCode ModifyPythiaEvent(Pythia8::Pythia &pythia) const override
Update the pythia event Probably not used for this application.
Gaudi::Property< double > m_flux_min_b
Gaudi::Property< double > m_flux_min_x
StatusCode finalize() override
AlgTool finalize method.
virtual double CrossSectionScaleFactor() const override
Return how much the cross section is modified.
StatusCode initialize() override
AlgTool initialize method.