#include <HLLHCEvtVtxGenerator.h>
Definition at line 26 of file HLLHCEvtVtxGenerator.h.
Definition at line 51 of file HLLHCEvtVtxGenerator.cc.
T getParameter(std::string const &) const
BaseEvtVtxGenerator(const edm::ParameterSet &)
HLLHCEvtVtxGenerator::~HLLHCEvtVtxGenerator |
( |
| ) |
|
|
override |
Definition at line 29 of file HLLHCEvtVtxGenerator.cc.
References edm::ConfigurationDescriptions::add(), and edm::ParameterSetDescription::add().
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);
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
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 37 of file HLLHCEvtVtxGenerator.h.
double HLLHCEvtVtxGenerator::integrandCC |
( |
double |
x, |
|
|
double |
z, |
|
|
double |
t |
|
) |
| const |
|
private |
Definition at line 146 of file HLLHCEvtVtxGenerator.cc.
References bets, betx, constexpr, funct::cos(), JetChargeProducer_cfi::exp, dqmdumpme::k, phi, phiCR, mps_fire::result, RF800, alignCSCRings::s, sigs, sigx, funct::sin(), mathSSE::sqrt(), wcc, and z.
Referenced by intensity().
147 constexpr double local_c_light = 2.99792458e8;
149 const double k =
wcc / local_c_light * two_pi;
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));
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)
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, HltBtagPostValidation_cff::c, constexpr, funct::cos(), PVValHelper::dy, epssn, JetChargeProducer_cfi::exp, integrandCC(), sigma(), funct::sin(), OrderedSet::t, and wcc.
Referenced by newVertex().
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)
Cos< T >::type cos(const T &t)
double integrandCC(double x, double z, double t) const
double sigma(double z, double epsilon, double beta, double betagamma) const
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, KineDebug3::count(), epssn, epsxn, fMeanX, fMeanY, fMeanZ, fTimeOffset, mps_fire::i, intensity(), sigma(), sigs, OrderedSet::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);
104 edm::LogError(
"Too many tries ") <<
" count : " << count << endl;
117 return HepMC::FourVector(
x,
y,
z,
t);
double intensity(double x, double y, double z, double t) const
double sigma(double z, double epsilon, double beta, double betagamma) const
double HLLHCEvtVtxGenerator::sigma |
( |
double |
z, |
|
|
double |
epsilon, |
|
|
double |
beta, |
|
|
double |
betagamma |
|
) |
| const |
|
private |
const double HLLHCEvtVtxGenerator::alphax |
|
private |
const double HLLHCEvtVtxGenerator::alphay |
|
private |
const double HLLHCEvtVtxGenerator::beta |
|
private |
const double HLLHCEvtVtxGenerator::betagamma |
|
private |
const double HLLHCEvtVtxGenerator::bets |
|
private |
const double HLLHCEvtVtxGenerator::betx |
|
private |
const double HLLHCEvtVtxGenerator::epss |
|
private |
const double HLLHCEvtVtxGenerator::epssn |
|
private |
const double HLLHCEvtVtxGenerator::epsx |
|
private |
const double HLLHCEvtVtxGenerator::epsxn |
|
private |
const double HLLHCEvtVtxGenerator::fMeanX |
|
private |
const double HLLHCEvtVtxGenerator::fMeanY |
|
private |
const double HLLHCEvtVtxGenerator::fMeanZ |
|
private |
const double HLLHCEvtVtxGenerator::fTimeOffset |
|
private |
const double HLLHCEvtVtxGenerator::gamma |
|
private |
const double HLLHCEvtVtxGenerator::momeV |
|
private |
const double HLLHCEvtVtxGenerator::oncc |
|
private |
const double HLLHCEvtVtxGenerator::phi |
|
private |
const double HLLHCEvtVtxGenerator::phiCR |
|
private |
const bool HLLHCEvtVtxGenerator::RF800 |
|
private |
const double HLLHCEvtVtxGenerator::sigs |
|
private |
const double HLLHCEvtVtxGenerator::sigx |
|
private |
const double HLLHCEvtVtxGenerator::wcc |
|
private |