MINT2
ReadMintTuple.h
Go to the documentation of this file.
1 #ifndef READMINTTUPLE_HH
2 #define READMINTTUPLE_HH
3 
4 #include "TFile.h"
5 #include "TTree.h"
6 #include "TLorentzVector.h"
7 #include "TString.h"
8 #include "TTree.h"
9 #include "TBranch.h"
10 #include "TEntryList.h"
11 
12 #include <vector>
13 
14 #include <string>
15 
16 #include "Mint/counted_ptr.h"
17 #include "Mint/DalitzEvent.h"
18 #include "Mint/IDalitzEvent.h"
20 #include "Mint/DalitzEventList.h"
22 
23 using namespace std;
24 using namespace MINT;
25 
27 {
28 private:
29  TFile* _file0;
30  TTree* _oldTree;
31  TTree* _tree;
32  std::string _fname;
33  std::string _ntpName;
34  long int _maxEvents;
35 
36  // Variables to read in
37  std::vector<std::vector<double> > m_input_var;
38  std::vector<double> m_pdg;
39  std::vector<int> set_pat;
40  std::vector<double> m_mother_var;
41  double m_mother_pdg;
42 
44  const char* _cuts;
45 
46  TLorentzVector _pMother;
47 
49 
51 
52 public:
53 
54  std::string newFilename() const;
55 
57  , std::string fname
58  , std::string ntpName = "DalitzEventList"
59  , const char* = ""
60  , long int maxEvents = -1 // -1 means: read all
61  );
62 
63  ~ReadMintTuple();
64 
65  bool getTree();
66 
67  bool SetDaughterBranchAddress(const char* Px, const char* Py, const char* Pz, const char* E, const char* pdg );
68  bool SetMotherBranchAddress(const char* Px, const char* Py, const char* Pz, const char* E, const char* pdg );
69 
70  bool SetEventPattern(DalitzEventPattern*);
71 
72  void ApplyFiducalCuts();
73  bool passFiducalCuts();
74 
75  bool AddFriend(std::string fname
76  , std::string ntpName);
77 
78  bool getUpdatedTree();
79 
80  MINT::counted_ptr<DalitzEvent> readEntry(unsigned int entry);
81  bool readit(DiskResidentEventList* listPtr, int nEvents=10);
82 
83 
84 };
85 
86 #endif
TFile * _file0
Definition: ReadMintTuple.h:29
DalitzEventPattern * m_pat
Definition: ReadMintTuple.h:48
double m_mother_pdg
Definition: ReadMintTuple.h:41
TTree * _oldTree
Definition: ReadMintTuple.h:30
std::string _fname
Definition: ReadMintTuple.h:32
std::string _ntpName
Definition: ReadMintTuple.h:33
std::vector< double > m_mother_var
Definition: ReadMintTuple.h:40
std::vector< int > set_pat
Definition: ReadMintTuple.h:39
std::vector< std::vector< double > > m_input_var
Definition: ReadMintTuple.h:37
const char * _cuts
Definition: ReadMintTuple.h:44
long int _maxEvents
Definition: ReadMintTuple.h:34
TLorentzVector _pMother
Definition: ReadMintTuple.h:46
bool _applyFiducalCuts
Definition: ReadMintTuple.h:50
std::vector< double > m_pdg
Definition: ReadMintTuple.h:38