NuChoice.h
Go to the documentation of this file.
1 ///----------------------------------------------------------------------------
2 /**
3  * \class bsim::NuChoice
4  * \file NuChoice.h
5  *
6  * \brief A class that defines the final choice of the neutrino ray
7  * including it position and momentum in both detector and beam
8  * coordinate systems. This class is generally used in
9  * conjunction with the "dk2nu" class.
10  *
11  * \author (last to touch it) $Author: rhatcher $
12  *
13  * \version $Revision: 1.1 $
14  *
15  * \date $Date: 2012-11-21 04:47:28 $
16  *
17  * Contact: rhatcher@fnal.gov
18  *
19  * $Id: NuChoice.h,v 1.1 2012-11-21 04:47:28 rhatcher Exp $
20  *
21  */
22 ///----------------------------------------------------------------------------
23 
24 #ifndef BSIM_NUCHOICE_H
25 #define BSIM_NUCHOICE_H
26 
27 #include "TLorentzVector.h"
28 #include "TVector3.h"
29 
30 namespace bsim {
31  /**
32  * All the data members are public as these classes are used as
33  * generalized structs. As they will be branches of a TTree no
34  * specialized naming indicators signifying that they are member data
35  * of a class will be used, nor will any fancy capitalization schemes.
36  *
37  * All classes must implement a clear() method that resets their values
38  * to an identifiably invalid state or clears any vectors. Additionally
39  * classes should provide a AsString() method for formatting themselves
40  * for use output.
41  */
42 
43  ///---------------------------------------------------------------------------
44  /**
45  *============================================================================
46  *
47  */
48  class NuChoice
49  {
50  public:
51  int pdgNu; ///< generated nu pdg code
52  double xyWgt; ///< generated nu x-y weight
53  double impWgt; ///< original importance weight
54  /// GDk2NuFlux::Weight() might be the product of these
55  TLorentzVector p4NuBeam; ///< generated nu 4-momentum in beam coord
56  TLorentzVector x4NuBeam; ///< generated nu 4-position in beam coord
57  TLorentzVector p4NuUser; ///< generated nu 4-momentum in user/det coord
58  TLorentzVector x4NuUser; ///< generated nu 4-position in user/det coord
59 
60  public:
61  NuChoice();
62  virtual ~NuChoice();
63  void clear(const std::string &opt = ""); ///< reset everything
64  std::string AsString(const std::string& opt = "") const;
65 
66  private:
67  ClassDef(bsim::NuChoice,1)
68  }; // end-of-class bsim::NuChoice
69 
70 } // end-of-namespace "bsim"
71 
72 // not part of namespace bsim
73 std::ostream& operator<<(std::ostream& os, const bsim::NuChoice& nuchoice);
74 
75 #endif
int pdgNu
generated nu pdg code
Definition: NuChoice.h:51
TLorentzVector x4NuBeam
generated nu 4-position in beam coord
Definition: NuChoice.h:56
double impWgt
Definition: NuChoice.h:53
double xyWgt
generated nu x-y weight
Definition: NuChoice.h:52
bsim namespace for beam simulation classes and functions
Definition: GDk2NuFlux.h:59
void clear(const std::string &opt="")
reset everything
TLorentzVector x4NuUser
generated nu 4-position in user/det coord
Definition: NuChoice.h:58
TLorentzVector p4NuUser
generated nu 4-momentum in user/det coord
Definition: NuChoice.h:57
std::string AsString(const std::string &opt="") const
TLorentzVector p4NuBeam
generated nu 4-momentum in beam coord
Definition: NuChoice.h:55
std::ostream & operator<<(std::ostream &os, const bsim::NuChoice &nuchoice)
virtual ~NuChoice()
enum BeamMode string