VMC Examples Version 6.6
Loading...
Searching...
No Matches
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
23namespace VMC
24{
25namespace Gflash
26{
27
28class 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
39{
40 public:
41 SensitiveDetector(const char* name);
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
72inline void SensitiveDetector::SetVerboseLevel(Int_t level)
73{
74 fVerboseLevel = level;
75}
76
77/// Return the hits collection
78inline TClonesArray* SensitiveDetector::GetHitsCollection() const
79{
81}
82
83} // namespace Gflash
84} // namespace VMC
85
86#endif // EX02_CALORIMETER_SD_H
The calorimeter hit.
Definition Hit.h:37
The calorimeter sensitive detector.
Int_t fVerboseLevel
Verbosity level.
Int_t fCrystalVolId
The crystal volume Id.
virtual void Print(Option_t *option="") const
TClonesArray * fCaloHitsCollection
Hits collection.
TClonesArray * GetHitsCollection() const
Return the hits collection.