Graduation-Project/include/GeneAnalysisManager.hh

53 lines
1.0 KiB
C++
Raw Normal View History

2023-04-09 22:30:59 +08:00
#ifndef GeneAnalysisManager_hh
#define GeneAnalysisManager_hh 1
2023-02-13 14:50:36 +08:00
#include "TFile.h"
#include "TROOT.h"
#include "TTree.h"
2023-02-13 15:48:31 +08:00
2023-05-08 11:10:33 +08:00
#include "globals.hh"
2023-02-13 14:50:36 +08:00
struct detEvent {
G4double Thetacm;
G4double Thetalab;
G4int Ndets;
G4double detE[24];
G4int detId[24];
};
class GeneAnalysisManager {
/**
* Analysis manager is a singleton object (there is only one instance).
* The pointer to this object is available through the use of the method GetInstance();
*
* @see GetInstance
*/
public:
GeneAnalysisManager();
~GeneAnalysisManager();
static GeneAnalysisManager *GetInstance();
void SetAnalysisFileName(G4String);
void FillAng(G4double thetacm, G4double thetalab);
void FillDetData(G4int ndets, G4double *edet, G4int *ndet);
2023-02-13 15:48:31 +08:00
// void EventNo();
2023-02-13 14:50:36 +08:00
void book();
void FillTree();
void save();
private:
static GeneAnalysisManager *instance;
struct detEvent mydata;
G4String analysisFileName;
TFile *theTFile;
TTree *tr;
};
#endif