233 throw cet::exception(
"HiggsMakeDecay Tool: BAD MASS. Configured mass (" +
std::to_string(flux.mass) +
237 double mixing = flux.C1;
252 double in_dist = (flux.pos.Vect() -
in).Mag();
253 double out_dist = (flux.pos.Vect() - out).Mag();
268 double flat_rand = CLHEP::RandFlat::shoot(
fEngine, 0, 1.);
269 double decay_rand =
flat_to_exp_rand(flat_rand, mean_dist, in_dist, out_dist);
270 TVector3 decay_pos3 = flux.pos.Vect() + decay_rand * (
in - flux.pos.Vect()).Unit();
274 TLorentzVector decay_pos(decay_pos3, decay_time);
279 double daughter_mass = TDatabasePDG::Instance()->GetParticle(daughter_pdg)->Mass();
282 double daughterE_HRF = flux.mass / 2.;
283 double daughterP_HRF = sqrt(daughterE_HRF * daughterE_HRF - daughter_mass * daughter_mass);
288 TVector3 pB_HRF = -pA_HRF;
290 TLorentzVector p4A = TLorentzVector(pA_HRF, daughterE_HRF);
291 TLorentzVector p4B = TLorentzVector(pB_HRF, daughterE_HRF);
294 p4A.Boost(flux.mom.BoostVector());
295 p4B.Boost(flux.mom.BoostVector());
298 decay.decay_width = width_elec + width_muon + width_piplus + width_pizero;
299 decay.mean_lifetime = lifetime_ns;
300 decay.mean_distance = mean_dist;
302 decay.pos = decay_pos;
304 decay.daughter_mom.push_back(p4A.Vect());
305 decay.daughter_e.push_back(p4A.E());
306 decay.daughter_pdg.push_back(daughter_pdg);
308 decay.daughter_mom.push_back(p4B.Vect());
309 decay.daughter_e.push_back(p4B.E());
311 if (daughter_pdg == 111) {
312 decay.daughter_pdg.push_back(daughter_pdg);
315 decay.daughter_pdg.push_back(-daughter_pdg);
double forcedecay_weight(double mean, double a, double b)
double PiZeroPartialWidth(double higs_mass, double mixing)
double ElectronPartialWidth(double higs_mass, double mixing)
CLHEP::HepRandomEngine * fEngine
double MuonPartialWidth(double higs_mass, double mixing)
static const Constants & Instance()
if &&[-z"$BASH_VERSION"] then echo Attempting to switch to bash bash shellSwitch exit fi &&["$1"= 'shellSwitch'] shift declare a IncludeDirectives for Dir in
std::string to_string(WindowPattern const &pattern)
double PiPlusPartialWidth(double higs_mass, double mixing)
double flat_to_exp_rand(double x, double mean, double a, double b)
TVector3 RandomUnitVector()
double TimeOfFlight(const MeVPrtlFlux &flux, TVector3 decay)
int RandDaughter(double elec_width, double muon_width, double piplus_width, double pizero_width)