NuWeight.h
Go to the documentation of this file.
1 #ifndef NUWEIGHT_H
2 #define NUWEIGHT_H
3 
4 #include "dk2nu/tree/dk2nu.h"
5 #include "dk2nu/tree/dkmeta.h"
6 
7 #include <TParticlePDG.h>
8 #include <TDatabasePDG.h>
9 #include <vector>
10 #include <iostream>
11 #include <cmath>
12 
14 
15  /*! \class NuWeight
16  * \brief Get the weight to get the neutrino probability flux
17  * in one point.
18  */
19  class NuWeight{
20  public:
21 
22  //! The constructor has to have the position of the detector.
23  NuWeight(std::vector<double>& posdet);
24 
25  //! Destructor
26  ~NuWeight();
27 
28  //! Calculate weight based on dk2nu entry. After this, enu and wgt have meaningful values
29  void calculate_weight(bsim::Dk2Nu* nu);
30  double enu;
31  double wgt;
32 
33  private:
34  TDatabasePDG* particle;
35  double xdet;
36  double ydet;
37  double zdet;
38 
39  };
40 
41 }
42 
43 #endif
Get the weight to get the neutrino probability flux in one point.
Definition: NuWeight.h:19
void calculate_weight(bsim::Dk2Nu *nu)
Calculate weight based on dk2nu entry. After this, enu and wgt have meaningful values.
Definition: NuWeight.cpp:16
NuWeight(std::vector< double > &posdet)
The constructor has to have the position of the detector.
Definition: NuWeight.cpp:7