#include <HLLHCEvtVtxGenerator.h>
Definition at line 26 of file HLLHCEvtVtxGenerator.h.
Definition at line 53 of file HLLHCEvtVtxGenerator.cc.
T getParameter(std::string const &) const
BaseEvtVtxGenerator(const edm::ParameterSet &)
HLLHCEvtVtxGenerator::~HLLHCEvtVtxGenerator |
( |
| ) |
|
|
override |
Definition at line 30 of file HLLHCEvtVtxGenerator.cc.
References edm::ConfigurationDescriptions::add(), and edm::ParameterSetDescription::add().
33 desc.
add<
double>(
"MeanXIncm",0.0);
34 desc.add<
double>(
"MeanYIncm",0.0);
35 desc.add<
double>(
"MeanZIncm",0.0);
36 desc.add<
double>(
"TimeOffsetInns",0.0);
37 desc.add<
double>(
"EprotonInGeV", 7000.0);
38 desc.add<
double>(
"CrossingAngleInurad", 510.0);
39 desc.add<
double>(
"CrabbingAngleCrossingInurad", 380.0);
40 desc.add<
double>(
"CrabbingAngleSeparationInurad", 0.0);
41 desc.add<
double>(
"CrabFrequencyInMHz", 400.0);
42 desc.add<
bool>(
"RF800",
false);
43 desc.add<
double>(
"BetaCrossingPlaneInm", 0.20);
44 desc.add<
double>(
"BetaSeparationPlaneInm", 0.20);
45 desc.add<
double>(
"HorizontalEmittance", 2.5e-06);
46 desc.add<
double>(
"VerticalEmittance", 2.05e-06);
47 desc.add<
double>(
"BunchLengthInm", 0.09);
49 desc.add<
bool>(
"readDB");
50 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 39 of file HLLHCEvtVtxGenerator.h.
double HLLHCEvtVtxGenerator::integrandCC |
( |
double |
x, |
|
|
double |
z, |
|
|
double |
t |
|
) |
| const |
|
private |
Definition at line 161 of file HLLHCEvtVtxGenerator.cc.
References bets, betx, constexpr, funct::cos(), JetChargeProducer_cfi::exp, gen::k, phi, phiCR, mps_fire::result, RF800, alignCSCRings::s, sigs, sigx, funct::sin(), mathSSE::sqrt(), wcc, and z.
Referenced by intensity().
164 constexpr double local_c_light = 2.99792458e8;
166 const double k =
wcc/local_c_light*two_pi;
167 const double k2 = k*
k;
170 const double cos2 = cos*
cos;
171 const double sin2 = sin*
sin;
174 const double sigmax2=sigx2*(1+
z*
z/(
betx*
betx));
178 constexpr double factorRMSgauss4 = 1./sqrt2/gamma34 * gamma14;
179 constexpr double NormFactorGauss4 = sqrt2to5 * gamma54 * gamma54;
182 const double sinCR2 = sinCR*sinCR;
187 const double norm =2.0/(two_pi*sigs2);
192 -1.0/(4*k2*sigmax2)*(
200 -
x*
x*(cos2/sigmax2 + sin2/sigs2)
202 + 2*
x*
cos*cosks*sinkct*sinCR/
k/sigmax2
209 const double norm = 2.0/(NormFactorGauss4*sigs2*factorRMSgauss4);
210 const double sigs4=sigs2*sigs2*factorRMSgauss4*factorRMSgauss4;
215 -z*z*z*z*cos2*cos2/sigs4
216 -6*ct*ct*z*z*cos2/sigs4
217 -sin2/(4*k2*sigmax2)*(
223 -4 * cosks*cosks * sinct*sinct)
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 137 of file HLLHCEvtVtxGenerator.cc.
References alphay, betagamma, bets, EnergyCorrector::c, constexpr, funct::cos(), PVValHelper::dy, epssn, JetChargeProducer_cfi::exp, integrandCC(), sigma(), funct::sin(), lumiQTWidget::t, and wcc.
Referenced by newVertex().
148 const double cay=
std::cos(alphay_mod);
149 const double say=
std::sin(alphay_mod);
151 const double dy=-(
z-
t)*say-
y*cay;
155 const double norm = two_pi*sigmay;
157 return (
std::exp(-dy*dy/(sigmay*sigmay))*
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 88 of file HLLHCEvtVtxGenerator.cc.
References betagamma, bets, betx, KineDebug3::count(), epssn, epsxn, fMeanX, fMeanY, fMeanZ, fTimeOffset, mps_fire::i, intensity(), sigma(), sigs, lumiQTWidget::t, x, y, and z.
92 double x(0.),
y(0.),
z(0.),
t(0.),
i(0.);
96 auto shoot = [&](){
return CLHEP::RandFlat::shoot(engine); };
99 z=(shoot()-0.5)*6.0*
sigs;
100 t=(shoot()-0.5)*6.0*
sigs;
107 <<
"i>imax : "<<
i<<
" > "<<imax<<endl;
109 }
while ((
i<imax*shoot())&&count<10000);
112 <<
" count : "<<count<<endl;
125 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 |