EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Module.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Module.h
1 #ifndef MODULE_HH
2 #define MODULE_HH
3 
4 #include <map>
5 #include <string>
6 #include <any>
7 
8 #include "TTree.h"
9 #include "TClonesArray.h"
10 
11 #include "external/ExRootAnalysis/ExRootTreeReader.h"
12 
13 #include "AnalysisFunctions.cc"
14 
15 
16 class Module {
17 
18  public:
19 
20  Module(ExRootTreeReader* data);
21 
22  ~Module();
23 
24  virtual void initialize();
25  virtual bool execute(std::map<std::string, std::any>* DataStore);
26  virtual void finalize();
27 
28  ExRootTreeReader* getData() { return _data;};
29 
30 
31  // Particle Objects
32  void setJets(TClonesArray* jets) { _jets = jets; };
33  void setElectrons(TClonesArray* electrons) { _electrons = electrons; };
34  void setPhotons(TClonesArray* photons) { _photons = photons; };
35  void setNeutralHadrons(TClonesArray* neutralhadrons) { _neutralhadrons = neutralhadrons; };
36  void setMuons(TClonesArray* muons) { _muons = muons; };
37  void setTracks(TClonesArray* tracks) { _tracks = tracks; };
38  void setEFlowTracks(TClonesArray* tracks) { _eflowtracks = tracks; };
39  void setMET(TClonesArray* met) { _met = met; };
40 
41  void setGenParticles(TClonesArray* particles) { _genparticles = particles; };
42  void setGenJets(TClonesArray* genjets) { _genjets = genjets; };
43 
44  TClonesArray* getJets() { return _jets;};
45  TClonesArray* getElectrons() { return _electrons;};
46  TClonesArray* getPhotons() { return _photons;};
47  TClonesArray* getNeutralHadrons() { return _neutralhadrons;};
48  TClonesArray* getMuons() { return _muons;};
49  TClonesArray* getEFlowTracks() { return _eflowtracks;};
50  TClonesArray* getTracks() { return _tracks;};
51  TClonesArray* getMET() { return _met;};
52  TClonesArray* getGenParticles() { return _genparticles;};
53  TClonesArray* getGenJets() { return _genjets;};
54 
55  private:
56 
57  ExRootTreeReader* _data = nullptr;
58 
59 
60  // Particle Object Array Pointers
61  TClonesArray* _jets = nullptr;
62  TClonesArray* _electrons = nullptr;
63  TClonesArray* _photons = nullptr;
64  TClonesArray* _neutralhadrons = nullptr;
65  TClonesArray* _muons = nullptr;
66  TClonesArray* _tracks = nullptr;
67  TClonesArray* _eflowtracks = nullptr;
68 
69  TClonesArray* _met = nullptr;
70 
71  TClonesArray* _genparticles = nullptr;
72  TClonesArray* _genjets = nullptr;
73 
74 
75 };
76 
77 #endif