Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cemcReco.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file cemcReco.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef CEMCRECO_H
4 #define CEMCRECO_H
5 
6 #include <fun4all/SubsysReco.h>
7 #include <HepMC/SimpleVector.h>
8 #include <vector>
9 //TopNode
10 class PHCompositeNode;
11 //histos and stuff
12 class TH1F;
13 class TH3F;
14 class TH2F;
15 class TH2I;
16 class TString;
17 //emcal stuff
19 class RawCluster;
21 class RawTowerContainer;
22 class RawTower;
23 //tracking for iso cone
24 class SvtxTrackMap;
25 //vertex info
26 class GlobalVertexMap;
27 class GlobalVertex;
28 //Fun4all
30 class TFile;
32 class PHG4Particle;
33 class PHG4VtxPoint;
34 class CaloEvalStack;
35 //class std::vector;
36 //class FourVector;
37 
38 const int nEtaBins = 5;
39 
40 
41 class cemcReco : public SubsysReco
42 {
43  public:
44 
45  cemcReco(const std::string &name, const std::string &outName);
46 
47  ~cemcReco() override;
48 
54  int Init(PHCompositeNode *topNode) override;
55 
61  int InitRun(PHCompositeNode *topNode) override;
62 
66  int process_event(PHCompositeNode *topNode) override;
67 
69  int ResetEvent(PHCompositeNode *topNode) override;
70 
72  int EndRun(const int runnumber) override;
73 
75  int End(PHCompositeNode *topNode) override;
76 
78  int Reset(PHCompositeNode * /*topNode*/) override;
79 
80  void Print(const std::string &what = "ALL") const override;
81 
82  private:
83  //counters, etc.
84  int nEvent;
86 
87  //functors
88  float calculateTSP(RawCluster *cluster, RawClusterContainer *cluster_container, RawTowerContainer *towerContainer, RawTowerGeomContainer *towerGeo, GlobalVertex *vtx);
89  float coneSum(RawCluster *cluster, RawClusterContainer *cluster_container, SvtxTrackMap *trackmap, float coneradius, GlobalVertex *vtx);
90  void letsSumw2();
91  float getpT(PHG4Particle *particle);
92  float FindTruthPhoton(float cluster_eta, float cluster_phi, float cluster_energy, PHG4TruthInfoContainer* particle);
95  bool compareVertices(HepMC::FourVector hepMCvtx, PHG4VtxPoint *g4vtx );
96  bool checkBarcode(int motherBarcode, std::vector<int> &motherBarcodes);
97  bool checkBarcode(int motherBarcode, std::vector<PHG4Particle*> &motherBarcodes);
98 
99  int getEtaBin(float eta);
100 
101  //this thing
103 
104  //RawTower *getMaxTower(RawCluster *cluster);
105  //histos
107  TH1F *photonE;
108  TH1F *clusterDisp;
109  TH2F *clusterChi2;
111  TH1F *isoPhoE;
112  TH2F *isoPhoChi2;
113  TH2F *isoPhoProb;
116  TH2F *tsp_E;
117  TH2F *tsp_E_iso;
119  TH1F *truth_eta_E;
123  TH3F *invMass_eta;
124  TH3F *dPhoChi2;
125  TH3F *dPhoProb;
126  TH3F *pi0Chi2;
127  TH3F *pi0Prob;
128  TH3F *etaChi2;
129  TH3F *etaProb;
131  TH3F *electronProb;
132  TH3F *hadronChi2;
133  TH3F *hadronProb;
134  TH2F *etaFrac;
135  TH2F *pi0Frac;
137  TH1F *unmatchedE;
139  TH3F *invMassEPhi;
140  //TH2F *deltaR_truth_eta;
141 
144 
146  //TH2F *asym_E_truth_eta;
147 
148  //Histogram manager
150 
151  //output file
152  TFile *out;
153  //values
154  const float pi = 3.1415926;
156 };
157 
158 #endif // CEMCRECO_H