Default implementation of the simulation of K40 background.
More...
#include <JK40DefaultSimulator.hh>
|
static double | p1 () |
| Parameters for probability of coincidence as a function of the cosine of space angle between PMT axes. More...
|
|
static double | p2 () |
|
static double | p3 () |
|
static double | p4 () |
|
Default implementation of the simulation of K40 background.
This class implements the JK40Simulator interface.
Definition at line 30 of file JK40DefaultSimulator.hh.
JDETECTOR::JK40DefaultSimulator::JK40DefaultSimulator |
( |
| ) |
|
|
inline |
JDETECTOR::JK40DefaultSimulator::JK40DefaultSimulator |
( |
const JK40Rates & |
rates | ) |
|
|
inline |
Get reference to unique instance of this class object.
This method returns an object with default values. The singles and multiples rates are taken from KM3NeT internal note "Detector simulations for KM3NeT".
- Returns
- reference to this class object
Definition at line 62 of file JK40DefaultSimulator.hh.
Default implementation of the simulation of K40 background.
const JK40Rates & getK40Rates()
Get K40 rates.
virtual double JDETECTOR::JK40DefaultSimulator::getSinglesRate |
( |
const JPMTIdentifier & |
pmt | ) |
const |
|
inlineoverridevirtual |
virtual double JDETECTOR::JK40DefaultSimulator::getMultiplesRate |
( |
const JModuleIdentifier & |
module, |
|
|
const int |
M |
|
) |
| const |
|
inlineoverridevirtual |
Get multiples rate as a function of optical module.
- Parameters
-
module | optical module identifier |
M | multiplicity (M >= 2) |
- Returns
- rate [Hz]
Implements JDETECTOR::JK40DefaultSimulatorInterface.
Definition at line 89 of file JK40DefaultSimulator.hh.
double getMultiplesRate(const multiplicity_type M) const
Get multiples rate at given multiplicity.
virtual double JDETECTOR::JK40DefaultSimulator::getProbability |
( |
const double |
ct | ) |
const |
|
inlineoverridevirtual |
Get probability of coincidence.
- Parameters
-
ct | cosine space angle between PMT axes |
- Returns
- probability
Implements JDETECTOR::JK40DefaultSimulatorInterface.
Definition at line 101 of file JK40DefaultSimulator.hh.
103 return exp(ct * (
p1() + ct * (
p2() + ct * (
p3() + ct*
p4()))));
static double p1()
Parameters for probability of coincidence as a function of the cosine of space angle between PMT axes...
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable STRING $argv[2] set_array QUANTILES set_variable FORMULA *[0] exp(-0.5 *(x-[1])*(x-[1])/([2]*[2]))" set_variable MODULE `getModule -a $DETECTOR -L "$STRING 0"` source JAcousticsToolkit.sh typeset -A TRIPODS get_tripods $WORKDIR/tripod.txt TRIPODS XMEAN
static double JDETECTOR::JK40DefaultSimulator::p1 |
( |
| ) |
|
|
inlinestaticprotected |
Parameters for probability of coincidence as a function of the cosine of space angle between PMT axes.
Values are provided by V.Kulikovski.
Definition at line 160 of file JK40DefaultSimulator.hh.
static double JDETECTOR::JK40DefaultSimulator::p2 |
( |
| ) |
|
|
inlinestaticprotected |
static double JDETECTOR::JK40DefaultSimulator::p3 |
( |
| ) |
|
|
inlinestaticprotected |
static double JDETECTOR::JK40DefaultSimulator::p4 |
( |
| ) |
|
|
inlinestaticprotected |
virtual void JDETECTOR::JK40DefaultSimulatorInterface::generateHits |
( |
const JModule & |
module, |
|
|
const JTimeRange & |
period, |
|
|
JModuleData & |
output |
|
) |
| const |
|
inlinevirtualinherited |
Generate hits.
- Parameters
-
module | module |
period | time window [ns] |
output | background data |
Implements JDETECTOR::JK40Simulator.
Definition at line 134 of file JK40DefaultSimulatorInterface.hh.
144 const size_t N = module.size();
145 const size_t M = (
N * (
N - 1)) / 2;
153 for (
size_t pmt = 0; pmt !=
N; ++pmt) {
157 if (rateL0_Hz > 0.0) {
159 const double t_ns = 1.0e9 / rateL0_Hz;
170 double totalRateL1_Hz = 0.0;
172 for (
size_t i = 0;
i !=
N; ++
i) {
176 if (totalRateL1_Hz > 0.0) {
178 const double t_ns = 1.0e9 / totalRateL1_Hz;
191 for (
size_t pmt1 = 0; pmt1 !=
N; ++pmt1) {
192 for (
size_t pmt2 = 0; pmt2 != pmt1; ++pmt2) {
204 for ( ; t1 < period.
getUpperLimit(); t1 += gRandom->Exp(t_ns)) {
219 for (
double R = totalRateL1_Hz * gRandom->Rndm(); M !=
N && (
R -=
rateL1_Hz[M]) > 0.0; ++M) {}
225 for ( ; M != 0; --M) {
231 for (
size_t i = 0; i !=
N; ++
i) {
233 if (buffer.count(i) == 0) {
242 P += probability1D[
i];
246 probability1D[
i] = 0.0;
254 for (P *= gRandom->Rndm(); pmt !=
N && (P -= probability1D[pmt]) > 0.0; ++pmt) {}
270 catch (
const JNumericalPrecision&) {}
static double getSigma()
Get intrinsic time smearing of K40 coincidences.
JCombinatorics::pair_type pair_type
Data structure for PMT analogue signal.
double getDot(const JNeutrinoDirection &first, const JNeutrinoDirection &second)
Dot product.
JDirection3D getDirection(const Vec &dir)
Get direction.
virtual double getSinglesRate(const JPMTIdentifier &pmt) const =0
Get singles rate as a function of PMT.
int getID() const
Get identifier.
virtual double getMultiplesRate(const JModuleIdentifier &module, const int M) const =0
Get multiples rate as a function of optical module.
then JCookie sh JDataQuality D $DETECTOR_ID R
then usage $script< input file >[option[primary[working directory]]] nWhere option can be N
std::vector< double > rateL1_Hz
Multiples rate as a function of the multiplicity.
virtual double getProbability(const double ct) const =0
Get probability of coincidence.
static double JDETECTOR::JK40DefaultSimulatorInterface::getSigma |
( |
| ) |
|
|
inlinestaticinherited |
Get intrinsic time smearing of K40 coincidences.
- Returns
- sigma [ns]
Definition at line 282 of file JK40DefaultSimulatorInterface.hh.
static double & get_sigma()
Get intrinsic time smearing of K40 coincidences.
static void JDETECTOR::JK40DefaultSimulatorInterface::setSigma |
( |
const double |
sigma | ) |
|
|
inlinestaticinherited |
Set intrinsic time smearing of K40 coincidences.
- Parameters
-
Definition at line 293 of file JK40DefaultSimulatorInterface.hh.
static double & get_sigma()
Get intrinsic time smearing of K40 coincidences.
double JPHYSICS::JK40Rates::getSinglesRate |
( |
| ) |
const |
|
inlineinherited |
Get singles rate.
- Returns
- rate [Hz]
Definition at line 71 of file JK40Rates.hh.
JRateL0_t rateL0
singles rate [Hz]
const JRateL1_t& JPHYSICS::JK40Rates::getMultiplesRates |
( |
| ) |
const |
|
inlineinherited |
Get multiples rate.
- Returns
- rate [Hz]
Definition at line 82 of file JK40Rates.hh.
JRateL1_t rateL1
multiples rates [Hz]
Get multiples rate at given multiplicity.
- Parameters
-
- Returns
- rate [Hz]
Definition at line 94 of file JK40Rates.hh.
static const multiplicity_type LOWER_L1_MULTIPLICITY
Lower L1 multiplicity.
JRateL1_t rateL1
multiples rates [Hz]
size_t multiplicity_type
Type definition of multiplicity.
Get lower multiplicty.
- Returns
- lower multiplicity
Definition at line 108 of file JK40Rates.hh.
static const multiplicity_type LOWER_L1_MULTIPLICITY
Lower L1 multiplicity.
Get upper multiplicty.
- Returns
- upper multiplicity
Definition at line 119 of file JK40Rates.hh.
JRateL1_t rateL1
multiples rates [Hz]
void JPHYSICS::JK40Rates::correct |
( |
const double |
QE | ) |
|
|
inlineinherited |
Correct rates for global efficiency,.
- Parameters
-
Definition at line 130 of file JK40Rates.hh.
static const multiplicity_type LOWER_L1_MULTIPLICITY
Lower L1 multiplicity.
multiplicity_type getLowerL1Multiplicity() const
Get lower multiplicty.
JRateL1_t rateL1
multiples rates [Hz]
T pow(const T &x, const double y)
Power .
double getMultiplesRate(const multiplicity_type M) const
Get multiples rate at given multiplicity.
size_t multiplicity_type
Type definition of multiplicity.
then JCookie sh JDataQuality D $DETECTOR_ID R
multiplicity_type getUpperL1Multiplicity() const
Get upper multiplicty.
double binomial(const size_t n, const size_t k)
Binomial function.
JRateL0_t rateL0
singles rate [Hz]
Read K40 simulator from input.
- Parameters
-
in | input stream |
object | K40 simulator |
- Returns
- input stream
Definition at line 114 of file JK40DefaultSimulator.hh.
116 const double rateL0 =
object.rateL0;
118 if (
in >>
object.rateL0) {
120 object.rateL1.clear();
122 for (
double x;
in >>
x; ) {
123 object.rateL1.push_back(x);
then fatal The output file must have the wildcard in the e g root fi eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
JRateL0_t rateL0
singles rate [Hz]
Write K40 simulator to output.
- Parameters
-
out | output stream |
object | K40 simulator |
- Returns
- output stream
Definition at line 142 of file JK40DefaultSimulator.hh.
144 out <<
object.rateL0;
146 for (JRateL1_t::const_iterator
i =
object.
rateL1.begin();
i !=
object.rateL1.end(); ++
i) {
JRateL1_t rateL1
multiples rates [Hz]
JRateL0_t JPHYSICS::JK40Rates::rateL0 |
|
protectedinherited |
JRateL1_t JPHYSICS::JK40Rates::rateL1 |
|
protectedinherited |
The documentation for this class was generated from the following file: