6 #include "art/Framework/Core/EDProducer.h"
7 #include "art/Framework/Principal/Event.h"
8 #include "art/Framework/Principal/Handle.h"
9 #include "art/Framework/Services/Registry/ServiceHandle.h"
10 #include "art/Persistency/Common/PtrMaker.h"
11 #include "art/Utilities/ToolMacros.h"
12 #include "cetlib/cpu_timer.h"
13 #include "fhiclcpp/ParameterSet.h"
14 #include "messagefacility/MessageLogger/MessageLogger.h"
24 #include "CLHEP/Random/RandomEngine.h"
25 #include "CLHEP/Random/JamesRandom.h"
26 #include "CLHEP/Random/RandFlat.h"
27 #include "nusimdata/SimulationBase/MCParticle.h"
36 #include "TDatabasePDG.h"
61 void configure(fhicl::ParameterSet
const &pset)
override;
64 int RandDaughter(
double elec_width,
double muon_width,
double piplus_width,
double pizero_width);
92 double A = (1. -
exp(-(b-a)/mean));
93 return - mean * log(1 - x * A) +
a;
98 return exp(-a/mean) -
exp(-b/mean);
102 return sqrt(kaon_mass * kaon_mass * kaon_mass * kaon_mass
103 -2 * kaon_mass * kaon_mass * pion_mass * pion_mass
104 -2 * kaon_mass * kaon_mass * higs_mass * higs_mass
105 + pion_mass * pion_mass * pion_mass * pion_mass
106 + higs_mass * higs_mass * higs_mass * higs_mass
107 -2 * pion_mass * pion_mass * higs_mass * higs_mass) / ( 2 * kaon_mass );
113 if (lep_mass * 2 >= higs_mass)
return 0.;
117 double width = (mixing * mixing * lep_mass * lep_mass * higs_mass / (8 * M_PI * higgs_vev * higgs_vev)) * pow(1 - 4 * lep_mass * lep_mass / (higs_mass * higs_mass), 3. / 2.);
130 if (pion_mass * 2 >= higs_mass)
return 0.;
134 double form_factor = (2. / 9.) * higs_mass * higs_mass + (11. / 9.) * pion_mass * pion_mass;
136 double width = (mixing * mixing * 3 * form_factor * form_factor / (32 * M_PI * higgs_vev * higgs_vev * higs_mass)) * pow(1- 4. * pion_mass * pion_mass / (higs_mass * higs_mass), 1. / 2.);
176 if (fReferenceHiggsEnergy < 0. && fReferenceHiggsKaonEnergy > 0.) {
194 double mean_dist = lifetime_ns * gamma_v;
209 double total_width = elec_width + muon_width + piplus_width + pizero_width;
211 double flat_rand = CLHEP::RandFlat::shoot(
fEngine, 0, 1.);
213 if (flat_rand < elec_width / total_width) {
216 else if (flat_rand < (elec_width + muon_width) / total_width) {
219 else if (flat_rand < (elec_width + muon_width + piplus_width) / total_width) {
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;
302 decay.
pos = decay_pos;
311 if (daughter_pdg == 111) {
double fReferenceHiggsMass
double fReferenceHiggsKaonEnergy
double forcedecay_weight(double mean, double a, double b)
process_name opflash particleana ie x
double fReferenceRayLength
double PiZeroPartialWidth(double higs_mass, double mixing)
double fReferenceHiggsMixing
double ElectronPartialWidth(double higs_mass, double mixing)
double MaxWeight() override
CLHEP::HepRandomEngine * fEngine
void configure(fhicl::ParameterSet const &pset) override
Interface for configuring the particular algorithm tool.
IMeVPrtlDecay interface class definiton.
HiggsMakeDecay class definiton.
double higgs_momentum(double kaon_mass, double pion_mass, double higs_mass)
double MuonPartialWidth(double higs_mass, double mixing)
IMeVPrtlStage interface class definiton. General interface behind each stage. Provides random number ...
Provides a base class aware of world box coordinates.
static const Constants & Instance()
std::vector< TVector3 > daughter_mom
std::vector< double > daughter_e
double PionPartialWidth(double pion_mass, double higs_mass, double mixing)
~HiggsMakeDecay()
Destructor.
double mean(const std::vector< short > &wf, size_t start, size_t nsample)
if &&[-z"$BASH_VERSION"] then echo Attempting to switch to bash bash shellSwitch exit fi &&["$1"= 'shellSwitch'] shift declare a IncludeDirectives for Dir in
double fReferenceHiggsEnergy
std::string to_string(WindowPattern const &pattern)
bool Decay(const MeVPrtlFlux &flux, const TVector3 &in, const TVector3 &out, MeVPrtlDecay &decay, double &weight) override
double PiPlusPartialWidth(double higs_mass, double mixing)
HiggsMakeDecay(fhicl::ParameterSet const &pset)
Constructor.
std::vector< int > daughter_pdg
double fReferenceRayDistance
double forwardPrtlEnergy(double parentM, double secM, double prtlM, double parentE)
double flat_to_exp_rand(double x, double mean, double a, double b)
TVector3 RandomUnitVector()
double LeptonPartialWidth(double lep_mass, double higs_mass, double mixing)
double TimeOfFlight(const MeVPrtlFlux &flux, TVector3 decay)
int RandDaughter(double elec_width, double muon_width, double piplus_width, double pizero_width)
This is an interface for an art Tool which decays "Prtl" inside a detector volume. It maps MeVPrtlFlux to MeVPrtlDecay.