VMC Examples Version 6.8
Loading...
Searching...
No Matches
Ex03CalorimeterSD.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 Ex03CalorimeterSD.h
14/// \brief Definition of the Ex03CalorimeterSD 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 "Ex03CalorHit.h"
23
24#include <TClonesArray.h>
25#include <TNamed.h>
26
28class TVirtualMC;
29
30/// \ingroup E03
31/// \brief The calorimeter sensitive detector
32///
33/// \date 06/03/2003
34/// \author I. Hrivnacova; IPN, Orsay
35
37{
38 public:
39 Ex03CalorimeterSD(const char* name, Ex03DetectorConstruction* detector);
41 const Ex03CalorimeterSD& origin, Ex03DetectorConstruction* detector);
43 virtual ~Ex03CalorimeterSD();
44
45 // methods
46 void Initialize();
47 Bool_t ProcessHits();
48 void EndOfEvent();
49 void Register();
50 virtual void Print(Option_t* option = "") const;
51 void PrintTotal() const;
52
53 // set methods
54 void SetVerboseLevel(Int_t level);
55
56 // get methods
57 Ex03CalorHit* GetHit(Int_t i) const;
58
59 private:
60 // methods
61 void ResetHits();
62
63 // data members
64 TVirtualMC* fMC; ///< The VMC implementation
65 Ex03DetectorConstruction* fDetector; ///< Detector construction
66 TClonesArray* fCalCollection; ///< Hits collection
67 Int_t fAbsorberVolId; ///< The absorber volume Id
68 Int_t fGapVolId; ///< The gap volume Id
69 Bool_t fAssemblyHierarchyPrinted; ///< Whether assembly levels were printed
70 Int_t fVerboseLevel; ///< Verbosity level
71
72 Ex03CalorHit fReflectedHit; ///< Reflected contribution to the layer hits
73
74 ClassDef(Ex03CalorimeterSD, 1) // Ex03CalorimeterSD
75};
76
77/// Set verbose level
78/// \param level The new verbose level value
79inline void Ex03CalorimeterSD::SetVerboseLevel(Int_t level)
80{
81 fVerboseLevel = level;
82}
83
84#endif // EX02_CALORIMETER_SD_H
Definition of the Ex03CalorHit class.
The calorimeter hit.
Ex03CalorHit fReflectedHit
Reflected contribution to the layer hits.
Ex03DetectorConstruction * fDetector
Detector construction.
TClonesArray * fCalCollection
Hits collection.
void SetVerboseLevel(Int_t level)
Int_t fVerboseLevel
Verbosity level.
Bool_t fAssemblyHierarchyPrinted
Whether assembly levels were printed.
Int_t fGapVolId
The gap volume Id.
Int_t fAbsorberVolId
The absorber volume Id.
Ex03CalorHit * GetHit(Int_t i) const
TVirtualMC * fMC
The VMC implementation.
Ex03CalorimeterSD(const char *name, Ex03DetectorConstruction *detector)
virtual void Print(Option_t *option="") const
The detector construction (via TGeo ).