PathLengthList.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::PathLengthList
5 
6 \brief Object to be filled with the neutrino path-length, for all detector
7  geometry materials, when starting from a position x and travelling
8  along the direction of the neutrino 4-momentum.
9 
10 \author Costas Andreopoulos <costas.andreopoulos \at stfc.ac.uk>
11  University of Liverpool & STFC Rutherford Appleton Lab
12 
13 \created May 24, 2005
14 
15 \cpright Copyright (c) 2003-2019, The GENIE Collaboration
16  For the full text of the license visit http://copyright.genie-mc.org
17  or see $GENIE/LICENSE
18 */
19 //____________________________________________________________________________
20 
21 #ifndef _PATH_LENGTH_LIST_H_
22 #define _PATH_LENGTH_LIST_H_
23 
24 #include <map>
25 #include <ostream>
26 #include <string>
27 
29 
30 class TLorentzVector;
31 
32 using std::map;
33 using std::ostream;
34 using std::string;
35 
36 namespace genie {
37 
38 class PathLengthList;
39 class PDGCodeList;
40 
41 ostream & operator << (ostream & stream, const PathLengthList & list);
42 
43 class PathLengthList : public map<int, double> {
44 
45 public :
47  PathLengthList(const PDGCodeList & pdglist);
49  PathLengthList(const map<int,double> & plist);
51 
52  void AddPathLength (int pdgc, double pl); // path-legth(pdgc) += pl
53  void SetPathLength (int pdgc, double pl); // path-legth(pdgc) = pl
54  void SetAllToZero (void);
55  bool AreAllZero (void) const;
56  void ScalePathLength (int pdgc, double scale);
57  double PathLength (int pdgc) const;
58 
60  void SaveAsXml (string filename) const;
61 
62  void Copy (const PathLengthList & plist);
63  void Print (ostream & stream) const;
64 
66  friend ostream & operator << (ostream & stream, const PathLengthList & list);
67 };
68 
69 } // genie namespace
70 
71 #endif // _PATH_LENGTH_LIST_H_
void ScalePathLength(int pdgc, double scale)
double PathLength(int pdgc) const
bool AreAllZero(void) const
THE MAIN GENIE PROJECT NAMESPACE
Definition: GeneratorBase.h:8
PathLengthList & operator=(const PathLengthList &list)
void SetPathLength(int pdgc, double pl)
string filename
Definition: shutoffs.py:106
A list of PDG codes.
Definition: PDGCodeList.h:33
Object to be filled with the neutrino path-length, for all detector geometry materials, when starting from a position x and travelling along the direction of the neutrino 4-momentum.
Double_t scale
Definition: plot.C:25
void SaveAsXml(string filename) const
XmlParserStatus_t LoadFromXml(string filename)
friend ostream & operator<<(ostream &stream, const PathLengthList &list)
void Print(ostream &stream) const
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
void AddPathLength(int pdgc, double pl)
enum genie::EXmlParseStatus XmlParserStatus_t
void Copy(const PathLengthList &plist)
enum BeamMode string