Skip to content

Commit 88c4c17

Browse files
committed
first commit
1 parent 9814fbc commit 88c4c17

35 files changed

+5254
-0
lines changed

Makefile

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# --------------------------------------------------------------
2+
# GNUmakefile
3+
# --------------------------------------------------------------
4+
5+
name := minidex_sim
6+
G4TARGET := $(name)
7+
G4EXLIB := true
8+
9+
G4DEBUG := 0
10+
11+
ROOTCFLAGS = $(shell root-config --cflags)
12+
ROOTLIBS = $(shell root-config --libs)
13+
ROOTGLIBS = $(shell root-config --glibs)
14+
15+
EXTRALIBS +=$(ROOTLIBS)
16+
EXTRALIBS +=$(ROOTGLIBS)
17+
EXTRALIBS +=-L/usr/lib
18+
19+
20+
CPPFLAGS += $(ROOTCFLAGS)
21+
22+
.PHONY: all
23+
all: lib bin
24+
print-% : ; @echo $* = $($*)
25+
26+
include $(G4INSTALL)/config/binmake.gmk
27+

include/HPGeAnalysisManager.hh

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
#ifndef __XENON10PANALYSISMANAGER_H__
2+
#define __XENON10PANALYSISMANAGER_H__
3+
4+
#include <globals.hh>
5+
#include "G4PhysicalConstants.hh"
6+
#include "G4SystemOfUnits.hh"
7+
#include <G4Navigator.hh>
8+
9+
#include <TParameter.h>
10+
11+
class G4Run;
12+
class G4Event;
13+
class G4Step;
14+
15+
class TFile;
16+
class TTree;
17+
18+
class HPGeEventData;
19+
class HPGePrimaryGeneratorAction;
20+
21+
class HPGeAnalysisManager
22+
{
23+
public:
24+
HPGeAnalysisManager(HPGePrimaryGeneratorAction *pPrimaryGeneratorAction);
25+
virtual ~HPGeAnalysisManager();
26+
27+
public:
28+
virtual void BeginOfRun(const G4Run *pRun);
29+
virtual void EndOfRun(const G4Run *pRun);
30+
virtual void BeginOfEvent(const G4Event *pEvent);
31+
virtual void EndOfEvent(const G4Event *pEvent);
32+
virtual void Step(const G4Step *pStep);
33+
34+
void SetDataFilename(const G4String &hFilename) { m_hDataFilename = hFilename; }
35+
void SetNbEventsToSimulate(G4int iNbEventsToSimulate) { m_iNbEventsToSimulate = iNbEventsToSimulate; }
36+
37+
void FillHitsToNtuple(const G4Event *pEvent);
38+
void WritePartialEvent(const G4Event *pEvent);
39+
void ResetPartialEvent(const G4Event *pEvent); // remove all hits collections
40+
//void SaveBremsstrahlungGamma(G4float px, G4float py, G4float pz);
41+
42+
bool GetNeedTrajectoryOrNot() {return NeedTrajectory;}
43+
bool GetNeedTrajectoryPointOrNot() {return NeedTrajectoryPoint;}
44+
45+
private:
46+
//G4bool FilterEvent(HPGeEventData *pEventData);
47+
48+
private:
49+
G4int m_iHPGeHitsCollectionID;
50+
51+
G4String m_hDataFilename;
52+
G4int m_iNbEventsToSimulate;
53+
54+
TFile *m_pTreeFile;
55+
TTree *m_pTree;
56+
TParameter<int> *m_pNbEventsToSimulateParameter;
57+
58+
HPGePrimaryGeneratorAction *m_pPrimaryGeneratorAction;
59+
60+
HPGeEventData *m_pEventData;
61+
62+
bool NeedTrajectory;
63+
bool NeedTrajectoryPoint;
64+
65+
};
66+
67+
#endif // __XENON10PANALYSISMANAGER_H__
68+

include/HPGeDetectorConstruction.hh

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#ifndef __XENON10PDETECTORCONSTRUCTION_H__
2+
#define __XENON10PDETECTORCONSTRUCTION_H__
3+
4+
//----------------------------------------------------------
5+
// from outside inwards
6+
// 20cm Pb, 10cmCu, inner chamber 20cmx20cm space, 40cm high
7+
// HPGe at the very origin
8+
// all these logical volumes should be put directly into Mother volume
9+
// therefore, all shield volumes are subtracted volumes
10+
//
11+
// 2011.8.7 move the detector 9mm away from the copper wall and add PE hat
12+
// following 3 components are moved towards +x direction by 9 mm within the Chamber
13+
// Cryostat
14+
// ChamberCoolingFinger
15+
// CryostatinnerVolume
16+
//
17+
// 2013.5.18 construct GEMMX detector with modified shielding
18+
// the counting chamber volume is 20cm x 20cm x 35cm
19+
// the copper shield is 40cm x 40cm, total height is 70cm, top 10cm thick, bottom 25cm thick,
20+
// the lead shield is 80cm x 80cm, total height is 110cm,
21+
//
22+
// 2013.6.20 put eight blocks of stainlesssteel samples ,3.844kg
23+
// 100x100x50 mm3
24+
//----------------------------------------------------------
25+
26+
#include <globals.hh>
27+
28+
#include <vector>
29+
#include <map>
30+
31+
using std::vector;
32+
using std::map;
33+
34+
class G4LogicalVolume;
35+
class G4VPhysicalVolume;
36+
class HPGeDetectorMessenger;
37+
38+
#include <G4VUserDetectorConstruction.hh>
39+
40+
class HPGeDetectorConstruction: public G4VUserDetectorConstruction
41+
{
42+
public:
43+
HPGeDetectorConstruction();
44+
~HPGeDetectorConstruction();
45+
46+
G4VPhysicalVolume* Construct();
47+
48+
void setGDMLsourceFile( G4String );
49+
50+
private:
51+
G4LogicalVolume *m_pMotherLogicalVolume;
52+
G4LogicalVolume *m_pLabLogicalVolume;
53+
G4VPhysicalVolume *m_pMotherPhysicalVolume;
54+
G4VPhysicalVolume *m_pLabPhysicalVolume;
55+
56+
void CheckOverlapping();
57+
void PrintGeometryInformation();
58+
59+
private:
60+
61+
HPGeDetectorMessenger *m_pDetectorMessenger;
62+
G4String fGDMLsourceFile;
63+
};
64+
65+
#endif // __XENON10PDETECTORCONSTRUCTION_H__
66+

include/HPGeDetectorMessenger.hh

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#ifndef HPGeDetectorMessenger_h
2+
#define HPGeDetectorMessenger_h 1
3+
4+
#include <G4UImessenger.hh>
5+
#include <globals.hh>
6+
7+
class HPGeDetectorConstruction;
8+
9+
class G4UIcommand;
10+
class G4UIdirectory;
11+
class G4UIcmdWithoutParameter;
12+
class G4UIcmdWithAString;
13+
class G4UIcmdWithADoubleAndUnit;
14+
class G4UIcmdWith3Vector;
15+
class G4UIcmdWith3VectorAndUnit;
16+
class G4UIcmdWithAnInteger;
17+
class G4UIcmdWithADouble;
18+
class G4UIcmdWithABool;
19+
class G4UIcmdWithoutParameter;
20+
21+
class HPGeDetectorMessenger: public G4UImessenger
22+
{
23+
public:
24+
HPGeDetectorMessenger(HPGeDetectorConstruction *pHPGeDetector);
25+
~HPGeDetectorMessenger();
26+
27+
void SetNewValue(G4UIcommand *pUIcommand, G4String hString);
28+
29+
private:
30+
HPGeDetectorConstruction* m_pHPGeDetector;
31+
32+
G4UIdirectory *m_pDetectorDir;
33+
G4UIcmdWithAString *fSetGDMLsourceFileCmd;
34+
35+
};
36+
37+
#endif
38+

include/HPGeEventAction.hh

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#ifndef __XENON10PEVENTACTION_H__
2+
#define __XENON10PEVENTACTION_H__
3+
4+
#include <G4UserEventAction.hh>
5+
6+
#include "HPGeAnalysisManager.hh"
7+
8+
class G4Event;
9+
10+
class HPGeEventAction : public G4UserEventAction
11+
{
12+
public:
13+
HPGeEventAction(HPGeAnalysisManager *pAnalysisManager = 0);
14+
~HPGeEventAction();
15+
16+
public:
17+
void BeginOfEventAction(const G4Event *pEvent);
18+
void EndOfEventAction(const G4Event *pEvent);
19+
20+
private:
21+
HPGeAnalysisManager *m_pAnalysisManager;
22+
};
23+
24+
#endif // __XENON10PEVENTACTION_H__
25+

0 commit comments

Comments
 (0)