VMC Examples Version 6.8
Loading...
Searching...
No Matches
Ex03dCalorimeterSD.h
Go to the documentation of this file.
1#ifndef EX03_CALORIMETER_SD_H
2#define EX03_CALORIMETER_SD_H
3
4//------------------------------------------------
5// The Virtual Monte Carlo examples
6// Copyright (C) 2014 - 2018 Ivana Hrivnacova
7// All rights reserved.
8//
9// For the licensing terms see geant4_vmc/LICENSE.
10// Contact: root-vmc@cern.ch
11//-------------------------------------------------
12
13/// \file Ex03dCalorimeterSD.h
14/// \brief Definition of the Ex03dCalorimeterSD class
15///
16/// Geant4 ExampleN03 adapted to Virtual Monte Carlo: \n
17/// Id: ExN03CalorimeterSD.hh,v 1.4 2002/01/09 17:24:11 ranjard Exp
18/// GEANT4 tag Name: geant4-05-00
19///
20/// \author Radoslaw Karabowicz; GSI
21
22#include <TNamed.h>
23#include <vector>
24
25#include "Ex03CalorHit.h"
26
28class TVirtualMC;
29
30/// \ingroup E03
31/// \brief The calorimeter sensitive detector
32///
33/// A variant of the Ex03CalorimeterSD class
34/// updated for RNTuple output.
35///
36/// \date 07/07/2026
37/// \author Radoslaw Karabowicz; GSI
38
40{
41 public:
42 Ex03dCalorimeterSD(const char* name, Ex03DetectorConstruction* detector);
44 const Ex03dCalorimeterSD& origin, Ex03DetectorConstruction* detector);
46 virtual ~Ex03dCalorimeterSD();
47
48 // methods
49 void Initialize();
50 Bool_t ProcessHits();
51 void EndOfEvent();
52 void Register();
53 virtual void Print(Option_t* option = "") const;
54 void PrintTotal() const;
55
56 // set methods
57 void SetVerboseLevel(Int_t level);
58
59 // get methods
60 Ex03CalorHit* GetHit(Int_t i) const;
61
62 private:
63 // methods
64 void ResetHits();
65
66 // data members
67 TVirtualMC* fMC; ///< The VMC implementation
68 Ex03DetectorConstruction* fDetector; ///< Detector construction
69 std::vector<Ex03CalorHit>* fCalCollection{
70 new std::vector<Ex03CalorHit>
71 }; //! < The vector of particle (persistent)
72 Int_t fAbsorberVolId; ///< The absorber volume Id
73 Int_t fGapVolId; ///< The gap volume Id
74 Int_t fVerboseLevel; ///< Verbosity level
75
76 ClassDef(Ex03dCalorimeterSD, 1) // Ex03dCalorimeterSD
77};
78
79/// Set verbose level
80/// \param level The new verbose level value
82{
83 fVerboseLevel = level;
84}
85
86#endif // EX02_CALORIMETER_SD_H
Definition of the Ex03CalorHit class.
The calorimeter hit.
The detector construction (via TGeo ).
Int_t fGapVolId
The gap volume Id.
TVirtualMC * fMC
The VMC implementation.
Int_t fAbsorberVolId
< The vector of particle (persistent)
virtual void Print(Option_t *option="") const
Ex03CalorHit * GetHit(Int_t i) const
Ex03dCalorimeterSD(const char *name, Ex03DetectorConstruction *detector)
Int_t fVerboseLevel
Verbosity level.
Ex03DetectorConstruction * fDetector
Detector construction.
void SetVerboseLevel(Int_t level)
std::vector< Ex03CalorHit > * fCalCollection