Import Geant4 6.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:41:53 +02:00
parent 4aea781e80
commit 96686e0c8f
6560 changed files with 153347 additions and 238155 deletions
+6 -5
View File
@@ -114,13 +114,12 @@ void AerogelRefData::ReadStdAerogelRefIndex() {
}
}
}
vector<G4double> AerogelRefData::GetCurAerogelRefIndValueVect (G4int AerogelTnum ) {
// no test for tdr rich. now put back to TB conditions.
vector<G4double>CAgel(NumberOfRefIndBins);
AerogelType Ctype;
// AerogelType Ctype;
G4double CRn = GetRefnominal( AerogelTnum );
for (G4int ib=0; ib < NumberOfRefIndBins; ib++ ){
@@ -128,9 +127,7 @@ vector<G4double> AerogelRefData::GetCurAerogelRefIndValueVect (G4int AerogelTnum
- StdAerogelNominalRefractiveIndex-AerogelRefIndShift[ AerogelTnum] + CRn;
}
return CAgel;
}
G4double AerogelRefData:: GetCurAerogelRefIndValue( G4int rbinw , G4int AerogelTnum ){
@@ -163,9 +160,11 @@ G4double AerogelRefData::GetRefnominal(G4int AgelTnum ) {
} else {G4cout<<"Unknown Aerogel Type "<<G4endl; }
return CRnominal;
}
AerogelType AerogelRefData::GetAerogelType(G4int AgelTnum ) {
AerogelType Ctype;
AerogelType Ctype=AerogelTypeA;
if(AgelTnum == 0 ){
Ctype=AerogelTypeA;
@@ -185,7 +184,9 @@ AerogelType AerogelRefData::GetAerogelType(G4int AgelTnum ) {
} else {G4cout<<"Unknown Aerogel Type "<<G4endl; }
return Ctype;
}
AerogelRefData::~AerogelRefData(){ ; }
+9 -7
View File
@@ -30,7 +30,8 @@
#include <fstream.h>
#include "FilterTrData.hh"
#include "RichTbGeometryParameters.hh"
#include "RichTbMaterialParameters.hh"
#include "RichTbMaterialParameters.hh"
FilterTrData::FilterTrData(G4int FilterTypeNum, G4String FilterDataFileName )
:NumberOfTrBins(NumFilterTransBins),
TransWaveL(vector<G4double>(NumFilterTransBins)),
@@ -57,6 +58,7 @@ FilterTrData::FilterTrData(G4int FilterTypeNum, G4String FilterDataFileName )
FilterThickness = 2.0*FilterHalfZArray[FilterTypeNum];
}
}
void FilterTrData::ReadFilterTrans() {
//first get the filter type index
FilterType Ftype = GetFilterTypeIndex();
@@ -92,21 +94,21 @@ void FilterTrData::ReadFilterTrans() {
G4cout<<" Please provide the Filter transmission Data " <<G4endl;
}
}
G4double FilterTrData::GetCurrentFilTrans(G4double trnData) {
// No wavelength dependance yet for the Fresnel loss at the
// surfaces.
G4double trn = trnData/100.0;
G4double na= FilterRefIndexNominal;
G4double nb= CurNeighbourRefIndexNominal;
G4double LossAtFEntrance=pow(((na-nb)/(na+nb)),2.0);
G4double LossAtFExit = pow(((nb-na)/(nb+na)),2.0);
// G4double na= FilterRefIndexNominal;
// G4double nb= CurNeighbourRefIndexNominal;
// G4double LossAtFEntrance=pow(((na-nb)/(na+nb)),2.0);
// G4double LossAtFExit = pow(((nb-na)/(nb+na)),2.0);
if(trn > 1.0 ) trn=1.0;
return trn;
}
G4double FilterTrData::GetTotFilTrans(G4double trnData) {
// No wavelength dependance yet.
+17 -19
View File
@@ -42,8 +42,8 @@ HpdSiEnergyLoss::HpdSiEnergyLoss(const G4String& materialName,
const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
G4int numberOfMat = G4Material::GetNumberOfMaterials();
for(G4int iMat=0;iMat<numberOfMat;iMat++) {
G4int iMat=0;
for(iMat=0;iMat<numberOfMat;iMat++) {
if ( materialName == (*theMaterialTable)[iMat]->GetName()){
fMatIndex=(*theMaterialTable)[iMat]->GetIndex();
break;
@@ -63,28 +63,28 @@ G4bool HpdSiEnergyLoss::IsApplicable(const G4ParticleDefinition&
}
G4double HpdSiEnergyLoss::GetContinuousStepLimit(const G4Track& track,
G4double previousStepSize,
G4double currentMinimumStep,
G4double& currentSafety){
G4double,
G4double,
G4double& ){
G4double RangeForStep = finalRangeforStep;
if( fMatIndex != track.GetMaterial() -> GetIndex() ) {
if( fMatIndex != G4int(track.GetMaterial() -> GetIndex()) ) {
RangeForStep = DBL_MAX;
}
return RangeForStep;
return RangeForStep;
}
G4double HpdSiEnergyLoss::GetMeanFreePath(const G4Track& track,
G4double previousStepSize,
G4double HpdSiEnergyLoss::GetMeanFreePath(const G4Track&,
G4double,
G4ForceCondition* condition) {
// return infinity so that it does nothing.
*condition = NotForced;
return DBL_MAX;
}
G4VParticleChange* HpdSiEnergyLoss::PostStepDoIt(const G4Track& aTrack,
const G4Step& aStep) {
// Do nothing
@@ -92,8 +92,9 @@ G4VParticleChange* HpdSiEnergyLoss::PostStepDoIt(const G4Track& aTrack,
return G4VContinuousDiscreteProcess::PostStepDoIt(aTrack,aStep);
}
G4VParticleChange* HpdSiEnergyLoss::AlongStepDoIt(const G4Track& aTrack,
const G4Step& aStep) {
const G4Step&) {
#ifdef G4ANALYSIS_USE
@@ -103,7 +104,7 @@ G4VParticleChange* HpdSiEnergyLoss::AlongStepDoIt(const G4Track& aTrack,
aParticleChange.Initialize(aTrack);
G4int aMaterialIndex = aTrack.GetMaterial()->GetIndex();
if(fMatIndex != aTrack.GetMaterial()->GetIndex() ) {
if(fMatIndex != aMaterialIndex ) {
return &aParticleChange;
}
@@ -137,12 +138,9 @@ G4VParticleChange* HpdSiEnergyLoss::AlongStepDoIt(const G4Track& aTrack,
#endif
G4StepPoint* pPreStepPoint = aStep.GetPreStepPoint();
G4String tpreVol = pPreStepPoint -> GetPhysicalVolume()->GetName();
G4int tpreVP = pPreStepPoint -> GetPhysicalVolume()->GetCopyNo();
G4int tpreVPS = pPreStepPoint -> GetPhysicalVolume()
->GetMother()->GetCopyNo();
// G4StepPoint* pPreStepPoint = aStep.GetPreStepPoint();
// G4String tpreVol = pPreStepPoint -> GetPhysicalVolume()->GetName();
// G4int tpreVP = pPreStepPoint -> GetPhysicalVolume()->GetCopyNo();
}
if (aKinEnergyFinal <= MinKineticEnergy ) {
aParticleChange.SetStatusChange(fStopAndKill);
@@ -32,6 +32,7 @@
#include "PadHpdPhotoElectricEffect.hh"
#include "RichTbGeometryParameters.hh"
#include "G4TransportationManager.hh"
#include "G4TouchableHandle.hh"
#include "Randomize.hh"
#include "RichTbAnalysisManager.hh"
#include "RichTbRunConfig.hh"
@@ -43,11 +44,11 @@
PadHpdPhotoElectricEffect::PadHpdPhotoElectricEffect(const G4String& processName ,
RichTbRunConfig* RConfig)
:G4VDiscreteProcess(processName),
HpdQE(NumHpdTot, vector<G4double>( NumQEbins)),
HpdWabin(NumHpdTot, vector<G4double>( NumQEbins)),
DemagnificationFactor(vector<G4double>(NumHpdTot)),
DemagnificationQuadFactor(vector<G4double>(NumHpdTot)) {
DemagnificationQuadFactor(vector<G4double>(NumHpdTot)),
HpdQE(NumHpdTot, vector<G4double>( NumQEbins)),
HpdWabin(NumHpdTot, vector<G4double>( NumQEbins))
{
rConfig=RConfig;
PrePhotoElectricVolName="PadHpdWindowQuartz";
PostPhotoElectricVolName="BiAlkaliPhCathode";
@@ -83,7 +84,7 @@ PadHpdPhotoElectricEffect::PadHpdPhotoElectricEffect(const G4String& processName
G4cout<<"Wrong size for Hpd QE "<<ihpdq<<" "<<qeCurHpd.size()
<<" "<< waCurHpd.size()<<G4endl;
}
for(G4int iqbin=0; iqbin < qeCurHpd.size(); iqbin++){
for(size_t iqbin=0; iqbin < qeCurHpd.size(); iqbin++){
HpdQE[ihpdq][iqbin]=qeCurHpd[iqbin]/100;
HpdWabin[ihpdq][iqbin]=waCurHpd[iqbin];
}
@@ -164,8 +165,8 @@ G4VParticleChange* PadHpdPhotoElectricEffect::PostStepDoIt(const G4Track& aTrack
//Now use the QE for the current HPD to determine if a
// photoelectron should be produced or not.
G4int currentHpdNumber= pPreStepPoint->GetPhysicalVolume()
-> GetMother() -> GetCopyNo();
G4int currentHpdNumber= pPreStepPoint->GetTouchableHandle()
-> GetReplicaNumber(1);
if(currentHpdNumber >= NumHpdTot ){
return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
@@ -196,7 +197,7 @@ G4VParticleChange* PadHpdPhotoElectricEffect::PostStepDoIt(const G4Track& aTrack
// coord system.
G4double GLx=GlobalElectronOrigin.x();
G4double GLy=GlobalElectronOrigin.y();
G4double PhotCkvRad = pow((pow(GLx,2)+pow(GLy,2)),0.5);
// G4double PhotCkvRad = pow((pow(GLx,2)+pow(GLy,2)),0.5);
G4double PhotCkvPhi = atan2(GLy,GLx)*180.0/pi;
if( PhotCkvPhi < - 180.0 )PhotCkvPhi+= 360.0;
@@ -135,7 +135,7 @@ void RichTbAnalysisManager::finish()
}
void RichTbAnalysisManager::BeginOfEventAnalysis(const G4Event* evt){
void RichTbAnalysisManager::BeginOfEventAnalysis(const G4Event*){
//RichCollId is already defined in LHCbRichSimEventAction.cc
// Hence its extraction is not repeated here.
@@ -161,7 +161,7 @@ void RichTbAnalysisManager::EndOfEventAnalysis(const G4Event* evt){
iTimer->Stop();
G4double TimeforThisEvent= iTimer->GetRealElapsed();
// G4double TimeforThisEvent= iTimer->GetRealElapsed();
G4SDManager * SDman = G4SDManager::GetSDMpointer();
@@ -104,7 +104,7 @@ RichTbComponent::RichTbComponent(RichTbMaterial* RMaterial,
G4int FilterNum = RConfig->GetFilterTNumber();
G4Box * FilterBox;
G4Box * FilterBox=0;
if(FilterNum >= 0 ) {
G4double FilterHalfZ= FilterHalfZArray[FilterNum];
FilterBox
@@ -296,8 +296,8 @@ RichTbComponent::RichTbComponent(RichTbMaterial* RMaterial,
// FilterType CurFil= RConfig->GetFilterType();
G4int Filnum= RConfig->GetFilterTNumber() ;
G4LogicalVolume* FilterLog;
G4VPhysicalVolume* FilterPhys;
G4LogicalVolume* FilterLog=0;
G4VPhysicalVolume* FilterPhys=0;
if(Filnum >= 0 ) {
G4double FilterHalfZCur= FilterHalfZArray[Filnum];
@@ -321,12 +321,12 @@ RichTbComponent::RichTbComponent(RichTbMaterial* RMaterial,
new G4PVPlacement(FilterTransform,"FilterBox",FilterLog,
RadFramePhys,false,0);
G4LogicalBorderSurface* FilterInnerSurface =
// G4LogicalBorderSurface* FilterInnerSurface =
new G4LogicalBorderSurface("RichTbFilterInnerSurface",
FilterPhys,VesselEnclosurePhys,
RMaterial->getOpticalFilterSurface());
G4LogicalBorderSurface* FilterOuterSurface =
// G4LogicalBorderSurface* FilterOuterSurface =
new G4LogicalBorderSurface("RichTbFilterOuterSurface",
VesselEnclosurePhys,FilterPhys,
RMaterial->getOpticalFilterSurface());
+28 -63
View File
@@ -44,49 +44,41 @@
#include "RichTbAnalysisManager.hh"
#include "RichTbIOData.hh"
RichTbEventAction::RichTbEventAction(){
RichTbEventAction::RichTbEventAction()
{
RichTbCollID = -1;
}
RichTbEventAction::RichTbEventAction(RichTbRunConfig* RConfig,
RichTbVisManager* RVisManager, RichTbIOData* RIOData){
RichTbVisManager* RVisManager, RichTbIOData* RIOData)
{
RichTbCollID = -1;
runConfiguration=RConfig;
pVisManager=RVisManager;
rTbIOData = RIOData;
}
RichTbEventAction::~RichTbEventAction(){
RichTbEventAction::~RichTbEventAction()
{
}
void RichTbEventAction::BeginOfEventAction(const G4Event* evt){
void RichTbEventAction::BeginOfEventAction(const G4Event* evt)
{
G4SDManager * SDman = G4SDManager::GetSDMpointer();
if(RichTbCollID<0){
RichTbCollID = SDman->GetCollectionID("RichTbHitsCollection");
}
#ifdef G4ANALYSIS_USE
RichTbAnalysisManager * analysis = RichTbAnalysisManager::getInstance();
analysis->BeginOfEventAnalysis(evt);
#endif
}
void RichTbEventAction::EndOfEventAction(const G4Event* evt){
void RichTbEventAction::EndOfEventAction(const G4Event* evt)
{
RichTbRunConfig* RConfig = runConfiguration;
// first get the trajectories
@@ -115,52 +107,36 @@ void RichTbEventAction::EndOfEventAction(const G4Event* evt){
}
if(RHC)
{
n_hit = RHC->entries();
for(G4int i=0;i<n_hit;i++)
{
totalhits += i;
}
// G4cout << " " << n_hit
// << " hits are stored in RichTbHitsCollection." << G4endl;
}
if(RConfig->getRichTbDrawTrajectory() > 0)
{
for (G4int i=0; i<n_trajectories; i++)
{
(*(evt->GetTrajectoryContainer()))[i]->DrawTrajectory();
}
}
if(RConfig->getRichTbDrawTrajectory() > 0){
for (G4int i=0; i<n_trajectories; i++){
(*(evt->GetTrajectoryContainer()))[i]->DrawTrajectory();
}
}
//now for the hits.
//now for the hits.
if(RHC) {
if(RHC)
{
G4int n_hith = RHC->entries();
for (G4int ih=0; ih<n_hith; ih++ ) {
for (G4int ih=0; ih<n_hith; ih++ )
{
RichTbHit* aHit = (*RHC)[ih];
aHit->DrawWithVisM(pVisManager);
}
}
}
//Now to Fill the Histograms
#ifdef G4ANALYSIS_USE
@@ -169,21 +145,10 @@ void RichTbEventAction::EndOfEventAction(const G4Event* evt){
#endif
// Now to write out the data
if(RConfig -> DoWriteOutputFile() ) {
rTbIOData -> WriteOutEventHeaderData(evt);
rTbIOData -> WriteOutHitData(evt);
G4cout << ">>> End of Event Number " << evt->GetEventID() << G4endl;
if(RConfig -> DoWriteOutputFile() )
{
rTbIOData -> WriteOutEventHeaderData(evt);
rTbIOData -> WriteOutHitData(evt);
G4cout << ">>> End of Event Number " << evt->GetEventID() << G4endl;
}
}
@@ -28,6 +28,11 @@
/////////////////////////////////////////////////////////////////////////////
#include "globals.hh"
#include "RichTbGeometryParameters.hh"
G4double PixRowNumSect[NumberOfPadHpdSiPixels];
G4double PixColNumSect[NumberOfPadHpdSiPixels];
G4bool PixelAtSectEdge[NumberOfPadHpdSiPixels];
G4double GetCurAerogelLength(G4int Aerognum ) {
return 2.0*AgelHalfZ[Aerognum];
}
+2 -1
View File
@@ -45,6 +45,7 @@ RichTbHit::~RichTbHit()
{;}
RichTbHit::RichTbHit(const RichTbHit &right)
: G4VHit(right)
{
edep = right.edep;
posAtSilicon = right.posAtSilicon;
@@ -68,7 +69,7 @@ const RichTbHit& RichTbHit::operator=(const RichTbHit &right)
int RichTbHit::operator==(const RichTbHit &right) const
{
return 0;
return (this==&right) ? 1 : 0;
}
void RichTbHit::Draw()
+8 -8
View File
@@ -184,7 +184,7 @@ RichTbHpd::RichTbHpd(RichTbMaterial* RMaterial,
HpdEnvelopeCone,
HpdEnvelopeConeTransform);
G4LogicalVolume* HpdEnvelopeTubeLCLog=
// G4LogicalVolume* HpdEnvelopeTubeLCLog=
new G4LogicalVolume(HpdEnvelopeTubeLC,RMaterial->getHpdTubeMaterial(),
"HpdEnvelopeTubeLC",0,0,0);
@@ -193,7 +193,7 @@ RichTbHpd::RichTbHpd(RichTbMaterial* RMaterial,
HpdEnvelopeSmallTube,
HpdEnvelopeSmallTubeTransform);
G4LogicalVolume* HpdEnvelopeTubeLCSLog=
// G4LogicalVolume* HpdEnvelopeTubeLCSLog=
new G4LogicalVolume(HpdEnvelopeTubeLCS,RMaterial->getHpdTubeMaterial(),
"HpdEnvelopeTubeLCS",0,0,0);
@@ -233,17 +233,17 @@ RichTbHpd::RichTbHpd(RichTbMaterial* RMaterial,
HpdPhCathodeLog,HpdMasterPhys,false,HpdNumber);
G4LogicalBorderSurface* HpdQuartzWSurface =
// G4LogicalBorderSurface* HpdQuartzWSurface =
new G4LogicalBorderSurface("HpdQuartzWSurface",HpdMasterPhys,
HpdQuartzWindowPhys,
RMaterial->getOpticalHpdTQuartzWSurface());
G4LogicalBorderSurface* HpdQPhCathodeSurface =
// G4LogicalBorderSurface* HpdQPhCathodeSurface =
new G4LogicalBorderSurface("HpdQPhCathodeSurface",HpdQuartzWindowPhys,
HpdPhCathodePhys,
RMaterial->getOpticalHpdQuartzWPhCathodeSurface());
G4LogicalBorderSurface* HpdPhCathodeQSurface =
// G4LogicalBorderSurface* HpdPhCathodeQSurface =
new G4LogicalBorderSurface("HpdQPhCathodeSurface", HpdPhCathodePhys,
HpdQuartzWindowPhys,
RMaterial->getOpticalHpdQuartzWPhCathodeSurface());
@@ -254,17 +254,17 @@ RichTbHpd::RichTbHpd(RichTbMaterial* RMaterial,
// HpdPhCathodeLog,
// RMaterial->getOpticalPhCathodeSkinSurface());
G4LogicalBorderSurface* HpdPhCathodeMasterSurface =
// G4LogicalBorderSurface* HpdPhCathodeMasterSurface =
new G4LogicalBorderSurface("HpdPhCathodeMasterSurface",
HpdPhCathodePhys,HpdMasterPhys,
RMaterial->getOpticalPhCathodeBorderSurface());
G4LogicalBorderSurface* HpdMasterPhCathodeSurface =
// G4LogicalBorderSurface* HpdMasterPhCathodeSurface =
new G4LogicalBorderSurface("HpdMasterPhCathodeSurface",
HpdMasterPhys,HpdPhCathodePhys,
RMaterial->getOpticalPhCathodeBorderSurface());
G4LogicalBorderSurface* HpdEnvelopeSurface =
// G4LogicalBorderSurface* HpdEnvelopeSurface =
new G4LogicalBorderSurface("HpdEnvelopeSurface",HpdMasterPhys,
HpdEnvelopeTubeGrandPhys,
RMaterial->getOpticalHpdMetalSurface());
+1 -1
View File
@@ -45,7 +45,7 @@ RichTbIOData::RichTbIOData(RichTbRunConfig* RConfig )
}
RichTbIOData::~RichTbIOData() { }
void RichTbIOData::WriteOutEventHeaderData( const G4Event* evt ) { }
void RichTbIOData::WriteOutEventHeaderData( const G4Event* ) { }
void RichTbIOData::WriteOutHitData( const G4Event* evt ) {
+15 -16
View File
@@ -55,23 +55,22 @@ RichTbMaterial::RichTbMaterial(RichTbRunConfig* RConfig):
G4double a,z,density; //a=mass of a mole;
// z=mean number of protons;
G4String name,symbol;
G4int isz,isn; //isz= number of protons in an isotope;
//G4int isz,isn; //isz= number of protons in an isotope;
//isn= number of nucleons in an isotope;
G4int numel,natoms; //numel=Number of elements constituting a material.
G4double abundance,fractionmass;
G4double fractionmass;
G4double temperature, pressure;
G4State kStateGas;
G4double FactorOne=1.0;
// G4double FactorOne=1.0;
G4UnitDefinition::BuildUnitsTable();
//PhotonEnergy
G4int ibin=0;
G4double PhotonEnergyStep=(PhotonMaxEnergy-PhotonMinEnergy)/
NumPhotWaveLengthBins;
G4double* PhotonMomentum=new G4double[NumPhotWaveLengthBins];
for (G4int ibin=0; ibin<NumPhotWaveLengthBins; ibin++){
for (ibin=0; ibin<NumPhotWaveLengthBins; ibin++){
PhotonMomentum[ibin]=PhotonMinEnergy+PhotonEnergyStep*ibin;
}
@@ -127,9 +126,9 @@ RichTbMaterial::RichTbMaterial(RichTbRunConfig* RConfig):
//Cesium
a=132.91*g/mole;
G4Element* elCs = new G4Element(name="Cesium",
symbol="Cs",z=55.,a);
// a=132.91*g/mole;
// G4Element* elCs = new G4Element(name="Cesium",
// symbol="Cs",z=55.,a);
//Antimony
@@ -411,13 +410,13 @@ RichTbMaterial::RichTbMaterial(RichTbRunConfig* RConfig):
GlassD263MomValue[ibin]= PhotMomWaveConv*eV/GlassD263TransWL[ibina];
}
if(GlassD263Transmis[ibina] >0.0 ) {
G4double currentfilterRefIndex= GlassD263Rindex[ibin];
// G4double currentfilterRefIndex= GlassD263Rindex[ibin];
G4double currentAdjacentMediumRefIndex=NitrogenNominalRefIndex;
// the following needs to be improved in the future
// to have a binary search and
// interpolation between the adjacent
// array elements etc. SE 15-11-2002.
for(G4int ibinr=0; ibinr<N2RefPhotW.size()-1 ; ibinr++){
for(size_t ibinr=0; ibinr<N2RefPhotW.size()-1 ; ibinr++){
G4double currMomA=GlassD263MomValue[ibin];
if(currMomA >= N2RefPhotW[ibinr] && currMomA <= N2RefPhotW[ibinr+1]){
currentAdjacentMediumRefIndex=N2RefInd[ibinr];
@@ -519,7 +518,7 @@ RichTbMaterial::RichTbMaterial(RichTbRunConfig* RConfig):
for (ibin=0; ibin<NumPhotWaveLengthBins; ibin++){
AerogTypeARindex[ibin]= ConvertAgelRIndex(PhotonMomentum[ibin],0);
AerogTypeARScatLength[ibin]=AerogelTypeASLength[ibin];
G4double photwl = PhotMomWaveConv/ (PhotonMomentum[ibin]/eV);
// G4double photwl = PhotMomWaveConv/ (PhotonMomentum[ibin]/eV);
G4double currentAgelRefIndex= AerogTypeARindex[ibin];
G4double currentNeighbourRefIndex= N2RefInd[ibin];
@@ -773,7 +772,7 @@ RichTbMaterial::RichTbMaterial(RichTbRunConfig* RConfig):
SiliconCoating->AddElement(elO,natoms=2);
G4double* SiliconCoatingAbsorpLength=new G4double[NumPhotWaveLengthBins];
G4double* SiliconCoatingRindex=new G4double[NumPhotWaveLengthBins];
// G4double* SiliconCoatingRindex=new G4double[NumPhotWaveLengthBins];
for (ibin=0; ibin<NumPhotWaveLengthBins; ibin++){
SiliconCoatingAbsorpLength[ibin]=0.0001*mm;
@@ -1124,8 +1123,8 @@ RichTbMaterial::RichTbMaterial(RichTbRunConfig* RConfig):
FilterEff[ibinf]= RichTbFilterSurfaceEfficiency[ibinf];
FilterPhotMom[ibinf]= RichTbFilterSurfacePhotMom[ibinf];
G4MaterialPropertiesTable* OpRichTbFilterSurfaceMPT =
new G4MaterialPropertiesTable();
// G4MaterialPropertiesTable* OpRichTbFilterSurfaceMPT =
// new G4MaterialPropertiesTable();
}
RichTbOpticalFilterSurface=OpRichTbFilterSurface;
@@ -1149,7 +1148,7 @@ G4double RichTbMaterial::ConvertAgelRIndex(G4double phmom, G4int AgelTnum ) {
AerogelRefData* AgData= rConfig -> GetAerogelRefdata();
//Now to convert and interpolate to get the same binning
// as the other property vectors.
G4double Refind;
G4double Refind=0.;
G4int Numphbin=AgData-> GetNumberOfRefIndBins();
G4double phm1,phm2;
if(phmom < AgData->GetAerogelRefphotE(0) ){
@@ -127,12 +127,13 @@ void HistoRichTbMaterialProperties(RichTbRunConfig* RConfig) {
G4double stepsize=7.0;
G4double thickness=(GetCurAerogelLength(AerogelNum))/cm;
// G4double thickness=(GetCurAerogelLength(AerogelNum))/cm;
AerogelType CurAerogelType=RConfig-> GetCurAerogelType(AerogelNum);
G4double Aparam, Cparam;
G4double Aparam=0.;
G4double Cparam=0.;
if(CurAerogelType == AerogelTypeA ) {
Aparam = AerogelTypeATotTrans;
Cparam = AerogelTypeAClarity*cm/(micrometer*micrometer*micrometer*micrometer);
@@ -142,8 +143,8 @@ void HistoRichTbMaterialProperties(RichTbRunConfig* RConfig) {
for(G4int Iabin=0; Iabin<100; Iabin ++ ) {
G4double waLInmu = waL/1000.0;
G4double Aetr = Aparam* exp(-Cparam * thickness / pow(waLInmu,4) );
// G4double waLInmu = waL/1000.0;
// G4double Aetr = Aparam* exp(-Cparam * thickness / pow(waLInmu,4) );
waL += stepsize;
}
@@ -163,12 +164,12 @@ void HistoRichTbMaterialProperties(RichTbRunConfig* RConfig) {
}
vector<G4int> getDeadPixelList(G4int ihpdNum, G4int isectNum){
vector<G4int> getDeadPixelList(G4int ihpdNum, G4int){
vector<G4int>DeadPixelList;
G4int isc,ipsc;
// G4int isc,ipsc;
if(DeadPixelList.size() > MaxNumDeadPixelPerHpdSect ){
if(G4int(DeadPixelList.size()) > MaxNumDeadPixelPerHpdSect ){
G4cout<<" Too Many dead Pixels in Hpd "<<DeadPixelList.size()
<<" in Hpd "<<ihpdNum<<G4endl;
}
@@ -179,7 +180,7 @@ vector<G4double>GetAerogelRScatLength(AerogelType CurrentAerogelType) {
vector<G4double>AgelRayleighScatLength(NumPhotWaveLengthBins);
vector<G4double>AgelPhotW = InitAgelPhotW();
G4double aClarity;
G4double aClarity=0.;
if(CurrentAerogelType == AerogelTypeA ) {
aClarity=AerogelTypeAClarity/(micrometer*micrometer*micrometer*micrometer);
@@ -213,7 +214,7 @@ G4double GetCurrentBulkTrans(G4double currentMatRefIndex,
G4double currentNeighbourRefIndex,
G4double MaxTotMeasuredTransmission){
G4double ATrans=MaxTotMeasuredTransmission;
G4double ePhot;
// G4double ePhot;
// in the following the energy of the photon is not used since
// it is only an approximate calulation.
G4double na= currentMatRefIndex;
@@ -41,7 +41,7 @@
RichTbPhotoDetector::RichTbPhotoDetector() {;}
RichTbPhotoDetector::RichTbPhotoDetector(RichTbMaterial* RMaterial,
RichTbComponent* RTbComponent, RichTbRunConfig* rConfig,
RichTbComponent* RTbComponent, RichTbRunConfig*,
G4bool ConstructTrackingSwitch){
ConstructTrackingGeometrySwitch=ConstructTrackingSwitch;
@@ -116,7 +116,7 @@ void RichTbPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
y0 = 0. ;
z0 = 0. ; // -0.5*(RichTbDetector->GetWorldSizeZ()) ;
}
G4double r0,phi0 ;
// G4double r0,phi0 ;
particleGun->SetParticlePosition(G4ThreeVector(x0,y0,z0));
+6 -6
View File
@@ -37,7 +37,7 @@
RichTbSD::RichTbSD(G4String DetName, G4int Numhpd , G4int NumSect,
G4int NumPixel,
G4String CollectionName)
G4String ) // CollectionName)
:G4VSensitiveDetector(DetName),NumberOfSensitiveHpds(Numhpd),
NumberOfSensitiveSectorsInHpd(NumSect),
NumberOfSensitivePixelsInSector(NumPixel),
@@ -52,7 +52,7 @@ RichTbSD::~RichTbSD(){
}
void RichTbSD::Initialize(G4HCofThisEvent* HCE)
void RichTbSD::Initialize(G4HCofThisEvent*)
{
RichTbHitCollection = new RichTbHitsCollection
(SensitiveDetectorName,collectionName[0]);
@@ -83,10 +83,10 @@ G4bool RichTbSD::ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist)
G4StepPoint* PrePosition = aStep->GetPreStepPoint();
G4int CurrentHpdNumber = PrePosition->GetPhysicalVolume()
-> GetMother() -> GetCopyNo();
G4int CurrentSectorNumber= PrePosition->GetPhysicalVolume()
->GetCopyNo();
G4int CurrentHpdNumber = PrePosition->GetTouchableHandle()
-> GetReplicaNumber(1);
G4int CurrentSectorNumber= PrePosition->GetTouchableHandle()
-> GetReplicaNumber();
G4VPhysicalVolume* ROphysVol = ROhist -> GetVolume();
G4int CurrentPixelNumber = ROphysVol->GetCopyNo();
+1 -1
View File
@@ -123,7 +123,7 @@ RichTbSiDet::RichTbSiDet(RichTbMaterial* RMaterial,
new G4PVPlacement(SiSectCoatingTransform,"HpdSectCoat",
HpdSectCoatLog,MotherOfSiDet,false,SectNum);
G4LogicalBorderSurface* HpdSectCoatSurface =
// G4LogicalBorderSurface* HpdSectCoatSurface =
new G4LogicalBorderSurface("HpdSectCoatSurface",MotherOfSiDet ,
HpdSectCoatPhys ,
RMaterial-> getHpdSiCoatSurface());
+1 -1
View File
@@ -123,7 +123,7 @@ RichTbSiPixel::RichTbSiPixel(RichTbMaterial* RMaterial,
//First Get the deadPixel List
G4bool thisPixelisAlive=true;
vector<G4int>DeadPxL = getDeadPixelList(IHpdNum,Isector);
for(G4int ideadP=0; ideadP<DeadPxL.size(); ideadP++){
for(size_t ideadP=0; ideadP<DeadPxL.size(); ideadP++){
if(ipixel == DeadPxL[ideadP] )thisPixelisAlive=false;
}
PixelIsAlive= thisPixelisAlive;
+110 -157
View File
@@ -45,212 +45,165 @@
#include "G4OpticalPhoton.hh"
#include "G4PionMinus.hh"
#include "AIDA/AIDA.h"
RichTbSteppingAction::RichTbSteppingAction(RichTbRunConfig* rConfig , RichTbPrimaryGeneratorAction* RPrimGenAction){
#ifdef G4ANALYSIS_USE
#include "AIDA/AIDA.h"
#endif
RichTbSteppingAction::
RichTbSteppingAction(RichTbRunConfig* rConfig ,
RichTbPrimaryGeneratorAction* RPrimGenAction)
{
richtbRunConfig= rConfig;
rPrimGenAction = RPrimGenAction;
HpdPhElectronKE=rConfig->getHpdPhElectronEnergy();
uParticleChange=new G4VParticleChange();
}
RichTbSteppingAction::~RichTbSteppingAction() { ;}
void RichTbSteppingAction::UserSteppingAction(const G4Step* aStep){
uParticleChange=new G4VParticleChange();
}
RichTbSteppingAction::~RichTbSteppingAction()
{
}
void RichTbSteppingAction::UserSteppingAction(const G4Step* aStep)
{
RichTbGenericHisto(aStep);
}
void RichTbSteppingAction:: RichTbDebugHisto(const G4Step* aStep){
void RichTbSteppingAction:: RichTbDebugHisto(const G4Step*)
{
}
void RichTbSteppingAction::RichTbGenericHisto(const G4Step* aStep) {
void RichTbSteppingAction::RichTbGenericHisto(const G4Step* aStep)
{
G4StepPoint* pPreStepPoint = aStep ->GetPreStepPoint();
G4StepPoint* pPostStepPoint = aStep ->GetPostStepPoint();
const G4ThreeVector prePos= pPreStepPoint->GetPosition();
const G4ThreeVector postPos= pPostStepPoint->GetPosition();
//In the following 1000 mm is the Z coord of a point
// In the following 1000 mm is the Z coord of a point
// between the mirror and the dowstream end of the vessel.
if(prePos.z()<1000*mm && prePos.z() > 0.0*mm ){
//check to see if we are at a boundary
if(prePos.z()<1000*mm && prePos.z() > 0.0*mm )
{
//check to see if we are at a boundary
if (pPostStepPoint->GetStepStatus() == fGeomBoundary)
{
if (pPostStepPoint->GetStepStatus() == fGeomBoundary){
G4Track* aPhotTrack = aStep -> GetTrack();
const G4DynamicParticle* aParticle = aPhotTrack->GetDynamicParticle();
const G4double PhotonEnergy = aParticle->GetKineticEnergy();
G4Track* aPhotTrack = aStep -> GetTrack();
const G4DynamicParticle* aParticle = aPhotTrack->GetDynamicParticle();
const G4double PhotonEnergy =
aParticle->GetKineticEnergy();
G4String VolNameD="Agel";
G4String VolNameE="VesselEnclosure";
G4String VolNameF="MirrorSphe";
G4String VolNameG="RadFrame";
G4String VolNameH="FilterBox";
G4String VolNameQ="HpdQuartzWindow";
G4String VolNameP="HpdMaster";
G4String VolNameD="Agel";
G4String VolNameE="VesselEnclosure";
G4String VolNameF="MirrorSphe";
G4String VolNameG="RadFrame";
G4String VolNameH="FilterBox";
G4String VolNameQ="HpdQuartzWindow";
G4String VolNameP="HpdMaster";
//
if( aParticle->GetDefinition() == G4OpticalPhoton::OpticalPhoton()){
if( pPreStepPoint -> GetPhysicalVolume() &&
pPostStepPoint -> GetPhysicalVolume() ) {
G4String tpreVol = pPreStepPoint -> GetPhysicalVolume()->GetName();
G4String tpostVol = pPostStepPoint -> GetPhysicalVolume()->GetName();
if(richtbRunConfig-> GetRichTbParticleEnergyCode() == 1 ||
richtbRunConfig-> GetRichTbParticleEnergyCode() == 2 ) {
// Optical photons are generated as beam particle.
// count the photons entering the aerogel volume.
// this is essentially same as the photons generated.
if(( tpreVol == VolNameG || tpreVol == VolNameE ) &&
tpostVol == VolNameD ) {
if( aParticle->GetDefinition() == G4OpticalPhoton::OpticalPhoton())
{
if( pPreStepPoint -> GetPhysicalVolume() &&
pPostStepPoint -> GetPhysicalVolume() )
{
G4String tpreVol = pPreStepPoint->GetPhysicalVolume()->GetName();
G4String tpostVol = pPostStepPoint->GetPhysicalVolume()->GetName();
#ifdef G4ANALISYS_USE
RichTbAnalysisManager * analysis = RichTbAnalysisManager::getInstance();
analysis->bumpNumPhotonsBeforeAerogel();
if(richtbRunConfig-> GetRichTbParticleEnergyCode() == 1 ||
richtbRunConfig-> GetRichTbParticleEnergyCode() == 2 )
{
// Optical photons are generated as beam particle.
// count the photons entering the aerogel volume.
// this is essentially same as the photons generated.
if(( tpreVol == VolNameG || tpreVol == VolNameE ) &&
( tpostVol == VolNameD ) )
{
RichTbAnalysisManager * analysis =
RichTbAnalysisManager::getInstance();
analysis->bumpNumPhotonsBeforeAerogel();
}
}
#endif
if(PhotonEnergy > 0.0 )
{
}
const G4double PhotonWavelength =
PhotMomWaveConv*1.0*eV/ PhotonEnergy;
}
if(PhotonEnergy > 0.0 ) {
const G4double PhotonWavelength =
PhotMomWaveConv*1.0*eV/ PhotonEnergy;
//
G4String tpreVol = pPreStepPoint -> GetPhysicalVolume()->GetName();
G4String tpostVol = pPostStepPoint -> GetPhysicalVolume()->GetName();
// First for the mirror volume
// First for the mirror volume
#ifdef G4ANALYSIS_USE
RichTbAnalysisManager * analysis = RichTbAnalysisManager::getInstance();
if(tpreVol == VolNameE && tpostVol == VolNameF ) {
RichTbAnalysisManager * analysis =
RichTbAnalysisManager::getInstance();
if(tpreVol == VolNameE && tpostVol == VolNameF )
{
analysis->getfhistoWBeforeMirror()->fill(PhotonWavelength);
analysis->bumpNumPhotonsBeforeMirror();
}
if(tpreVol == VolNameF && tpostVol == VolNameE )
{
analysis->getfhistoWAfterMirror()->fill(PhotonWavelength);
analysis->bumpNumPhotonsAfterMirror();
}
if(tpreVol == VolNameF && tpostVol == VolNameE ) {
analysis->getfhistoWAfterMirror()->fill(PhotonWavelength);
analysis->bumpNumPhotonsAfterMirror();
#endif
}
//
//Now for the Aerogel Volume
if(richtbRunConfig-> GetRichTbParticleEnergyCode() == 0 ) {
if(( tpreVol == VolNameG || tpreVol == VolNameE ) &&
tpostVol == VolNameD ) {
if(prePos.z() < postPos.z() ) {
#ifdef G4ANALYSIS_USE
//Now for the Aerogel Volume
if(richtbRunConfig-> GetRichTbParticleEnergyCode() == 0 )
{
if(( tpreVol == VolNameG || tpreVol == VolNameE ) &&
( tpostVol == VolNameD ) )
{
if(prePos.z() < postPos.z() )
{
RichTbAnalysisManager * analysis = RichTbAnalysisManager::getInstance();
analysis->bumpNumPhotonsBeforeAerogel();
}
}
}
#endif
}
}
}
if( ( tpreVol == VolNameD ) &&
( tpostVol == VolNameG || tpostVol == VolNameE ) )
{
if(tpreVol == VolNameD &&
( tpostVol == VolNameG || tpostVol == VolNameE ) ) {
// G4double XatAgelExit=postPos.x();
//G4double YatAgelExit=postPos.y();
//G4double ZatAgelExit=postPos.z();
const G4ThreeVector PhotCurMom =
aPhotTrack->GetMomentumDirection();
//G4double CurExitangle= acos(PhotCurMom.z());
// G4double XatAgelExit=postPos.x();
// G4double YatAgelExit=postPos.y();
// G4double ZatAgelExit=postPos.z();
const G4ThreeVector PhotCurMom =
aPhotTrack->GetMomentumDirection();
// G4double CurExitangle= acos(PhotCurMom.z());
// Plot the Angle of emission of the photon.
// When there is no Raylegh scattering this is the
// Cherenkov angle. For now we only consider the charged
// track to be of direction 001. Later this may be changed.
// So the angle considered is just the angle of the photon
// track.
// Plot the Angle of emission of the photon.
// When there is no Raylegh scattering this is the
// Cherenkov angle. For now we only consider the charged
// track to be of direction 001. Later this may be changed.
// So the angle considered is just the angle of the photon
// track.
#ifdef G4ANALYSIS_USE
RichTbAnalysisManager * analysis = RichTbAnalysisManager::getInstance();
RichTbAnalysisManager * analysis =
RichTbAnalysisManager::getInstance();
const G4ThreeVector PhotOrgUnitMom =
aPhotTrack->GetVertexMomentumDirection();
G4double Ckv_angle= acos(PhotOrgUnitMom.z());
const G4ThreeVector PhotOrgUnitMom =
aPhotTrack->GetVertexMomentumDirection();
G4double Ckv_angle= acos(PhotOrgUnitMom.z());
analysis->getfhistoCkvProdSmall()->fill(Ckv_angle);
analysis->getfhistoCkvProdSmall()->fill(Ckv_angle);
//Now for the photon emission point in aerogel
// Now for the photon emission point in aerogel
const G4ThreeVector PhotEmisPt = aPhotTrack->GetVertexPosition();
analysis->getfhistoEmisZ()->fill( PhotEmisPt.z());
const G4ThreeVector PhotEmisPt = aPhotTrack->GetVertexPosition();
analysis->getfhistoEmisZ()->fill( PhotEmisPt.z());
#endif
}
}
}
}
}
}
}
}
}
}
+26 -38
View File
@@ -32,19 +32,22 @@
// Supported drivers...
// Not needing external packages or libraries...
#include "G4ASCIITree.hh"
#include "G4DAWNFILE.hh"
#include "G4GAGTree.hh"
#include "G4HepRepFile.hh"
#include "G4HepRep.hh"
#include "G4RayTracer.hh"
#include "G4VRML1File.hh"
#include "G4VRML2File.hh"
// Needing external packages or libraries...
#ifdef G4VIS_USE_DAWN
#include "G4FukuiRenderer.hh"
#endif
#ifdef G4VIS_USE_DAWNFILE
#include "G4DAWNFILE.hh"
#endif
#ifdef G4VIS_USE_OPACS
#include "G4Wo.hh"
#include "G4Xo.hh"
#endif
#ifdef G4VIS_USE_OPENGLX
#include "G4OpenGLImmediateX.hh"
#include "G4OpenGLStoredX.hh"
@@ -61,7 +64,7 @@
#endif
#ifdef G4VIS_USE_OIX
// #include "G4OpenInventorX.hh"
#include "G4OpenInventorX.hh"
#endif
#ifdef G4VIS_USE_OIWIN32
@@ -73,15 +76,6 @@
#include "G4VRML2.hh"
#endif
#ifdef G4VIS_USE_VRMLFILE
#include "G4VRML1File.hh"
#include "G4VRML2File.hh"
#endif
#ifdef G4VIS_USE_RAYTRACER
#include "G4RayTracer.hh"
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
RichTbVisManager::RichTbVisManager () { ; }
@@ -91,19 +85,22 @@ RichTbVisManager::~RichTbVisManager () {;}
void RichTbVisManager::RegisterGraphicsSystems () {
// Graphics Systems not needing external packages or libraries...
RegisterGraphicsSystem (new G4ASCIITree);
RegisterGraphicsSystem (new G4DAWNFILE);
RegisterGraphicsSystem (new G4GAGTree);
RegisterGraphicsSystem (new G4HepRepFile);
RegisterGraphicsSystem (new G4HepRep);
RegisterGraphicsSystem (new G4RayTracer);
RegisterGraphicsSystem (new G4VRML1File);
RegisterGraphicsSystem (new G4VRML2File);
// Graphics systems needing external packages or libraries...
#ifdef G4VIS_USE_DAWN
RegisterGraphicsSystem (new G4FukuiRenderer);
#endif
#ifdef G4VIS_USE_DAWNFILE
RegisterGraphicsSystem (new G4DAWNFILE);
#endif
#ifdef G4VIS_USE_OPACS
RegisterGraphicsSystem (new G4Wo);
RegisterGraphicsSystem (new G4Xo);
#endif
#ifdef G4VIS_USE_OPENGLX
RegisterGraphicsSystem (new G4OpenGLImmediateX);
RegisterGraphicsSystem (new G4OpenGLStoredX);
@@ -120,7 +117,7 @@ void RichTbVisManager::RegisterGraphicsSystems () {
#endif
#ifdef G4VIS_USE_OIX
// RegisterGraphicsSystem (new G4OpenInventorX);
RegisterGraphicsSystem (new G4OpenInventorX);
#endif
#ifdef G4VIS_USE_OIWIN32
@@ -132,15 +129,6 @@ void RichTbVisManager::RegisterGraphicsSystems () {
RegisterGraphicsSystem (new G4VRML2);
#endif
#ifdef G4VIS_USE_VRMLFILE
RegisterGraphicsSystem (new G4VRML1File);
RegisterGraphicsSystem (new G4VRML2File);
#endif
#ifdef G4VIS_USE_RAYTRACER
RegisterGraphicsSystem (new G4RayTracer);
#endif
if (fVerbose > 0) {
G4cout <<
"\nYou have successfully chosen to use the following graphics systems."