VMC Examples Version 6.6
Loading...
Searching...
No Matches
A01EmCalorimeterSD.h
Go to the documentation of this file.
1#ifndef A01_EM_CALORIMETER_SD_H
2#define A01_EM_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 A01EmCalorimeterSD.h
14/// \brief Definition of the A01EmCalorimeterSD 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 A01EmCalorHit;
24
25/// \ingroup A01
26/// \brief The EM calorimeter sensitive detector
27///
28/// \author I. Hrivnacova; IPN, Orsay
29
31{
32 public:
33 A01EmCalorimeterSD(const char* name);
36 virtual ~A01EmCalorimeterSD();
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 A01EmCalorHit* 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(A01EmCalorimeterSD, 1) // A01EmCalorimeterSD
68};
69
70/// (In)Activate writing hits on file
71/// \param writeHits The new value of the option
72inline void A01EmCalorimeterSD::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_EM_CALORIMETER_SD_H
The EM calorimeter hit.
The EM calorimeter sensitive detector.
Int_t fVolId
The calorimeter volume Id.
A01EmCalorHit * GetHit(Int_t i) const
static const Int_t fgkNofRows
void SetWriteHits(Bool_t writeHits)
void SetVerboseLevel(Int_t level)
virtual void Print(Option_t *option="") const
Bool_t fWriteHits
Option to write hits.
Int_t fVerboseLevel
Verbosity level.
TClonesArray * fCalCollection
Hits collection.
static const Int_t fgkNofColumns