Geant4 VMC Version 6.6
Loading...
Searching...
No Matches
TG4SDConstruction.h
Go to the documentation of this file.
1#ifndef TG4_SD_CONSTRUCTION_H
2#define TG4_SD_CONSTRUCTION_H
3
4//------------------------------------------------
5// The Geant4 Virtual Monte Carlo package
6// Copyright (C) 2007 - 2015 Ivana Hrivnacova
7// All rights reserved.
8//
9// For the licensing terms see geant4_vmc/LICENSE.
10// Contact: root-vmc@cern.ch
11//-------------------------------------------------
12
17
18#include "TG4SDMessenger.h"
19#include "TG4Verbose.h"
20
21#include <set>
22
23class G4LogicalVolume;
24
25class TVirtualMCSensitiveDetector;
26
38
40
41{
42 public:
44 virtual ~TG4SDConstruction();
45
46 // static methods
47 static const G4String& GetDefaultSVLabel();
48
49 // methods
50 virtual void Construct();
51
52 // set methods
53 void AddSelection(const G4String& selection);
54 void SetExclusiveSDScoring(G4bool value);
55 void SetSelectionFromTGeo(G4bool value);
56 void SetSensitiveVolumeLabel(const G4String& label);
57 void SetIsGflash(G4bool isGflash);
58
59 private:
60 // methods
61 void CreateSD(G4LogicalVolume* lv, TVirtualMCSensitiveDetector* userSD) const;
64 void MapVolumesToSDIds();
65
67
69 static const G4String fgkDefaultSVLabel;
70
73
76
78 G4String fSVLabel;
79
81 std::set<G4String> fSelection;
82
84 G4bool fIsGflash;
85};
86
87// inline functions
88
90{
93 return fgkDefaultSVLabel;
94}
95
97{
99 fExclusiveSDScoring = value;
100}
101
103{
105 fSelectionFromTGeo = value;
106}
107
108inline void TG4SDConstruction::SetSensitiveVolumeLabel(const G4String& label)
109{
112 fSVLabel = label;
113}
114
115inline void TG4SDConstruction::SetIsGflash(G4bool isGflash)
116{
118 fIsGflash = isGflash;
119}
120
121#endif // TG4_SD_CONSTRUCTION_H
Definition of the TG4SDMessenger class.
Definition of the TG4Verbose class.
Sensitive detector construction.
void CreateSD(G4LogicalVolume *lv, TVirtualMCSensitiveDetector *userSD) const
static const G4String & GetDefaultSVLabel()
void SetIsGflash(G4bool isGflash)
void SetSelectionFromTGeo(G4bool value)
void SetExclusiveSDScoring(G4bool value)
G4String fSVLabel
the label used to flag sensitive volumes in TGeo
void SetSensitiveVolumeLabel(const G4String &label)
std::set< G4String > fSelection
the set of volumes names which are selected as sensitive
void AddSelection(const G4String &selection)
G4bool fIsGflash
the flag to acivate creating Gflash sensitive detectors
static const G4String fgkDefaultSVLabel
default value of the sensitive volumes label
G4bool fExclusiveSDScoring
the flag to activate new scoring via user defined sensitive detectors
TG4SDMessenger fMessenger
messenger
G4bool fSelectionFromTGeo
the flag to activate retrieving sensitive volumes from TGeo
Messenger class that defines commands for the SD construction.
Base class for defining the verbose level and a common messenger.
Definition TG4Verbose.h:36