VMC Examples Version 6.6
Loading...
Searching...
No Matches
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 <TClonesArray.h>
23#include <TVirtualMCSensitiveDetector.h>
24
26class Ex03CalorHit;
27class TVirtualMC;
28
29/// \ingroup E03
30/// \brief The calorimeter sensitive detector
31///
32/// A variant of the Ex03CalorimeterSD:
33/// a sensitive detector class derived fron the new
34/// TVirtualMCSensitiveDetector interface
35///
36/// \author I. Hrivnacova; IPN, Orsay
37
39{
40 public:
41 Ex03bCalorimeterSD(const char* name, Ex03DetectorConstruction* detector);
43 const Ex03bCalorimeterSD& origin, Ex03DetectorConstruction* detector);
45 virtual ~Ex03bCalorimeterSD();
46
47 // methods
48 void Initialize();
49 virtual void ProcessHits();
50 void EndOfEvent();
51 void Register();
52 virtual void Print(Option_t* option = "") const;
53 void PrintTotal() const;
54
55 // set methods
56 void SetVerboseLevel(Int_t level);
57 void SetPrintModulo(Int_t value);
58
59 // get methods
60 Ex03CalorHit* GetHit(Int_t i) const;
61
62 private:
63 // methods
64 void ResetHits();
65
66 // data members
67 TVirtualMC* fMC; ///< The VMC implementation
68 Ex03DetectorConstruction* fDetector; ///< Detector construction
69 TClonesArray* fCalCollection; ///< Hits collection
70 Int_t fAbsorberVolId; ///< The absorber volume Id
71 Int_t fGapVolId; ///< The gap volume Id
72 Int_t fVerboseLevel; ///< Verbosity level
73 Int_t fPrintModulo; ///< The event modulus number to be printed
74
75 ClassDef(Ex03bCalorimeterSD, 1) // Ex03bCalorimeterSD
76};
77
78/// Set verbose level
79/// \param level The new verbose level value
81{
82 fVerboseLevel = level;
83}
84
85/// Set the event modulus number to be printed
86/// \param value The new event modulus number value
87inline void Ex03bCalorimeterSD::SetPrintModulo(Int_t value)
88{
89 fPrintModulo = value;
90}
91
92#endif // EX02_CALORIMETER_SD_H
The calorimeter hit.
The detector construction (via TGeo )
The calorimeter sensitive detector.
TVirtualMC * fMC
The VMC implementation.
void SetVerboseLevel(Int_t level)
Int_t fPrintModulo
The event modulus number to be printed.
Ex03DetectorConstruction * fDetector
Detector construction.
virtual void Print(Option_t *option="") const
TClonesArray * fCalCollection
Hits collection.
Int_t fAbsorberVolId
The absorber volume Id.
Ex03CalorHit * GetHit(Int_t i) const
Int_t fGapVolId
The gap volume Id.
void SetPrintModulo(Int_t value)
Int_t fVerboseLevel
Verbosity level.