EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CompCal.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CompCal.h
1 
2 #ifndef CompCal_h
3 #define CompCal_h
4 
5 // composite calorimeter
6 
7 #include <Geant4/globals.hh>
8 
9 #include <Rtypes.h>
10 
11 class Cell;
12 class G4LogicalVolume;
13 class TTree;
14 class RootOut;
15 
16 class CompCal {
17 
18  public:
19 
20  CompCal(const G4String&, G4double zpos, G4double ypos, G4LogicalVolume*, RootOut *rout);
21  virtual ~CompCal() {}
22 
23 // virtual void Add(std::vector<Detector*> *vec);
24  virtual const G4String& GetName() const {return fNam;}
25  virtual void CreateOutput(TTree *tree);
26  virtual void ClearEvent();
27  virtual void FinishEvent();
28 
29  private:
30 
31  G4String fNam; // detector name
32 
33  void AddBranch(const std::string& nam, Double_t *val, TTree *tree);
34  void AddBranch(const std::string& nam, ULong64_t *val, TTree *tree);
35 
36  Double_t fEdep; // deposited energy in the detector
37  Double_t fX; // x of first point in the detector
38  Double_t fY; // y of first point
39  Double_t fZ; // z of first point
40  Double_t fXyzE; // track energy at the first point
41 
42  ULong64_t fNphot; // number of optical photons from all cells
43  ULong64_t fNscin; // scintillation photons from all cells
44  ULong64_t fNcerenkov; // Cerenkov photons from all cells
45 
46  ULong64_t fNphotDet; // detected optical photons from cell photon detectors
47  ULong64_t fNscinDet; // detected scintillation photons from all cell photon detectors
48  ULong64_t fNcerenkovDet; // detected Cerenkov photons from all cells photon detectors
49 
50  std::vector<Cell*> *fCells; //detector cells
51 
52  friend class Cell;
53 
54 };
55 
56 #endif
57