VMC Examples Version 6.6
Loading...
Searching...
No Matches
A01DriftChamberSD.h
Go to the documentation of this file.
1#ifndef A01_DRIFT_CHAMBER_SD_H
2#define A01_DRIFT_CHAMBER_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 A01DriftChamberSD.h
14/// \brief Definition of the A01DriftChamberSD 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
24
25/// \ingroup A01
26/// \brief The calorimeter sensitive detector
27///
28/// \author I. Hrivnacova; IPN, Orsay
29
31{
32 public:
33 A01DriftChamberSD(const char* name, const char* volName);
36 virtual ~A01DriftChamberSD();
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 A01DriftChamberHit* GetHit(Int_t i) const;
52
53 private:
54 // data members
55 TClonesArray* fHitsCollection; ///< Hits collection
56 TString fVolName; ///< The sensitive volume name
57 Int_t fVolId; ///< The calorimeter volume Id
58 Bool_t fWriteHits; ///< Option to write hits
59 Int_t fVerboseLevel; ///< Verbosity level
60
61 ClassDef(A01DriftChamberSD, 1) // A01DriftChamberSD
62};
63
64/// (In)Activate writing hits on file
65/// \param writeHits The new value of the option
66inline void A01DriftChamberSD::SetWriteHits(Bool_t writeHits)
67{
68 fWriteHits = writeHits;
69}
70
71/// Set verbose level
72/// \param level The new verbose level value
73inline void A01DriftChamberSD::SetVerboseLevel(Int_t level)
74{
75 fVerboseLevel = level;
76}
77
78#endif // A01_DRIFT_CHAMBER_SD_H
The drift chamber hit.
The calorimeter sensitive detector.
Bool_t fWriteHits
Option to write hits.
Int_t fVolId
The calorimeter volume Id.
TClonesArray * fHitsCollection
Hits collection.
A01DriftChamberHit * GetHit(Int_t i) const
Int_t fVerboseLevel
Verbosity level.
void SetWriteHits(Bool_t writeHits)
TString fVolName
The sensitive volume name.
virtual void Print(Option_t *option="") const
void SetVerboseLevel(Int_t level)