VMC Examples Version 6.6
Loading...
Searching...
No Matches
SensitiveDetector.h
Go to the documentation of this file.
1#ifndef GARFIELD_CALORIMETER_SD_H
2#define GARFIELD_CALORIMETER_SD_H
3
4//------------------------------------------------
5// The Virtual Monte Carlo examples
6// Copyright (C) 2007 - 2016 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 ExGarfield/include/SensitiveDetector.h
14/// \brief Definition of the ExGarfield::SensitiveDetector class
15///
16/// Garfield garfieldpp 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 ExGarfield
26{
27
28class Hit;
29
30/// \ingroup ExGarfield
31/// \brief The calorimeter sensitive detector
32///
33/// Garfield garfieldpp 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 Bool_t UpdateFromGarfield();
50 void EndOfEvent();
51 void Register();
52 virtual void Print(Option_t* option = "") const;
53
54 // set methods
55 void SetVerboseLevel(Int_t level);
56
57 // get methods
58 Hit* GetHit() const;
59
60 private:
61 // data members
62 Hit* fHit; ///< The detector hit
63 Int_t fAbsorberVolId; ///< The absorber volume Id
64 Int_t fGasVolId; ///< The gas 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 Hit* SensitiveDetector::GetHit() const { return fHit; }
79
80} // namespace ExGarfield
81} // namespace VMC
82
83#endif // EX02_CALORIMETER_SD_H
The calorimeter hit.
Definition Hit.h:37
The calorimeter sensitive detector.
Hit * GetHit() const
Return the hits collection.
Int_t fAbsorberVolId
The absorber volume Id.
virtual void Print(Option_t *option="") const