VMC Examples
Version 6.8
Toggle main menu visibility
Loading...
Searching...
No Matches
examples
Gflash
include
SensitiveDetector.h
Go to the documentation of this file.
1
#ifndef GFLASH_CALORIMETER_SD_H
2
#define GFLASH_CALORIMETER_SD_H
3
4
//------------------------------------------------
5
// The Virtual Monte Carlo examples
6
// Copyright (C) 2007 - 2015 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 Gflash/include/SensitiveDetector.h
14
/// \brief Definition of the Gflash::SensitiveDetector class
15
///
16
/// Geant4 gflash example adapted to Virtual Monte Carlo.
17
///
18
/// \author I. Hrivnacova; IPN, Orsay
19
20
#include <TClonesArray.h>
21
#include <TNamed.h>
22
23
namespace
VMC
24
{
25
namespace
Gflash
26
{
27
28
class
Hit
;
29
30
/// \ingroup Gflash
31
/// \brief The calorimeter sensitive detector
32
///
33
/// Geant4 gflash example adapted to Virtual Monte Carlo.
34
///
35
/// \date 28/10/2015
36
/// \author I. Hrivnacova; IPN, Orsay
37
38
class
SensitiveDetector
:
public
TNamed
39
{
40
public
:
41
SensitiveDetector
(
const
char
* name);
42
SensitiveDetector
(
const
SensitiveDetector
& origin);
43
SensitiveDetector
();
44
virtual
~SensitiveDetector
();
45
46
// methods
47
void
Initialize
();
48
Bool_t
ProcessHits
();
49
void
EndOfEvent
();
50
void
Register
();
51
virtual
void
Print
(Option_t* option =
""
)
const
;
52
void
PrintTotal
()
const
;
53
54
// set methods
55
void
SetVerboseLevel
(Int_t level);
56
57
// get methods
58
Hit
*
GetHit
(Int_t i)
const
;
59
TClonesArray*
GetHitsCollection
()
const
;
60
61
private
:
62
// data members
63
TClonesArray*
fCaloHitsCollection
;
///< Hits collection
64
Int_t
fCrystalVolId
;
///< The crystal volume Id
65
Int_t
fVerboseLevel
;
///< Verbosity level
66
67
ClassDef(
SensitiveDetector
, 1)
// SensitiveDetector
68
};
69
70
/// Set verbose level
71
/// \param level The new verbose level value
72
inline
void
SensitiveDetector::SetVerboseLevel
(Int_t level)
73
{
74
fVerboseLevel
= level;
75
}
76
77
/// Return the hits collection
78
inline
TClonesArray*
SensitiveDetector::GetHitsCollection
()
const
79
{
80
return
fCaloHitsCollection
;
81
}
82
83
}
// namespace Gflash
84
}
// namespace VMC
85
86
#endif
// EX02_CALORIMETER_SD_H
TNamed
VMC::Gflash::Hit
The calorimeter hit.
Definition
Hit.h:37
VMC::Gflash::SensitiveDetector::fVerboseLevel
Int_t fVerboseLevel
Verbosity level.
Definition
SensitiveDetector.h:65
VMC::Gflash::SensitiveDetector::fCrystalVolId
Int_t fCrystalVolId
The crystal volume Id.
Definition
SensitiveDetector.h:64
VMC::Gflash::SensitiveDetector::Print
virtual void Print(Option_t *option="") const
Definition
SensitiveDetector.cxx:155
VMC::Gflash::SensitiveDetector::SetVerboseLevel
void SetVerboseLevel(Int_t level)
Definition
SensitiveDetector.h:72
VMC::Gflash::SensitiveDetector::Initialize
void Initialize()
Definition
SensitiveDetector.cxx:97
VMC::Gflash::SensitiveDetector::Register
void Register()
Definition
SensitiveDetector.cxx:146
VMC::Gflash::SensitiveDetector::ProcessHits
Bool_t ProcessHits()
Definition
SensitiveDetector.cxx:107
VMC::Gflash::SensitiveDetector::fCaloHitsCollection
TClonesArray * fCaloHitsCollection
Hits collection.
Definition
SensitiveDetector.h:63
VMC::Gflash::SensitiveDetector::~SensitiveDetector
virtual ~SensitiveDetector()
Definition
SensitiveDetector.cxx:71
VMC::Gflash::SensitiveDetector::GetHitsCollection
TClonesArray * GetHitsCollection() const
Return the hits collection.
Definition
SensitiveDetector.h:78
VMC::Gflash::SensitiveDetector::GetHit
Hit * GetHit(Int_t i) const
Definition
SensitiveDetector.cxx:84
VMC::Gflash::SensitiveDetector::SensitiveDetector
SensitiveDetector(const char *name)
Definition
SensitiveDetector.cxx:39
VMC::Gflash::SensitiveDetector::PrintTotal
void PrintTotal() const
Definition
SensitiveDetector.cxx:167
VMC::Gflash::SensitiveDetector::EndOfEvent
void EndOfEvent()
Definition
SensitiveDetector.cxx:135
VMC::Gflash::SensitiveDetector::SensitiveDetector
SensitiveDetector()
Definition
SensitiveDetector.cxx:64
VMC::Gflash
Definition
DetectorConstruction.h:30
VMC
Definition
FastSimulation.h:26
Generated on
for VMC Examples by
1.17.0