LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
DK2NuInterface.h
Go to the documentation of this file.
1 #ifndef _DK2NUINTERFACE_H_
2 #define _DK2NUINTERFACE_H_
3 
4 #include "dk2nu/tree/NuChoice.h"
5 #include "dk2nu/tree/dk2nu.h"
6 #include "dk2nu/tree/dkmeta.h"
8 
10 
11 class TTree;
12 class TFile;
13 
14 #include "TLorentzRotation.h"
15 #include "TRandom3.h"
16 
17 #include <vector>
18 
19 namespace fluxr {
20  class DK2NuInterface : public FluxInterface {
21  public:
22  Long64_t GetEntries() const { return fNEntries; };
23  int GetRun() const { return fRun; };
24  float GetPOT() const { return fPOT; };
25  TLorentzVector GetNuPosition() const { return fNuPos; };
26  TLorentzVector GetNuMomentum() const { return fNuMom; };
27 
28  void SetRootFile(TFile* rootFile);
29  bool FillMCFlux(Long64_t ientry, simb::MCFlux& mcflux);
30 
31  bsim::Dk2Nu* GetDk2Nu() { return fDk2Nu; };
32  bsim::NuChoice* GetNuChoice() { return fNuChoice; };
33 
34  void Init(fhicl::ParameterSet const& ps);
35  void User2BeamPos(const TLorentzVector& usrxyz, TLorentzVector& beamxyz) const;
36  void Beam2UserPos(const TLorentzVector& beamxyz, TLorentzVector& usrxyz) const;
37  void Beam2UserP4(const TLorentzVector& beamp4, TLorentzVector& usrp4) const;
38  TVector3 AnglesToAxis(double theta, double phi);
39 
40  private:
41  TTree* fDk2NuTree;
42  TTree* fDkMetaTree;
43  bsim::Dk2Nu* fDk2Nu;
44  bsim::DkMeta* fDkMeta;
45  bsim::NuChoice* fNuChoice;
46  Long64_t fNEntries;
47  int fRun;
48  float fPOT;
49 
50  TLorentzVector fNuPos;
51  TLorentzVector fNuMom;
52 
53  TRotation fBeamRotXML, fTempRot;
54  TLorentzRotation fBeamRot, fBeamRotInv;
55  TVector3 fBeamPosXML;
56  TLorentzVector fBeamZero;
57  TVector3 detAV_rand_user;
58  TLorentzVector fRandUser, fRandBeam;
59  };
60 
61 }
62 
63 #endif // _DK2NUINTERFACE_H_
bool FillMCFlux(Long64_t ientry, simb::MCFlux &mcflux)
bsim::DkMeta * fDkMeta
bsim::Dk2Nu * GetDk2Nu()
TLorentzVector fNuPos
TLorentzVector fBeamZero
TLorentzVector fRandBeam
bsim::NuChoice * fNuChoice
TLorentzVector fNuMom
TLorentzVector GetNuMomentum() const
TLorentzVector fRandUser
void User2BeamPos(const TLorentzVector &usrxyz, TLorentzVector &beamxyz) const
TVector3 AnglesToAxis(double theta, double phi)
void Beam2UserPos(const TLorentzVector &beamxyz, TLorentzVector &usrxyz) const
bsim::NuChoice * GetNuChoice()
TLorentzRotation fBeamRotInv
float GetPOT() const
void Init(fhicl::ParameterSet const &ps)
void Beam2UserP4(const TLorentzVector &beamp4, TLorentzVector &usrp4) const
void SetRootFile(TFile *rootFile)
bsim::Dk2Nu * fDk2Nu
TLorentzRotation fBeamRot
TLorentzVector GetNuPosition() const
Long64_t GetEntries() const