All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DK2NuInterface.h
Go to the documentation of this file.
1 #ifndef _DK2NUINTERFACE_H_
2 #define _DK2NUINTERFACE_H_
3 #include "FluxInterface.h"
4 #include <vector>
5 
6 class TTree;
7 class TFile;
8 
9 #include "TLorentzRotation.h"
10 #include "TRandom3.h"
11 
12 #include "dk2nu/tree/dkmeta.h"
13 #include "dk2nu/tree/dk2nu.h"
14 #include "dk2nu/tree/NuChoice.h"
15 
16 #include "fhiclcpp/ParameterSet.h"
17 
18 namespace fluxr {
20  {
21  public:
24 
25  const Long64_t GetEntries() {return fNEntries;};
26  const int GetRun() {return fRun;};
27  const void SetRun(int run) {fRun = run;};
28  const float GetPOT() {return fPOT;};
29  const TLorentzVector GetNuPosition() {return fNuPos;};
30  const TLorentzVector GetNuMomentum() {return fNuMom;};
31 
32  void SetRootFile(TFile* rootFile);
33  bool FillMCFlux(Long64_t ientry, simb::MCFlux& mcflux);
34 
35  bsim::Dk2Nu* GetDk2Nu() {return fDk2Nu;};
36  bsim::NuChoice* GetNuChoice() {return fNuChoice;};
37 
38  void Init(fhicl::ParameterSet const & ps);
39  void User2BeamPos(const TLorentzVector& usrxyz, TLorentzVector& beamxyz) const;
40  void Beam2UserPos(const TLorentzVector& beamxyz, TLorentzVector& usrxyz) const;
41  void Beam2UserP4(const TLorentzVector& beamp4, TLorentzVector& usrp4) const;
42  TVector3 AnglesToAxis(double theta, double phi);
43 
44  private:
45  TTree* fDk2NuTree;
46  TTree* fDkMetaTree;
47  bsim::Dk2Nu* fDk2Nu;
48  bsim::DkMeta* fDkMeta;
49  bsim::NuChoice* fNuChoice;
50  Long64_t fNEntries;
51  int fRun;
52  float fPOT;
53 
54  TLorentzVector fNuPos;
55  TLorentzVector fNuMom;
56 
57  TRotation fBeamRotXML, fTempRot;
58  TLorentzRotation fBeamRot, fBeamRotInv;
59  TVector3 fBeamPosXML;
60  TLorentzVector fBeamZero;
61  TVector3 fFluxWindowPtUser[3];
63  TVector3 fWindowNormal;
65  Double_t fWindowArea;
66  TRandom3 fRnd;
67  };
68 
69 }
70 
71 #endif // _DK2NUINTERFACE_H_
const void SetRun(int run)
bool FillMCFlux(Long64_t ientry, simb::MCFlux &mcflux)
bsim::DkMeta * fDkMeta
bsim::Dk2Nu * GetDk2Nu()
TLorentzVector fNuPos
TLorentzVector fBeamZero
const Long64_t GetEntries()
TLorentzVector fFluxWindowDir2
bsim::NuChoice * fNuChoice
TLorentzVector fNuMom
const TLorentzVector GetNuPosition()
const TLorentzVector GetNuMomentum()
void User2BeamPos(const TLorentzVector &usrxyz, TLorentzVector &beamxyz) const
TVector3 AnglesToAxis(double theta, double phi)
void Beam2UserPos(const TLorentzVector &beamxyz, TLorentzVector &usrxyz) const
TVector3 fFluxWindowPtUser[3]
bsim::NuChoice * GetNuChoice()
TLorentzRotation fBeamRotInv
const float GetPOT()
TLorentzVector fFluxWindowBase
void Init(fhicl::ParameterSet const &ps)
void Beam2UserP4(const TLorentzVector &beamp4, TLorentzVector &usrp4) const
TLorentzVector fFluxWindowDir1
void SetRootFile(TFile *rootFile)
bsim::Dk2Nu * fDk2Nu
TLorentzRotation fBeamRot