#include <HLLHCEvtVtxGenerator.h>
Definition at line 26 of file HLLHCEvtVtxGenerator.h.
◆ HLLHCEvtVtxGenerator() [1/2]
Definition at line 51 of file HLLHCEvtVtxGenerator.cc.
53 fMeanX(
p.getParameter<
double>(
"MeanXIncm") * cm),
54 fMeanY(
p.getParameter<
double>(
"MeanYIncm") * cm),
55 fMeanZ(
p.getParameter<
double>(
"MeanZIncm") * cm),
56 fTimeOffset(
p.getParameter<
double>(
"TimeOffsetInns") * ns * c_light),
57 momeV(
p.getParameter<
double>(
"EprotonInGeV") * 1e9),
61 phi(
p.getParameter<
double>(
"CrossingAngleInurad") * 1
e-6),
62 wcc(
p.getParameter<
double>(
"CrabFrequencyInMHz") * 1e6),
63 RF800(
p.getParameter<
bool>(
"RF800")),
64 betx(
p.getParameter<
double>(
"BetaCrossingPlaneInm")),
65 bets(
p.getParameter<
double>(
"BetaSeparationPlaneInm")),
66 epsxn(
p.getParameter<
double>(
"HorizontalEmittance")),
67 epssn(
p.getParameter<
double>(
"VerticalEmittance")),
68 sigs(
p.getParameter<
double>(
"BunchLengthInm")),
69 alphax(
p.getParameter<
double>(
"CrabbingAngleCrossingInurad") * 1
e-6),
70 alphay(
p.getParameter<
double>(
"CrabbingAngleSeparationInurad") * 1
e-6),
BaseEvtVtxGenerator(const edm::ParameterSet &)
◆ HLLHCEvtVtxGenerator() [2/2]
◆ ~HLLHCEvtVtxGenerator()
HLLHCEvtVtxGenerator::~HLLHCEvtVtxGenerator |
( |
| ) |
|
|
override |
◆ fillDescriptions()
Definition at line 29 of file HLLHCEvtVtxGenerator.cc.
References edm::ConfigurationDescriptions::add(), and submitPVResolutionJobs::desc.
31 desc.add<
double>(
"MeanXIncm", 0.0);
32 desc.add<
double>(
"MeanYIncm", 0.0);
33 desc.add<
double>(
"MeanZIncm", 0.0);
34 desc.add<
double>(
"TimeOffsetInns", 0.0);
35 desc.add<
double>(
"EprotonInGeV", 7000.0);
36 desc.add<
double>(
"CrossingAngleInurad", 510.0);
37 desc.add<
double>(
"CrabbingAngleCrossingInurad", 380.0);
38 desc.add<
double>(
"CrabbingAngleSeparationInurad", 0.0);
39 desc.add<
double>(
"CrabFrequencyInMHz", 400.0);
40 desc.add<
bool>(
"RF800",
false);
41 desc.add<
double>(
"BetaCrossingPlaneInm", 0.20);
42 desc.add<
double>(
"BetaSeparationPlaneInm", 0.20);
43 desc.add<
double>(
"HorizontalEmittance", 2.5e-06);
44 desc.add<
double>(
"VerticalEmittance", 2.05e-06);
45 desc.add<
double>(
"BunchLengthInm", 0.09);
47 desc.add<
bool>(
"readDB");
48 descriptions.
add(
"HLLHCEvtVtxGenerator",
desc);
void add(std::string const &label, ParameterSetDescription const &psetDescription)
◆ GetInvLorentzBoost()
TMatrixD const* HLLHCEvtVtxGenerator::GetInvLorentzBoost |
( |
| ) |
const |
|
inlineoverridevirtual |
This method - and the comment - is a left-over from COBRA-OSCAR time : return the last generated event vertex. If no vertex has been generated yet, a NULL pointer is returned.
Implements BaseEvtVtxGenerator.
Definition at line 43 of file HLLHCEvtVtxGenerator.h.
◆ integrandCC()
double HLLHCEvtVtxGenerator::integrandCC |
( |
double |
x, |
|
|
double |
z, |
|
|
double |
t |
|
) |
| const |
|
private |
Definition at line 146 of file HLLHCEvtVtxGenerator.cc.
References bets, betx, funct::cos(), JetChargeProducer_cfi::exp, dqmdumpme::k, local_c_light, phi, phiCR, mps_fire::result, RF800, alignCSCRings::s, sigs, sigx, funct::sin(), mathSSE::sqrt(), wcc, x, and z.
Referenced by intensity().
150 const double k2 =
k *
k;
153 const double cos2 =
cos *
cos;
154 const double sin2 =
sin *
sin;
157 const double sigmax2 = sigx2 * (1 +
z *
z / (
betx *
betx));
161 constexpr
double factorRMSgauss4 =
162 1. / sqrt2 / gamma34 * gamma14;
163 constexpr
double NormFactorGauss4 = sqrt2to5 * gamma54 * gamma54;
166 const double sinCR2 = sinCR * sinCR;
171 const double norm = 2.0 / (two_pi * sigs2);
175 std::exp(-ct * ct / sigs2 -
z *
z * cos2 / sigs2 -
176 1.0 / (4 * k2 * sigmax2) *
181 4 * k2 *
z *
z * sin2) -
182 x *
x * (cos2 / sigmax2 + sin2 / sigs2)
183 +
x * ct *
sin / sigs2
184 + 2 *
x *
cos * cosks * sinkct * sinCR /
k / sigmax2
191 const double norm = 2.0 / (NormFactorGauss4 * sigs2 * factorRMSgauss4);
192 const double sigs4 = sigs2 * sigs2 * factorRMSgauss4 * factorRMSgauss4;
197 std::exp(-ct * ct * ct * ct / sigs4 -
z *
z *
z *
z * cos2 * cos2 / sigs4 - 6 * ct * ct *
z *
z * cos2 / sigs4 -
198 sin2 / (4 * k2 * sigmax2) *
Sin< T >::type sin(const T &t)
Cos< T >::type cos(const T &t)
static constexpr float local_c_light
◆ intensity()
double HLLHCEvtVtxGenerator::intensity |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z, |
|
|
double |
t |
|
) |
| const |
|
private |
Definition at line 126 of file HLLHCEvtVtxGenerator.cc.
References alphay, betagamma, bets, c, funct::cos(), PVValHelper::dy, epssn, JetChargeProducer_cfi::exp, integrandCC(), sigma(), funct::sin(), submitPVValidationJobs::t, wcc, x, y, and z.
Referenced by newVertex().
128 constexpr
double c = 2.99792458e+8;
134 const double cay =
std::cos(alphay_mod);
135 const double say =
std::sin(alphay_mod);
137 const double dy = -(
z -
t) * say -
y * cay;
141 const double norm = two_pi * sigmay;
143 return (
std::exp(-
dy *
dy / (sigmay * sigmay)) * xzt_density / norm);
Sin< T >::type sin(const T &t)
double sigma(double z, double epsilon, double beta, double betagamma) const
Cos< T >::type cos(const T &t)
double integrandCC(double x, double z, double t) const
◆ newVertex()
HepMC::FourVector HLLHCEvtVtxGenerator::newVertex |
( |
CLHEP::HepRandomEngine * |
engine | ) |
const |
|
overridevirtual |
return a new event vertex
Implements BaseEvtVtxGenerator.
Definition at line 81 of file HLLHCEvtVtxGenerator.cc.
References betagamma, bets, betx, submitPVResolutionJobs::count, epssn, epsxn, fMeanX, fMeanY, fMeanZ, fTimeOffset, mps_fire::i, intensity(), sigma(), sigs, submitPVValidationJobs::t, x, y, and z.
84 double x(0.),
y(0.),
z(0.),
t(0.),
i(0.);
88 auto shoot = [&]() {
return CLHEP::RandFlat::shoot(engine); };
91 z = (shoot() - 0.5) * 6.0 *
sigs;
92 t = (shoot() - 0.5) * 6.0 *
sigs;
99 edm::LogError(
"Too large intensity") <<
"i>imax : " <<
i <<
" > " << imax << endl;
101 }
while ((
i < imax * shoot()) &&
count < 10000);
117 return HepMC::FourVector(
x,
y,
z,
t);
double sigma(double z, double epsilon, double beta, double betagamma) const
Log< level::Error, false > LogError
double intensity(double x, double y, double z, double t) const
◆ operator=()
◆ sigma()
double HLLHCEvtVtxGenerator::sigma |
( |
double |
z, |
|
|
double |
epsilon, |
|
|
double |
beta, |
|
|
double |
betagamma |
|
) |
| const |
|
private |
◆ alphax
const double HLLHCEvtVtxGenerator::alphax |
|
private |
◆ alphay
const double HLLHCEvtVtxGenerator::alphay |
|
private |
◆ beta
const double HLLHCEvtVtxGenerator::beta |
|
private |
◆ betagamma
const double HLLHCEvtVtxGenerator::betagamma |
|
private |
◆ bets
const double HLLHCEvtVtxGenerator::bets |
|
private |
◆ betx
const double HLLHCEvtVtxGenerator::betx |
|
private |
◆ epss
const double HLLHCEvtVtxGenerator::epss |
|
private |
◆ epssn
const double HLLHCEvtVtxGenerator::epssn |
|
private |
◆ epsx
const double HLLHCEvtVtxGenerator::epsx |
|
private |
◆ epsxn
const double HLLHCEvtVtxGenerator::epsxn |
|
private |
◆ fMeanX
const double HLLHCEvtVtxGenerator::fMeanX |
|
private |
◆ fMeanY
const double HLLHCEvtVtxGenerator::fMeanY |
|
private |
◆ fMeanZ
const double HLLHCEvtVtxGenerator::fMeanZ |
|
private |
◆ fTimeOffset
const double HLLHCEvtVtxGenerator::fTimeOffset |
|
private |
◆ gamma
const double HLLHCEvtVtxGenerator::gamma |
|
private |
◆ momeV
const double HLLHCEvtVtxGenerator::momeV |
|
private |
◆ oncc
const double HLLHCEvtVtxGenerator::oncc |
|
private |
◆ phi
const double HLLHCEvtVtxGenerator::phi |
|
private |
◆ phiCR
const double HLLHCEvtVtxGenerator::phiCR |
|
private |
◆ RF800
const bool HLLHCEvtVtxGenerator::RF800 |
|
private |
◆ sigs
const double HLLHCEvtVtxGenerator::sigs |
|
private |
◆ sigx
const double HLLHCEvtVtxGenerator::sigx |
|
private |
◆ wcc
const double HLLHCEvtVtxGenerator::wcc |
|
private |