VMC Examples Version 6.6
Loading...
Searching...
No Matches
A01HadCalorimeterSD.h
Go to the documentation of this file.
1#ifndef A01_HAD_CALORIMETER_SD_H
2#define A01_HAD_CALORIMETER_SD_H
3
4//------------------------------------------------
5// The Virtual Monte Carlo examples
6// Copyright (C) 2007 - 2014 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 A01HadCalorimeterSD.h
14/// \brief Definition of the A01HadCalorimeterSD class
15///
16/// Geant4 example A01 adapted to Virtual Monte Carlo: \n
17///
18/// \author I. Hrivnacova; IPN, Orsay
19
20#include <TClonesArray.h>
21#include <TNamed.h>
22
23class A01HadCalorHit;
24
25/// \ingroup A01
26/// \brief The hadron calorimeter sensitive detector
27///
28/// \author I. Hrivnacova; IPN, Orsay
29
31{
32 public:
33 A01HadCalorimeterSD(const char* name);
36 virtual ~A01HadCalorimeterSD();
37
38 // methods
39 void Initialize();
40 Bool_t ProcessHits();
41 void EndOfEvent();
42 void Register();
43 virtual void Print(Option_t* option = "") const;
44 void PrintTotal() const;
45
46 // set methods
47 void SetWriteHits(Bool_t writeHits);
48 void SetVerboseLevel(Int_t level);
49
50 // get methods
51 A01HadCalorHit* GetHit(Int_t i) const;
52
53 private:
54 // methods
55 void ResetHits();
56
57 // static data members
58 static const Int_t fgkNofColumns;
59 static const Int_t fgkNofRows;
60
61 // data members
62 TClonesArray* fCalCollection; ///< Hits collection
63 Int_t fVolId; ///< The calorimeter volume Id
64 Bool_t fWriteHits; ///< Option to write hits
65 Int_t fVerboseLevel; ///< Verbosity level
66
67 ClassDef(A01HadCalorimeterSD, 1) // A01HadCalorimeterSD
68};
69
70/// (In)Activate writing hits on file
71/// \param writeHits The new value of the option
72inline void A01HadCalorimeterSD::SetWriteHits(Bool_t writeHits)
73{
74 fWriteHits = writeHits;
75}
76
77/// Set verbose level
78/// \param level The new verbose level value
80{
81 fVerboseLevel = level;
82}
83
84#endif // A01_HAD_CALORIMETER_SD_H
The hadron calorimeter hit.
The hadron calorimeter sensitive detector.
A01HadCalorHit * GetHit(Int_t i) const
static const Int_t fgkNofRows
void SetWriteHits(Bool_t writeHits)
Int_t fVerboseLevel
Verbosity level.
virtual void Print(Option_t *option="") const
Int_t fVolId
The calorimeter volume Id.
static const Int_t fgkNofColumns
Bool_t fWriteHits
Option to write hits.
TClonesArray * fCalCollection
Hits collection.
void SetVerboseLevel(Int_t level)