VMC Examples
Version 6.8
Toggle main menu visibility
Loading...
Searching...
No Matches
examples
E03
E03b
include
Ex03bCalorimeterSD.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 Ex03bCalorimeterSD.h
14
/// \brief Definition of the Ex03bCalorimeterSD 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 I. Hrivnacova; IPN, Orsay
21
22
#include "
Ex03CalorHit.h
"
23
24
#include <TClonesArray.h>
25
#include <TVirtualMCSensitiveDetector.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:
34
/// a sensitive detector class derived fron the new
35
/// TVirtualMCSensitiveDetector interface
36
///
37
/// \author I. Hrivnacova; IPN, Orsay
38
39
class
Ex03bCalorimeterSD
:
public
TVirtualMCSensitiveDetector
40
{
41
public
:
42
Ex03bCalorimeterSD
(
const
char
* name,
Ex03DetectorConstruction
* detector);
43
Ex03bCalorimeterSD
(
44
const
Ex03bCalorimeterSD
& origin,
Ex03DetectorConstruction
* detector);
45
Ex03bCalorimeterSD
();
46
virtual
~Ex03bCalorimeterSD
();
47
48
// methods
49
void
Initialize
();
50
virtual
void
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
void
SetPrintModulo
(Int_t value);
59
60
// get methods
61
Ex03CalorHit
*
GetHit
(Int_t i)
const
;
62
63
private
:
64
// methods
65
void
ResetHits
();
66
67
// data members
68
TVirtualMC*
fMC
;
///< The VMC implementation
69
Ex03DetectorConstruction
*
fDetector
;
///< Detector construction
70
TClonesArray*
fCalCollection
;
///< Hits collection
71
Int_t
fAbsorberVolId
;
///< The absorber volume Id
72
Int_t
fGapVolId
;
///< The gap volume Id
73
Int_t
fVerboseLevel
;
///< Verbosity level
74
Int_t
fPrintModulo
;
///< The event modulus number to be printed
75
76
Ex03CalorHit
fReflectedHit
;
///< Reflected contribution to the layer hits
77
78
ClassDef(
Ex03bCalorimeterSD
, 1)
// Ex03bCalorimeterSD
79
};
80
81
/// Set verbose level
82
/// \param level The new verbose level value
83
inline
void
Ex03bCalorimeterSD::SetVerboseLevel
(Int_t level)
84
{
85
fVerboseLevel
= level;
86
}
87
88
/// Set the event modulus number to be printed
89
/// \param value The new event modulus number value
90
inline
void
Ex03bCalorimeterSD::SetPrintModulo
(Int_t value)
91
{
92
fPrintModulo
= value;
93
}
94
95
#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
Ex03bCalorimeterSD::Register
void Register()
Definition
Ex03bCalorimeterSD.cxx:213
Ex03bCalorimeterSD::fReflectedHit
Ex03CalorHit fReflectedHit
Reflected contribution to the layer hits.
Definition
Ex03bCalorimeterSD.h:76
Ex03bCalorimeterSD::fMC
TVirtualMC * fMC
The VMC implementation.
Definition
Ex03bCalorimeterSD.h:68
Ex03bCalorimeterSD::Ex03bCalorimeterSD
Ex03bCalorimeterSD(const char *name, Ex03DetectorConstruction *detector)
Definition
Ex03bCalorimeterSD.cxx:37
Ex03bCalorimeterSD::SetVerboseLevel
void SetVerboseLevel(Int_t level)
Definition
Ex03bCalorimeterSD.h:83
Ex03bCalorimeterSD::ResetHits
void ResetHits()
Definition
Ex03bCalorimeterSD.cxx:122
Ex03bCalorimeterSD::fPrintModulo
Int_t fPrintModulo
The event modulus number to be printed.
Definition
Ex03bCalorimeterSD.h:74
Ex03bCalorimeterSD::fDetector
Ex03DetectorConstruction * fDetector
Detector construction.
Definition
Ex03bCalorimeterSD.h:69
Ex03bCalorimeterSD::PrintTotal
void PrintTotal() const
Definition
Ex03bCalorimeterSD.cxx:233
Ex03bCalorimeterSD::Initialize
void Initialize()
Definition
Ex03bCalorimeterSD.cxx:135
Ex03bCalorimeterSD::Ex03bCalorimeterSD
Ex03bCalorimeterSD()
Definition
Ex03bCalorimeterSD.cxx:87
Ex03bCalorimeterSD::Print
virtual void Print(Option_t *option="") const
Definition
Ex03bCalorimeterSD.cxx:221
Ex03bCalorimeterSD::fCalCollection
TClonesArray * fCalCollection
Hits collection.
Definition
Ex03bCalorimeterSD.h:70
Ex03bCalorimeterSD::fAbsorberVolId
Int_t fAbsorberVolId
The absorber volume Id.
Definition
Ex03bCalorimeterSD.h:71
Ex03bCalorimeterSD::GetHit
Ex03CalorHit * GetHit(Int_t i) const
Definition
Ex03bCalorimeterSD.cxx:113
Ex03bCalorimeterSD::fGapVolId
Int_t fGapVolId
The gap volume Id.
Definition
Ex03bCalorimeterSD.h:72
Ex03bCalorimeterSD::~Ex03bCalorimeterSD
virtual ~Ex03bCalorimeterSD()
Definition
Ex03bCalorimeterSD.cxx:100
Ex03bCalorimeterSD::EndOfEvent
void EndOfEvent()
Definition
Ex03bCalorimeterSD.cxx:185
Ex03bCalorimeterSD::ProcessHits
virtual void ProcessHits()
Definition
Ex03bCalorimeterSD.cxx:152
Ex03bCalorimeterSD::SetPrintModulo
void SetPrintModulo(Int_t value)
Definition
Ex03bCalorimeterSD.h:90
Ex03bCalorimeterSD::fVerboseLevel
Int_t fVerboseLevel
Verbosity level.
Definition
Ex03bCalorimeterSD.h:73
TVirtualMCSensitiveDetector
Generated on
for VMC Examples by
1.17.0