Skip to content
Snippets Groups Projects
Commit 5ad55d22 authored by matta's avatar matta
Browse files

* Adding a DummyDetectorData class to NPLib

parent 35ba4fed
No related branches found
No related tags found
No related merge requests found
......@@ -28,9 +28,10 @@ I) REQUIREMENTS
II) WORKING CONFIGURATIONS
The NPTool package has been mainly tested (and developped) with
the two following configurations:
the following configurations:
1) Mac OS X (10.5.7) + G4 (4.9.2) + CLHEP (2.0.4.2) + ROOT (5.22/00 and 5.24/00) + GSL ()
2) Linux Fedora (kernel 2.6.29) + G4 (4.9.1p3) + CLHEP (2.0.4.2) + ROOT (5.22/00) + GSL (1.12)
3) Linux Fedora (kernel 2.6.29) + G4 (4.9.2p2) + CLHEP (2.0.4.2) + ROOT (5.25/02) + GSL (1.12)
Please, report any working or non-working configuration.
III) INSTALLATION
......
# Makefile for the ROOT test programs.
# This Makefile shows nicely how to compile and link applications
# using the ROOT libraries on all supported platforms.
#
# Copyright (c) 2000 Rene Brun and Fons Rademakers
#
# Author: Fons Rademakers, 29/2/2000
ROOTCONFIG := root-config
ARCH := $(shell $(ROOTCONFIG) --arch)
PLATFORM := $(shell $(ROOTCONFIG) --platform)
ALTCC := $(shell $(ROOTCONFIG) --cc)
ALTCXX := $(shell $(ROOTCONFIG) --cxx)
ALTF77 := $(shell $(ROOTCONFIG) --f77)
ALTLD := $(shell $(ROOTCONFIG) --ld)
#CXX =
ObjSuf = o
SrcSuf = cxx
ExeSuf =
DllSuf = so
OutPutOpt = -o # keep whitespace after "-o"
ifeq (debug,$(findstring debug,$(ROOTBUILD)))
OPT = -g
OPT2 = -g
else
ifneq ($(findstring debug, $(strip $(shell $(ROOTCONFIG) --config))),)
OPT = -g
OPT2 = -g
else
OPT = -O
OPT2 = -O2
endif
endif
ROOTCFLAGS := $(shell $(ROOTCONFIG) --cflags)
ROOTLDFLAGS := $(shell $(ROOTCONFIG) --ldflags)
ROOTLIBS := $(shell $(ROOTCONFIG) --libs)
ROOTGLIBS := $(shell $(ROOTCONFIG) --glibs)
HASTHREAD := $(shell $(ROOTCONFIG) --has-thread)
ROOTDICTTYPE := $(shell $(ROOTCONFIG) --dicttype)
NOSTUBS := $(shell $(ROOTCONFIG) --nostubs)
ROOTCINT := rootcint
ifeq ($(ARCH),linux)
# Linux with egcs, gcc 2.9x, gcc 3.x
CXX = g++
CXXFLAGS = $(OPT2) -Wall -fPIC
LD = g++
LDFLAGS = $(OPT2)
SOFLAGS = -shared
endif
ifeq ($(ARCH),linuxkcc)
# Linux with the KAI compiler
CXX = KCC --one_instantiation_per_object
CXXFLAGS = $(OPT) -fPIC +K0
LD = KCC
LDFLAGS = $(OPT) $(shell $(ROOTCONFIG) --cflags)
SOFLAGS =
endif
ifeq ($(ARCH),linuxicc)
# Linux with Intel icc compiler
ICC_MAJOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
cut -d'.' -f1)
ICC_MINOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
cut -d'.' -f2)
CXX = icc
CXXFLAGS = $(OPT) -fPIC -wd1476
LD = icpc
LDFLAGS = $(OPT)
SOFLAGS = -shared
endif
ifeq ($(ARCH),linuxppcgcc)
# PPC Linux with gcc and glibc
CXX = g++
CXXFLAGS = $(OPT2) -Wall -fPIC
LD = g++
LDFLAGS = $(OPT2)
SOFLAGS = -shared
endif
ifeq ($(ARCH),linuxia64gcc)
# Itanium Linux with gcc 2.9x
CXX = g++
CXXFLAGS = $(OPT2) -Wall -fPIC
LD = g++
LDFLAGS = $(OPT2)
SOFLAGS = -shared
endif
ifeq ($(ARCH),linuxia64sgi)
# Itanium Linux with sgiCC
CXX = sgiCC
CXXFLAGS = $(OPT) -Wall -fPIC
LD = gsgiCC
LDFLAGS = $(OPT)
SOFLAGS = -shared
endif
ifeq ($(ARCH),linuxia64ecc)
# Itanium Linux with Intel icc (was ecc)
ICC_MAJOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
cut -d'.' -f1)
ICC_MINOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
cut -d'.' -f2)
CXX = icc
CXXFLAGS = $(OPT) -fPIC -wd1476 -ftz
LD = icpc
LDFLAGS = $(OPT)
SOFLAGS = -shared
endif
ifeq ($(ARCH),linuxx8664gcc)
# AMD Opteron and Intel EM64T (64 bit mode) Linux with gcc 3.x
CXX = g++
CXXFLAGS = $(OPT2) -Wall -fPIC
LD = g++
LDFLAGS = $(OPT2)
SOFLAGS = -shared
endif
ifeq ($(ARCH),linuxppc64gcc)
# PPC64 Linux with gcc 3.x
CXX = g++
CXXFLAGS = $(OPT) -Wall -fPIC
LD = g++
LDFLAGS = $(OPT)
SOFLAGS = -shared
endif
ifeq ($(ARCH),linuxx8664icc)
# AMD Opteron and Intel EM64T (64 bit mode) Linux with Intel icc compiler
CXX = icc
CXXFLAGS = $(OPT) -fPIC -wd1476 -wd1572
LD = icpc
LDFLAGS = $(OPT)
SOFLAGS = -shared
endif
ifeq ($(ARCH),linuxalphagcc)
# Alpha Linux with gcc
CXX = g++
CXXFLAGS = $(OPT2) -Wall -fPIC
LD = g++
LDFLAGS = $(OPT2)
SOFLAGS = -shared
endif
ifeq ($(ARCH),linuxmips)
# GNU/Linux on mips (BE/LE, O32/N32/N64) with gcc
CXX = g++
CXXFLAGS = $(OPT2) -Wall -fPIC
LD = g++
LDFLAGS = $(OPT2)
SOFLAGS = -shared
endif
ifeq ($(ARCH),linuxhppa)
# GNU/Linux on hppa with gcc
CXX = g++
CXXFLAGS = $(OPT2) -Wall -fPIC
LD = g++
LDFLAGS = $(OPT2)
SOFLAGS = -shared
endif
ifeq ($(ARCH),linuxarm)
# ARM Linux with egcs
CXX = g++
CXXFLAGS = $(OPT) -Wall -fPIC
LD = g++
LDFLAGS = $(OPT)
SOFLAGS = -shared
endif
ifeq ($(ARCH),macosx)
# MacOS X with cc (GNU cc 2.95.2 and gcc 3.3)
MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
CXX = g++
CXXFLAGS = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
LD = $(MACOSXTARGET) g++
LDFLAGS = $(OPT2) -bind_at_load
# The SOFLAGS will be used to create the .dylib,
# the .so will be created separately
ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
DllSuf = so
else
DllSuf = dylib
endif
UNDEFOPT = dynamic_lookup
ifneq ($(subst $(MACOSX_MINOR),,12),12)
UNDEFOPT = suppress
LD = g++
endif
SOFLAGS = -dynamiclib -single_module -undefined $(UNDEFOPT)
endif
ifeq ($(ARCH),macosxicc)
# MacOS X with Intel icc compiler
MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
ifeq ($(MACOSX_MINOR),5)
MACOSX_MINOR := 4
endif
CXX = icc
CXXFLAGS = $(OPT) -fPIC -wd1476
LD = $(MACOSXTARGET) icpc
LDFLAGS = $(OPT)
# The SOFLAGS will be used to create the .dylib,
# the .so will be created separately
ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
DllSuf = so
else
DllSuf = dylib
endif
SOFLAGS = -dynamiclib -single_module -undefined dynamic_lookup
endif
ifeq ($(ARCH),macosx64)
# MacOS X >= 10.4 with gcc 64 bit mode (GNU gcc 4.*)
# Only specific option (-m64) comes from root-config
MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
CXX = g++
CXXFLAGS = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
LD = $(MACOSXTARGET) g++ -m64
LDFLAGS = $(OPT2) -bind_at_load
# The SOFLAGS will be used to create the .dylib,
# the .so will be created separately
ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
DllSuf = so
else
DllSuf = dylib
endif
SOFLAGS = -m64 -dynamiclib -single_module -undefined dynamic_lookup
endif
ifeq ($(ARCH),macosxxlc)
# MacOS X with IBM xlC compiler
MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
CXX = xlC
CXXFLAGS = $(OPT)
LD = $(MACOSXTARGET) xlC
LDFLAGS = $(OPT) -Wl,-bind_at_load
# The SOFLAGS will be used to create the .dylib,
# the .so will be created separately
DllSuf = dylib
UNDEFOPT = dynamic_lookup
ifneq ($(subst $(MACOSX_MINOR),,12),12)
UNDEFOPT = suppress
LD = xlC
endif
SOFLAGS = -qmkshrobj -single_module -undefined $(UNDEFOPT)
endif
CXXFLAGS += $(ROOTCFLAGS)
LDFLAGS += $(ROOTLDFLAGS)
LIBS = $(ROOTLIBS) $(SYSLIBS)
GLIBS = $(ROOTGLIBS) $(SYSLIBS)
INCLUDE = -I$(CLHEP_BASE_DIR)/include
#------------------------------------------------------------------------------
SHARELIB = libDUMMYDetectorData.so
all: $(SHARELIB)
#------------------------------------------------------------------------------
############### Detector ##############
## DUMMYDetector ##
libDUMMYDetectorData.so: TDUMMYDetectorData.o TDUMMYDetectorDataDict.o
$(LD) $(SOFLAGS) $^ $(OutPutOpt) $@
TDUMMYDetectorDataDict.cxx: TDUMMYDetectorData.h
rootcint -f $@ -c $^
# dependances
TDUMMYDetectorData.o: TDUMMYDetectorData.cxx TDUMMYDetectorData.h
#######################################
############# Clean and More ##########
clean:
@rm -f core *~ *.o *Dict*
distclean:
make clean; rm -f *.so
.SUFFIXES: .$(SrcSuf)
###
.$(SrcSuf).$(ObjSuf):
$(CXX) $(CXXFLAGS) $(INCLUDE) -c $<
#include <iostream>
#include "TDUMMYDetectorData.h"
/*****************************************************************************
* Copyright (C) 2009 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@ipno.in2p3.fr *
* *
* Creation Date : October 2009 *
* Last update : *
*---------------------------------------------------------------------------*
* Decription: *
* This class described the raw data of a very simple DUMMYDetector *
* Use it as a template for your own detector! *
* *
*---------------------------------------------------------------------------*
* Comment: *
* *
* *
*****************************************************************************/
ClassImp(TDUMMYDetectorData)
TDUMMYDetectorData::TDUMMYDetectorData()
{
}
TDUMMYDetectorData::~TDUMMYDetectorData()
{
}
void TDUMMYDetectorData::Clear()
{
fDUMMYDetector_Energy.clear();
fDUMMYDetector_Number.clear();
fDUMMYDetector_Time.clear();
}
void TDUMMYDetectorData::Dump() const
{
cout << "XXXXXXXXXXXXXXXXXXXXXXXX New Event XXXXXXXXXXXXXXXXX" << endl;
for(unsigned short i = 0 ; i<fDUMMYDetector_Energy.size() ; i ++)
{
cout << "DUMMYDetector Number " << fDUMMYDetector_Number[i] << " Energy: " << fDUMMYDetector_Energy[i] << " Time: "<< fDUMMYDetector_Time[i] << endl;
}
}
#ifndef __DUMMYDetectorDATA__
#define __DUMMYDetectorDATA__
/*****************************************************************************
* Copyright (C) 2009 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@ipno.in2p3.fr *
* *
* Creation Date : October 2009 *
* Last update : *
*---------------------------------------------------------------------------*
* Decription: *
* This class described the raw data of a very simple DUMMY detector *
* Use it as a template for your own detector! *
* *
*---------------------------------------------------------------------------*
* Comment: *
* *
* *
*****************************************************************************/
#include <vector>
#include "TObject.h"
using namespace std ;
class TDUMMYDetectorData : public TObject {
private:
// ADC
vector<double> fDUMMYDetector_Energy ;
vector<double> fDUMMYDetector_Time ;
vector<short> fDUMMYDetector_Number ;
public:
TDUMMYDetectorData();
virtual ~TDUMMYDetectorData();
void Clear();
void Clear(const Option_t*) {};
void Dump() const;
///////////////////// GETTERS ////////////////////////
// (E)
double GetEnergy(int i) {return fDUMMYDetector_Energy[i];}
// (T)
double GetTime(int i) {return fDUMMYDetector_Time[i];}
// (N)
int GetDUMMYDetectorNumber(int i) {return fDUMMYDetector_Number[i];}
double GetEnergySize() {return fDUMMYDetector_Energy.size();}
// (T)
double GetTimeSize() {return fDUMMYDetector_Time.size();}
// (N)
int GetDUMMYDetectorNumberSize() {return fDUMMYDetector_Number.size();}
///////////////////// SETTERS ////////////////////////
// (E)
void SetEnergy(double E) {fDUMMYDetector_Energy.push_back(E);}
void SetTime(double T) {fDUMMYDetector_Time.push_back(T);}
void SetDUMMYDetectorNumber(int N) {fDUMMYDetector_Number.push_back(N);}
//
ClassDef(TDUMMYDetectorData,1) // DUMMYDetectorData structure
};
#endif
This diff is collapsed.
/********************************************************************
* TDUMMYDetectorDataDict.h
* CAUTION: DON'T CHANGE THIS FILE. THIS FILE IS AUTOMATICALLY GENERATED
* FROM HEADER FILES LISTED IN G__setup_cpp_environmentXXX().
* CHANGE THOSE HEADER FILES AND REGENERATE THIS FILE.
********************************************************************/
#ifdef __CINT__
#error TDUMMYDetectorDataDict.h/C is only for compilation. Abort cint.
#endif
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#define G__ANSIHEADER
#define G__DICTIONARY
#define G__PRIVATE_GVALUE
#include "G__ci.h"
extern "C" {
extern void G__cpp_setup_tagtableTDUMMYDetectorDataDict();
extern void G__cpp_setup_inheritanceTDUMMYDetectorDataDict();
extern void G__cpp_setup_typetableTDUMMYDetectorDataDict();
extern void G__cpp_setup_memvarTDUMMYDetectorDataDict();
extern void G__cpp_setup_globalTDUMMYDetectorDataDict();
extern void G__cpp_setup_memfuncTDUMMYDetectorDataDict();
extern void G__cpp_setup_funcTDUMMYDetectorDataDict();
extern void G__set_cpp_environmentTDUMMYDetectorDataDict();
}
#include "TObject.h"
#include "TMemberInspector.h"
#include "TDUMMYDetectorData.h"
#include <algorithm>
namespace std { }
using namespace std;
#ifndef G__MEMFUNCBODY
#endif
extern G__linked_taginfo G__TDUMMYDetectorDataDictLN_TClass;
extern G__linked_taginfo G__TDUMMYDetectorDataDictLN_TBuffer;
extern G__linked_taginfo G__TDUMMYDetectorDataDictLN_TMemberInspector;
extern G__linked_taginfo G__TDUMMYDetectorDataDictLN_TObject;
extern G__linked_taginfo G__TDUMMYDetectorDataDictLN_vectorlEshortcOallocatorlEshortgRsPgR;
extern G__linked_taginfo G__TDUMMYDetectorDataDictLN_vectorlEdoublecOallocatorlEdoublegRsPgR;
extern G__linked_taginfo G__TDUMMYDetectorDataDictLN_vectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgR;
extern G__linked_taginfo G__TDUMMYDetectorDataDictLN_reverse_iteratorlEvectorlEROOTcLcLTSchemaHelpercOallocatorlEROOTcLcLTSchemaHelpergRsPgRcLcLiteratorgR;
extern G__linked_taginfo G__TDUMMYDetectorDataDictLN_TDUMMYDetectorData;
/* STUB derived class for protected member access */
......@@ -269,7 +269,7 @@ INCLUDE = -I$(CLHEP_BASE_DIR)/include
#------------------------------------------------------------------------------
SHARELIB = Vdetec InputOutputRoot InitCond InterCoord \
Must2All GaspardData AnnularS1Data PlasticData\
Must2All GaspardData AnnularS1Data PlasticData DummyDetectorData\
Reaction EnergyLoss
all: $(SHARELIB)
......@@ -308,19 +308,26 @@ GaspardData:
cp ./GASPARD/*.so ./lib ; cp ./GASPARD/*.h ./include
ifeq ($(ARCH),macosx)
cd lib; ln -sf libGaspardData.so libGaspardData.dylib
cd lib; ln -sf libGaspardPyysics.so libGaspardPhysics.dylib
cd lib; ln -sf libGaspardPhysics.so libGaspardPhysics.dylib
endif
## Gaspard ##
## Plastic ##
PlasticData:
make -C ./Plastic
cp ./Plastic/*.so ./lib ; cp ./Plastic/*.h ./include
ifeq ($(ARCH),macosx)
cd lib; ln -sf libPlasticData.so libPlasticData.dylib
cd lib; ln -sf libPlasticPyysics.so libPlasticPhysics.dylib
cd lib; ln -sf libPlasticPhysics.so libPlasticPhysics.dylib
endif
## DUMMY Detector ##
DummyDetectorData:
make -C ./DummyDetector
cp ./DummyDetector/*.so ./lib ; cp ./DummyDetector/*.h ./include
ifeq ($(ARCH),macosx)
cd lib; ln -sf libDummyDetectorData.so libPlasticData.dylib
cd lib; ln -sf libPlasticPhysics.so libPlasticPhysics.dylib
endif
############# Simulation ##############
## InitialConditions ##
......@@ -378,6 +385,7 @@ clean:
make clean -C ./GASPARD
make clean -C ./InteractionCoordinates
make clean -C ./InitialConditions
make clean -C ./DummyDetector
distclean:
rm -f ./lib/*.so
......@@ -393,7 +401,7 @@ endif
make distclean -C ./GASPARD
make distclean -C ./InteractionCoordinates
make distclean -C ./InitialConditions
make distclean -C ./DummyDetector
.SUFFIXES: .$(SrcSuf)
###
......
......@@ -122,7 +122,7 @@ private:
G4double m_Energy ;
////////////////////////////////////////////////////
////////////////// Scorer Things ///////////////////
///////////////// Scorer Related ///////////////////
////////////////////////////////////////////////////
private:
......@@ -132,6 +132,17 @@ private:
// Scorer Associate to the 20um Silicon stage
G4MultiFunctionalDetector* m_StripScorer ;
private:
// Initialize mmaterial used in detector definition
void InitializeMaterial();
// List of material
G4Material* m_MaterialSilicon ;
G4Material* m_MaterialAl ;
G4Material* m_MaterialVacuum ;
////////////////////////////////////////////////////
///////////////Private intern Data//////////////////
////////////////////////////////////////////////////
......
......@@ -62,11 +62,16 @@ using namespace CLHEP;
// ThinSi Specific Method
ThinSi::ThinSi()
{
InitializeMaterial();
}
ThinSi::~ThinSi()
{}
{
delete m_MaterialSilicon ;
delete m_MaterialAl ;
delete m_MaterialVacuum ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ThinSi::AddTelescope(G4ThreeVector TL ,
G4ThreeVector BL ,
......@@ -125,28 +130,6 @@ void ThinSi::VolumeMaker( G4int DetNumber ,
Number << NbrTelescopes ;
DetectorNumber = Number.str() ;
////////////////////////////////////////////////////////////////
/////////////////Material Definition ///////////////////////////
////////////////////////////////////////////////////////////////
G4Element* N = new G4Element("Nitrogen" , "N" , 7 , 14.01 * g / mole);
G4Element* O = new G4Element("Oxigen" , "O" , 8 , 16.00 * g / mole);
G4double a, z, density;
// Si
a = 28.0855 * g / mole;
density = 2.321 * g / cm3;
G4Material* Silicon = new G4Material("Si", z = 14., a, density);
// Al
density = 2.702 * g / cm3;
a = 26.98 * g / mole;
G4Material* Al = new G4Material("Al", z = 13., a, density);
// Vacuum
density = 0.000000001 * mg / cm3;
G4Material* Vacuum = new G4Material("Vacuum", density, 2);
Vacuum->AddElement(N, .7);
Vacuum->AddElement(O, .3);
////////////////////////////////////////////////////////////////
/////////General Geometry Parameter Definition /////////////////
......@@ -162,7 +145,7 @@ void ThinSi::VolumeMaker( G4int DetNumber ,
G4Box* solidThinSi = new G4Box(Name, 0.5*DetectorSize, 0.5*DetectorSize, 0.5*FrameThickness*mm);
G4LogicalVolume* logicThinSi =
new G4LogicalVolume(solidThinSi, Vacuum, Name, 0, 0);
new G4LogicalVolume(solidThinSi, m_MaterialVacuum, Name, 0, 0);
PVPBuffer =
new G4PVPlacement(G4Transform3D(*Det_rot, Det_pos) ,
......@@ -177,10 +160,10 @@ void ThinSi::VolumeMaker( G4int DetNumber ,
G4Box* solidFrameVertical = new G4Box(Name + "_Frame", 0.5*(DetectorSize - SiliconSize) / 2, 0.5*DetectorSize, 0.5*FrameThickness*mm) ;
G4LogicalVolume* logicFrameHorizontal =
new G4LogicalVolume(solidFrameHorizontal, Al, Name, 0, 0);
new G4LogicalVolume(solidFrameHorizontal, m_MaterialAl, Name, 0, 0);
G4LogicalVolume* logicFrameVertical =
new G4LogicalVolume(solidFrameVertical, Al, Name, 0, 0);
new G4LogicalVolume(solidFrameVertical, m_MaterialAl, Name, 0, 0);
G4ThreeVector FrameTopPosition = G4ThreeVector(0 , 0.5 * SiliconSize + 0.5 * (DetectorSize - SiliconSize) / 2 , 0) ;
G4ThreeVector FrameBottomPosition = G4ThreeVector(0 , -0.5 * SiliconSize - 0.5 * (DetectorSize - SiliconSize) / 2 , 0) ;
......@@ -233,7 +216,7 @@ void ThinSi::VolumeMaker( G4int DetNumber ,
new G4Box("ThinSiAlu", 0.5*SiliconSize, 0.5*SiliconSize, 0.5*AluThickness) ;
G4LogicalVolume* logicAlu =
new G4LogicalVolume(solidAlu, Al, "logicAlu", 0, 0, 0) ;
new G4LogicalVolume(solidAlu, m_MaterialAl, "logicAlu", 0, 0, 0) ;
PVPBuffer =
new G4PVPlacement(0 , posAluFront , logicAlu , Name + "_AluFront" , logicThinSi , true, 0) ;
......@@ -246,7 +229,7 @@ void ThinSi::VolumeMaker( G4int DetNumber ,
new G4Box("ThinSi", 0.5*SiliconSize, 0.5*SiliconSize, 0.5*SiliconThickness) ;
G4LogicalVolume* logicSi =
new G4LogicalVolume(solidSi, Silicon, "logicSi", 0, 0, 0) ;
new G4LogicalVolume(solidSi, m_MaterialSilicon, "logicSi", 0, 0, 0) ;
PVPBuffer =
new G4PVPlacement(0, posSi, logicSi, Name + "_Si", logicThinSi, true, 0) ;
......@@ -683,3 +666,31 @@ void ThinSi::InitializeScorers()
G4SDManager::GetSDMpointer()->AddNewDetector(m_StripScorer) ;
}
////////////////////////////////////////////////////////////////
/////////////////Material Definition ///////////////////////////
////////////////////////////////////////////////////////////////
void ThinSi::InitializeMaterial()
{
G4Element* N = new G4Element("Nitrogen" , "N" , 7 , 14.01 * g / mole);
G4Element* O = new G4Element("Oxigen" , "O" , 8 , 16.00 * g / mole);
G4double a, z, density;
// Si
a = 28.0855 * g / mole;
density = 2.321 * g / cm3;
m_MaterialSilicon = new G4Material("Si", z = 14., a, density);
// Al
density = 2.702 * g / cm3;
a = 26.98 * g / mole;
m_MaterialAl = new G4Material("Al", z = 13., a, density);
// Vacuum
density = 0.000000001 * mg / cm3;
m_MaterialVacuum = new G4Material("Vacuum", density, 2);
m_MaterialVacuum->AddElement(N, .7);
m_MaterialVacuum->AddElement(O, .3);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment