VMC Examples
Version 6.8
Toggle main menu visibility
Loading...
Searching...
No Matches
examples
E03
E03d
include
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
27
class
Ex03DetectorConstruction
;
28
class
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
39
class
Ex03dCalorimeterSD
:
public
TNamed
40
{
41
public
:
42
Ex03dCalorimeterSD
(
const
char
* name,
Ex03DetectorConstruction
* detector);
43
Ex03dCalorimeterSD
(
44
const
Ex03dCalorimeterSD
& origin,
Ex03DetectorConstruction
* detector);
45
Ex03dCalorimeterSD
();
46
virtual
~Ex03dCalorimeterSD
();
47
48
// static methods
49
static
void
PrintTotal
(std::vector<Ex03CalorHit>* collection);
50
51
// methods
52
void
Initialize
();
53
Bool_t
ProcessHits
();
54
void
EndOfEvent
();
55
void
Register
();
56
virtual
void
Print
(Option_t* option =
""
)
const
;
57
void
PrintTotal
()
const
;
58
59
// set methods
60
void
SetVerboseLevel
(Int_t level);
61
62
// get methods
63
Ex03CalorHit
*
GetHit
(Int_t i)
const
;
64
65
private
:
66
// methods
67
void
ResetHits
();
68
69
// data members
70
TVirtualMC*
fMC
;
///< The VMC implementation
71
Ex03DetectorConstruction
*
fDetector
;
///< Detector construction
72
std::vector<Ex03CalorHit>*
fCalCollection
{
73
new
std::vector<Ex03CalorHit>
74
};
//! < The vector of particle (persistent)
75
Int_t
fAbsorberVolId
;
///< The absorber volume Id
76
Int_t
fGapVolId
;
///< The gap volume Id
77
Int_t
fVerboseLevel
;
///< Verbosity level
78
79
ClassDef(
Ex03dCalorimeterSD
, 1)
// Ex03dCalorimeterSD
80
};
81
82
/// Set verbose level
83
/// \param level The new verbose level value
84
inline
void
Ex03dCalorimeterSD::SetVerboseLevel
(Int_t level)
85
{
86
fVerboseLevel
= level;
87
}
88
89
#endif
// EX02_CALORIMETER_SD_H
Ex03CalorHit.h
Definition of the Ex03CalorHit class.
Ex03CalorHit
The calorimeter hit.
Definition
Ex03CalorHit.h:32
Ex03DetectorConstruction
The detector construction (via TGeo ).
Definition
Ex03DetectorConstruction.h:35
Ex03dCalorimeterSD::Register
void Register()
Definition
Ex03dCalorimeterSD.cxx:204
Ex03dCalorimeterSD::PrintTotal
void PrintTotal() const
Definition
Ex03dCalorimeterSD.cxx:223
Ex03dCalorimeterSD::fGapVolId
Int_t fGapVolId
The gap volume Id.
Definition
Ex03dCalorimeterSD.h:76
Ex03dCalorimeterSD::fMC
TVirtualMC * fMC
The VMC implementation.
Definition
Ex03dCalorimeterSD.h:70
Ex03dCalorimeterSD::fAbsorberVolId
Int_t fAbsorberVolId
< The vector of particle (persistent)
Definition
Ex03dCalorimeterSD.h:75
Ex03dCalorimeterSD::Initialize
void Initialize()
Definition
Ex03dCalorimeterSD.cxx:147
Ex03dCalorimeterSD::~Ex03dCalorimeterSD
virtual ~Ex03dCalorimeterSD()
Definition
Ex03dCalorimeterSD.cxx:114
Ex03dCalorimeterSD::Print
virtual void Print(Option_t *option="") const
Definition
Ex03dCalorimeterSD.cxx:211
Ex03dCalorimeterSD::GetHit
Ex03CalorHit * GetHit(Int_t i) const
Definition
Ex03dCalorimeterSD.cxx:126
Ex03dCalorimeterSD::Ex03dCalorimeterSD
Ex03dCalorimeterSD()
Definition
Ex03dCalorimeterSD.cxx:107
Ex03dCalorimeterSD::ProcessHits
Bool_t ProcessHits()
Definition
Ex03dCalorimeterSD.cxx:159
Ex03dCalorimeterSD::EndOfEvent
void EndOfEvent()
Definition
Ex03dCalorimeterSD.cxx:193
Ex03dCalorimeterSD::Ex03dCalorimeterSD
Ex03dCalorimeterSD(const char *name, Ex03DetectorConstruction *detector)
Definition
Ex03dCalorimeterSD.cxx:65
Ex03dCalorimeterSD::fVerboseLevel
Int_t fVerboseLevel
Verbosity level.
Definition
Ex03dCalorimeterSD.h:77
Ex03dCalorimeterSD::ResetHits
void ResetHits()
Definition
Ex03dCalorimeterSD.cxx:135
Ex03dCalorimeterSD::fDetector
Ex03DetectorConstruction * fDetector
Detector construction.
Definition
Ex03dCalorimeterSD.h:71
Ex03dCalorimeterSD::SetVerboseLevel
void SetVerboseLevel(Int_t level)
Definition
Ex03dCalorimeterSD.h:84
Ex03dCalorimeterSD::fCalCollection
std::vector< Ex03CalorHit > * fCalCollection
Definition
Ex03dCalorimeterSD.h:72
TNamed
Generated on
for VMC Examples by
1.17.0