All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MonoEnergyHiggsFlux_tool.cc
Go to the documentation of this file.
1 /**
2  *
3  */
4 
5 // Framework Includes
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"
15 
16 // local includes
18 
20 
21 
22 // LArSoft includes
23 
24 // ROOT
25 #include "TVector3.h"
26 
27 // std includes
28 #include <string>
29 #include <iostream>
30 #include <memory>
31 
32 //------------------------------------------------------------------------------------------------------------------------------------------
33 // implementation follows
34 
35 namespace evgen {
36 namespace ldm {
37 /**
38  * @brief MonoEnergyHiggsFlux class definiton
39  */
41 {
42 public:
43  /**
44  * @brief Constructor
45  */
46  MonoEnergyHiggsFlux(fhicl::ParameterSet const &pset);
47 
48  /**
49  * @brief Destructor
50  */
52 
53  bool MakeFlux(const simb::MCFlux &flux, MeVPrtlFlux &higgs, double &weight) override;
54  void configure(const fhicl::ParameterSet&) override;
55 
56  // no weights
57  double MaxWeight() override { return -1.; }
58 
59 private:
60  TVector3 fStart; //!< Start of Higgs ray in detector coordinates [cm]
61  TVector3 fDir; //!< Direction of Higgs ray (unit vector)
62  double fE; //!< Energy of Higgs [GeV]
63  double fM; //!< Mass of Higgs [GeV]
64  double fMixingAngle;
65  double fStartTime; //!< Start time of Higgs in detector time [us]
66 };
67 
68 MonoEnergyHiggsFlux::MonoEnergyHiggsFlux(fhicl::ParameterSet const &pset):
69  IMeVPrtlStage("MonoEnergyHiggsFlux"),
70  IMeVPrtlFlux(pset)
71 {
72  this->configure(pset);
73 }
74 
75 //------------------------------------------------------------------------------------------------------------------------------------------
76 
78 {
79 }
80 
81 //------------------------------------------------------------------------------------------------------------------------------------------
82 void MonoEnergyHiggsFlux::configure(fhicl::ParameterSet const &pset)
83 {
84  fStart = TVector3(pset.get<double>("X"), pset.get<double>("Y"), pset.get<double>("Z"));
85  fDir = TVector3(pset.get<double>("Xdir"), pset.get<double>("Ydir"), pset.get<double>("Zdir"));
86 
87  fE = pset.get<double>("E");
88  fM = pset.get<double>("M");
89  fMixingAngle = pset.get<double>("MixingAngle");
90  fStartTime = pset.get<double>("T", 0.);
91 
92 }
93 
94 bool MonoEnergyHiggsFlux::MakeFlux(const simb::MCFlux &flux/*ignored*/, MeVPrtlFlux &higgs, double &weight) {
95  (void) flux;
96  higgs.pos = TLorentzVector(fStart, fStartTime);
97  // set the momentum
98  TVector3 p = fDir * sqrt(fE*fE - fM * fM);
99  higgs.mom = TLorentzVector(p, fE);
100  higgs.C1 = fMixingAngle;
101  higgs.mass = fM;
102 
103  // no kaon here
104  higgs.kmom = TLorentzVector(0, 0, 0, 0);
105  higgs.kaon_pdg = -1;
106 
107  // beam is same as detector coord
108  higgs.pos_beamcoord = higgs.pos;
109  higgs.mom_beamcoord = higgs.mom;
110  higgs.kmom_beamcoord = higgs.kmom;
111  higgs.generator = 0; // kDissonantHiggs
112 
113 
114  weight = 1.;
115  return true;
116 }
117 
118 DEFINE_ART_CLASS_TOOL(MonoEnergyHiggsFlux)
119 
120 } // namespace ldm
121 } // namespace evgen
TLorentzVector pos_beamcoord
Definition: MeVPrtlFlux.h:10
TLorentzVector mom
Definition: MeVPrtlFlux.h:14
double fE
Energy of Higgs [GeV].
TLorentzVector mom_beamcoord
Definition: MeVPrtlFlux.h:15
pdgs p
Definition: selectors.fcl:22
TVector3 fDir
Direction of Higgs ray (unit vector)
double fStartTime
Start time of Higgs in detector time [us].
TLorentzVector kmom
Definition: MeVPrtlFlux.h:13
IMeVPrtlStage interface class definiton. General interface behind each stage. Provides random number ...
Definition: IMeVPrtlStage.h:36
j template void())
Definition: json.hpp:3108
bool MakeFlux(const simb::MCFlux &flux, MeVPrtlFlux &higgs, double &weight) override
MonoEnergyHiggsFlux(fhicl::ParameterSet const &pset)
Constructor.
void configure(const fhicl::ParameterSet &) override
Interface for configuring the particular algorithm tool.
TVector3 fStart
Start of Higgs ray in detector coordinates [cm].
MonoEnergyHiggsFlux class definiton.
TLorentzVector pos
Definition: MeVPrtlFlux.h:11
This is an interface for an art Tool which turns MCFlux objects (which is a meson decay to neutrinos)...
IMeVPrtlFlux interface class definiton.
Definition: IMeVPrtlFlux.h:39
TLorentzVector kmom_beamcoord
Definition: MeVPrtlFlux.h:12