Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef Nebula_h
#define Nebula_h 1
/*****************************************************************************
* Copyright (C) 2009-2019 this file is part of the NPTool Project *
* *
* For the licensing terms see $NPTOOL/Licence/NPTool_Licence *
* For the list of contributors see $NPTOOL/Licence/Contributors *
*****************************************************************************/
/*****************************************************************************
* Original Author: Adrien Matta contact address: matta@lpccaen.in2p3.fr *
* *
* Creation Date : December 2019 *
* Last update : *
*---------------------------------------------------------------------------*
* Decription: *
* This class describe Nebula simulation *
* *
*---------------------------------------------------------------------------*
* Comment: *
* *
*****************************************************************************/
// C++ header
#include <string>
#include <vector>
using namespace std;
// G4 headers
#include "G4ThreeVector.hh"
#include "G4RotationMatrix.hh"
#include "G4LogicalVolume.hh"
#include "G4MultiFunctionalDetector.hh"
// NPTool header
#include "NPSVDetector.hh"
#include "TNebulaData.h"
#include "NPInputParser.h"
class Nebula : public NPS::VDetector{
////////////////////////////////////////////////////
/////// Default Constructor and Destructor /////////
////////////////////////////////////////////////////
public:
Nebula() ;
virtual ~Nebula() ;
////////////////////////////////////////////////////
//////// Specific Function of this Class ///////////
////////////////////////////////////////////////////
public:
// Cartesian
void AddWall(G4ThreeVector POS, int NbrModule,bool veto,bool frame);
G4LogicalVolume* BuildModule();
G4LogicalVolume* BuildVeto();
private:
G4LogicalVolume* m_Module;
G4LogicalVolume* m_Veto;
double Energy;
double Light;
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
////////////////////////////////////////////////////
////// Inherite from NPS::VDetector class /////////
////////////////////////////////////////////////////
public:
// Read stream at Configfile to pick-up parameters of detector (Position,...)
// Called in DetecorConstruction::ReadDetextorConfiguration Method
void ReadConfiguration(NPL::InputParser) ;
// Construct detector and inialise sensitive part.
// Called After DetecorConstruction::AddDetector Method
void ConstructDetector(G4LogicalVolume* world) ;
// Add Detector branch to the EventTree.
// Called After DetecorConstruction::AddDetector Method
void InitializeRootOutput() ;
// Read sensitive part and fill the Root tree.
// Called at in the EventAction::EndOfEventAvtion
void ReadSensitive(const G4Event* event) ;
public: // Scorer
// Initialize all Scorer used by the MUST2Array
void InitializeScorers() ;
// Associated Scorer
G4MultiFunctionalDetector* m_ModuleScorer ;
G4MultiFunctionalDetector* m_VetoScorer ;
////////////////////////////////////////////////////
///////////Event class to store Data////////////////
////////////////////////////////////////////////////
private:
TNebulaData* m_Event ;
////////////////////////////////////////////////////
///////////////Private intern Data//////////////////
////////////////////////////////////////////////////
private: // Geometry
// Detector Coordinate
vector<G4ThreeVector> m_Pos;
vector<int> m_NbrModule;
int m_TotalModule = 0;
vector<bool> m_HasVeto;
vector<bool> m_HasFrame;
// Visualisation Attribute
G4VisAttributes* m_VisModule;
G4VisAttributes* m_VisVeto;
G4VisAttributes* m_VisPMT;
G4VisAttributes* m_VisFrame;
// Needed for dynamic loading of the library
public:
static NPS::VDetector* Construct();
};
#endif