HighLAND
DataSample.hxx
1 #ifndef DataSample_h
2 #define DataSample_h
3 
4 #include <map>
5 #include <vector>
6 #include <stdexcept>
7 
8 #include <TreeManager.hxx>
9 #include "Header.hxx"
10 
11 /// This class handles a data sample with POT and spill info
12 /// A DataSample inherits from a Tree manager and therefore contains several trees
13 /// - The "header" tree with POT and spill info
14 /// - The "config" tree with info about the selection and the systematics
15 /// - The "default" analysis tree with the analysis variables and the accum_level
16 /// - Other analysis trees with systematics
17 /// It also inherits from Header, which holds POT info
18 
19 class DataSample: public TreeManager, public Header{
20  public :
21 
22  DataSample();
23  DataSample(const std::string& file, double norm=0, const std::string& cut="");
24  virtual ~DataSample(){}
25 
26  /// Set and returns the cut to be applied to this sample
27  void SetCut(const std::string& cut){_cut = cut;}
28  std::string GetCut() const{return _cut;}
29 
30  /// Set and Get the special normalisation to be used for this sample
31  void SetNorm(Float_t norm){_norm = norm;}
32  Float_t GetNorm() const{return _norm;}
33 
34  /// Systematic group for this sample
35  void SetSystGroup(const std::string& systGroup){_systGroup = systGroup;}
36  const std::string& GetSystGroup() const {return _systGroup;}
37 
38  /// Systematic option for this sample
39  void SetSystOption(const std::string& systOption){_systOption = systOption;}
40  const std::string& GetSystOption() const {return _systOption;}
41 
42  /// returns the filePath
43  const std::string& GetFilePath(){return _filePath;}
44 
45  /// Set and Get the special normalisation to be used for this sample
46  void SetNEntries(Int_t en){_nEntries = en;}
47  Int_t GetNEntries() const{return _nEntries;}
48 
49  protected:
50 
51  /// The file path
52  std::string _filePath;
53 
54  /// The number of entries in this DataSample
55  Int_t _nEntries;
56 
57  /// An automatic cut to be applied to this sample (for example to select runs)
58  std::string _cut;
59 
60  /// Special normalization for this sample (instead of POT in header)
61  Float_t _norm;
62 
63  /// Systematic group for this sample
64  std::string _systGroup;
65 
66  /// Systematic option for this sample
67  std::string _systOption;
68 };
69 
70 #endif
71 
72 
std::string _cut
An automatic cut to be applied to this sample (for example to select runs)
Definition: DataSample.hxx:58
const std::string & GetFilePath()
returns the filePath
Definition: DataSample.hxx:43
Float_t _norm
Special normalization for this sample (instead of POT in header)
Definition: DataSample.hxx:61
Int_t _nEntries
The number of entries in this DataSample.
Definition: DataSample.hxx:55
This class handles POT info, SoftwareVersion and IsMC.
Definition: Header.hxx:10
void SetCut(const std::string &cut)
Set and returns the cut to be applied to this sample.
Definition: DataSample.hxx:27
std::string _systOption
Systematic option for this sample.
Definition: DataSample.hxx:67
void SetNorm(Float_t norm)
Set and Get the special normalisation to be used for this sample.
Definition: DataSample.hxx:31
void SetSystGroup(const std::string &systGroup)
Systematic group for this sample.
Definition: DataSample.hxx:35
void SetNEntries(Int_t en)
Set and Get the special normalisation to be used for this sample.
Definition: DataSample.hxx:46
std::string _systGroup
Systematic group for this sample.
Definition: DataSample.hxx:64
std::string _filePath
The file path.
Definition: DataSample.hxx:52
void SetSystOption(const std::string &systOption)
Systematic option for this sample.
Definition: DataSample.hxx:39