Graduation-Project/include/GeneAnalysisManager.hh

54 lines
1.0 KiB
C++
Raw Normal View History

2023-02-13 14:50:36 +08:00
#ifndef GENEANALYSISMANAGER_HH
#define GENEANALYSISMANAGER_HH 1
#include "TFile.h"
#include "TROOT.h"
#include "TTree.h"
2023-02-13 15:48:31 +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;
2023-02-13 15:48:31 +08:00
// G4int evtNo;
2023-02-13 14:50:36 +08:00
G4String analysisFileName;
TFile *theTFile;
TTree *tr;
};
#endif