Import Geant4 5.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:28:22 +02:00
parent fbd4999cf7
commit 4aea781e80
5454 changed files with 223141 additions and 67347 deletions
+8 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.68 2003/04/30 13:57:45 gcosmo Exp $
$Id: History,v 1.70 2003/06/26 13:47:18 gcosmo Exp $
-------------------------------------------------------------------
=========================================================
@@ -17,6 +17,13 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
27th June 2003 Gabriele Cosmo (examples-V05-01-01)
- Updated reference outputs.
- Included fixes to GNUmakefiles for porting on Darwin in GDML example.
30th May 2003 Gabriele Cosmo (examples-V05-01-00)
- Updated reference outputs.
30th April 2003 Gabriele Cosmo (examples-V05-00-02)
- Includes fixes/improvements part of release 5.1.
- Updated reference outputs.
+5 -1
View File
@@ -1,4 +1,4 @@
$Id: README,v 1.4 2003/02/27 19:30:05 gcosmo Exp $
$Id: README,v 1.5 2003/06/06 14:56:31 gcosmo Exp $
-------------------------------------------------------------------
=========================================================
@@ -48,6 +48,8 @@ Novice level examples
- EM shower parametrisation
ExampleN06
- Optical photon processes
ExampleN07
- Regions and parameterised materials
Extended level examples
analysis
@@ -86,6 +88,8 @@ Advanced level examples
lAr_calorimeter
- Simulation of the Liquid Argon Calorimeter of the ATLAS
Detector at LHC.
Rich
- Rich Test Beam Simulation.
underground_physics
- Setup of an underground dark matter experiment.
xray_fluorescence
+2 -1
View File
@@ -1,4 +1,4 @@
# $Id: GNUmakefile,v 1.3 2001/12/04 13:38:55 gcosmo Exp $
# $Id: GNUmakefile,v 1.4 2003/06/25 14:55:54 gcosmo Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
@@ -11,6 +11,7 @@ include $(G4INSTALL)/config/architecture.gmk
SUBDIRS = brachytherapy gammaray_telescope underground_physics
SUBDIRS += xray_fluorescence xray_telescope
SUBDIRS += Tiara Rich composite_calorimeter lAr_calorimeter
.PHONY : all clean clean_libs
+45
View File
@@ -0,0 +1,45 @@
# $Id: GNUmakefile,v 1.1 2003/05/26 13:02:50 pmendez Exp $
# --------------------------------------------------------------
# GNUmakefile for examples module. Gabriele Cosmo, 06/04/98.
# --------------------------------------------------------------
name := RichTbSim
G4TARGET := $(name)
G4EXLIB := true
ifndef G4INSTALL
G4INSTALL = ../../..
endif
ifdef G4ANALYSIS_USE
CPPFLAGS += -DG4ANALYSIS_USE
endif
include $(G4INSTALL)/config/architecture.gmk
ifdef G4ANALYSIS_USE
CPPFLAGS += `aida-config --include`
LDFLAGS += `aida-config --lib`
endif
#
.PHONY: all
all: lib bin
include $(G4INSTALL)/config/binmake.gmk
visclean:
rm -f g4*.prim g4*.eps g4*.wrl
rm -f .DAWN_*
+137
View File
@@ -0,0 +1,137 @@
==============================================================
Geant4 - an Object-oriented Toolkit for Simulation HEP
==============================================================
Rich Detector for LHCb
----------------------------------
This example is intended to simulate the TestBeam Setup of the Rich detector
at the LHCb to test the performance of the aerogel radiator.
The goal of the Rich is the proper identification of charged particles
in a momentum range of 1-150 GeV/c and to assist in the separation of
signal and background.
1. GEOMETRY DEFINITION
-----------------------------
It consists on 2 detector; RICH1, RICH2 which have to cover
the full LHCb momentum range:
RICH1: Aerogel 2 to 10 GeV/c
C4F10 < 70 GeV/c
RICH2: CF4 < 150 GeV/c
The geometry (defined inside RichDetectorConstruction class) consists of
4 Hpd, a target containing the aerogel and a spherical mirror.
The TestbeamSetUp is related to changes in teils, distances between elements
of the testbeam and types. All the possible configurations are considered
by a loop inside the MaterialParameters class.
2. AN EVENT: THE PRIMARY GENERATOR
-------------------------------------
The primary kinematic consists of a single charge particle (normally pions)
which is sent towards the target producing a rain of photons reflected and
focused by the spherical mirrors and recolected after in the Hpd.
The aim of the testbeam is to perform resolutions measurements with
and without the aerogel to probe the improvement of its use. Comparisons
between simulation and data are performed to determine the angle defined
between the simmetry axis of the system (axis z) and the distance to the
interaction point of the produced photons in the Hpd.
The information related to type of particles to be sent, their energy
and directions is included inside the PrimaryGeneratorAction class.
These parameters can be changed interactively using an extern macro
(run1.mac). It is recomended the use of such macro for changes because
it avoids further compilations.
A RUN is a set of events.
3. VISUALIZATION
--------------------
The Visualization manager is set in the main().
The Initialisation of the drawing is already defined in run1.mac.
The example is prepared to use any other visualization packages which
can be defined in such macro or inside RichTbVis0.mac. Before running
the events, the visualization must be initialized by:
> /control/execute/RichTbVis0.mac
The detector has longitudinal view of the geometry as default.
The tracks are drawn at the end of event, and erased at the end of the run.
4. PHYSICS DEMO
----------------
The particles type and physics processes which will be available in
this example are set in PhysicsList class.
In addition a built-in interactive command (process/inactivate proname)
allows to activate/inactivatethe processes one by one.
5. HOW TO START?
-----------------
- compile and link to generate an executable
% cd geant4/examples/advanced/Rich/
% gmake
- execute the program in 'batch' mode from macro files
% RichTbSim run1.mac
- execute tests in 'interactive mode'
% RichTbSim
.....
Idle> type your commands
.....
Idle> exit
6. HISTOGRAMS
---------------
This example produces 7 histograms (saved as rich.his generated automatically
during the running time) which illustrate the final state of the most important
information of the example:
histo1 --> Number of Photon Hits per Track
histo2 --> Number of Photons before Mirror
histo3 --> WaveLength of Photons before Mirror
histo4 --> WaveLength of Photons after Mirror
histo5 --> Cherekov Angle at roduction all angles
histo6 --> Z of the Photon Emission Point
histo7 --> Cherenkov Ring Radius
See their definition on AnalysisManager.
Note that histograms are disabled via the flag G4ANALYSIS_USE in GNUmakefile.
7. USING THE LAST ANAPHE IMPLEMENTATION OF AIDA HISTOGRAMS
------------------------------------------------------------
In order to use the new Anaphe implementation of the AIDA interfaces
prepare some environment variables by source-ing one of the following
startup scripts:
(THIS EXAMPLE HAS BEEN DEVELOPED AND TESTED WITH THE gcc-2.95.5 COMPILER)
o Setup the environment variable: G4ANALYSIS_USE 1
o setenv PATH ${PATH}:/afs/cern.ch/sw/lhcxx/specific/redhat73/gcc-2.95.2/5.0.5/bin
o source /afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.5/install/sharedstart.csh
o ln -s /afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.5/scripts/* ~/bin/ (this has
to be done only once)
After this, you will have access to the last 'aida-config' command
which is used in the GNUmakefile.
+160
View File
@@ -0,0 +1,160 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich Test Beam Simulation Main program
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
// ----------------------------------------------------------------
#include <iostream.h>
#include "RichTbRunAction.hh"
#include "RichTbEventAction.hh"
#include "RichTbDetectorConstruction.hh"
#include "RichTbPrimaryGeneratorAction.hh"
#include "RichTbStackingAction.hh"
#include "RichTbSteppingAction.hh"
#include "RichTbTrackingAction.hh"
#include "RichTbPhysicsList.hh"
#include "G4VPhysicalVolume.hh"
#include "G4RunManager.hh"
#include "RichTbRunConfig.hh"
#include "RichTbIOData.hh"
#include "G4UImanager.hh"
#include "G4UIterminal.hh"
#ifdef G4UI_USE_XM
#include "G4UIXm.hh"
#endif
#include "Randomize.hh"
#ifdef G4VIS_USE
#include "RichTbVisManager.hh"
#endif
#include "G4ios.hh"
#include <stdlib.h>
int main(int argc,char** argv) {
// Seed the random number generator manually
// ------------------------------------------
G4long myseed = 345354;
HepRandom::setTheSeed(myseed);
// Run manager
G4RunManager * runManager = new G4RunManager;
//Job and Run options.
RichTbRunConfig* rConfig= new RichTbRunConfig();
// Datafile streams for input and output
RichTbIOData* rIOData = new RichTbIOData( rConfig );
RichTbDetectorConstruction* RichTbDet
= new RichTbDetectorConstruction(rConfig);
runManager->SetUserInitialization(RichTbDet);
RichTbPhysicsList* RichTbPhy
=new RichTbPhysicsList(rConfig);
runManager-> SetUserInitialization(RichTbPhy);
// UserAction classes - optional
RichTbVisManager* visManager = new RichTbVisManager();
visManager->SetVerboseLevel(0);
visManager->Initialize();
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
cout<<" PVVisManager "<<pVVisManager<<endl;
cout<<"VisManager "<<visManager<<endl;
runManager->SetUserAction(new RichTbRunAction);
RichTbPrimaryGeneratorAction* PrimaryGenAction =
new RichTbPrimaryGeneratorAction(RichTbDet);
runManager->SetUserAction( PrimaryGenAction );
RichTbEventAction* eventAction=
new RichTbEventAction(rConfig,visManager,
rIOData);
runManager->SetUserAction(eventAction);
runManager->SetUserAction(new RichTbStackingAction);
RichTbSteppingAction* StepAction= new RichTbSteppingAction(rConfig, PrimaryGenAction );
runManager->SetUserAction(StepAction);
runManager->SetUserAction(new RichTbTrackingAction);
G4UImanager* UI = G4UImanager::GetUIpointer();
G4UIsession* session=0;
//Initialize G4 kernel
runManager -> Initialize();
if(argc==1){
session = new G4UIterminal;
}
if (session){ // Interactive mode
UI->ApplyCommand("/run/verbose 0");
UI->ApplyCommand("/event/verbose 0");
UI->ApplyCommand("/tracking/verbose 0");
UI->ApplyCommand("/particle/process/verbose 0");
session->SessionStart();
delete session;
}
else // Batch mode
{
G4UImanager * UI = G4UImanager::GetUIpointer();
G4String command = "/control/execute ";
G4String fileName = argv[1];
UI->ApplyCommand(command+fileName);
}
#ifdef G4VIS_USE
delete visManager;
#endif
G4cout << "\nVisManager deleted..\n" <<G4endl;
delete runManager;
G4cout << "\nRunManager deleted..\n" <<G4endl;
return 0;
}
+91
View File
@@ -0,0 +1,91 @@
#######################################################################
# MACRO FILE NAME: RichTbVis0.mac #
# #
# AUTHOR(S): Satoshi Tanaka #
# Mod SE 20-3-01 #
# DATE: November 10, 1999 #
# May 20, 2000 #
# June 06, 2000 #
# #
# CONTENTS: A simplest macro to demonstrate visualization of #
# detector geometry and events #
# #
# USAGE: #
# Idle> /control/execute RichTbVis0.mac #
# #
# REQUIRED PLATFORMS & SOFTWARES: Unix, X-window, OpenGL, #
# DAWN (version 3.80 or after) #
# gv (Ghostview), Tcl/Tk #
# #
# ENVIRONMENTAL VARIABLES (C-MACROS) FOR INSTALLATION: #
# (See geant4/source/visualization/README for details.) #
# #
# % setenv OGLHOME ... (e.g. /usr/local) #
# % setenv G4VIS_BUILD_OPENGLX_DRIVER 1 #
# % setenv G4VIS_BUILD_DAWNFILE_DRIVER 1 #
# #
# ENVIRONMENTAL VARIABLES (C-MACROS) FOR COMPILATION: #
# (See geant4/source/visualization/README for details.) #
# #
# % setenv G4VIS_USE_OPENGLX 1 #
# % setenv G4VIS_USE_DAWNFILE 1 #
# #
# Addional Notes: #
# The compound command "/vis/open <graphics-system-name>" #
# is equivalent to the following set of commands: #
# #
# /vis/sceneHandler/create $1 #
# /vis/viewer/create #
# #
# The compound command "/vis/drawVolume <physical-volume-name>" #
# is equivalent to the following set of commands: #
# #
# /vis/scene/create #
# /vis/scene/add/volume $1 #
# /vis/sceneHandler/attach #
# /vis/viewer/refresh #
# /vis/viewer/update #
# #
#######################################################################
##############################################
# Visualization of detector geometry
# with the OGLIX (OpenGL Immediate X) driver
##############################################
# Invoke the OGLIX driver
#/vis/open OGLIX
# Set camera
# Note: Camera setting should be done
# for each scene handler.
/vis/camera/reset
/vis/scene/create
#/vis/sceneHandler/create OGLIX
#/vis/sceneHandler/create DAWNFILE
#/vis/sceneHandler/create OGLSXm
/vis/open DAWNFILE
/vis/open OGLIX
/vis/viewer/create
/vis/scene/add/volume
#/vis/camera/viewpoint 0 0
/vis/camera/viewpoint -90 -90
#/vis/camera/viewpoint 270 0
/vis/camera/zoom 0.8
#/vis/camera/spin 20 10
# Visualize of the whole detector geometry
/vis/drawVolume
/vis/viewer/update
@@ -0,0 +1,76 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// AerogelRefData.hh for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef AerogelRefData_h
#define AerogelRefData_h 1
#include "G4ios.hh"
#include "globals.hh"
#include <vector>
#include "AerogelTypeSpec.hh"
class AerogelRefData {
public:
AerogelRefData(G4String AerogelRefInputFileName);
virtual ~AerogelRefData();
void ReadStdAerogelRefIndex();
vector<G4double> GetCurAerogelRefIndValueVect(G4int AerogelTypenum );
G4double GetCurAerogelRefIndValue( G4int rbinw , G4int AerogelTypenum );
G4double GetRefnominal(G4int);
AerogelType GetAerogelType(G4int);
G4int GetNumberOfRefIndBins() {return NumberOfRefIndBins; }
G4double GetAerogelRefphotE(G4int BinNumw )
{return StdAerogelRefphotE[BinNumw]; }
G4double GetStdAerogelRefIndValue(G4int BinNumv )
{return StdAerogelRefIndexValue[BinNumv];}
vector<G4double> GetAerogelRefphotEVect()
{ return StdAerogelRefphotE ; }
vector<G4double> GetStdAerogelRefIndValueVect()
{return StdAerogelRefIndexValue ; }
G4double GetAerogelRefIndShift(G4int iAgtype)
{return AerogelRefIndShift[iAgtype];}
G4double GetAerogelWavelengthRef(G4int jAgtype)
{return AerogelWavelengthRef[jAgtype]; }
G4double GetStdAgelRefIndexE(G4double RefEnergy );
G4String GetAerogelRefIndexFileName() {return AerogelRefIndexFileName; }
private:
G4String AerogelRefIndexFileName;
G4int NumberOfRefIndBins;
vector<G4double>StdAerogelRefphotE ;
vector<G4double>StdAerogelRefIndexValue ;
G4double StdAerogelNominalRefractiveIndex;
vector<G4double> AerogelRefIndShift;
vector<G4double> AerogelWavelengthRef;
};
#endif
@@ -0,0 +1,44 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// AerogelTypeSpec.hh for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef AerogelTypeSpec_h
#define AerogelTypeSpec_h 1
// different types of Aerogels.
static const G4int MaxNumberOfAerogelTiles=5;
static const G4int MaxNumberOfAerogelTypes=5;
enum AerogelType{AerogelTypeA,AerogelTypeB,AerogelTypeC,AerogelTypeD,
AerogelTypeE};
static const G4String AerogelTypeString[]={"AerogelTypeA","AerogelTypeB",
"AerogelTypeC","AerogelTypeD",
"AerogelTypeE"};
// Type A has dimensions 7*8*4 cm
// In the G4Example only 1 type is used. In the LHCb implementation
// there are 5 types of aerogel.
// In the G4Example only 1 tile is implemented. In the LHCb
// implementation upto 5 tiles are allowed.
#endif
@@ -0,0 +1,72 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// FilterTrData.chh for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef FilterTrData_h
#define FilterTrData_h 1
#include "G4ios.hh"
#include "globals.hh"
#include <vector>
#include "FilterTypeSpec.hh"
class FilterTrData {
public:
FilterTrData(G4int , G4String );
virtual ~FilterTrData();
G4double GetCurrentFilTrans(G4double);
G4double GetTotFilTrans(G4double);
void ReadFilterTrans();
G4int GetNumberofBins() {return NumberOfTrBins; }
G4double GetCurTransWL(G4int BinNumw ) {return TransWaveL[BinNumw]; }
G4double GetCurTransValue(G4int BinNumv ) {return TransValue[BinNumv];}
G4double GetCurTransTotValue(G4int BinNumv ) {return TransTotValue[BinNumv];}
G4double GetCurFilterThickness() {return FilterThickness; }
vector<G4double> GetTransWL() { return TransWaveL ; }
vector<G4double> GetTransValue() {return TransValue ; }
vector<G4double> GetTransTotValue() {return TransTotValue ; }
FilterType GetFilterTypeIndex() {return FilterTypeIndex ; }
private:
FilterType FilterTypeIndex;
G4int FilterTypeNumber;
G4int NumberOfTrBins;
G4double FilterThickness;
G4double FilterRefIndexNominal;
vector<G4double>TransWaveL ;
vector<G4double>TransValue ;
vector<G4double>TransTotValue;
G4double CurNeighbourRefIndexNominal;
G4String FilterTransDataFileName;
};
#endif
@@ -0,0 +1,38 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// FilterTypeSpec.hh for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef FilterTypeSpec_h
#define FilterTypeSpec_h 1
// different types of filters.
static const G4int MaxNumberOfFilterTypes=1;
enum FilterType{GlassD263};
static const G4String FilterTypeString[]={"GlassD263"};
//
// in the G4Example only 1 type of filter used. In the
// LHCb implementation several types of filters used.
#endif
@@ -0,0 +1,79 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// HpdSiEnergyLoss.hh for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef HpdSiEnergyLoss_h
#define HpdSiEnergyLoss_h 1
#include "globals.hh"
#include "G4VEnergyLoss.hh"
#include "G4VParticleChange.hh"
#include "G4DynamicParticle.hh"
#include "G4Track.hh"
#include "G4Step.hh"
#include "G4ParticleDefinition.hh"
class HpdSiEnergyLoss : public G4VEnergyLoss
{
public:
HpdSiEnergyLoss(const G4String& materialName ,
const G4String& processName);
virtual ~HpdSiEnergyLoss();
G4bool IsApplicable(const G4ParticleDefinition&);
// true for all charged particles
G4double GetContinuousStepLimit(const G4Track& track,
G4double previousStepSize,
G4double currentMinimumStep,
G4double& currentSafety);
G4VParticleChange* AlongStepDoIt(const G4Track& aTrack,
const G4Step& aStep) ;
G4double GetMeanFreePath(const G4Track& track,
G4double previousStepSize,
G4ForceCondition* condition);
G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
const G4Step& aStep);
private:
// hide assignment and copy operators
HpdSiEnergyLoss ( HpdSiEnergyLoss &);
HpdSiEnergyLoss & operator=(const HpdSiEnergyLoss &right);
//now the data members
G4int fMatIndex;
G4double MinKineticEnergy ;
G4double MipEnergy;
G4double finalRangeforStep;
G4String ElossMaterialName;
};
#endif
@@ -0,0 +1,88 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// PadHpdPhotoElectricEffect.hh for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef PadHpdPhotoElectricEffect_h
#define PadHpdPhotoElectricEffect_h 1
#include "G4ios.hh"
#include "globals.hh"
#include "Randomize.hh"
#include "G4VDiscreteProcess.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4DynamicParticle.hh"
#include "G4OpticalPhoton.hh"
#include "G4Electron.hh"
#include "G4Step.hh"
#include "RichTbMaterialParameters.hh"
class RichTbAnalysisManager;
class RichTbRunConfig;
class PadHpdPhotoElectricEffect : public G4VDiscreteProcess {
public:
PadHpdPhotoElectricEffect(const G4String&,RichTbRunConfig* );
virtual ~PadHpdPhotoElectricEffect();
G4bool IsApplicable(const G4ParticleDefinition& );
// is applicable for optical photon only
G4double GetMeanFreePath(const G4Track& ,
G4double ,
G4ForceCondition* condition);
//returns infinity (max integer possible) . This means the process does
// not limit the step, but sets the Forced condition for the DoIt to be
// invoked at every step. But only at the boundary between Hpd quartz
// window and the Hpd photocathode any action be taken.
G4VParticleChange* PostStepDoIt(const G4Track& aTrack,
const G4Step& aStep);
//The method for implementing the HpdPhotoelectric effect.
G4double getHpdQEff(G4int, G4double);
// To interpolate the QE from QE data.
G4double getHpdPhElectronKE()
{return HpdPhElectronKE; }
G4double getPhCathodeToSilDetDist()
{return PhCathodeToSilDetDist; }
G4double getHpdDemag(G4int hpdnum) {return DemagnificationFactor[hpdnum]; }
private:
// RichTbAnalysisManager* rAnalysisPhy;
RichTbRunConfig* rConfig;
G4String PrePhotoElectricVolName;
G4String PostPhotoElectricVolName;
G4double HpdPhElectronKE;
G4double PhCathodeToSilDetDist;
G4double PSFsigma;
vector<G4double>DemagnificationFactor;
vector<G4double>DemagnificationQuadFactor;
vector<vector<G4double> >HpdQE;
vector<vector<G4double> >HpdWabin;
};
#endif
@@ -0,0 +1,199 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbAnalysisManager.hh for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef RichTbAnalysisManager_h
#define RichTbAnalysisManager_h 1
#include "globals.hh"
#include <vector>
#include "G4ThreeVector.hh"
#ifdef G4ANALYSIS_USE
#include "AIDA/AIDA.h"
#endif
#include "RichTbAnalysisMessenger.hh"
class G4Step;
#ifdef G4ANALYSIS_USE
namespace AIDA{
class IAnalysisFactory;
class IHistogramFactory;
class ITree;
class ITupleFactory;
class ITuple;
}
#endif
class G4Run;
class G4Event;
class G4Step;
class G4Timer;
class G4SteppingManager;
class RichTbRunConfig;
class RichTbAnalysisManager{
public:
RichTbAnalysisManager();
virtual ~RichTbAnalysisManager();
#ifdef G4ANALYSIS_USE
void book();
void finish();
static RichTbAnalysisManager* getInstance();
void SetOutputFileName(G4String);
#endif
void BeginOfRunAnalysis();
void EndOfRunAnalysis();
void BeginOfEventAnalysis(const G4Event*);
void EndOfEventAnalysis(const G4Event*);
void StepAnalysis(const G4SteppingManager* );
void bumpNumPhotonsBeforeAerogel() { NumPhotBeforeAerogel++ ; }
G4int getNumPhotBeforeAerogel() {return NumPhotBeforeAerogel; }
void bumpNumPhotonsAfterFilter(){ NumPhotAfterFilter++ ; }
G4int getNumPhotAfterFilter() {return NumPhotAfterFilter ; }
void bumpNumPhotonsBeforeFilter(){ NumPhotBeforeFilter++ ; }
G4int getNumPhotBeforeFilter() {return NumPhotBeforeFilter ; }
void bumpNumPhotonsBeforeMirror(){ NumPhotBeforeMirror++ ; }
G4int getNumPhotBeforeMirror() {return NumPhotBeforeMirror ; }
void bumpNumPhotonsAfterMirror(){ NumPhotAfterMirror++ ; }
G4int getNumPhotAfterMirror() {return NumPhotAfterMirror ; }
void bumpNumPhotonsAtHpd1Input(){ NumPhotAtHpd1Input++ ; }
G4int getNumPhotAtHpd1Input() {return NumPhotAtHpd1Input ; }
void bumpNumPhotonsAtHpd2Input(){ NumPhotAtHpd2Input++ ; }
G4int getNumPhotAtHpd2Input() {return NumPhotAtHpd2Input ; }
void bumpNumPhotonsAtHpd3Input(){ NumPhotAtHpd3Input++ ; }
G4int getNumPhotAtHpd3Input() {return NumPhotAtHpd3Input ; }
void bumpNumPhotonsAtHpd4Input(){ NumPhotAtHpd4Input++ ; }
G4int getNumPhotAtHpd4Input() {return NumPhotAtHpd4Input ; }
void bumpNumHitInSi(){ NumHitInSi++ ; }
G4int getNumHitInSi() {return NumHitInSi ; }
G4double getMeanHXCoord() {return MeanHXCoord ; }
G4double getMeanHYCoord() {return MeanHYCoord ; }
G4double getNumHXCoord() {return NumHXCoord ; }
G4double getNumHYCoord() {return NumHYCoord ; }
void setMeanHXCoord(G4double cx );
void setMeanHYCoord(G4double cy );
public:
G4String outputFileName;
static RichTbAnalysisManager* instance;
#ifdef G4ANALYSIS_USE
RichTbAnalysisMessenger* analisysMessenger;
AIDA::IAnalysisFactory* analysisFactory;
AIDA::ITree* tree;
AIDA::IHistogramFactory* histogramFactory;
#endif
AIDA::IHistogram1D* getfhistoNPhotG() {return fhistoNrPhotG;}
AIDA::IHistogram1D* getfhistoNBeforeMirror() {return fhistoNBeforeMirror;}
AIDA::IHistogram1D* getfhistoWBeforeMirror() {return fhistoWBeforeMirror;}
AIDA::IHistogram1D* getfhistoWAfterMirror() {return fhistoWAfterMirror;}
AIDA::IHistogram1D* getfhistoCkvProdSmall() {return fhistoCkvProdSmall;}
AIDA::IHistogram1D* getfhistoEmisZ() {return fhistoEmisZ;}
AIDA::IHistogram1D* getfhistoCkvRadius() {return fhistoCkvRadius; }
public:
#ifdef G4ANALYSIS_USE
AIDA::IHistogram1D* fhistoNrPhotG;
AIDA::IHistogram1D* fhistoNBeforeMirror;
AIDA::IHistogram1D* fhistoWBeforeMirror;
AIDA::IHistogram1D* fhistoWAfterMirror;
AIDA::IHistogram1D* fhistoCkvProdSmall;
AIDA::IHistogram1D* fhistoEmisZ;
AIDA::IHistogram1D* fhistoCkvRadius;
#endif
G4Timer* iTimer;
G4int NumPhotBeforeAerogel;
G4int NumPhotBeforeMirror;
G4int NumPhotBeforeFilter;
G4int NumPhotAfterFilter;
G4int NumPhotAtHpd1Input;
G4int NumPhotAtHpd2Input;
G4int NumPhotAtHpd3Input;
G4int NumPhotAtHpd4Input;
G4int NumPhotAfterMirror;
G4int NumHitTotInHpd1;
G4int NumHitTotInHpd2;
G4int NumHitTotInHpd3;
G4int NumHitTotInHpd4;
G4int NumHitInSi;
RichTbRunConfig* rConfig;
G4double MeanHXCoord;
G4double MeanHYCoord;
G4double NumHXCoord;
G4double NumHYCoord;
};
#endif
@@ -0,0 +1,67 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbAnalysisMessenger.hh for Rich of LHCb
// History:
// Created: Patricia Mendez (Patricia.Mendez@cern.ch)
////////////////////////////////////////////////////////////////////////////
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifdef G4ANALYSIS_USE
#ifndef RichTbAnalysisMessenger_h
#define RichTbAnalysisMessenger_h 1
#include "globals.hh"
#include "G4UImessenger.hh"
class RichTbAnalysisManager;
class G4UIdirectory;
class G4UIcmdWithAString;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class G4UIcmdWithAString;
class RichTbAnalysisMessenger: public G4UImessenger
{
public:
RichTbAnalysisMessenger(RichTbAnalysisManager* );
~RichTbAnalysisMessenger();
private:
//pointer to RichTbAnalysisManager
RichTbAnalysisManager* richAnalysis;
G4UIdirectory* RichTbAnalysisDir;
G4UIcmdWithAString* ouputFileCommand;
};
#endif
#endif
@@ -0,0 +1,138 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbComponent.hh for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef RichTbComponent_h
#define RichTbComponent_h 1
#include "globals.hh"
#include <vector>
#include "RichTbMaterial.hh"
#include "RichTbHall.hh"
#include "RichTbRunConfig.hh"
#include "G4LogicalVolume.hh"
#include "G4VPhysicalVolume.hh"
#include "AerogelTypeSpec.hh"
#include "G4LogicalBorderSurface.hh"
class RichTbComponent {
public:
RichTbComponent();
RichTbComponent(RichTbMaterial*,RichTbHall*, RichTbRunConfig*,G4bool);
virtual ~RichTbComponent();
G4LogicalVolume* getEnclosureLogicalVolume()
{return RichTbEnclosureLVol;}
G4VPhysicalVolume* getEnclosurePhysicalVolume()
{return RichTbEnclosurePVol;}
G4LogicalVolume* getMirrorLogicalVolume()
{return RichTbMirrorLVol;}
G4VPhysicalVolume* getMirrorPhysicalVolume()
{return RichTbMirrorPVol;}
G4LogicalBorderSurface* getMirrorSurface()
{return RichTbMirrorBSurf; }
G4LogicalVolume* getRadFrameLogicalVolume()
{return RichTbRadFrameLVol;}
G4VPhysicalVolume* getRadFramePhysicalVolume()
{return RichTbRadFramePVol;}
G4LogicalVolume* getRadUpWLogicalVolume()
{return RichTbRadUpWLVol;}
G4VPhysicalVolume* getRadUpWPhysicalVolume()
{return RichTbRadUpWPVol;}
G4LogicalVolume* getRadDnWLogicalVolume()
{return RichTbRadDnWLVol;}
G4VPhysicalVolume* getRadDnWPhysicalVolume()
{return RichTbRadDnWPVol;}
G4int getNumAerogelTiles() {return NumAerogelTiles; }
G4LogicalVolume* getAgelLogicalVolume(G4int Agelnum)
{return RichTbAgelLVol[Agelnum];}
G4VPhysicalVolume* getAgelPhysicalVolume(G4int Agelnumber)
{return RichTbAgelPVol[Agelnumber];}
G4LogicalVolume* getAgelWrapTopLogicalVolume(G4int Agelnum)
{return RichTbAgelWrapTopLVol[Agelnum];}
G4VPhysicalVolume* getAgelWrapTopPhysicalVolume(G4int Agelnumber)
{return RichTbAgelWrapTopPVol[Agelnumber];}
G4LogicalVolume* getAgelWrapBotLogicalVolume(G4int Agelnum)
{return RichTbAgelWrapBotLVol[Agelnum];}
G4VPhysicalVolume* getAgelWrapBotPhysicalVolume(G4int Agelnumber)
{return RichTbAgelWrapBotPVol[Agelnumber];}
G4LogicalVolume* getFilterLogicalVolume()
{return RichTbFilterLVol;}
G4VPhysicalVolume* getFilterPhysicalVolume()
{return RichTbFilterPVol;}
private:
G4LogicalVolume* RichTbEnclosureLVol;
G4VPhysicalVolume* RichTbEnclosurePVol;
G4LogicalBorderSurface* RichTbEnclosureOuterBSurf;
G4LogicalBorderSurface* RichTbEnclosureInnerBSurf;
G4LogicalVolume* RichTbMirrorLVol;
G4VPhysicalVolume* RichTbMirrorPVol;
G4LogicalBorderSurface* RichTbMirrorBSurf;
G4LogicalVolume* RichTbRadFrameLVol;
G4VPhysicalVolume* RichTbRadFramePVol;
G4LogicalVolume* RichTbRadUpWLVol;
G4VPhysicalVolume* RichTbRadUpWPVol;
G4LogicalVolume* RichTbRadDnWLVol;
G4VPhysicalVolume* RichTbRadDnWPVol;
G4int NumAerogelTiles;
vector<G4LogicalVolume*> RichTbAgelLVol;
vector<G4VPhysicalVolume*> RichTbAgelPVol;
vector<G4LogicalVolume*> RichTbAgelWrapTopLVol;
vector<G4VPhysicalVolume*> RichTbAgelWrapTopPVol;
vector<G4LogicalVolume*> RichTbAgelWrapBotLVol;
vector<G4VPhysicalVolume*> RichTbAgelWrapBotPVol;
G4LogicalVolume* RichTbFilterLVol;
G4VPhysicalVolume* RichTbFilterPVol;
G4bool ConstructTrackingGeometrySwitch;
};
#endif
@@ -0,0 +1,82 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbDetectorConstruction.hh for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef RichTbDetectorConstruction_h
#define RichTbDetectorConstruction_h 1
#include "globals.hh"
#include "RichTbMaterial.hh"
#include "RichTbHall.hh"
#include "RichTbComponent.hh"
#include "RichTbPhotoDetector.hh"
#include "RichTbGraphics.hh"
#include "G4VUserDetectorConstruction.hh"
#include "G4VPhysicalVolume.hh"
#include "RichTbRunConfig.hh"
#include "RichTbROGeometry.hh"
#include "RichTbAnalysisManager.hh"
class RichTbDetectorConstruction:
public G4VUserDetectorConstruction{
public:
RichTbDetectorConstruction();
RichTbDetectorConstruction(RichTbRunConfig*);
virtual ~RichTbDetectorConstruction();
G4VPhysicalVolume* Construct();
RichTbMaterial* getRichTbMaterial()
{return rMaterial; }
RichTbHall* getRichTbHall()
{return rTbHall; }
RichTbComponent* getRichTbComponent()
{return rTbComponent; }
RichTbPhotoDetector* getRichTbPhotoDetector()
{return rTbPhotoDetector; }
RichTbGraphics* getRichTbGraphcis()
{return rTbGraphics; }
RichTbROGeometry* getROGeometry()
{return rTbROGeom; }
private:
RichTbRunConfig* runConfiguration;
RichTbMaterial* rMaterial;
RichTbHall* rTbHall;
RichTbComponent* rTbComponent;
RichTbPhotoDetector* rTbPhotoDetector;
RichTbGraphics* rTbGraphics;
RichTbROGeometry* rTbROGeom;
};
#endif
@@ -0,0 +1,65 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbEventAction.cc for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef RichTbEventAction_h
#define RichTbEventAction_h 1
#include "G4UserEventAction.hh"
#include "G4ThreeVector.hh"
#include "RichTbRunConfig.hh"
#include "RichTbAnalysisManager.hh"
class G4Event;
class RichTbVisManager;
class RichTbAnalysisManager;
class RichTbIOData;
class RichTbEventAction : public G4UserEventAction {
public:
RichTbEventAction();
RichTbEventAction(RichTbRunConfig* ,
RichTbVisManager* , RichTbIOData* );
virtual ~RichTbEventAction();
public:
void BeginOfEventAction(const G4Event* );
void EndOfEventAction(const G4Event* );
G4int GetRichCollID() {return RichTbCollID;};
RichTbAnalysisManager* getAnalysisM()
{return ranalysisManager; }
RichTbVisManager* getVisM()
{return pVisManager; }
private:
RichTbRunConfig* runConfiguration;
G4int RichTbCollID;
RichTbAnalysisManager* ranalysisManager;
RichTbVisManager* pVisManager;
RichTbIOData* rTbIOData;
};
#endif
@@ -0,0 +1,392 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbGeometryParameters.hh for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef RichTbGeometryParameters_h
#define RichTbGeometryParameters_h 1
#include "globals.hh"
#include "AerogelTypeSpec.hh"
#include <math.h>
extern void InitializeRichTbGeometry();
extern G4double GetCurAerogelLength(G4int);
//
//
static const G4double sqroot3=pow(3.0,0.5);
//Size of the LHCb Rich Testbeam Hall.
static const G4double ExpHallHalfX=4000.0*mm;
static const G4double ExpHallHalfY=4000.0*mm;
static const G4double ExpHallHalfZ=8000.0*mm;
// The Hall is kept at the orgin of the coord system.
// The coord system has +z along the beam direction and +y
// going upwards.
//
//Now for the Vessel
static const G4double VesselInnerRad=0.0*mm;
static const G4double VesselOuterRad=275.0*mm;
static const G4double VesselHalfZ=540.0*mm;
static const G4double VesselStartPhi=0.0*rad;
static const G4double VesselDelPhi=twopi*rad;
static const G4double VesselPosX=0.0*mm;
static const G4double VesselPosY=0.0*mm;
static const G4double VesselPosZ=VesselHalfZ;
//Now for the box containing the aerogel sample.
static const G4double RadFrameHalfX=55.0*mm;
static const G4double RadFrameHalfY=55.0*mm;
static const G4double RadFrameHalfZ=55.0*mm;
static const G4double RadFramePosX=0.0*mm;
static const G4double RadFramePosY=0.0*mm;
//The following are the Z positons of start of the radiator frame
// and aerogel tiles.
static const G4double RadFrameGenStartZ=185.0*mm;
static const G4double AgelTileGenStartZ=190.0*mm;
static const G4double RadFramePosZ=
RadFrameGenStartZ+RadFrameHalfZ-VesselHalfZ;
// Now for the aerogel blocks. They are made to start at 190mm from the
// upstream edge of the box.
// The following are dimensioned to MaxNumberOfAerogelTiles which
// from the AerogelTypeSpec.hh file
//
//Now for the window of the radframe at its upstream and downstream
// ends.
//
static const G4double RadHoldUpHalfX=50.0*mm;
static const G4double RadHoldUpHalfY=50.0*mm;
static const G4double RadHoldUpHalfZ=1.0*mm;
static const G4double RadHoldUpPosX=0.0*mm;
static const G4double RadHoldUpPosY=0.0*mm;
static const G4double RadHoldUpPosZ=-RadFrameHalfZ+ RadHoldUpHalfZ;
static const G4double RadWinUpOuterRad=40.0*mm;
static const G4double RadWinUpInnerRad=0.0*mm;
static const G4double RadWinUpHalfZ= RadHoldUpHalfZ+5.0*mm;
static const G4double RadWinUpStartPhi=0.0*rad;
static const G4double RadWinUpDelPhi=twopi*rad;
static const G4double RadWinUpShiftX=0.0*mm;
static const G4double RadWinUpShiftY=0.0*mm;
static const G4double RadWinUpShiftZ=0.0*mm;
//
static const G4double RadHoldDnHalfX=50.0*mm;
static const G4double RadHoldDnHalfY=50.0*mm;
static const G4double RadHoldDnHalfZ=1.0*mm;
static const G4double RadHoldDnPosX=0.0*mm;
static const G4double RadHoldDnPosY=0.0*mm;
static const G4double RadHoldDnShiftZ=15.0*mm;
static const G4double RadHoldDnPosZ=RadFrameHalfZ-
RadHoldDnShiftZ- RadHoldDnHalfZ;
static const G4double RadWinDnOuterRad=40.0*mm;
static const G4double RadWinDnInnerRad=0.0*mm;
static const G4double RadWinDnHalfZ= RadHoldDnHalfZ+5.0*mm;
static const G4double RadWinDnStartPhi=0.0*rad;
static const G4double RadWinDnDelPhi=twopi*rad;
static const G4double RadWinDnShiftX=0.0*mm;
static const G4double RadWinDnShiftY=0.0*mm;
static const G4double RadWinDnShiftZ=0.0*mm;
// the following three variables are for each of the aerogel types.
// In the G4example only 1 type is simply repeated 5 times.
static const G4double AgelHalfX[]={35.0*mm,35.0*mm,35.0*mm,35.0*mm,35.0*mm};
static const G4double AgelHalfY[]={40.0*mm,40.0*mm,40.0*mm,40.0*mm,40.0*mm};
static const G4double AgelHalfZ[]={20.0*mm,20.0*mm,20.0*mm,20.0*mm,20.0*mm};
// The following 2 variables are for each tile.
// for now no shifts forseen in the XY direction.
static const G4double AgelPosX[]={0.0*mm,0.0*mm,0.0*mm,0.0*mm,0.0*mm};
static const G4double AgelPosY[]={0.0*mm,0.0*mm,0.0*mm,0.0*mm,0.0*mm};
static const G4double AgelStartZ=
AgelTileGenStartZ-RadFrameGenStartZ-RadFrameHalfZ;
static const G4double TotalAgelThickness=80.0*mm;
static const G4double AgelTileGapZ=1.0*mm;
static const G4double AgelEndZ= AgelStartZ+TotalAgelThickness+AgelTileGapZ;
//Now for the wraps above and below the aerogel tiles.
static const G4double AgelWrapTopHalfX[]=
{35.0*mm,35.0*mm,35.0*mm,35.0*mm,35.0*mm};
static const G4double AgelWrapTopHalfY[]=
{1.0*mm,1.0*mm,1.0*mm,1.0*mm,1.0*mm};
static const G4double AgelWrapTopHalfZ[]=
{20.0*mm,20.0*mm,20.0*mm,20.0*mm,20.0*mm};
static const G4double AgelWrapTopPosX[]=
{0.0*mm,0.0*mm,0.0*mm,0.0*mm,0.0*mm};
static const G4double AgelWrapBotHalfX[]=
{35.0*mm,35.0*mm,35.0*mm,35.0*mm,35.0*mm};
static const G4double AgelWrapBotHalfY[]=
{1.0*mm,1.0*mm,1.0*mm,1.0*mm,1.0*mm};
static const G4double AgelWrapBotHalfZ[]=
{20.0*mm,20.0*mm,20.0*mm,20.0*mm,20.0*mm};
static const G4double AgelWrapBotPosX[]=
{0.0*mm,0.0*mm,0.0*mm,0.0*mm,0.0*mm};
// in the G4Example only 1 type of filter is used.
static const G4double FilterHalfX=53.0*mm;
static const G4double FilterHalfY=53.0*mm;
static const G4double GlassD263HalfZ=0.15*mm;
static const G4double FilterHalfZArray[]={GlassD263HalfZ, GlassD263HalfZ,
GlassD263HalfZ, GlassD263HalfZ, GlassD263HalfZ, GlassD263HalfZ };
// have a nominal value for the filter thickness.
static const G4double FilterHalfZNominal= GlassD263HalfZ;
static const G4double FilterPosX=0.0*mm;
static const G4double FilterPosY=0.0*mm;
//gap between aerogel and Filter in Z.
static const G4double FilterAgelGapZ=2.5*mm;
//nominal value for the Filter position
static const G4double FilterPosZNominal=
AgelEndZ+FilterAgelGapZ+ FilterHalfZNominal;
//Now for the mirror
//
static const G4double MirrorRInner=1185.0*mm;
static const G4double MirrorROuter=1191.0*mm;
static const G4double MirrorHorizontalChord=350.0*mm;
static const G4double MirrorVerticalChord=290.0*mm;
// the following is 600+117+6 mm.
// here 121 is the hpd Q window outer Z and 6 is the
// thickness of the mirror
// static const G4double MirrorShiftFromEnd=707.0*mm;
static const G4double MirrorShiftFromEnd=723.0*mm;
static const G4double MirrorNominalPosZ=MirrorShiftFromEnd-VesselHalfZ
-MirrorRInner;
static const G4double MirrorNominalRotX=0.0*rad;
static const G4double MirrorNominalRotY=0.0*rad;
//Now for each of the HPDs.
// First the size of each part.
static const G4double HpdMasterRad=64.00*mm;
//static const G4double HpdMasterHalfZ=55.0*mm;
static const G4double HpdMasterHalfZ=60.0*mm;
static const G4double HpdEnvelopeLargeTubeInnerRad=58.5*mm;
static const G4double HpdEnvelopeLargeTubeOuterRad=63.5*mm;
//static const G4double HpdEnvelopeLargeTubeHalfZ=8.73*mm;
static const G4double HpdEnvelopeLargeTubeHalfZ=11.0*mm;
static const G4double HpdEnvelopeConeHalfZ=20.0*mm;
static const G4double HpdEnvelopeSmallTubeHalfZ=10.0*mm;
static const G4double HpdEnvelopeSmallTubeInnerRad=35.0*mm;
static const G4double HpdEnvelopeSmallTubeOuterRad=40.0*mm;
static const G4double HpdEnvelopeConeOuterR2=HpdEnvelopeLargeTubeOuterRad;
static const G4double HpdEnvelopeConeInnerR2=HpdEnvelopeLargeTubeInnerRad;
static const G4double HpdEnvelopeConeOuterR1=HpdEnvelopeSmallTubeOuterRad;
static const G4double HpdEnvelopeConeInnerR1=HpdEnvelopeSmallTubeInnerRad;
//
static const G4double HpdEnvelopeEndCapRad=HpdEnvelopeSmallTubeOuterRad;
static const G4double HpdEnvelopeEndCapHalfZ=2.5*mm;
static const G4double HpdQuartzWindowThickness=4.0*mm;
static const G4double HpdQuarzWindowROuter=100.0*mm;
static const G4double HpdQuarzWindowRInner= HpdQuarzWindowROuter
-HpdQuartzWindowThickness;
static const G4double PhotoCathodeThickness=0.00004*mm;
static const G4double HpdPhCathodeROuter= HpdQuarzWindowRInner;
static const G4double HpdPhCathodeRInner=
HpdQuarzWindowRInner - PhotoCathodeThickness;
// The following obtained by arcsin(63.5/100)
static const G4double HpdQuartzWThetaSize=0.6880*rad;
// The following obtained by arcsin(57/(100-4))
static const G4double HpdPhCathodeThetaSize=0.6357*rad;
// For defining cylinders and spherical segment..
static const G4double HpdMasterInnerRad=0.0*mm;
static const G4double HpdMasterStartPhi=0.0*rad;
static const G4double HpdMasterEndPhi=twopi*rad;
static const G4double HpdEnvelopeLargeTubeStartPhi=0.0*rad;
static const G4double HpdEnvelopeLargeTubeEndPhi=twopi*rad;
static const G4double HpdEnvelopeConeStartPhi=0.0*rad;
static const G4double HpdEnvelopeConeEndPhi=twopi*rad;
static const G4double HpdEnvelopeSmallTubeStartPhi=0.0*rad;
static const G4double HpdEnvelopeSmallTubeEndPhi=twopi*rad;
static const G4double HpdEnvelopeEndCapInnerRad=0.0*mm;
static const G4double HpdEnvelopeEndCapStartPhi=0.0*rad;
static const G4double HpdEnvelopeEndCapEndPhi=twopi*rad;
static const G4double HpdQuartzWPhiSize=twopi*rad;
static const G4double HpdQuartzWStartTheta=0.0*rad;
static const G4double HpdQuartzWStartPhi=0.0*rad;
static const G4double HpdPhCathodePhiSize=twopi*rad;
static const G4double HpdPhCathodeStartTheta=0.0*rad;
static const G4double HpdPhCathodeStartPhi=0.0*rad;
// Z locations of the various parts.
static const G4double HpdQuartzPartFromEndZ=4.0*mm;
//static const G4double HpdEnvelopePartFromEndZ=18.0*mm;
// The following obtained by requiring 100-sqrt(100*100-63.5*63.5)=22.75
// for the quartz region in Z. The total is 22.75+4+4=30.75.
static const G4double HpdEnvelopePartFromEndZ=30.75*mm;
static const G4double HpdPhotoCathodeSiZdist=100.0*mm;
//Silicon detector inside the HPD
static const G4int NumberOfSiDetSectors=16;
// Now for each one of the sector.
// In the following the 0.0001 is to avoid graphics from crashing
// for zero length of a triangle made from a trapozoid.
static const G4double SiSectAngSize=(22.5*pi/180)*rad;
static const G4double SiSectAngHalfSize=SiSectAngSize/2.0;
static const G4double SiSectHeight=25.0*mm;
static const G4double SiSectSide= SiSectHeight/cos(SiSectAngHalfSize);
static const G4double SiSectHalfMoonGap=0.0*mm;
static const G4double SiSectTrapHalfY1=0.15*mm; // halfthickness of Si.
static const G4double SiSectTrapHalfY2= SiSectTrapHalfY1;
static const G4double SiSectTrapHalfX1=0.0001*mm;
static const G4double SiSectTrapHalfX2 = SiSectHeight*tan(SiSectAngHalfSize);
static const G4double SiSectTrapHalfZ = SiSectHeight/2.0 ;
static const G4double SiSectRotX=(90*pi/180)*rad;
static const G4double SiSectAngStart=(pi/2.0)*rad-SiSectAngSize/2.0;
// SiSectPosX and SiSectPosY are calculated in the cc file.
static const G4double SiSectPosZ=
HpdMasterHalfZ-HpdQuartzPartFromEndZ-
HpdQuartzWindowThickness-HpdPhotoCathodeSiZdist;
//
//
//Now for the coating on the Silicon surface.
static const G4double SiSectCoatingAngSize=SiSectAngSize;
static const G4double SiSectCoatingAngHalfSize=SiSectAngSize/2.0;
static const G4double SiSectCoatingSide=SiSectSide;
static const G4double SiSectCoatingHalfMoonGap=SiSectHalfMoonGap;
static const G4double SiSectCoatingTrapHalfY1=0.05*mm; // SiCoating HalfThick.
static const G4double SiSectCoatingTrapHalfY2= SiSectCoatingTrapHalfY1;
static const G4double SiSectCoatingTrapHalfX1= SiSectTrapHalfX1;
static const G4double SiSectCoatingTrapHalfX2= SiSectTrapHalfX2;
static const G4double SiSectCoatingTrapHalfZ= SiSectTrapHalfZ;
static const G4double SiSectCoatingRotX=SiSectRotX;
static const G4double SiSectCoatingAngStart=SiSectAngStart;
// SiSectCoatingPosX and SiSectCoatingPosY are calculated in the cc file.
static const G4double SiSectCoatingPosZ =
SiSectPosZ + SiSectTrapHalfY1+SiSectCoatingTrapHalfY1;
//
//
static const G4double XsizePix=1.0*mm;
static const G4double YsizePix=1.0*mm;
static const G4double YsizeBigPix=2.0*mm;
// the number of the big pixel in the pixel map on the web=59, hence
// in the c++ array 58 since the array start from 0.
static const G4int BigPixelNum=58;
//Silicon pixels inside the Silicon detector.
static const G4double SiPixelHalfY= SiSectTrapHalfY1;
static const G4double SiPixelHalfX= XsizePix/2.0;
static const G4double SiPixelHalfZ= YsizePix/2.0;
// now for the big pixel at the centre of the hpd.
static const G4double SiBigPixelHalfZ=YsizeBigPix/2.0;
//Now for their relative locations
static const G4double HpdEnvelopeLargeTubePosX=0.0*mm;
static const G4double HpdEnvelopeLargeTubePosY=0.0*mm;
static const G4double HpdEnvelopeLargeTubePosZ=
HpdMasterHalfZ-HpdEnvelopePartFromEndZ-HpdEnvelopeLargeTubeHalfZ;
static const G4double HpdEnvelopeConeShiftX=0.0*mm;
static const G4double HpdEnvelopeConeShiftY=0.0*mm;
static const G4double HpdEnvelopeConeShiftZ=
-(HpdEnvelopeLargeTubeHalfZ+HpdEnvelopeConeHalfZ);
static const G4double HpdEnvelopeSmallTubeShiftX=0.0*mm;
static const G4double HpdEnvelopeSmallTubeShiftY=0.0*mm;
static const G4double HpdEnvelopeSmallTubeShiftZ=
-(HpdEnvelopeLargeTubeHalfZ+2*HpdEnvelopeConeHalfZ+
HpdEnvelopeSmallTubeHalfZ);
static const G4double HpdEnvelopeEndCapShiftX=0.0*mm;
static const G4double HpdEnvelopeEndCapShiftY=0.0*mm;
static const G4double HpdEnvelopeEndCapShiftZ=
-(HpdEnvelopeLargeTubeHalfZ+2*HpdEnvelopeConeHalfZ+
2*HpdEnvelopeSmallTubeHalfZ+HpdEnvelopeEndCapHalfZ);
static const G4double HpdQuartzWPosX=0.0*mm;
static const G4double HpdQuartzWPosY=0.0*mm;
static const G4double HpdQuartzWPosZ=
HpdMasterHalfZ- HpdQuartzPartFromEndZ-HpdQuarzWindowROuter;
static const G4double HpdPhCathodePosX=0.0*mm;
static const G4double HpdPhCathodePosY=0.0*mm;
static const G4double HpdPhCathodePosZ= HpdQuartzWPosZ;
//Placement of the Hpd Si pixels in the Hpd Si Sector.
static const G4int NumberOfPadHpdSiPixels=128;
static const G4int MaxNumberOfPixRow=24;
static const G4int MaxNumberOfPixCol=10;
static G4double PixRowNumSect[NumberOfPadHpdSiPixels];
static G4double PixColNumSect[NumberOfPadHpdSiPixels];
static G4bool PixelAtSectEdge[NumberOfPadHpdSiPixels];
// the following is for the rows after the central big pixel.
// the central pixel is at row 0.
// the others start from row number start at 1.
// the following is 1 mm in the current setup.
static const G4double RowInitPointBigPixel= SiSectTrapHalfZ*2.0
-(MaxNumberOfPixRow-1) * YsizePix
- YsizeBigPix/2.0;
// the following is 1.5 mm in the current setup.
static const G4double RowInitPoint= SiSectTrapHalfZ*2.0
-(MaxNumberOfPixRow-1) * YsizePix
- YsizePix/2.0;
//The follwing two variables are defined in the cc file for this
//include file as part of the class declared below. Since the
// Si det plane is in the XZ plane, a swap of Y->Z and Z->Y is done
// while positioning the Si Pixel.
static const G4double HpdSiPixPosZ=0.0*mm;
#ifndef RichTbPadHpdSiPixPos_h
#define RichTbPadHpdSiPixPos_h 1
class RichTbPadHpdSiPixPos{
public:
RichTbPadHpdSiPixPos(G4int);
virtual ~RichTbPadHpdSiPixPos();
G4double getPadHpdSiPixPosX() {return PadHpdSiPixPosX;}
G4double getPadHpdSiPixPosY() {return PadHpdSiPixPosY;}
G4double getCurrentPixelnum(){return icurpixel;}
private:
G4double PadHpdSiPixPosX;
G4double PadHpdSiPixPosY;
G4int icurpixel;
};
#endif
//Placement of all the HPDs.
static const G4int NumberOfHpds=4;
static const G4double HpdPosRad=146.5*mm;
static const G4double HpdZfromEnd=HpdMasterHalfZ-VesselPosZ+1.0*mm;;
static const G4double HpdMasterPosX[NumberOfHpds]=
{HpdPosRad,0.0*mm,-HpdPosRad,0.0*mm};
static const G4double HpdMasterPosY[NumberOfHpds]=
{0.0*mm,-HpdPosRad,0.0*mm,HpdPosRad};
static const G4double HpdMasterPosZ[NumberOfHpds]=
{HpdZfromEnd,HpdZfromEnd,HpdZfromEnd,HpdZfromEnd};
//rot1 version of hpd rotations.
static const G4double HpdMasterRotZ[NumberOfHpds]=
{0.0*rad,(69.5*pi/180.0)*rad,(22.5*pi/180.0)*rad,(7.5*pi/180.0)*rad};
//
//
#endif
@@ -0,0 +1,54 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbGraphics.hh for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef RichTbGraphics_h
#define RichTbGraphics_h 1
#include "globals.hh"
#include "RichTbMaterial.hh"
#include "RichTbHall.hh"
#include "RichTbComponent.hh"
#include "RichTbPhotoDetector.hh"
#include "G4VUserDetectorConstruction.hh"
#include "G4VPhysicalVolume.hh"
#include "RichTbROGeometry.hh"
class RichTbGraphics {
public:
RichTbGraphics();
RichTbGraphics(RichTbHall*, RichTbComponent*, RichTbPhotoDetector*,
RichTbROGeometry*, RichTbRunConfig* );
virtual ~RichTbGraphics();
private:
};
#endif
@@ -0,0 +1,56 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbHall.hh for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef RichTbHall_h
#define RichTbHall_h 1
#include "globals.hh"
#include "RichTbMaterial.hh"
#include "G4VUserDetectorConstruction.hh"
#include "G4VPhysicalVolume.hh"
#include "G4LogicalVolume.hh"
class RichTbHall {
public:
RichTbHall();
RichTbHall(RichTbMaterial*);
virtual ~RichTbHall();
G4LogicalVolume* getRichTbHallLogicalVolume()
{return RichTbHallLVol;}
G4VPhysicalVolume* getRichTbHallPhysicalVolume()
{return RichTbHallPVol;}
private:
G4LogicalVolume* RichTbHallLVol;
G4VPhysicalVolume* RichTbHallPVol;
};
#endif
+101
View File
@@ -0,0 +1,101 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbHit.hh for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef RichTbHit_h
#define RichTbHit_h 1
#include "G4VHit.hh"
#include "G4THitsCollection.hh"
#include "G4Allocator.hh"
#include "G4ThreeVector.hh"
#include "G4Transform3D.hh"
class RichTbVisManager;
class RichTbHit : public G4VHit
{
public:
RichTbHit();
virtual ~RichTbHit();
RichTbHit(const RichTbHit &right);
const RichTbHit& operator=(const RichTbHit &right);
int operator==(const RichTbHit &right) const;
inline void *operator new(size_t);
inline void operator delete(void *aHit);
void Draw();
void DrawWithVisM(RichTbVisManager*);
void Print();
private:
G4double edep;
G4ThreeVector posAtSilicon;
G4ThreeVector posAtPhotoCathode;
G4int CurHpdNum;
G4int CurSectNum;
G4int CurPixelNum;
public:
inline void SetEdep(G4double de) { edep = de; };
inline G4double GetEdep() { return edep; };
inline void SetPos(G4ThreeVector xyz) { posAtSilicon = xyz; };
inline G4ThreeVector GetPos() { return posAtSilicon; };
inline void SetPosPC(G4ThreeVector xyzPC) { posAtPhotoCathode = xyzPC; };
inline G4ThreeVector GetPosPC() { return posAtPhotoCathode; };
inline void SetCurHpdNum (G4int ihp ) { CurHpdNum = ihp; } ;
inline G4int GetCurHpdNum() { return CurHpdNum ; };
inline void SetCurSectNum (G4int isector ) { CurSectNum = isector; } ;
inline G4int GetCurSectNum() { return CurSectNum ; };
inline void SetCurPixNum (G4int ipx ) { CurPixelNum = ipx; };
inline G4int GetCurPixNum() { return CurPixelNum; };
inline void AddEdep( G4double addenergy ) { edep += addenergy; }
};
typedef G4THitsCollection<RichTbHit> RichTbHitsCollection;
extern G4Allocator<RichTbHit> RichTbHitAllocator;
inline void* RichTbHit::operator new(size_t)
{
void *aHit;
aHit = (void *) RichTbHitAllocator.MallocSingle();
return aHit;
}
inline void RichTbHit::operator delete(void *aHit)
{
RichTbHitAllocator.FreeSingle((RichTbHit*) aHit);
}
#endif
@@ -0,0 +1,86 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbHpd.hh for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef RichTbHpd_h
#define RichTbHpd_h 1
#include "globals.hh"
#include "RichTbMaterial.hh"
#include "RichTbGeometryParameters.hh"
#include "G4LogicalVolume.hh"
#include "G4VPhysicalVolume.hh"
#include "RichTbSiDet.hh"
#include "RichTbSD.hh"
class RichTbHpd {
public:
RichTbHpd();
virtual ~RichTbHpd();
RichTbHpd(RichTbMaterial*, G4VPhysicalVolume * ,G4int, G4int,G4bool);
G4LogicalVolume* getHpdLogicalVolume()
{return RichTbHpdLVol;}
G4VPhysicalVolume* getHpdPhysicalVolume()
{return RichTbHpdPVol;}
G4LogicalVolume* getHpdEnvelopeTubeGrandLogicalVolume()
{return RichTbHpdEnvelopeTubeGrandLVol;}
G4VPhysicalVolume* getHpdEnvelopeTubeGrandPhysicalVolume()
{return RichTbHpdEnvelopeTubeGrandPVol;}
G4LogicalVolume* getHpdQuartzWLogicalVolume()
{return RichTbHpdQuartzWLVol;}
G4VPhysicalVolume* getHpdQuartzWPhysicalVolume()
{return RichTbHpdQuartzWPVol;}
G4LogicalVolume* getHpdPhCathodeLogicalVolume()
{return RichTbPhCathodeLVol;}
G4VPhysicalVolume* getHpdPhCathodePhysicalVolume()
{return RichTbPhCathodePVol;}
G4int getHpdNum(){return HpdNumber;}
G4int getNumSectInHpd() {return NumSectInHpd;}
RichTbSiDet* getRichHpdSiDetSect(G4int isect)
{return richSiliconDetectorSect[isect];}
private:
G4int HpdNumber;
RichTbSD* aHpdSD;
G4LogicalVolume* RichTbHpdLVol;
G4VPhysicalVolume* RichTbHpdPVol;
G4LogicalVolume* RichTbHpdEnvelopeTubeGrandLVol;
G4VPhysicalVolume* RichTbHpdEnvelopeTubeGrandPVol;
G4LogicalVolume* RichTbHpdQuartzWLVol;
G4VPhysicalVolume* RichTbHpdQuartzWPVol;
G4LogicalVolume* RichTbPhCathodeLVol;
G4VPhysicalVolume* RichTbPhCathodePVol;
RichTbSiDet* richSiliconDetectorSect[NumberOfSiDetSectors];
G4int NumSectInHpd;
G4bool ConstructTrackGeomSwitch;
};
#endif
@@ -0,0 +1,50 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbIOData.hh for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef RichTbIOData_h
#define RichTbIOData_h 1
#include "globals.hh"
#include <iostream>
#include <fstream.h>
#include "RichTbRunConfig.hh"
#include "G4Event.hh"
class RichTbIOData {
public:
RichTbIOData(RichTbRunConfig* );
virtual ~RichTbIOData();
void WriteOutEventHeaderData(const G4Event* );
void WriteOutHitData(const G4Event* );
private:
ofstream OutputDataFS;
G4String aOutFileString;
};
#endif
@@ -0,0 +1,148 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbMaterial.hh for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef RichTbMaterial_h
#define RichTbMaterial_h 1
#include "globals.hh"
#include <vector>
#include "G4Material.hh"
#include "G4MaterialTable.hh"
#include "G4Element.hh"
#include "G4ElementTable.hh"
#include "G4OpticalSurface.hh"
#include "RichTbRunConfig.hh"
#include "AerogelTypeSpec.hh"
class RichTbMaterial {
public:
RichTbMaterial();
RichTbMaterial(RichTbRunConfig*);
virtual ~RichTbMaterial();
G4double ConvertAgelRIndex(G4double,G4int);
G4Material* getAir() {return RichTbAmbientAir;}
G4Material* getTAir() {return RichTbTubeAir;}
G4Material* getNitrogenGas() {return RichTbNitrogenGas;}
G4Material* getH2O() {return RichTbH2O;}
G4Material* getMirrorQuartz() {return RichTbMirrorQuartz;}
G4Material* getQuartzWMaterial() {return RichTbQuartzWindowMaterial;}
G4Material* getHpdQuartzWMaterial() {return HpdQuartzWindowMaterial;}
G4Material* getPadHpdQuartzWMaterial() {return PadHpdQuartzWindowMaterial;}
G4Material* getRichTbFilterMaterial(G4int FilterTNum )
{return RichTbFilterMaterial[FilterTNum] ; }
G4Material* getGlassD263FilterMaterial() {return GlassD263FilterMaterial;}
G4Material* getAerogelMaterial(G4int AgelNum )
{return RichTbAerogelMaterial[AgelNum]; }
G4Material* getAerogelTypeA() {return RichTbAerogelTypeA; }
G4Material* getAerogelTypeB() {return RichTbAerogelTypeB; }
G4Material* getAerogelTypeC() {return RichTbAerogelTypeC; }
G4Material* getAerogelTypeD() {return RichTbAerogelTypeD; }
G4Material* getAerogelTypeE() {return RichTbAerogelTypeE; }
G4Material* getC4F10() {return RichTbC4F10; }
G4Material* getCF4() {return RichTbCF4; }
G4Material* getVacuum() {return RichTbVacuum;}
G4Material* getAluminium() {return RichTbAluminium; }
G4Material* getHpdTubeMaterial() {return HpdTubeMaterial; }
G4Material* getHpdSiDetMaterial() {return HpdSiDetMaterial;}
G4Material* getHpdSiCoatingMaterial() {return HpdSiCoatingMaterial;}
G4Material* getPadHpdPhCathodeMaterial() {return PadHpdPhCathodeMaterial;}
G4Material* getPlasticAg() {return RichTbPlasticAg;}
G4OpticalSurface* getOpticalMirrorSurface()
{return RichTbOpticalMirrorSurface; }
G4OpticalSurface* getOpticalEnclosureSurface()
{return RichTbOpticalEnclosureSurface; }
G4OpticalSurface* getOpticalGasQuartzWSurface()
{return RichTbOpticalGasQuartzWSurface; }
G4OpticalSurface* getOpticalHpdMetalSurface()
{return RichTbOpticalHpdMetalSurface;}
G4OpticalSurface* getOpticalHpdTQuartzWSurface()
{return HpdTQuartzWSurface; }
G4OpticalSurface* getOpticalHpdQuartzWPhCathodeSurface()
{return HpdQuartzWPhCathodeSurface; }
G4OpticalSurface* getOpticalPhCathodeSkinSurface()
{return PhCathodeSkinSurface; }
G4OpticalSurface* getOpticalPhCathodeBorderSurface()
{return PhCathodeBorderSurface; }
G4OpticalSurface* getOpticalFilterSurface()
{return RichTbOpticalFilterSurface; }
G4OpticalSurface* getHpdSiCoatSurface()
{return HpdSiCoatSurface; }
private:
G4Material* RichTbAmbientAir;
G4Material* RichTbTubeAir;
G4Material* RichTbNitrogenGas;
G4Material* RichTbH2O;
G4Material* RichTbMirrorQuartz;
G4Material* RichTbQuartzWindowMaterial;
vector<G4Material*> RichTbAerogelMaterial;
G4Material* RichTbAerogelTypeA;
G4Material* RichTbAerogelTypeB;
G4Material* RichTbAerogelTypeC;
G4Material* RichTbAerogelTypeD;
G4Material* RichTbAerogelTypeE;
G4Material* RichTbC4F10;
G4Material* RichTbCF4;
G4Material* RichTbVacuum;
G4Material* RichTbAluminium;
G4Material* HpdTubeMaterial;
G4Material* HpdSiDetMaterial;
G4Material* HpdSiCoatingMaterial;
G4Material* HpdQuartzWindowMaterial;
G4Material* PadHpdQuartzWindowMaterial;
vector<G4Material*> RichTbFilterMaterial;
G4Material* GlassD263FilterMaterial;
G4Material* PadHpdPhCathodeMaterial;
G4Material* RichTbPlasticAg;
G4OpticalSurface* RichTbOpticalMirrorSurface;
G4OpticalSurface* RichTbOpticalEnclosureSurface;
G4OpticalSurface* RichTbOpticalGasQuartzWSurface;
G4OpticalSurface* HpdTQuartzWSurface;
G4OpticalSurface* HpdQuartzWPhCathodeSurface;
G4OpticalSurface* PhCathodeSkinSurface;
G4OpticalSurface* PhCathodeBorderSurface;
G4OpticalSurface* HpdSiCoatSurface;
//The following metal surface used although it would be redundant.
// The metal volume has no ref. index.
G4OpticalSurface* RichTbOpticalHpdMetalSurface;
G4OpticalSurface* RichTbOpticalFilterSurface;
RichTbRunConfig* rConfig;
};
#endif
@@ -0,0 +1,279 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbMaterialParameters.hh for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef RichTbMaterialParameters_h
#define RichTbMaterialParameters_h 1
#include "globals.hh"
#include "RichTbGeometryParameters.hh"
#include "RichTbAnalysisManager.hh"
#include "RichTbRunConfig.hh"
#include "AerogelTypeSpec.hh"
extern void InitializeRichTbMaterial();
extern void HistoRichTbMaterialProperties(RichTbRunConfig* RConfig);
extern vector<G4double> InitializeHpdQE(G4int);
extern vector<G4double> InitializeHpdWaveL(G4int);
extern vector<G4double> InitN2RefIndex(G4double, G4double);
extern vector<G4double> InitN2RefPhotW();
extern vector<G4double> InitAgelPhotW();
extern vector<G4double> InitializePhotonMomentumVector();
extern vector<G4int> getDeadPixelList(G4int ihpdNum , G4int IsectNum);
extern vector<G4double>GetAerogelRScatLength(AerogelType);
extern G4double GetCurrentBulkTrans(G4double currentMatRefIndex,
G4double currentNeighbourRefIndex,
G4double MaxTotMeasuredTransmission);
// extern void GetGlassD263FilterTrans();
//
// the following value should be calculated in terms of the
// fundamental constants in the future. It is the conversion
// factor between the wavelength of a photon in nanometers
// and its energy in eV.
static const G4double PhotMomWaveConv=1243.125;
// Limits of Photon Energy and number of bins for the
// Photon energy range.
// static const G4double PhotonMinEnergy=1.5*eV;
static const G4double PhotonMinEnergy=1.3*eV;
static const G4double PhotonMaxEnergy=7.3*eV;
static const G4int NumPhotWaveLengthBins = 1000;
static const G4int NumPhotonRichMirrorReflWaveLengthBins=63;
static const G4int NumAerogelRefIndexPhotonEnergyBins=37;
// static const G4int NumFilterGlassD263WaveLengthBins=10;
// Defintion of STP pressure and temp
//static const G4double Pressure_STP=1.013*bar;
//static const G4double Temperature_STP=273.*kelvin
static const G4double GasPressure_STP=STP_Pressure;
static const G4double GasTemperature_STP=STP_Temperature;
// Ref Index of nitrogen using sellmeir parametrization
static const G4double SellN2E1=13.414;
static const G4double SellN2E2=23.215;
static const G4double SellN2F1=921.28;
static const G4double SellN2F2=3569.60;
static const G4double GasMolWeightN2=28.02; //unit is grams
static const G4double GasRhoN2atSTP=0.00125053; //unit is gramPercm3
//
//
//Mirror reflectivity
// In the following, the bins at 100 nm, and 1000nm are
// defined just for convenience of interpolation.
// They are not measured points.
static const G4double PhotonWavelengthRefl[]=
{100.0, 200.0, 210.0, 220.0, 230.0, 240.0, 250.0, 260.0, 270.0, 280.0,
290.0, 300.0, 310.0, 320.0, 330.0, 340.0, 350.0, 360.0, 370.0, 380.0,
390.0, 400.0, 410.0, 420.0, 430.0, 440.0, 450.0, 460.0, 470.0, 480.0,
490.0, 500.0, 510.0, 520.0, 530.0, 540.0, 550.0, 560.0, 570.0, 580.0,
590.0, 600.0, 610.0, 620.0, 630.0, 640.0, 650.0, 660.0, 670.0, 680.0,
690.0, 700.0, 710.0, 720.0, 730.0, 740.0, 750.0, 760.0, 770.0, 780.0,
790.0, 800.0, 1000.0 };
static const G4double RichTbMirrorReflectivity[]=
{0.0, 0.9106, 0.9232, 0.9285, 0.9314, 0.9323, 0.9312, 0.9287, 0.9264,
0.9234, 0.9195, 0.9156, 0.9109, 0.9066, 0.9022, 0.8981, 0.8925, 0.8883,
0.8836, 0.8796, 0.8756, 0.8727, 0.8697, 0.8672, 0.8653, 0.8636, 0.8624,
0.8612, 0.8608, 0.8601, 0.8601, 0.8601, 0.8600, 0.8603, 0.8603, 0.8604,
0.8605, 0.8608, 0.8609, 0.8608, 0.8608, 0.8606, 0.8604, 0.8600, 0.8598,
0.8591, 0.8581, 0.8573, 0.8563, 0.8549, 0.8535, 0.8517, 0.8497, 0.8475,
0.8447, 0.8417, 0.8382, 0.8388, 0.8296, 0.8258, 0.8204, 0.8172, 0.8172 };
static const G4double RichTbMirrorEfficiency[]=
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0 };
// Transmission in quartz
static const G4int NumPhotonRichTbGasQuartzWSurfaceWaveLengthBins=10;
static const G4double RichGasQuartzWSurfacePhotMom[]=
{1.0*eV,2.0*eV, 3.0*eV,4.0*eV,5.0*eV,6.0*eV,7.0*eV,8.0*eV,
9.0*eV,10.0*eV};
static const G4double RichTbGasQuartzWSurfaceReflectivity[]=
{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0};
static const G4double RichTbGasQuartzWSurfaceEfficiency[]=
{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0};
// Transmission in the filters
static const G4int NumPhotonRichTbFilterSurfaceWaveLengthBins=10;
static const G4double RichTbFilterSurfacePhotMom[]=
{1.0*eV,2.0*eV, 3.0*eV,4.0*eV,5.0*eV,6.0*eV,7.0*eV,8.0*eV,
9.0*eV,10.0*eV};
static const G4double RichTbFilterSurfaceReflectivity[]=
{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0};
static const G4double RichTbFilterSurfaceEfficiency[]=
{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0};
// In the G4Example only 1 type of filter is used.
// In the LHCb implementation several types of filters
// were used. The program was originally setup for upto
// 6 types of filters.
// Now for the Glass D263 filter
static const G4int NumPhotBinGlassD263Trans=601;
// static const G4double RefIndexGlassD263=1.50;
// artifically low value for the ref index of filter used for the
// G4example. If one uses the original value of 1.5, the cherenkov
// photons created in the filter by the 9 GeV/c pions will have cherenkov
// angle larger than the critical angle and hence would cause
// an (almost) infinite loop of total internal reflections. These
// photons eventually die from photon absorption,
// but they use a lot of cpu time.
// In the lhcb implementation the G4OpboundaryProcess is modified to
// to take care of this. But for the G4example this complication is
// avoided by using an artificially low value for the ref idex of the filter.
// SE. 15-11-2002.
static const G4double RefIndexGlassD263=1.30;
// for initlializing the arrays for the filter tramsmission
// the following value is used. The arrays are later resized
// to the appropiate value.
static const G4int NumFilterTransBins= NumPhotBinGlassD263Trans;
//
//Now for the different type of Aerogel Tiles
//In the G4example the same Aerogel type is simply repeated 5 times.
//In the LHCb implementation 5 different types are used.
static const G4double AerogelTypeAClarity
=0.00719*micrometer*micrometer*micrometer*micrometer/cm;
static const G4double AerogelTypeATotTrans=0.9368;
static const G4double AerogelTypeANominalRefIndex=1.03066;
static const G4double AerogelTypeBClarity= AerogelTypeAClarity;
static const G4double AerogelTypeBTotTrans=AerogelTypeATotTrans;
static const G4double AerogelTypeBNominalRefIndex=AerogelTypeANominalRefIndex;
//
static const G4double AerogelTypeCClarity=AerogelTypeAClarity;
static const G4double AerogelTypeCTotTrans=AerogelTypeATotTrans;
static const G4double AerogelTypeCNominalRefIndex=AerogelTypeANominalRefIndex;
static const G4double AerogelTypeDClarity=AerogelTypeAClarity;
static const G4double AerogelTypeDTotTrans=AerogelTypeATotTrans;
static const G4double AerogelTypeDNominalRefIndex=AerogelTypeANominalRefIndex;
static const G4double AerogelTypeEClarity=AerogelTypeAClarity;
static const G4double AerogelTypeETotTrans=AerogelTypeATotTrans;
static const G4double AerogelTypeENominalRefIndex=AerogelTypeANominalRefIndex;
static const G4double AerogelReferenceRefIndWavelength[]=
{400.0*nanometer,400.0*nanometer,400.0*nanometer,400.0*nanometer,
400.0*nanometer};
static const G4double StdAerogelNominalRefIndex=1.034;
// for test try tdr aerogel
//static const G4double StdAerogelNominalRefIndex=1.03123653;
// static const char* StdAerogelRefIndFile =
// "/afs/cern.ch/user/s/seaso/mycmt/RichTb/v5/inputData/aerogelRefIndex.txt";
// The following is the nominal ref index at STP for nitrogen.
// the aerogel is kept inside the nitrogen;
static const G4double NitrogenNominalRefIndex=1.000298;
//
// Quantum efficiency of the photocathodes
// the following line already in geometryparameters.hh
//static const G4int NumberOfHpds=4;
static const G4int NumHpdTot= NumberOfHpds;
static const G4int NumQEbins=41;
// for now all HPDs have the same wavelength bins.
// for the G4Example the QE is multiplied by 1.08 to account for
// the fresnel losses at the HPD Input Quartz window.
// In the G4 example, the correction to
// account for the QE reduction in the periphery of the HPD
// is not done, for simplicity.
// In the LHCb implementation this taken care of more accurately.
static const G4double HpdQEReductionFactor=1.08;
static const G4double HpdQEWaveL[]=
{200.0,210.0,220.0,230.0,240.0,250.0,260.0,270.0,280.0,290.0,300.0,
310.0,320.0,330.0,340.0,350.0,360.0,370.0,380.0,390.0,400.0,410.0,
420.0,430.0,440.0,450.0,460.0,470.0,480.0,490.0,500.0,510.0,520.0,
530.0,540.0,550.0,560.0,570.0,580.0,590.0,600.0};
static const G4double Hpd0QEPerCent[]=
{0.0,0.0,2.4264,9.0559,14.5723,18.9039,24.2476,27.9504,29.0910,
31.5069,28.2676,26.8652,26.0060,25.2934,24.5034,23.4996,22.6084,
21.0618,19.6225,18.2942,16.4564,14.3433,12.5074,10.6036,8.7953,
7.2646,6.1266,5.0693,3.9949,3.0248,2.2300,1.5261,0.8610,0.4803,
0.2870,0.1320,0.0500,0.0135,0.0,0.0,0.0};
static const G4double Hpd1QEPerCent[]=
{0.0,1.0810,3.1196,6.4212,10.4983,14.3031,17.9612,20.6541,22.1570,
25.5633,25.3696,25.2293,25.1988,24.9773,24.8055,24.4088,24.1165,
23.3368,22.4608,21.8726,20.4717,18.9725,17.5489,15.8493,14.1541,
12.5689,11.1047,9.7609,8.4922,7.3264,6.2243,5.0602,3.5248,2.3012,
1.5403,1.0813,0.6823,0.4553,0.2524,0.1227,0.0583};
static const G4double Hpd2QEPerCent[]=
{0.0,0.0,1.3648,4.1624,6.8814,9.5704,12.5728,15.4286,16.7373,19.9520,
20.0918,20.3359,20.6562,20.7517,20.6236,20.1992,19.8387,18.6558,17.5653,
16.6784,15.2398,13.6456,12.1764,10.5722,9.0127,7.6529,6.4820,5.4517,
4.4408,3.5450,2.7400,1.9825,1.3073,0.7549,0.4712,0.3031,0.1675,
0.0803,0.0391,0.0169,0.0094};
static const G4double Hpd3QEPerCent[]=
{0.0,11.3501,12.1319,13.2398,16.2100,18.7656,21.7482,24.3610,25.0792,
28.6009,28.2349,28.4114,28.5484,28.6614,28.8812,28.7106,28.1548,28.0591,
25.5305,21.8913,19.6042,18.3709,17.3953,17.1329,16.2153,14.8937,14.6245,
13.0102,13.8088,13.2000,12.0881,10.7617,8.1836,5.9729,4.6335,3.6822,
2.9047,2.2591,1.7516,1.2502,0.8219};
// only the linear term is used for now
// static const G4double HpdDemagConst[]={ }
static const G4double HpdDemagLinearTerm[]=
{2.46433268,2.28343310,2.29306727,2.37845184};
// In the G4example the quadratic term is neglected and hence set to zero.
static const G4double HpdDemagQuadraticTerm[]=
{0.0,0.0,0.0,0.0};
static const G4double HpdDemagErrorPercent=0.0;
// in the G4example a PSF factor is used, just an example.
static const G4double PadHpdPSFsigma=100.0*micrometer;
//quartz Transmission for 10 mm thickness.
static const G4double QuTransDataThickness =10.0*mm;
static const G4int NumPhotbinQuartzTrans=6;
static const G4double QuartzTransWL[]=
{180.0 ,185.0, 190.0, 200.0, 220.0,1000.0};
static const G4double QuartzTransmis[]=
{0.80, 0.90, 0.95 ,0.98 , 1.0,1.0};
static const G4double PhCathodeNominalTransmission=0.52;
//The dead Pixel List is set to zero for the G4Example.
//Hence all pixels are set to be active.
// The following is just a maximum number of deadpixels for array sizes.
static const G4int MaxNumDeadPixelPerHpdSect=50;
// Now for the back scattering
static const G4double backscaprob=0.18;
// Now for the approximate and adhoc way of evaluating the effect of
// backscattering.
static const G4double NsigmaInPedCut=4.0;
static const G4double SignalToNoiseInData=10.0;
#endif
@@ -0,0 +1,53 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbPhotoDetector.hh for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef RichTbPhotoDetector_h
#define RichTbPhotoDetector_h 1
#include "globals.hh"
#include "RichTbMaterial.hh"
#include "RichTbComponent.hh"
#include "RichTbHpd.hh"
#include "RichTbRunConfig.hh"
class RichTbPhotoDetector {
public:
RichTbPhotoDetector();
RichTbPhotoDetector(RichTbMaterial*, RichTbComponent*, RichTbRunConfig*, G4bool);
virtual ~RichTbPhotoDetector();
G4int getNumberOfHpds() {return NumOfHpds; }
RichTbHpd* getRichHPD(G4int HpdNum){ return richHPD[HpdNum]; }
private:
G4int NumOfHpds;
RichTbHpd* richHPD[NumberOfHpds];
G4bool ConstructTrackingGeometrySwitch;
};
#endif
@@ -0,0 +1,80 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbPhysicsList.hh for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef RichTbPhysicsList_h
#define RichTbPhysicsList_h 1
#include "globals.hh"
#include "G4VUserPhysicsList.hh"
#include "RichTbRunConfig.hh"
#include "RichTbAnalysisManager.hh"
#include "G4ParticleTable.hh"
class RichTbPhysicsList : public G4VUserPhysicsList
{
public:
RichTbPhysicsList();
RichTbPhysicsList(RichTbRunConfig*);
virtual ~RichTbPhysicsList();
protected:
// Construct particles and processes
virtual void ConstructParticle();
virtual void ConstructProcess();
//
virtual void SetCuts();
protected:
// these methods Construct particles
virtual void ConstructBosons();
virtual void ConstructLeptons();
virtual void ConstructMesons();
virtual void ConstructBaryons();
protected:
// these methods Construct physics processes and register them
virtual void ConstructGeneral();
virtual void ConstructEM();
virtual void ConstructOp();
private:
RichTbRunConfig* rConfigPh;
RichTbAnalysisManager* rAnalysisPh;
// the particle table has the complete List of existing particle types
G4ParticleTable* theParticleTable;
G4ParticleTable::G4PTblDicIterator* theParticleIterator;
};
#endif
@@ -0,0 +1,72 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbPrimaryGeneratorAction.hh for Rich of LHCb
// History:
// Created: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef RichTbPrimaryGeneratorAction_h
#define RichTbPrimaryGeneratorAction_h 1
#include "G4VUserPrimaryGeneratorAction.hh"
#include "globals.hh"
class G4ParticleGun;
class G4Event;
class RichTbDetectorConstruction;
class RichTbPrimaryGeneratorMessenger;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class RichTbPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
{
public:
RichTbPrimaryGeneratorAction(RichTbDetectorConstruction*);
~RichTbPrimaryGeneratorAction();
public:
void GeneratePrimaries(G4Event*);
void SetRndmFlag(G4String val) { rndmFlag = val;}
void Setxvertex(G4double x) ;
void Setyvertex(G4double y) ;
void Setzvertex(G4double z) ;
static G4String GetPrimaryName() ;
private:
G4ParticleGun* particleGun; //pointer a to G4 service class
RichTbDetectorConstruction* RichTbDetector; //pointer to the geometry
RichTbPrimaryGeneratorMessenger* gunMessenger; //messenger of this class
G4String rndmFlag; //flag for a random impact point
static G4String thePrimaryParticleName ;
G4double xvertex,yvertex,zvertex;
G4bool vertexdefined;
};
#endif
@@ -0,0 +1,58 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbPrimaryGeneratorMessenger.hh for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef RichTbPrimaryGeneratorMessenger_h
#define RichTbPrimaryGeneratorMessenger_h 1
#include "G4UImessenger.hh"
#include "globals.hh"
class RichTbPrimaryGeneratorAction;
class G4UIcmdWithAString;
class G4UIcmdWithADoubleAndUnit;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class RichTbPrimaryGeneratorMessenger: public G4UImessenger
{
public:
RichTbPrimaryGeneratorMessenger(RichTbPrimaryGeneratorAction*);
~RichTbPrimaryGeneratorMessenger();
void SetNewValue(G4UIcommand*, G4String);
private:
RichTbPrimaryGeneratorAction* RichTbAction;
G4UIcmdWithAString* RndmCmd;
G4UIcmdWithADoubleAndUnit* setxvertexCmd;
G4UIcmdWithADoubleAndUnit* setyvertexCmd;
G4UIcmdWithADoubleAndUnit* setzvertexCmd;
};
#endif
@@ -0,0 +1,51 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbRODummySD.hh for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef RichTbRODummySD_h
#define RichTbRODummySD_h 1
#include "G4VSensitiveDetector.hh"
class G4Step;
class RichTbRODummySD : public G4VSensitiveDetector
{
public:
RichTbRODummySD();
~RichTbRODummySD() {};
void Initialize(G4HCofThisEvent*HCE) {};
G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist) {return false;}
void EndOfEvent(G4HCofThisEvent*HCE) {};
void clear() {};
void DrawAll() {};
void PrintAll() {};
};
RichTbRODummySD::RichTbRODummySD()
: G4VSensitiveDetector("RichTbROdummySD") {}
#endif
@@ -0,0 +1,62 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbROGeometry.hh for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef RichTbROGeometry_h
#define RichTbROGeometry_h 1
#include "G4VReadOutGeometry.hh"
#include "G4VPhysicalVolume.hh"
#include "RichTbMaterial.hh"
#include "RichTbHall.hh"
#include "RichTbComponent.hh"
#include "RichTbRunConfig.hh"
#include "RichTbPhotoDetector.hh"
class RichTbROGeometry : public G4VReadOutGeometry {
public:
RichTbROGeometry(RichTbMaterial*,RichTbRunConfig*);
RichTbROGeometry(G4String, RichTbMaterial*,RichTbRunConfig*);
~RichTbROGeometry();
G4VPhysicalVolume* Build();
RichTbHall* getRichTbHall()
{ return ROTbHall; }
RichTbComponent* getRichTbComponent()
{ return ROTbComponent; }
RichTbPhotoDetector* getROPhotDet()
{ return ROPhotDet ;}
private:
RichTbMaterial* rMaterial;
RichTbRunConfig* ROTbConfig;
RichTbHall* ROTbHall;
RichTbComponent* ROTbComponent;
RichTbPhotoDetector* ROPhotDet;
};
#endif
@@ -0,0 +1,58 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbRunAction.hh for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef RichTbRunAction_h
#define RichTbRunAction_h 1
#include "globals.hh"
#include "G4UserRunAction.hh"
class G4Timer;
class G4Run;
class RichTbRunAction : public G4UserRunAction
{
public:
RichTbRunAction();
virtual ~RichTbRunAction();
public:
void BeginOfRunAction(const G4Run* aRun);
void EndOfRunAction(const G4Run* aRun);
private:
G4Timer* timer;
};
#endif
@@ -0,0 +1,188 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbRunConfig.hh for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef RichTbRunConfig_h
#define RichTbRunConfig_h 1
#include "globals.hh"
#include <vector>
#include "AerogelTypeSpec.hh"
#include "FilterTypeSpec.hh"
#include "AerogelRefData.hh"
#include "FilterTrData.hh"
#include <math.h>
#include <fstream.h>
class RichTbRunConfig{
public:
RichTbRunConfig();
virtual ~RichTbRunConfig();
G4double getPressureN2()
{return CurrentPressureN2;}
G4double getTemperatureN2()
{ return CurrentTemperatureN2; }
G4double getMirrorAddTiltX()
{return MirrorAddTiltX; }
G4double getMirrorAddTiltY()
{return MirrorAddTiltY; }
G4int getRichTbHall_visib()
{return RichTbHall_visib;}
G4int getRichTbEnclosure_visib()
{return RichTbEnclosure_visib;}
G4int getRichTbRadFrame_visib()
{return RichTbRadFrame_visib;}
G4int getRichTbRadUpW_visib()
{return RichTbRadUpW_visib;}
G4int getRichTbRadDnW_visib()
{return RichTbRadDnW_visib;}
G4int getRichTbAerogel_visib()
{return RichTbAerogel_visib;}
G4int getRichTbAerogelWrap_visib()
{return RichTbAerogelWrap_visib;}
G4int getRichTbFilter_visib()
{return RichTbFilter_visib;}
G4int getRichTbMirror_visib()
{return RichTbMirror_visib;}
G4int getRichTbHpdMaster_visib()
{return RichTbHpdMaster_visib; }
G4int getRichTbHpdEnvelopeTube_visib()
{return RichTbHpdEnvelopeTube_visib;}
G4int getRichTbHpdQuartzW_visib()
{return RichTbHpdQuartzW_visib; }
G4int getRichTbHpdPhCathode_visib()
{return RichTbHpdPhCathode_visib; }
G4int getRichTbHpdSiDet_visib()
{return RichTbHpdSiDet_visib; }
G4int getRichTbHpdSectCoat_visib()
{return RichTbHpdSectCoat_visib; }
G4int getRichTbHpdSiPx_visib()
{return RichTbHpdSiPx_visib; }
G4int getRefIndexPara()
{return RefIndexPara; }
G4int getRichTbDrawTrajectory() {return RichTbDrawTrajectory_visib; }
G4double getHpdPhElectronEnergy() {return HpdPhElectronEnergy; }
G4int DoWriteOutputFile() {return WriteOutputFile; }
G4String getOutputFileName() {return OutputFileName; }
G4String getOutputHistoDirName() {return OutputHistoDirName; }
G4int getWriteMiscOutputFlag() {return WriteMiscOutputFlag; }
G4String getMiscOutFileName() {return MiscOutFileName; }
G4int GetFilterTNumber() {return FilterTNumber; }
FilterType GetFilterType() {return CurFilterType; }
G4int GetNumberOfAerogelTiles() {return NumberOfAerogelTiles ; }
G4int GetCurAerogelTNumber(G4int AgelNum )
{return CurAerogelTNumber[AgelNum];}
AerogelType GetCurAerogelType(G4int AgelNumber)
{return CurAerogelType[AgelNumber];}
AerogelRefData* GetAerogelRefdata() {return AerogelRefractiveInd;}
FilterTrData* GetFilterTrData() {return FilterTransData; }
G4int GetRichTbNumPartEvent() {return RichTbNumPartEvent; }
G4int GetRichTbParticleTypeCode() {return RichTbParticleTypeCode; }
G4int GetRichTbParticleStartPosCode() {return RichTbParticleStartPosCode; }
G4int GetRichTbParticleDirectionCode(){return RichTbParticleDirectionCode; }
G4int GetRichTbParticleEnergyCode(){return RichTbParticleEnergyCode; }
G4double GetRichTbParticleEnergy() {return RichTbParticleEnergy; }
G4double GetRichTbPhotLowE() {return RichTbPhotLowE; }
G4double GetRichTbPhotHighE() {return RichTbPhotHighE; }
G4String GetAerogelRefDataFile() {return AerogelRefDataInputFileName; }
G4String GetFilterTransDataFile() { return FilterTransDataInputFileName; }
private:
G4double CurrentPressureN2;
G4double CurrentTemperatureN2;
G4int RefIndexPara;
G4double MirrorAddTiltX;
G4double MirrorAddTiltY;
//Graphics setups
//For Following variables 0 means make the volume invisible;
// 1 means make it visible as a solid.
// 2 means make it visible as a wireframe.
G4int RichTbHall_visib;
G4int RichTbEnclosure_visib;
G4int RichTbRadFrame_visib;
G4int RichTbRadUpW_visib;
G4int RichTbRadDnW_visib;
G4int RichTbAerogel_visib;
G4int RichTbAerogelWrap_visib;
G4int RichTbFilter_visib;
G4int RichTbMirror_visib;
G4int RichTbHpdMaster_visib;
G4int RichTbHpdEnvelopeTube_visib;
G4int RichTbHpdQuartzW_visib;
G4int RichTbHpdPhCathode_visib;
G4int RichTbHpdSiDet_visib;
G4int RichTbHpdSectCoat_visib;
G4int RichTbHpdSiPx_visib;
G4int RichTbDrawTrajectory_visib;
G4double HpdPhElectronEnergy;
G4int FilterTNumber;
FilterType CurFilterType;
G4int NumberOfAerogelTiles;
vector<G4int>CurAerogelTNumber;
vector<AerogelType>CurAerogelType;
G4int WriteOutputFile;
G4String OutputFileName;
G4String OutputHistoDirName;
G4String AerogelRefDataInputFileName;
G4String FilterTransDataInputFileName;
G4int WriteMiscOutputFlag;
G4String MiscOutFileName;
AerogelRefData* AerogelRefractiveInd;
FilterTrData* FilterTransData;
//The following is for particle types.
// used as the beam.
//First the number of beam particles per event.
G4int RichTbNumPartEvent;
// 0 means piminus, 1 means optical photon,
// 2 means mixture of piminus and proton.
G4int RichTbParticleTypeCode;
//The following poscode = 0 means standard pos (0, 0, -2000.0 mm);
// =1 means special pos implemented.
G4int RichTbParticleStartPosCode;
// The following dire code =0 means dir is 0,0,1. The other
// codes for getting the beam spread is not implemented yet.
G4int RichTbParticleDirectionCode;
G4int RichTbParticleEnergyCode;
// the following is for charged particle energy in GeV.
G4double RichTbParticleEnergy;
//The following is for photon energy range in eV for testing optical
// parameters.
G4double RichTbPhotLowE;
G4double RichTbPhotHighE;
};
#endif
@@ -0,0 +1,67 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbSD.hh for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef RichTbSD_h
#define RichTbSD_h 1
#include "globals.hh"
#include "G4VSensitiveDetector.hh"
#include "G4ThreeVector.hh"
#include "RichTbHit.hh"
#include "RichTbGeometryParameters.hh"
class G4Step;
class G4HCofThisEvent;
class RichTbSD : public G4VSensitiveDetector
{
public:
RichTbSD(G4String , G4int, G4int, G4int,G4String );
virtual ~RichTbSD();
void Initialize(G4HCofThisEvent*HCE);
G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist);
void EndOfEvent(G4HCofThisEvent*HCE);
void clear();
void DrawAll();
void PrintAll();
private:
RichTbHitsCollection * RichTbHitCollection;
G4int NumberOfSensitiveHpds;
G4int NumberOfSensitiveSectorsInHpd;
G4int NumberOfSensitivePixelsInSector;
vector<G4int> HpdSDID;
G4int HCID;
};
#endif
@@ -0,0 +1,71 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbSiDet.hh for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef RichTbSiDet_h
#define RichTbSiDet_h 1
#include "globals.hh"
#include "RichTbMaterial.hh"
#include "RichTbGeometryParameters.hh"
#include "G4LogicalVolume.hh"
#include "G4VPhysicalVolume.hh"
#include "RichTbSiPixel.hh"
class RichTbSiDet {
public:
RichTbSiDet();
virtual ~RichTbSiDet();
RichTbSiDet(RichTbMaterial*, G4VPhysicalVolume*, G4bool, G4int, G4int);
G4LogicalVolume* getHpdSiSectLogicalVolume()
{return RichTbHpdSiSectLVol;}
G4VPhysicalVolume* getHpdSiSectPhysicalVolume()
{return RichTbHpdSiSectPVol;}
G4LogicalVolume* getHpdSectCoatLogicalVolume()
{return RichTbHpdSectCoatLVol;}
G4VPhysicalVolume* getHpdSectCoatPhysicalVolume()
{return RichTbHpdSectCoatPVol;}
G4int getNumSiPixels(){return NumHpdSiPix ;}
G4int getCurSiSectNum(){return CurSiSectNum;}
RichTbSiPixel* getHpdSiPx(G4int ipixelnum )
{ return hpdSiPixel[ipixelnum]; }
G4int getIHpdNumber()
{ return IHpdNumber; }
private:
G4LogicalVolume* RichTbHpdSiSectLVol;
G4VPhysicalVolume* RichTbHpdSiSectPVol;
G4LogicalVolume* RichTbHpdSectCoatLVol;
G4VPhysicalVolume* RichTbHpdSectCoatPVol;
G4int NumHpdSiPix;
G4int CurSiSectNum;
RichTbSiPixel* hpdSiPixel[NumberOfPadHpdSiPixels];
G4bool ConstructTrackGeomSwitch;
G4int IHpdNumber;
};
#endif
@@ -0,0 +1,57 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbSiPixel.hh for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef RichTbSiPixel_h
#define RichTbSiPixel_h 1
#include "globals.hh"
#include "RichTbMaterial.hh"
#include "RichTbGeometryParameters.hh"
#include "G4LogicalVolume.hh"
#include "G4VPhysicalVolume.hh"
class RichTbSiPixel {
public:
RichTbSiPixel();
virtual ~RichTbSiPixel();
RichTbSiPixel(RichTbMaterial*, G4VPhysicalVolume*, G4int, G4int, G4int);
G4LogicalVolume* getHpdSiPixelLogicalVolume()
{return RichTbHpdSiPixelLVol;}
G4VPhysicalVolume* getHpdSiPixelPhysicalVolume()
{return RichTbHpdSiPixelPVol;}
G4int getICurSectorNumber() {return ICurSectorNumber; }
G4int getHpdSiPixelnum() {return HpdSiPixelnum; }
G4int getICurHpdNumber() {return ICurHpdNumber;}
private:
G4LogicalVolume* RichTbHpdSiPixelLVol;
G4VPhysicalVolume* RichTbHpdSiPixelPVol;
G4int ICurSectorNumber;
G4int HpdSiPixelnum;
G4int ICurHpdNumber;
G4bool PixelIsAlive;
};
#endif
@@ -0,0 +1,44 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbStackingAction.hh for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef RichTbStackingAction_h
#define RichTbStackingAction_h 1
#include "G4UserStackingAction.hh"
class RichTbStackingAction : public G4UserStackingAction {
public:
RichTbStackingAction();
virtual ~RichTbStackingAction();
void NewStage(){ ;}
void PrepareNewEvent(){;}
private:
};
#endif
@@ -0,0 +1,66 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbSteppingAction.hh for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef RichTbSteppingAction_h
#define RichTbSteppingAction_h 1
#include "G4UserSteppingAction.hh"
#include "G4VDiscreteProcess.hh"
#include "G4VParticleChange.hh"
#include "G4ParticleChange.hh"
class RichTbAnalysisManager;
class RichTbRunConfig;
class RichTbPrimaryGeneratorAction;
class RichTbSteppingAction : public G4UserSteppingAction {
public:
RichTbSteppingAction(RichTbRunConfig* ,
RichTbPrimaryGeneratorAction* );
virtual ~RichTbSteppingAction();
void UserSteppingAction(const G4Step* aStep);
void RichTbGenericHisto(const G4Step* aStep);
void RichTbDebugHisto(const G4Step* aStep);
RichTbAnalysisManager* getRAnalysisManager()
{return ranalysisManager; }
RichTbRunConfig* getRichTbRunConfig()
{return richtbRunConfig; }
G4double getHpdPhElectronKE()
{return HpdPhElectronKE; }
private:
RichTbAnalysisManager* ranalysisManager;
RichTbRunConfig* richtbRunConfig;
RichTbPrimaryGeneratorAction* rPrimGenAction;
G4double HpdPhElectronKE;
G4VParticleChange* uParticleChange;
};
#endif
@@ -0,0 +1,44 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbTrackingAction.hh for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef RichTbTrackingAction_h
#define RichTbTrackingAction_h 1
#include "G4UserTrackingAction.hh"
class RichTbTrackingAction : public G4UserTrackingAction {
public:
RichTbTrackingAction();
virtual ~RichTbTrackingAction();
void PreUserTrackingAction(const G4Track* aTrack){;}
void PostUserTrackingAction(const G4Track* aTrack){;}
private:
};
#endif
@@ -0,0 +1,53 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbVisManager.hh for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifndef RichTbVisManager_h
#define RichTbVisManager_h 1
#ifdef G4VIS_USE
#include "G4VisManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
class RichTbVisManager: public G4VisManager {
public:
RichTbVisManager ();
virtual ~RichTbVisManager();
private:
void RegisterGraphicsSystems ();
};
#endif
#endif
@@ -0,0 +1,601 @@
800 92.0400
799 92.0850
798 92.0400
797 91.9650
796 91.8850
795 92.0100
794 92.1100
793 91.9500
792 92.0100
791 91.9750
790 91.9900
789 91.9600
788 91.9650
787 91.9600
786 91.9100
785 91.9200
784 91.9950
783 92.0750
782 92.0800
781 92.0550
780 92.0000
779 92.1000
778 92.0500
777 92.0850
776 92.1000
775 92.0050
774 92.0300
773 92.0400
772 92.0000
771 92.0350
770 92.1100
769 92.0400
768 92.0700
767 92.1250
766 92.0600
765 92.0650
764 92.0800
763 91.9950
762 92.1050
761 92.1350
760 92.1000
759 92.1250
758 92.0800
757 92.1450
756 92.1150
755 92.0850
754 92.0650
753 92.1000
752 92.1050
751 92.1050
750 92.1900
749 92.2350
748 92.2350
747 92.2650
746 92.1900
745 92.2100
744 92.1700
743 92.1500
742 92.1400
741 92.1950
740 92.2200
739 92.2000
738 92.1500
737 92.2200
736 92.2100
735 92.2350
734 92.1850
733 92.1900
732 92.1400
731 92.1650
730 92.1700
729 92.1350
728 92.1650
727 92.1650
726 92.2250
725 92.2150
724 92.1600
723 92.2350
722 92.2750
721 92.2100
720 92.2750
719 92.2050
718 92.1400
717 92.1550
716 92.1050
715 92.1000
714 92.1450
713 92.1900
712 92.2000
711 92.1550
710 92.1900
709 92.2100
708 92.1900
707 92.1850
706 92.2350
705 92.2250
704 92.2000
703 92.2700
702 92.2000
701 92.2000
700 92.2250
699 92.1750
698 92.2250
697 92.2100
696 92.2350
695 92.2100
694 92.1700
693 92.2000
692 92.1750
691 92.1550
690 92.1650
689 92.1900
688 92.2050
687 92.1650
686 92.1650
685 92.1950
684 92.1750
683 92.2150
682 92.2250
681 92.2000
680 92.1400
679 92.1850
678 92.1950
677 92.1750
676 92.2200
675 92.2250
674 92.2350
673 92.2450
672 92.1800
671 92.1650
670 92.1900
669 92.2200
668 92.1900
667 92.2100
666 92.2150
665 92.1900
664 92.1450
663 92.1800
662 92.1800
661 92.2150
660 92.2250
659 92.2100
658 92.1600
657 92.2100
656 92.2150
655 92.1850
654 92.1950
653 92.2050
652 92.2150
651 92.2150
650 92.1900
649 92.1500
648 92.1750
647 92.1950
646 92.2200
645 92.2100
644 92.1900
643 92.1550
642 92.1750
641 92.1550
640 92.1500
639 92.1250
638 92.1000
637 92.1900
636 92.2050
635 92.1600
634 92.1550
633 92.1600
632 92.1950
631 92.1850
630 92.1800
629 92.2200
628 92.2150
627 92.1700
626 92.1750
625 92.2050
624 92.1750
623 92.1400
622 92.1800
621 92.1500
620 92.1550
619 92.1650
618 92.1750
617 92.1850
616 92.1600
615 92.1550
614 92.1650
613 92.1550
612 92.1650
611 92.1450
610 92.1400
609 92.1450
608 92.1000
607 92.1350
606 92.1250
605 92.1600
604 92.1300
603 92.1050
602 92.1300
601 92.1450
600 92.1450
599 92.1050
598 92.1450
597 92.1500
596 92.1850
595 92.1550
594 92.1700
593 92.1500
592 92.1100
591 92.1000
590 92.0850
589 92.1300
588 92.1200
587 92.0750
586 92.1150
585 92.1100
584 92.1300
583 92.0900
582 92.0700
581 92.0650
580 92.1050
579 92.1050
578 92.1150
577 92.1150
576 92.1000
575 92.0900
574 92.0800
573 92.0900
572 92.0950
571 92.0850
570 92.0700
569 92.0550
568 92.0850
567 92.0900
566 92.0650
565 92.0850
564 92.0800
563 92.0300
562 91.9700
561 92.0400
560 92.0650
559 92.0550
558 92.0250
557 92.0600
556 92.0300
555 92.0600
554 92.0600
553 92.0200
552 92.0650
551 92.0600
550 92.0650
549 92.0750
548 92.0300
547 92.0600
546 92.0050
545 92.0350
544 92.0150
543 91.9900
542 92.0000
541 92.0450
540 92.0100
539 92.0350
538 92.0500
537 92.0000
536 92.0100
535 92.0050
534 91.9850
533 91.9800
532 91.9750
531 91.9850
530 91.9900
529 92.0000
528 91.9900
527 91.9850
526 91.9850
525 91.9700
524 92.0000
523 91.9500
522 91.9500
521 91.9300
520 91.9700
519 91.9600
518 91.9350
517 91.9500
516 91.9700
515 91.9150
514 91.9400
513 91.9450
512 91.9400
511 91.9300
510 91.9300
509 91.8800
508 91.9200
507 91.9550
506 91.9350
505 91.9000
504 91.9200
503 91.8700
502 91.9000
501 91.8500
500 91.8800
499 91.8800
498 91.9150
497 91.8750
496 91.9150
495 91.8450
494 91.8400
493 91.8850
492 91.9350
491 91.8650
490 91.8400
489 91.8200
488 91.8750
487 91.8300
486 91.8350
485 91.8350
484 91.8550
483 91.8600
482 91.8100
481 91.8600
480 91.8600
479 91.8250
478 91.8200
477 91.8150
476 91.8350
475 91.8400
474 91.8150
473 91.8550
472 91.8200
471 91.8150
470 91.7500
469 91.7850
468 91.7600
467 91.7500
466 91.7700
465 91.8000
464 91.7400
463 91.7450
462 91.7400
461 91.7050
460 91.6600
459 91.7650
458 91.7350
457 91.7200
456 91.7300
455 91.7100
454 91.6850
453 91.6850
452 91.7400
451 91.7600
450 91.7650
449 91.7250
448 91.6600
447 91.6100
446 91.6650
445 91.6800
444 91.6100
443 91.6800
442 91.5850
441 91.6250
440 91.5600
439 91.6450
438 91.6400
437 91.6000
436 91.5850
435 91.5500
434 91.5850
433 91.5850
432 91.5800
431 91.6100
430 91.6400
429 91.5850
428 91.5300
427 91.5500
426 91.5700
425 91.5800
424 91.5900
423 91.4950
422 91.4850
421 91.4850
420 91.5050
419 91.4700
418 91.4900
417 91.5300
416 91.5050
415 91.4700
414 91.4900
413 91.5200
412 91.5350
411 91.5250
410 91.5300
409 91.5200
408 91.4750
407 91.5100
406 91.5000
405 91.4850
404 91.4550
403 91.3850
402 91.4000
401 91.3800
400 91.4650
399 91.5100
398 91.4350
397 91.3500
396 91.3600
395 91.3450
394 91.3300
393 91.4050
392 91.3550
391 91.3150
390 91.3300
389 91.4150
388 91.2700
387 91.1900
386 91.2900
385 91.1800
384 91.2250
383 91.1300
382 91.1350
381 91.1700
380 91.2100
379 91.0850
378 91.1300
377 91.1650
376 91.0950
375 91.1150
374 91.0950
373 91.0550
372 91.0450
371 90.9200
370 90.9800
369 91.0750
368 90.9500
367 90.9650
366 90.8850
365 90.9000
364 90.8100
363 90.8200
362 90.8050
361 90.6800
360 90.6850
359 90.5850
358 90.5400
357 90.5300
356 90.4650
355 90.3050
354 90.2500
353 90.0650
352 89.9800
351 89.9100
350 89.7250
349 89.5400
348 89.4250
347 89.1850
346 89.1100
345 88.7200
344 88.3750
343 88.0500
342 87.8550
341 87.5100
340 87.0700
339 86.6700
338 86.0550
337 85.5900
336 84.8300
335 84.0950
334 83.3000
333 82.4900
332 81.3850
331 80.2300
330 78.9300
329 77.5200
328 75.9700
327 74.2350
326 72.4450
325 70.4550
324 68.2750
323 65.8900
322 63.3000
321 60.4700
320 57.4950
319 54.3700
318 51.0900
317 47.5950
316 43.9850
315 40.3150
314 36.5150
313 32.7350
312 28.9800
311 25.3500
310 21.8300
309 18.5150
308 15.4300
307 12.6100
306 10.0950
305 7.9050
304 6.0450
303 4.5100
302 3.2750
301 2.3100
300 1.5800
299 1.0450
298 0.6700
297 0.4200
296 0.2550
295 0.1550
294 0.0950
293 0.0600
292 0.0400
291 0.0350
290 0.0250
289 0.0250
288 0.0250
287 0.0250
286 0.0250
285 0.0250
284 0.0250
283 0.0200
282 0.0200
281 0.0200
280 0.0250
279 0.0250
278 0.0200
277 0.0200
276 0.0200
275 0.0250
274 0.0200
273 0.0200
272 0.0200
271 0.0200
270 0.0200
269 0.0200
268 0.0200
267 0.0200
266 0.0200
265 0.0200
264 0.0200
263 0.0200
262 0.0200
261 0.0200
260 0.0200
259 0.0200
258 0.0150
257 0.0200
256 0.0200
255 0.0200
254 0.0200
253 0.0200
252 0.0200
251 0.0200
250 0.0200
249 0.0150
248 0.0150
247 0.0150
246 0.0200
245 0.0200
244 0.0200
243 0.0200
242 0.0200
241 0.0200
240 0.0200
239 0.0200
238 0.0200
237 0.0200
236 0.0200
235 0.0200
234 0.0200
233 0.0200
232 0.0200
231 0.0200
230 0.0200
229 0.0200
228 0.0200
227 0.0200
226 0.0200
225 0.0200
224 0.0200
223 0.0200
222 0.0200
221 0.0200
220 0.0200
219 0.0250
218 0.0250
217 0.0200
216 0.0200
215 0.0200
214 0.0200
213 0.0250
212 0.0250
211 0.0200
210 0.0250
209 0.0250
208 0.0250
207 0.0250
206 0.0250
205 0.0300
204 0.0350
203 0.0300
202 0.0350
201 0.0400
200 0.0400
@@ -0,0 +1,37 @@
1.00 1.03465
1.25 1.03475
1.50 1.03487
1.75 1.03502
2.00 1.03519
2.25 1.03539
2.50 1.03562
2.75 1.03587
3.00 1.03615
3.25 1.03646
3.50 1.03681
3.75 1.03719
4.00 1.03761
4.25 1.03808
4.50 1.03858
4.75 1.03914
5.00 1.03975
5.25 1.04042
5.50 1.04116
5.75 1.04197
6.00 1.04287
6.25 1.04387
6.50 1.04498
6.75 1.04622
7.00 1.04761
7.25 1.04920
7.50 1.05101
7.75 1.05310
8.00 1.05554
8.25 1.05844
8.50 1.06194
8.75 1.06626
9.00 1.07176
9.25 1.07905
9.50 1.08920
9.75 1.10449
+31
View File
@@ -0,0 +1,31 @@
#
# This file permits to customize, with commands,
# the menu bar of the G4UIXm, G4UIWin32 sessions.
# It has no effect with G4UIterminal.
#
# File :
/gui/addMenu file File
/gui/addButton file Continue continue
/gui/addButton file Exit "exit"
#
# Run menu :
/gui/addMenu run Run
/gui/addButton run run1 "/control/execute ../macro/run1.mac"
#
# Vis menu :
/gui/addMenu vis Vis
/gui/addButton vis Vis0 "/control/execute ../macro/RichTbVis0.mac"
#
#Setup driver Menu:
/gui/addMenu setup Setup
# /gui/addButton setup Init "/control/execute ../macro/InitRichTb.mac"
/gui/addButton setup opgl "/control/execute ../macro/SetupOpenGL.mac"
/gui/addButton setup dawn "/control/execute ../macro/SetupDawn.mac"
#
# To limit the output flow in the "dump" widget :
/event/printModulo 100
@@ -0,0 +1,28 @@
9
3 0 4 49.7386 150.373 99.0187
0 12 28 147.981 21.0972 110.641
1 3 28 20.3513 -146.566 110.818
2 13 33 -141.255 43.6408 102.346
1 5 69 3.46392 -150.377 112.859
3 0 49 19.0977 147.364 111.077
0 11 103 143.116 44.6994 101.891
1 3 40 28.2627 -148.871 108.715
1 11 33 -44.1108 -142.736 102.183
5
3 4 125 -12.6703 91.5218 94.6715
1 10 60 -22.847 -150.721 110.146
3 8 23 -43.0856 144.268 102.759
3 8 68 -16.1594 146.573 111.63
0 13 69 150.269 4.04504 112.841
11
3 5 33 -17.9766 102.675 100.5
0 8 33 98.498 4.28633 100.027
1 3 30 31.598 -147.669 107.643
3 8 14 -36.3804 143.587 105.792
3 8 78 -18.7976 149.179 111.104
0 11 112 143.77 47.7513 100.237
3 8 24 -43.3309 145.142 102.654
2 12 59 -147.881 7.01453 112.733
2 5 40 -149.109 -29.1983 108.415
3 13 68 6.83367 159.936 111.809
3 8 10 -54.3685 143.293 96.0556
+45
View File
@@ -0,0 +1,45 @@
# $Id: run1.mac,v 1.2 2003/06/12 08:50:50 pmendez Exp $
#
# Macro file for "LHCbRichSim.cc"
#
#/vis/open OGLIX
# (can be run in batch, without graphic)
/control/verbose 2
/control/saveHistory
#
#run/verbose 4
#event/verbose 4
#tracking/verbose 5
#process/verbose 4
#particle/process/verbose 4
#vis/verbose 4
/vis/scene/create
/vis/sceneHandler/create OGLSXm
/vis/sceneHandler/create OGLIX
/vis/viewer/create
/vis/scene/add/volume
/vis/viewer/update
/vis/viewer/viewpointThetaPhi -90. -90.
/hits/list
/hits/activate
/hits/verbose 4
/tracking/storeTrajectory 1
/vis/scene/add/trajectories
/gun/particle pi-
/gun/energy 10 GeV
/gun/xvertex 0.000 mm
/gun/yvertex 0.000 mm
/gun/zvertex -20.000 mm
/run/beamOn 2
@@ -0,0 +1,198 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// AerogelRefData.cc for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#include <iostream.h>
#include <fstream.h>
#include "AerogelRefData.hh"
#include "RichTbGeometryParameters.hh"
#include "RichTbMaterialParameters.hh"
AerogelRefData::AerogelRefData(G4String AgelRefIndFile)
:NumberOfRefIndBins(NumAerogelRefIndexPhotonEnergyBins),
StdAerogelRefphotE(vector<G4double>(NumAerogelRefIndexPhotonEnergyBins)),
StdAerogelRefIndexValue(vector<G4double>(NumAerogelRefIndexPhotonEnergyBins)),
AerogelRefIndShift(vector<G4double>( MaxNumberOfAerogelTypes)),
AerogelWavelengthRef(vector<G4double>( MaxNumberOfAerogelTypes)) {
AerogelRefIndexFileName=AgelRefIndFile;
StdAerogelNominalRefractiveIndex= StdAerogelNominalRefIndex;
ReadStdAerogelRefIndex();
G4double AerogelRefEnergy,AerogelReferenceRefInd;
for(G4int ityp=0; ityp< MaxNumberOfAerogelTypes; ityp++ ){
AerogelWavelengthRef[ityp]=AerogelReferenceRefIndWavelength[ityp];
AerogelRefEnergy=
(PhotMomWaveConv/(AerogelWavelengthRef[ityp]/nanometer))*eV;
AerogelReferenceRefInd = GetStdAgelRefIndexE(AerogelRefEnergy);
AerogelRefIndShift[ityp] = AerogelReferenceRefInd -
StdAerogelNominalRefractiveIndex ;
}
}
G4double AerogelRefData::GetStdAgelRefIndexE(G4double StdAgelRefEnergy) {
G4double refint= StdAerogelNominalRefractiveIndex;
if(StdAgelRefEnergy <= StdAerogelRefphotE[0] ) {
refint= StdAerogelRefphotE[0];
G4cout<<"Ref index reference value outside bounds "<<G4endl;
}
if(StdAgelRefEnergy > StdAerogelRefphotE[ NumberOfRefIndBins-1 ] ) {
refint= StdAerogelRefphotE[ NumberOfRefIndBins-1 ];
G4cout<<"Ref index reference value outside bounds "<<G4endl;
}
for(G4int iabin=0; iabin < NumberOfRefIndBins-1 ; iabin++ ){
G4double E1= StdAerogelRefphotE[iabin];
G4double E2= StdAerogelRefphotE[iabin+1];
if(StdAgelRefEnergy > E1 && StdAgelRefEnergy <= E2 && E1 != E2 ){
//Now interpolate
G4double r1= StdAerogelRefIndexValue[iabin];
G4double r2= StdAerogelRefIndexValue[iabin+1];
G4double slp=(r2-r1)/(E2-E1);
G4double ain= r1-slp*E1;
refint= slp*StdAgelRefEnergy + ain;
break;
}
}
return refint;
}
void AerogelRefData::ReadStdAerogelRefIndex() {
const char* StdAerogelRefIndFile= AerogelRefIndexFileName.c_str();
if( StdAerogelRefIndFile == 0 ){
G4cout<<" Aerogel RefIndex Input file missing"
<< " Please provide the correct file name "
<<G4endl;
}else {
G4cout<<"Now reading Std Aerogel Ref Index from "
<<StdAerogelRefIndFile<<G4endl;
ifstream finpga(StdAerogelRefIndFile);
G4double ephot,rind;
for (G4int fbin=0; fbin< NumberOfRefIndBins ; fbin++){
finpga>>ephot;
finpga>>rind;
StdAerogelRefphotE[fbin]=ephot*eV;
StdAerogelRefIndexValue[fbin]=rind;
//for test avoid the variation in ref index. SE 18-10-01
// StdAerogelRefIndexValue[fbin]= StdAerogelNominalRefractiveIndex;
}
}
}
vector<G4double> AerogelRefData::GetCurAerogelRefIndValueVect (G4int AerogelTnum ) {
// no test for tdr rich. now put back to TB conditions.
vector<G4double>CAgel(NumberOfRefIndBins);
AerogelType Ctype;
G4double CRn = GetRefnominal( AerogelTnum );
for (G4int ib=0; ib < NumberOfRefIndBins; ib++ ){
CAgel[ib]= StdAerogelRefIndexValue[ib]
- StdAerogelNominalRefractiveIndex-AerogelRefIndShift[ AerogelTnum] + CRn;
}
return CAgel;
}
G4double AerogelRefData:: GetCurAerogelRefIndValue( G4int rbinw , G4int AerogelTnum ){
// no test for tdr. now in TB conditions.
G4double crn= GetRefnominal( AerogelTnum );
return StdAerogelRefIndexValue[rbinw]
- StdAerogelNominalRefractiveIndex-AerogelRefIndShift[ AerogelTnum] +crn;
// - StdAerogelNominalRefractiveIndex-AerogelRefIndShift[ AerogelTnum] +crn;
// return StdAerogelRefIndexValue[rbinw]-1.03269+crn;
}
G4double AerogelRefData::GetRefnominal(G4int AgelTnum ) {
G4double CRnominal = StdAerogelNominalRefractiveIndex;
if(AgelTnum == 0 ){
CRnominal= AerogelTypeANominalRefIndex;
}else if (AgelTnum == 1 ) {
CRnominal= AerogelTypeBNominalRefIndex;
}else if (AgelTnum == 2 ) {
CRnominal= AerogelTypeCNominalRefIndex;
}else if (AgelTnum == 3 ) {
CRnominal= AerogelTypeDNominalRefIndex;
}else if (AgelTnum == 4 ) {
CRnominal= AerogelTypeENominalRefIndex;
} else {G4cout<<"Unknown Aerogel Type "<<G4endl; }
}
AerogelType AerogelRefData::GetAerogelType(G4int AgelTnum ) {
AerogelType Ctype;
if(AgelTnum == 0 ){
Ctype=AerogelTypeA;
}else if (AgelTnum == 1 ) {
Ctype=AerogelTypeB;
}else if (AgelTnum == 2 ) {
Ctype=AerogelTypeC;
}else if (AgelTnum == 3 ) {
Ctype=AerogelTypeD;
}else if (AgelTnum == 4 ) {
Ctype=AerogelTypeE;
} else {G4cout<<"Unknown Aerogel Type "<<G4endl; }
}
AerogelRefData::~AerogelRefData(){ ; }
+123
View File
@@ -0,0 +1,123 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// filterTrData.cc for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#include <iostream.h>
#include <fstream.h>
#include "FilterTrData.hh"
#include "RichTbGeometryParameters.hh"
#include "RichTbMaterialParameters.hh"
FilterTrData::FilterTrData(G4int FilterTypeNum, G4String FilterDataFileName )
:NumberOfTrBins(NumFilterTransBins),
TransWaveL(vector<G4double>(NumFilterTransBins)),
TransValue(vector<G4double>(NumFilterTransBins)),
TransTotValue(vector<G4double>(NumFilterTransBins))
{
// In the G4example the same type of filter is used
// for all types of filters.
FilterTypeNumber= FilterTypeNum;
FilterTransDataFileName=FilterDataFileName;
if( FilterTypeNum >= 0 && FilterTypeNum <= 5 ) {
FilterTypeIndex = GlassD263;
FilterRefIndexNominal = RefIndexGlassD263 ;
} else if (FilterTypeNum == -1 ) {
G4cout<<" No filter for this run "<<G4endl;
} else {G4cout<<"FilterTrData : Unknown Filter Type "<<G4endl; }
//for now default ref index is provided as that of glassd263.
CurNeighbourRefIndexNominal= NitrogenNominalRefIndex;
ReadFilterTrans();
if(FilterTypeNum >=0 ) {
FilterThickness = 2.0*FilterHalfZArray[FilterTypeNum];
}
}
void FilterTrData::ReadFilterTrans() {
//first get the filter type index
FilterType Ftype = GetFilterTypeIndex();
if(Ftype == GlassD263 ) {
const char* D263FilterTransFile= FilterTransDataFileName.c_str();
if(D263FilterTransFile != 0 ) {
G4cout<<"Glass D263 Filter trans is from "<<D263FilterTransFile<<G4endl;
if(NumberOfTrBins != NumPhotBinGlassD263Trans ) {
NumberOfTrBins = NumPhotBinGlassD263Trans;
TransWaveL.resize(NumberOfTrBins);
TransValue.resize(NumberOfTrBins);
TransTotValue.resize(NumberOfTrBins);
}
ifstream finpga(D263FilterTransFile);
G4double wa,trn;
//set the order to have increasing in wavelength after reading in.
//the data file is with decreasing order of wavelength.
for (G4int fbin=0; fbin< NumberOfTrBins ; fbin++){
finpga>>wa;
finpga>>trn;
TransWaveL[NumberOfTrBins-fbin-1]=wa;
// TransValue[NumberOfTrBins-fbin-1]=trn/100.0;
TransValue[NumberOfTrBins-fbin-1]=GetCurrentFilTrans(trn);
TransTotValue[NumberOfTrBins-fbin-1]=GetTotFilTrans(trn);
}
}else {
G4cout<<" Unknown file name for filter transmission Data input "<<G4endl;
G4cout<<" Please specify the correct file name for filter transmission " <<G4endl;
}
} else {
G4cout<<"Unknown Filter or No filter"<<G4endl;
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);
if(trn > 1.0 ) trn=1.0;
return trn;
}
G4double FilterTrData::GetTotFilTrans(G4double trnData) {
// No wavelength dependance yet.
return trnData/100.0;
}
FilterTrData::~FilterTrData(){ ; }
@@ -0,0 +1,164 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// HpdSiEnergyLoss.cc for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#include "HpdSiEnergyLoss.hh"
#include "G4Material.hh"
#include "Randomize.hh"
#include "RichTbMaterialParameters.hh"
#include "RichTbAnalysisManager.hh"
HpdSiEnergyLoss::HpdSiEnergyLoss(const G4String& materialName,
const G4String& processName)
: G4VEnergyLoss(processName),
MinKineticEnergy(1.*eV),MipEnergy(30000.0*eV),
finalRangeforStep(0.15*mm) {
ElossMaterialName= materialName;
const G4MaterialTable* theMaterialTable = G4Material::GetMaterialTable();
G4int numberOfMat = G4Material::GetNumberOfMaterials();
for(G4int iMat=0;iMat<numberOfMat;iMat++) {
if ( materialName == (*theMaterialTable)[iMat]->GetName()){
fMatIndex=(*theMaterialTable)[iMat]->GetIndex();
break;
}
}
if(iMat >= numberOfMat ) {
G4Exception("Invalid material Name in HpdSiEnergyLoss constructor" );
}
}
HpdSiEnergyLoss::~HpdSiEnergyLoss() { }
G4bool HpdSiEnergyLoss::IsApplicable(const G4ParticleDefinition&
aParticleType) {
return(aParticleType.GetPDGCharge()!= 0.);
}
G4double HpdSiEnergyLoss::GetContinuousStepLimit(const G4Track& track,
G4double previousStepSize,
G4double currentMinimumStep,
G4double& currentSafety){
G4double RangeForStep = finalRangeforStep;
if( fMatIndex != track.GetMaterial() -> GetIndex() ) {
RangeForStep = DBL_MAX;
}
return RangeForStep;
}
G4double HpdSiEnergyLoss::GetMeanFreePath(const G4Track& track,
G4double previousStepSize,
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
aParticleChange.Initialize(aTrack) ;
return G4VContinuousDiscreteProcess::PostStepDoIt(aTrack,aStep);
}
G4VParticleChange* HpdSiEnergyLoss::AlongStepDoIt(const G4Track& aTrack,
const G4Step& aStep) {
#ifdef G4ANALYSIS_USE
RichTbAnalysisManager * analysis = RichTbAnalysisManager::getInstance();
#endif
aParticleChange.Initialize(aTrack);
G4int aMaterialIndex = aTrack.GetMaterial()->GetIndex();
if(fMatIndex != aTrack.GetMaterial()->GetIndex() ) {
return &aParticleChange;
}
const G4DynamicParticle* aParticle = aTrack.GetDynamicParticle();
G4double aKinEnergyInit = aParticle->GetKineticEnergy();
G4double Eloss, aKinEnergyFinal;
if(aKinEnergyInit < MinKineticEnergy ) { Eloss=0.0 ; }
else if( aKinEnergyInit < MipEnergy ) {Eloss= aKinEnergyInit ;}
else { Eloss = MipEnergy; }
aKinEnergyFinal=aKinEnergyInit-Eloss;
//In the G4example the backscattering is implemented in
//an adhoc manner as done below. It simply causes an
// efficiency loss.
G4double bckratio;
if( SignalToNoiseInData > 0.0 ){
bckratio = NsigmaInPedCut/ SignalToNoiseInData ;
}
G4double Effs = 1.0 - backscaprob * bckratio;
G4double Randbsk = G4UniformRand();
if(Randbsk <= Effs && Eloss > 0.0 ) {
aParticleChange.SetLocalEnergyDeposit(Eloss);
#ifdef G4ANALYSIS_USE
analysis->bumpNumHitInSi();
#endif
G4StepPoint* pPreStepPoint = aStep.GetPreStepPoint();
G4String tpreVol = pPreStepPoint -> GetPhysicalVolume()->GetName();
G4int tpreVP = pPreStepPoint -> GetPhysicalVolume()->GetCopyNo();
G4int tpreVPS = pPreStepPoint -> GetPhysicalVolume()
->GetMother()->GetCopyNo();
}
if (aKinEnergyFinal <= MinKineticEnergy ) {
aParticleChange.SetStatusChange(fStopAndKill);
}else {
aParticleChange.SetEnergyChange(aKinEnergyFinal);
}
return &aParticleChange;
}
@@ -0,0 +1,276 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// PadHpdPhotoElectricEffect.cc for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#include "globals.hh"
#include <math.h>
#include "PadHpdPhotoElectricEffect.hh"
#include "RichTbGeometryParameters.hh"
#include "G4TransportationManager.hh"
#include "Randomize.hh"
#include "RichTbAnalysisManager.hh"
#include "RichTbRunConfig.hh"
#include "RichTbMaterialParameters.hh"
#include "RichTbAnalysisManager.hh"
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)) {
rConfig=RConfig;
PrePhotoElectricVolName="PadHpdWindowQuartz";
PostPhotoElectricVolName="BiAlkaliPhCathode";
HpdPhElectronKE=(RConfig-> getHpdPhElectronEnergy())*keV;
PhCathodeToSilDetDist= HpdPhotoCathodeSiZdist;
PSFsigma=PadHpdPSFsigma;
for(G4int ihpdq=0; ihpdq<NumHpdTot; ihpdq++ ) {
if( HpdDemagLinearTerm[ihpdq] != 0.0 ) {
DemagnificationFactor[ihpdq]=1.0 / HpdDemagLinearTerm[ihpdq];
}else { DemagnificationFactor[ihpdq] =1.0 / 2.3;}
if( HpdDemagQuadraticTerm[ihpdq] != 0.0 ) {
DemagnificationQuadFactor[ihpdq]=1.0 / HpdDemagQuadraticTerm[ihpdq];
}else{DemagnificationQuadFactor[ihpdq]=0.0*(1.0/(1.0*mm)); }
// Now to apply the error on the HPD demag factor. SE 28-4-02
// for now a flat error is applied. the uniform number from -1.0 to
// 1.0 is obtained and then multiplied with the factor.
G4double DemagError= (HpdDemagErrorPercent/100.0)*(2.0*G4UniformRand()-1.0) ;
DemagnificationFactor[ihpdq] = DemagnificationFactor[ihpdq]*(1.0+DemagError);
vector<G4double>qeCurHpd = InitializeHpdQE(ihpdq);
vector<G4double>waCurHpd = InitializeHpdWaveL(ihpdq);
if(qeCurHpd.size() != waCurHpd.size() ) {
G4cout<<"Wrong size for Hpd QE "<<ihpdq<<" "<<qeCurHpd.size()
<<" "<< waCurHpd.size()<<G4endl;
}
for(G4int iqbin=0; iqbin < qeCurHpd.size(); iqbin++){
HpdQE[ihpdq][iqbin]=qeCurHpd[iqbin]/100;
HpdWabin[ihpdq][iqbin]=waCurHpd[iqbin];
}
}
G4cout<<GetProcessName() <<" is created "<<G4endl;
}
PadHpdPhotoElectricEffect::~PadHpdPhotoElectricEffect() {; }
G4bool PadHpdPhotoElectricEffect::IsApplicable(const G4ParticleDefinition&
aParticleType)
{
return ( &aParticleType == G4OpticalPhoton::OpticalPhoton() );
}
G4double PadHpdPhotoElectricEffect::GetMeanFreePath(const G4Track& ,
G4double ,
G4ForceCondition* condition)
{
*condition = Forced;
return DBL_MAX;
}
G4VParticleChange* PadHpdPhotoElectricEffect::PostStepDoIt(const G4Track& aTrack,
const G4Step& aStep)
{
aParticleChange.Initialize(aTrack);
G4StepPoint* pPreStepPoint = aStep.GetPreStepPoint();
G4StepPoint* pPostStepPoint = aStep.GetPostStepPoint();
if (pPostStepPoint->GetStepStatus() != fGeomBoundary){
return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
}
G4String PrePhName = pPreStepPoint -> GetPhysicalVolume() ->
GetLogicalVolume() -> GetMaterial()->GetName();
G4String PostPhName= pPostStepPoint -> GetPhysicalVolume() ->
GetLogicalVolume() -> GetMaterial() ->GetName();
if(( PrePhName == PrePhotoElectricVolName &&
PostPhName == PostPhotoElectricVolName) ||
( PostPhName == PrePhotoElectricVolName &&
PrePhName == PostPhotoElectricVolName) ) {
}else {
return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
}
if (aTrack.GetStepLength()<=kCarTolerance/2){
return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
}
const G4DynamicParticle* aDynamicPhoton = aTrack.GetDynamicParticle();
G4double PhotonEnergy = aDynamicPhoton->GetKineticEnergy();
if(PhotonEnergy <= 0.0 ) {
return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
}
//Now use the QE for the current HPD to determine if a
// photoelectron should be produced or not.
G4int currentHpdNumber= pPreStepPoint->GetPhysicalVolume()
-> GetMother() -> GetCopyNo();
if(currentHpdNumber >= NumHpdTot ){
return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
}
G4double PhotWLength=PhotMomWaveConv/(PhotonEnergy/eV);
G4double PhCathodeQE = getHpdQEff(currentHpdNumber, PhotWLength);
G4double randomnum = G4UniformRand();
//the following three lines are copied from few lines later just
// for histogramming convenience.
G4ThreeVector GlobalElectronOrigin= pPostStepPoint->GetPosition();
G4Navigator* theNavigator =
G4TransportationManager::GetTransportationManager()->
GetNavigatorForTracking();
G4ThreeVector LocalElectronOrigin = theNavigator->
GetGlobalToLocalTransform().
TransformPoint(GlobalElectronOrigin);
// For the histogram of the radius of the cherenkov circle.
// This assumes that the beam is along 001 axis in the global
// coord system.
G4double GLx=GlobalElectronOrigin.x();
G4double GLy=GlobalElectronOrigin.y();
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;
if(randomnum < PhCathodeQE ) {
G4double CurDemagFactor=DemagnificationFactor[currentHpdNumber];
G4double CurDemagQuadFactor=DemagnificationQuadFactor[currentHpdNumber];
// now get the Point Spread function.
G4double PsfRandomAzimuth = twopi*G4UniformRand();
G4double PsfRandomRad= G4RandGauss::shoot(0.0,PSFsigma);
G4double PsfX= PsfRandomRad*cos( PsfRandomAzimuth);
G4double PsfY= PsfRandomRad*sin( PsfRandomAzimuth);
G4ThreeVector LocalElectronDirection(
(CurDemagFactor+CurDemagQuadFactor*LocalElectronOrigin.x()-1.0)*LocalElectronOrigin.x()+PsfX,
(CurDemagFactor+CurDemagQuadFactor*LocalElectronOrigin.y()-1.0)*LocalElectronOrigin.y()+PsfY,
-(PhCathodeToSilDetDist-
(HpdPhCathodeRInner-LocalElectronOrigin.z())));
//normalize this vector and then transform back to global coord system.
LocalElectronDirection = LocalElectronDirection.unit();
const G4ThreeVector GlobalElectronDirection = theNavigator->
GetLocalToGlobalTransform().
TransformAxis(LocalElectronDirection);
G4double ElecKineEnergy=getHpdPhElectronKE();
//create the electron
G4DynamicParticle* aElectron= new G4DynamicParticle (G4Electron::Electron(),
GlobalElectronDirection, ElecKineEnergy) ;
aParticleChange.SetNumberOfSecondaries(1) ;
// aParticleChange.AddSecondary( aElectron ) ;
aParticleChange.AddSecondary( aElectron,GlobalElectronOrigin,true ) ;
// Kill the incident photon when it has converted to photoelectron.
aParticleChange.SetLocalEnergyDeposit(PhotonEnergy);
aParticleChange.SetEnergyChange(0.);
aParticleChange.SetStatusChange(fStopAndKill);
}
//photon is not killed if it is not converted to photoelectron
//SE 26-09-01.
return G4VDiscreteProcess::PostStepDoIt(aTrack, aStep);
}
G4double PadHpdPhotoElectricEffect::getHpdQEff(G4int HpdNum,
G4double PhotonWLength){
G4double hq1,hq2, wa1, wa2,aslope,aintc;
G4double qeff=0.0;
for (G4int ibinq=0 ; ibinq<NumQEbins-1 ; ibinq++ ){
wa1 = HpdWabin[HpdNum][ibinq];
wa2 = HpdWabin[HpdNum][ibinq+1];
if( PhotonWLength >= wa1 && PhotonWLength <= wa2 ) {
hq1 = HpdQE[HpdNum][ibinq];
hq2 = HpdQE[HpdNum][ibinq+1];
aslope = (hq2-hq1)/(wa2-wa1);
aintc = hq1 - (aslope * wa1 );
qeff= aintc + aslope * PhotonWLength ;
return qeff;
}
}
return qeff;
}
@@ -0,0 +1,267 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbAnalysisManager.cc for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#include "G4Timer.hh"
#include "globals.hh"
#include "fstream"
#include <ctype.h>
#include "G4ios.hh"
#include "G4Run.hh"
#include "G4Event.hh"
#include "G4Track.hh"
#include "G4VVisManager.hh"
#include "G4TrajectoryContainer.hh"
#include "G4Trajectory.hh"
#include "G4SteppingManager.hh"
#include "G4SDManager.hh"
#include "G4HCofThisEvent.hh"
#include "RichTbHit.hh"
#include "RichTbRunConfig.hh"
#include "RichTbAnalysisMessenger.hh"
#ifdef G4ANALYSIS_USE
#include "RichTbAnalysisManager.hh"
#include "AIDA/AIDA.h"
RichTbAnalysisManager* RichTbAnalysisManager::instance = 0;
RichTbAnalysisManager::RichTbAnalysisManager()
:outputFileName("rich.his"), analysisFactory(0),tree(0),histogramFactory(0)
{
iTimer = new G4Timer;
NumPhotBeforeAerogel=0;
NumPhotBeforeMirror=0;
NumPhotAfterMirror=0;
NumPhotBeforeFilter=0;
NumPhotAfterFilter=0;
NumPhotAtHpd1Input=0;
NumPhotAtHpd2Input=0;
NumPhotAtHpd3Input=0;
NumPhotAtHpd4Input=0;
NumHitTotInHpd1=0;
NumHitTotInHpd2=0;
NumHitTotInHpd3=0;
NumHitTotInHpd4=0;
NumHitInSi=0;
analisysMessenger = new RichTbAnalysisMessenger(this);
// Hooking an AIDA compliant analysis system.
analysisFactory = AIDA_createAnalysisFactory();
if(analysisFactory) {
AIDA::ITreeFactory* treeFactory = analysisFactory->createTreeFactory();
if(treeFactory) {
tree = treeFactory->create(outputFileName,"hbook",false,true);
delete treeFactory; // Will not delete the ITree.
histogramFactory = analysisFactory->createHistogramFactory(*tree);
}
}
}
RichTbAnalysisManager::~RichTbAnalysisManager(){
delete histogramFactory;
histogramFactory = 0;
delete analysisFactory;
analysisFactory = 0;
delete instance;
}
RichTbAnalysisManager* RichTbAnalysisManager::getInstance()
{
if(instance==0) {instance = new RichTbAnalysisManager;}
return instance;
}
void RichTbAnalysisManager::book()
{
fhistoNrPhotG = histogramFactory->createHistogram1D("1","Number of Photon Hits per Track",120,0.,20.);
fhistoNBeforeMirror = histogramFactory->createHistogram1D("2","Number of Photons before Mirror",100,0.,750.);
fhistoWBeforeMirror = histogramFactory->createHistogram1D("3","WaveLength of Photons before Mirror",100,200.,800.);
fhistoWAfterMirror = histogramFactory->createHistogram1D("4","WaveLength of Photons after Mirror",100,200.,800.);
fhistoCkvProdSmall = histogramFactory->createHistogram1D("9","Cherekov Angle at roduction all angles",500,0.,0.5);
fhistoEmisZ = histogramFactory->createHistogram1D("10","Z of the Photon Emission Point",120,0.,600.);
fhistoCkvRadius = histogramFactory->createHistogram1D("5","Cherenkov Ring Radius",300,80.,220.);
}
void RichTbAnalysisManager::finish()
{
if(tree){
tree->commit(); //Write histos and ntuples in file
tree->close();
}
}
void RichTbAnalysisManager::BeginOfEventAnalysis(const G4Event* evt){
//RichCollId is already defined in LHCbRichSimEventAction.cc
// Hence its extraction is not repeated here.
iTimer->Start();
NumPhotBeforeAerogel=0;
NumPhotBeforeMirror=0;
NumPhotAfterMirror=0;
NumPhotBeforeFilter=0;
NumPhotAfterFilter=0;
NumPhotAtHpd1Input=0;
NumPhotAtHpd2Input=0;
NumPhotAtHpd3Input=0;
NumPhotAtHpd4Input=0;
NumHitTotInHpd1=0;
NumHitTotInHpd2=0;
NumHitTotInHpd3=0;
NumHitTotInHpd4=0;
NumHitInSi=0;
}
void RichTbAnalysisManager::EndOfEventAnalysis(const G4Event* evt){
iTimer->Stop();
G4double TimeforThisEvent= iTimer->GetRealElapsed();
G4SDManager * SDman = G4SDManager::GetSDMpointer();
G4String colNam;
G4int RichTbCollID = SDman->GetCollectionID(colNam="RichTbHitsCollection");
G4int RichTbc = RichTbCollID;
G4int evtNb = evt->GetEventID();
if(RichTbc<0) return;
G4HCofThisEvent * HCE = evt->GetHCofThisEvent();
RichTbHitsCollection* RHC =
HCE ? (RichTbHitsCollection*)(HCE->GetHC(RichTbc)) : 0;
if(RHC)
{
int n_hit = RHC->entries();
G4cout << " " << n_hit
<< " hits are stored in RichTbHitsCollection in event "<<evtNb<< G4endl;
//fill the final number of hits in this event into a histogram
fhistoNrPhotG->fill(n_hit*1.0);
//To print and plot the number of hits per each HPD.
for (G4int iha=0; iha<n_hit; iha++ ) {
RichTbHit* aHit = (*RHC)[iha];
G4int CurHpdnum = aHit -> GetCurHpdNum();
if(CurHpdnum == 0 ) {
NumHitTotInHpd1++;
}else if (CurHpdnum == 1 ) {
NumHitTotInHpd2++;
}else if (CurHpdnum == 2 ) {
NumHitTotInHpd3++;
}else if (CurHpdnum == 3 ) {
NumHitTotInHpd4++;
}
}
//fill the number of photons before mirror into a histogram
fhistoNBeforeMirror->fill(NumPhotBeforeMirror);
G4cout<<"NumPhot before mirror "<<NumPhotBeforeMirror<<G4endl;
G4cout<<"NumPhot after mirror "<<NumPhotAfterMirror<<G4endl;
G4cout<<"NumPhot incident on Hpd 1 2 3 4 = "<< NumPhotAtHpd1Input
<<" "<< NumPhotAtHpd2Input<<" "<< NumPhotAtHpd3Input
<<" "<< NumPhotAtHpd4Input<<G4endl;
G4cout<<"Number of Si hits in Hpd 1 2 3 4 are "<<NumHitTotInHpd1
<<" "<<NumHitTotInHpd2<<" "<<NumHitTotInHpd3
<<" "<<NumHitTotInHpd4<<G4endl;
}
}
//void RichTbAnalysisManager::StepAnalysis(
// const G4SteppingManager* aSteppingManager ){
//}
void RichTbAnalysisManager::setMeanHXCoord(G4double cx ) {
G4double hcurx = NumHXCoord+1.0;
if(hcurx != 0.0 ) {
G4double Mhx = MeanHXCoord * (NumHXCoord / hcurx) + cx/hcurx ;
MeanHXCoord = Mhx;
NumHXCoord = hcurx;
}else { G4cout<< "Zero hcurx in setMeanHXCoord "<<G4endl; }
}
void RichTbAnalysisManager::setMeanHYCoord(G4double cy ) {
G4double hcury = NumHYCoord+1.0;
if(hcury != 0.0 ) {
G4double Mhy = MeanHYCoord * (NumHYCoord / hcury) + cy/hcury ;
MeanHYCoord = Mhy;
NumHYCoord = hcury;
}else { G4cout<< "Zero hcury in setMeanHYCoord "<<G4endl; }
}
void RichTbAnalysisManager::SetOutputFileName(G4String newName)
{
outputFileName = newName;
}
#endif
@@ -0,0 +1,78 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// RichTbAnalysisMessenger.cc for Rich of LHCb
// Advanced example of Geant4
// Author: Patricia Mendez (patricia.mendez@cern.ch)
//
// History:
// -----------
// Patricia Mendez Created
//--------------------------------------------------------------------------
#ifdef G4ANALYSIS_USE
#include "RichTbAnalysisMessenger.hh"
#include "RichTbAnalysisManager.hh"
#include "G4UIdirectory.hh"
#include "G4UIcmdWithAString.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
RichTbAnalysisMessenger::RichTbAnalysisMessenger(RichTbAnalysisManager* analysisManager)
:richAnalysis(analysisManager)
{
RichTbAnalysisDir = new G4UIdirectory("/analysis/");
RichTbAnalysisDir->SetGuidance("analysis control.");
ouputFileCommand = new G4UIcmdWithAString("/analysis/outputFile",this);
ouputFileCommand->SetGuidance("specify the name of the output file (lowercase for Hbook)");
ouputFileCommand->SetGuidance("default: rich.hbk");
ouputFileCommand->SetParameterName("choice",true);
ouputFileCommand->SetDefaultValue("rich.his");
ouputFileCommand->AvailableForStates(G4State_Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
RichTbAnalysisMessenger::~RichTbAnalysisMessenger()
{
delete RichTbAnalysisDir;
}
#endif
@@ -0,0 +1,382 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbComponent.cc for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#include <iostream.h>
#include "globals.hh"
#include "RichTbDetectorConstruction.hh"
#include "RichTbGeometryParameters.hh"
#include "RichTbMaterialParameters.hh"
#include "FilterTypeSpec.hh"
#include "RichTbComponent.hh"
#include "G4Box.hh"
#include "G4Tubs.hh"
#include "G4Sphere.hh"
#include "G4LogicalVolume.hh"
#include "G4VPhysicalVolume.hh"
#include "G4PVPlacement.hh"
#include "G4RotationMatrix.hh"
#include "G4ThreeVector.hh"
#include "G4Transform3D.hh"
#include "G4LogicalBorderSurface.hh"
#include "G4Material.hh"
#include "G4SubtractionSolid.hh"
RichTbComponent::RichTbComponent(){ ; }
RichTbComponent::RichTbComponent(RichTbMaterial* RMaterial,
RichTbHall* RTbHall , RichTbRunConfig* RConfig,
G4bool ConstructTrackingSwitch):
RichTbAgelLVol(vector<G4LogicalVolume*>(MaxNumberOfAerogelTiles)),
RichTbAgelPVol(vector<G4VPhysicalVolume*>(MaxNumberOfAerogelTiles)),
RichTbAgelWrapTopLVol(vector<G4LogicalVolume*>(MaxNumberOfAerogelTiles)),
RichTbAgelWrapTopPVol(vector<G4VPhysicalVolume*>(MaxNumberOfAerogelTiles)),
RichTbAgelWrapBotLVol(vector<G4LogicalVolume*>(MaxNumberOfAerogelTiles)),
RichTbAgelWrapBotPVol(vector<G4VPhysicalVolume*>(MaxNumberOfAerogelTiles))
{
ConstructTrackingGeometrySwitch=ConstructTrackingSwitch;
//First define the shapes.
//Components of the Vessel.
G4Tubs * VesselEnclosure
= new G4Tubs("VesselEnclosure",VesselInnerRad,VesselOuterRad,
VesselHalfZ,VesselStartPhi,VesselDelPhi);
G4RotationMatrix VesselBRot;
G4ThreeVector VesselBTrsl(VesselPosX,VesselPosY,VesselPosZ);
G4Transform3D VesselBTransform(VesselBRot,VesselBTrsl);
G4LogicalVolume* VesselEnclosureLog=
new G4LogicalVolume(VesselEnclosure, RMaterial->getNitrogenGas(),
"VesselEnclosure",0,0,0);
G4VPhysicalVolume* VesselEnclosurePhys=
new G4PVPlacement(VesselBTransform,"VesselEnclosure",
VesselEnclosureLog,
RTbHall->getRichTbHallPhysicalVolume(),
false,0);
//
//
if(ConstructTrackingSwitch){
G4int NAgelTiles=RConfig-> GetNumberOfAerogelTiles();
G4Box * RadFrame
= new G4Box("RadFrame",RadFrameHalfX,RadFrameHalfY,RadFrameHalfZ);
G4Box * RadHoldUps
= new G4Box("RadHoldUps",RadHoldUpHalfX,RadHoldUpHalfY,RadHoldUpHalfZ);
G4Tubs * RadHoldUpWin
= new G4Tubs("RadHoldUpWin", RadWinUpInnerRad, RadWinUpOuterRad,
RadWinUpHalfZ,RadWinUpStartPhi,RadWinUpDelPhi);
G4Box * RadHoldDns
= new G4Box("RadHoldDns",RadHoldDnHalfX,RadHoldDnHalfY,RadHoldDnHalfZ);
G4Tubs * RadHoldDnWin
= new G4Tubs("RadHoldDnWin", RadWinDnInnerRad, RadWinDnOuterRad,
RadWinDnHalfZ,RadWinDnStartPhi,RadWinDnDelPhi);
G4int FilterNum = RConfig->GetFilterTNumber();
G4Box * FilterBox;
if(FilterNum >= 0 ) {
G4double FilterHalfZ= FilterHalfZArray[FilterNum];
FilterBox
= new G4Box("FilterBox", FilterHalfX,FilterHalfY,FilterHalfZ);
}
//Mirror
G4double MirrThetaSize=2.0*asin(MirrorHorizontalChord/(MirrorRInner*2.0));
G4double MirrThetaStart=halfpi*rad-MirrThetaSize/2.0;
G4double MirrPhiSize=2.0*asin(MirrorVerticalChord/(MirrorRInner*2.0));
G4double MirrPhiStart=-MirrPhiSize/2.0;
G4Sphere* MirrorSphe= new G4Sphere("MirrorSphe",MirrorRInner,
MirrorROuter,MirrPhiStart,
MirrPhiSize,MirrThetaStart,
MirrThetaSize);
//Now for the rotations and translations..
G4RotationMatrix RadFrameRot;
G4RotationMatrix RadWinUpRot,RadWinDnRot,RadHoldUpRot,RadHoldDnRot;
G4ThreeVector RadFrameTrsl(RadFramePosX,RadFramePosY,RadFramePosZ);
G4Transform3D RadFrameTransform(RadFrameRot,RadFrameTrsl);
//
//
G4ThreeVector RadWinUpTrsl(RadWinUpShiftX,RadWinUpShiftY,RadWinUpShiftZ);
G4Transform3D RadWinUpTransform(RadWinUpRot,RadWinUpTrsl);
G4ThreeVector RadHoldUpTrsl(RadHoldUpPosX,RadHoldUpPosY,RadHoldUpPosZ);
G4Transform3D RadHoldUpTransform(RadHoldUpRot,RadHoldUpTrsl);
//
G4ThreeVector RadWinDnTrsl(RadWinDnShiftX,RadWinDnShiftY,RadWinDnShiftZ);
G4Transform3D RadWinDnTransform(RadWinDnRot,RadWinDnTrsl);
G4ThreeVector RadHoldDnTrsl(RadHoldDnPosX,RadHoldDnPosY,RadHoldDnPosZ);
G4Transform3D RadHoldDnTransform(RadHoldDnRot,RadHoldDnTrsl);
//
//
//
G4RotationMatrix MirrorRotationX, MirrorRotationY;
G4double MirrorExtraTiltX = RConfig->getMirrorAddTiltX();
G4double MirrorExtraTiltY = RConfig->getMirrorAddTiltY();
G4double MirrorTotRotX= MirrorNominalRotX+MirrorExtraTiltX;
G4double MirrorTotRotY= MirrorNominalRotY+MirrorExtraTiltY;
G4double MirrorPosX, MirrorPosY, MirrorPosZ;
if( MirrorTotRotX !=0.0 || MirrorTotRotY != 0.0 ) {
MirrorPosX =-VesselPosX-MirrorRInner*sin(MirrorTotRotY);
MirrorPosY =-VesselPosY+MirrorRInner*sin(MirrorTotRotX);
MirrorPosZ =MirrorShiftFromEnd-VesselHalfZ
-MirrorRInner*(cos(MirrorTotRotY)+cos(MirrorTotRotX)-1.0);
}else {
MirrorPosX =-VesselPosX;
MirrorPosY =-VesselPosY;
MirrorPosZ =MirrorNominalPosZ;
}
G4ThreeVector MirrorPos(MirrorPosX,MirrorPosY,MirrorPosZ);
if (MirrorTotRotX != 0.0 ) {
MirrorRotationX.rotateX(MirrorTotRotX);
}
MirrorRotationY.rotateY(-halfpi*rad+MirrorTotRotY);
G4Transform3D MirrorTransform(MirrorRotationX*MirrorRotationY,MirrorPos);
//
G4LogicalBorderSurface* VesselOuterSurface =
new G4LogicalBorderSurface("VesselOuterSurface",
RTbHall->getRichTbHallPhysicalVolume(),
VesselEnclosurePhys,
RMaterial->getOpticalEnclosureSurface());
G4LogicalBorderSurface* VesselInnerSurface =
new G4LogicalBorderSurface("VesselInnerSurface",
VesselEnclosurePhys,
RTbHall->getRichTbHallPhysicalVolume(),
RMaterial->getOpticalEnclosureSurface());
RichTbEnclosureOuterBSurf=VesselOuterSurface;
RichTbEnclosureInnerBSurf=VesselInnerSurface;
G4LogicalVolume* RadFrameLog=
new G4LogicalVolume(RadFrame,RMaterial->getNitrogenGas(),
"RadFrame",0,0,0);
G4VPhysicalVolume* RadFramePhys=
new G4PVPlacement(RadFrameTransform,"RadFrame",RadFrameLog,
VesselEnclosurePhys,false,0);
//Now for the holder upstream and downstream of the Aerogel Tiles.
G4SubtractionSolid* RadUpW =
new G4SubtractionSolid("RadUpW",RadHoldUps,RadHoldUpWin,
RadWinUpTransform);
G4LogicalVolume* RadUpWLog=
new G4LogicalVolume(RadUpW,RMaterial->getPlasticAg(),
"RadUpW",0,0,0);
G4VPhysicalVolume* RadUpWPhys=
new G4PVPlacement( RadHoldUpTransform,"RadUpW",RadUpWLog,
RadFramePhys ,false,0);
//
G4SubtractionSolid* RadDnW =
new G4SubtractionSolid("RadDnW",RadHoldDns,RadHoldDnWin,
RadWinDnTransform);
G4LogicalVolume* RadDnWLog=
new G4LogicalVolume(RadDnW,RMaterial->getAluminium(),
"RadDnW",0,0,0);
G4VPhysicalVolume* RadDnWPhys=
new G4PVPlacement( RadHoldDnTransform,"RadDnW",RadDnWLog,
RadFramePhys ,false,0);
//Now for the various aerogel tiles and the wraps above and
//below them
NumAerogelTiles= NAgelTiles;
G4RotationMatrix AgelRot,AgelWrapTopRot,AgelWrapBotRot;
G4double AgelPosSZ[MaxNumberOfAerogelTiles];
G4double AgelPosCurZ[MaxNumberOfAerogelTiles];
for(G4int agNum=0; agNum<NAgelTiles; agNum++ ){
G4int agTnumber= RConfig->GetCurAerogelTNumber(agNum);
G4Box* Agel = new G4Box("Agel", AgelHalfX[agTnumber],
AgelHalfY[agTnumber],AgelHalfZ[agTnumber]);
AgelPosSZ[agNum]=AgelHalfZ[agTnumber];
AgelPosCurZ[agNum]=AgelEndZ-AgelHalfZ[agTnumber];
for(G4int agt=0; agt<agNum; agt++ ) {
AgelPosCurZ[agNum] -= (2*AgelPosSZ[agt]+ AgelTileGapZ);
}
G4ThreeVector AgelTrsl(AgelPosX[agNum],
AgelPosY[agNum],AgelPosCurZ[agNum]);
G4Transform3D AgelTransform(AgelRot,AgelTrsl);
G4Material* CurAgelMaterial= RMaterial->getAerogelMaterial(agTnumber);
G4LogicalVolume* AgelLog=
new G4LogicalVolume(Agel,CurAgelMaterial,"Agel",0,0,0);
G4VPhysicalVolume* AgelPhys=
new G4PVPlacement(AgelTransform,"Agel",AgelLog,
RadFramePhys,false,agNum);
RichTbAgelLVol[agNum] = AgelLog;
RichTbAgelPVol[agNum] = AgelPhys;
G4Box* AgelWrapTop = new G4Box("AgelWrapTop", AgelWrapTopHalfX[agTnumber],
AgelWrapTopHalfY[agTnumber],
AgelWrapTopHalfZ[agTnumber]);
G4Box* AgelWrapBot = new G4Box("AgelWrapBot", AgelWrapBotHalfX[agTnumber],
AgelWrapBotHalfY[agTnumber],
AgelWrapBotHalfZ[agTnumber]);
G4double AgelWrapTopPosCurZ=AgelPosCurZ[agNum];
G4double AgelWrapBotPosCurZ=AgelPosCurZ[agNum];
G4double AgelWrapTopPosCurY=AgelHalfY[agTnumber]+
AgelWrapTopHalfY[agTnumber];
G4double AgelWrapBotPosCurY=-AgelHalfY[agTnumber]+
-AgelWrapBotHalfY[agTnumber];
G4ThreeVector AgelWrapTopTrsl(AgelWrapTopPosX[agNum],
AgelWrapTopPosCurY,AgelWrapTopPosCurZ);
G4Transform3D AgelWrapTopTransform(AgelWrapTopRot,AgelWrapTopTrsl);
G4ThreeVector AgelWrapBotTrsl(AgelWrapBotPosX[agNum],
AgelWrapBotPosCurY,AgelWrapBotPosCurZ);
G4Transform3D AgelWrapBotTransform(AgelWrapBotRot,AgelWrapBotTrsl);
G4LogicalVolume* AgelWrapTopLog=
new G4LogicalVolume(AgelWrapTop, RMaterial->getPlasticAg(),
"AgelWrapTop",0,0,0);
G4LogicalVolume* AgelWrapBotLog=
new G4LogicalVolume(AgelWrapBot, RMaterial->getPlasticAg(),
"AgelWrapBot",0,0,0);
G4VPhysicalVolume* AgelWrapTopPhys=
new G4PVPlacement(AgelWrapTopTransform,"AgelWrapTop",
AgelWrapTopLog,RadFramePhys,false,agNum);
G4VPhysicalVolume* AgelWrapBotPhys=
new G4PVPlacement(AgelWrapBotTransform,"AgelWrapBot",
AgelWrapBotLog,RadFramePhys,false,agNum);
RichTbAgelWrapTopLVol[agNum] = AgelWrapTopLog;
RichTbAgelWrapTopPVol[agNum] = AgelWrapTopPhys;
RichTbAgelWrapBotLVol[agNum] = AgelWrapBotLog;
RichTbAgelWrapBotPVol[agNum] = AgelWrapBotPhys;
}
// FilterType CurFil= RConfig->GetFilterType();
G4int Filnum= RConfig->GetFilterTNumber() ;
G4LogicalVolume* FilterLog;
G4VPhysicalVolume* FilterPhys;
if(Filnum >= 0 ) {
G4double FilterHalfZCur= FilterHalfZArray[Filnum];
G4double FilterPosZ= FilterPosZNominal-FilterHalfZNominal+FilterHalfZCur;
G4RotationMatrix FilterRot;
G4ThreeVector FilterTrsl(FilterPosX,FilterPosY,FilterPosZ);
G4Transform3D FilterTransform(FilterRot,FilterTrsl);
G4Material* CurFilterMaterial
= RMaterial-> getRichTbFilterMaterial( Filnum);
FilterLog=
new G4LogicalVolume(FilterBox, CurFilterMaterial,
"FilterBox",0,0,0);
FilterPhys=
new G4PVPlacement(FilterTransform,"FilterBox",FilterLog,
RadFramePhys,false,0);
G4LogicalBorderSurface* FilterInnerSurface =
new G4LogicalBorderSurface("RichTbFilterInnerSurface",
FilterPhys,VesselEnclosurePhys,
RMaterial->getOpticalFilterSurface());
G4LogicalBorderSurface* FilterOuterSurface =
new G4LogicalBorderSurface("RichTbFilterOuterSurface",
VesselEnclosurePhys,FilterPhys,
RMaterial->getOpticalFilterSurface());
}
G4LogicalVolume* MirrorLog=
new G4LogicalVolume(MirrorSphe,RMaterial->getMirrorQuartz(),
"MirrorSphe",0,0,0);
G4VPhysicalVolume* MirrorPhys=
new G4PVPlacement(MirrorTransform,"MirrorSphe",MirrorLog,
VesselEnclosurePhys,false,0);
G4LogicalBorderSurface* MirrorSurface =
new G4LogicalBorderSurface("RichTbMirrorSurface",
VesselEnclosurePhys,MirrorPhys,
RMaterial->getOpticalMirrorSurface());
RichTbRadFrameLVol= RadFrameLog;
RichTbRadFramePVol= RadFramePhys;
RichTbRadUpWLVol= RadUpWLog;
RichTbRadUpWPVol= RadUpWPhys;
RichTbRadDnWLVol= RadDnWLog;
RichTbRadDnWPVol= RadDnWPhys;
if(Filnum >= 0 ) {
RichTbFilterLVol = FilterLog;
RichTbFilterPVol = FilterPhys;
}
RichTbMirrorLVol=MirrorLog;
RichTbMirrorPVol=MirrorPhys;
RichTbMirrorBSurf=MirrorSurface;
}
RichTbEnclosureLVol=VesselEnclosureLog;
RichTbEnclosurePVol=VesselEnclosurePhys;
}
RichTbComponent::~RichTbComponent() {; }
@@ -0,0 +1,117 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbDetectorConstruction.cc for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#include <iostream.h>
#include "RichTbMaterialParameters.hh"
#include "RichTbGeometryParameters.hh"
#include "RichTbDetectorConstruction.hh"
#include "RichTbHall.hh"
#include "RichTbMaterial.hh"
#include "G4Box.hh"
#include "G4ThreeVector.hh"
#include "G4LogicalVolume.hh"
#include "G4VPhysicalVolume.hh"
#include "G4PVPlacement.hh"
#include "G4SDManager.hh"
#include "RichTbSD.hh"
RichTbDetectorConstruction::RichTbDetectorConstruction(){; }
RichTbDetectorConstruction::RichTbDetectorConstruction(RichTbRunConfig* RConfig){
runConfiguration=RConfig;
}
RichTbDetectorConstruction::~RichTbDetectorConstruction(){;}
G4VPhysicalVolume* RichTbDetectorConstruction::Construct(){
RichTbRunConfig* rConfig= runConfiguration;
InitializeRichTbMaterial();
HistoRichTbMaterialProperties(rConfig);
rMaterial = new RichTbMaterial(rConfig);
InitializeRichTbGeometry();
rTbHall = new RichTbHall(rMaterial);
rTbComponent = new RichTbComponent(rMaterial,rTbHall,rConfig,true);
rTbPhotoDetector = new RichTbPhotoDetector(rMaterial,rTbComponent,rConfig,true);
//Now for the sensitive Detector
G4SDManager* SDman = G4SDManager::GetSDMpointer();
G4String HpdSDname = "RichTbSD";
G4String RichTbHColname="RichTbHitsCollection";
RichTbSD* HpdSD = new RichTbSD( HpdSDname,
NumberOfHpds,NumberOfSiDetSectors,
NumberOfPadHpdSiPixels,
RichTbHColname );
G4String ROgeometryName = "RichTbROGeom";
rTbROGeom = new RichTbROGeometry(ROgeometryName,rMaterial, rConfig);
rTbROGeom -> BuildROGeometry();
HpdSD ->SetROgeometry( rTbROGeom);
SDman->AddNewDetector( HpdSD );
G4int NumHpd = NumberOfHpds;
for (G4int ihpd=0 ; ihpd < NumHpd ; ihpd++ ) {
G4int NumSiSect=rTbPhotoDetector-> getRichHPD(ihpd) ->
getNumSectInHpd();
for (G4int isec=0; isec < NumSiSect; isec++) {
G4LogicalVolume* RichTbSiDetSect_LV =rTbPhotoDetector ->
getRichHPD(ihpd)-> getRichHpdSiDetSect(isec)->
getHpdSiSectLogicalVolume();
RichTbSiDetSect_LV->SetSensitiveDetector( HpdSD );
}
}
rTbGraphics = new RichTbGraphics(rTbHall,rTbComponent,
rTbPhotoDetector,rTbROGeom, rConfig );
return rTbHall->getRichTbHallPhysicalVolume();
}
@@ -0,0 +1,189 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbEventAction.cc for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#include "RichTbEventAction.hh"
#include "G4Event.hh"
#include "G4EventManager.hh"
#include "G4TrajectoryContainer.hh"
#include "G4Trajectory.hh"
#include "G4HCofThisEvent.hh"
#include "G4VHitsCollection.hh"
#include "G4SDManager.hh"
#include "G4VVisManager.hh"
#include "RichTbVisManager.hh"
#include "G4UImanager.hh"
#include "G4ios.hh"
#include "RichTbSD.hh"
#include "RichTbHit.hh"
#include "RichTbRunConfig.hh"
#include "RichTbAnalysisManager.hh"
#include "RichTbIOData.hh"
RichTbEventAction::RichTbEventAction(){
RichTbCollID = -1;
}
RichTbEventAction::RichTbEventAction(RichTbRunConfig* RConfig,
RichTbVisManager* RVisManager, RichTbIOData* RIOData){
RichTbCollID = -1;
runConfiguration=RConfig;
pVisManager=RVisManager;
rTbIOData = RIOData;
}
RichTbEventAction::~RichTbEventAction(){
}
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){
RichTbRunConfig* RConfig = runConfiguration;
// first get the trajectories
G4TrajectoryContainer* trajectoryContainer=evt->GetTrajectoryContainer();
G4int n_trajectories=0;
G4int totalhits = 0;
if(trajectoryContainer){n_trajectories=trajectoryContainer->entries();
G4cout << " " << n_trajectories
<< " Tracks are stored in Trajectorycontainer." << G4endl;
}
// Now get the hits
if(RichTbCollID<0) return;
G4HCofThisEvent * HCE = evt->GetHCofThisEvent();
RichTbHitsCollection* RHC = 0;
G4int n_hit = 0;
if(HCE)
{
RHC = (RichTbHitsCollection*)(HCE->GetHC(RichTbCollID));
}
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();
}
}
//now for the hits.
if(RHC) {
G4int n_hith = RHC->entries();
for (G4int ih=0; ih<n_hith; ih++ ) {
RichTbHit* aHit = (*RHC)[ih];
aHit->DrawWithVisM(pVisManager);
}
}
//Now to Fill the Histograms
#ifdef G4ANALYSIS_USE
RichTbAnalysisManager * analysis = RichTbAnalysisManager::getInstance();
analysis->EndOfEventAnalysis(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;
}
}
@@ -0,0 +1,427 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbAnalysisManager.cc for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#include "globals.hh"
#include "RichTbGeometryParameters.hh"
G4double GetCurAerogelLength(G4int Aerognum ) {
return 2.0*AgelHalfZ[Aerognum];
}
RichTbPadHpdSiPixPos::RichTbPadHpdSiPixPos(G4int ipixelnum) {
//coord system such that Origin at the top of a sector;
// which is near the center of the anode.
//The X is along the bottom and Y goes radially outward (from top to
// bottom).
icurpixel=ipixelnum;
PadHpdSiPixPosX=PixColNumSect[ipixelnum]*XsizePix;
if(ipixelnum == BigPixelNum ) {
PadHpdSiPixPosY=PixRowNumSect[ipixelnum]*YsizePix+RowInitPointBigPixel;
}else {
PadHpdSiPixPosY=PixRowNumSect[ipixelnum]*YsizePix+RowInitPoint;
}
}
RichTbPadHpdSiPixPos::~RichTbPadHpdSiPixPos(){ ; }
void InitializeRichTbGeometry(){
PixRowNumSect[59-1]=0.0;
PixRowNumSect[70-1]=1.0;
PixRowNumSect[60-1]=2.0;
PixRowNumSect[82-1]=3.0;
PixRowNumSect[47-1]=3.0;
PixRowNumSect[81-1]=4.0;
PixRowNumSect[48-1]=4.0;
PixRowNumSect[91-1]=5.0;
PixRowNumSect[69-1]=5.0;
PixRowNumSect[38-1]=5.0;
PixRowNumSect[101-1]=6.0;
PixRowNumSect[80-1]=6.0;
PixRowNumSect[49-1]=6.0;
PixRowNumSect[28-1]=6.0;
PixRowNumSect[100-1]=7.0;
PixRowNumSect[79-1]=7.0;
PixRowNumSect[50-1]=7.0;
PixRowNumSect[29-1]=7.0;
PixRowNumSect[99-1]=8.0;
PixRowNumSect[78-1]=8.0;
PixRowNumSect[51-1]=8.0;
PixRowNumSect[30-1]=8.0;
PixRowNumSect[109-1]=9.0;
PixRowNumSect[90-1]=9.0;
PixRowNumSect[61-1]=9.0;
PixRowNumSect[39-1]=9.0;
PixRowNumSect[20-1]=9.0;
PixRowNumSect[108-1]=10.0;
PixRowNumSect[89-1]=10.0;
PixRowNumSect[68-1]=10.0;
PixRowNumSect[40-1]=10.0;
PixRowNumSect[21-1]=10.0;
PixRowNumSect[107-1]=11.0;
PixRowNumSect[88-1]=11.0;
PixRowNumSect[62-1]=11.0;
PixRowNumSect[41-1]=11.0;
PixRowNumSect[22-1]=11.0;
PixRowNumSect[116-1]=12.0;
PixRowNumSect[98-1]=12.0;
PixRowNumSect[77-1]=12.0;
PixRowNumSect[52-1]=12.0;
PixRowNumSect[31-1]=12.0;
PixRowNumSect[13-1]=12.0;
PixRowNumSect[115-1]=13.0;
PixRowNumSect[97-1]=13.0;
PixRowNumSect[76-1]=13.0;
PixRowNumSect[53-1]=13.0;
PixRowNumSect[32-1]=13.0;
PixRowNumSect[14-1]=13.0;
PixRowNumSect[114-1]=14.0;
PixRowNumSect[96-1]=14.0;
PixRowNumSect[75-1]=14.0;
PixRowNumSect[54-1]=14.0;
PixRowNumSect[33-1]=14.0;
PixRowNumSect[15-1]=14.0;
PixRowNumSect[121-1]=15.0;
PixRowNumSect[106-1]=15.0;
PixRowNumSect[87-1]=15.0;
PixRowNumSect[67-1]=15.0;
PixRowNumSect[42-1]=15.0;
PixRowNumSect[23-1]=15.0;
PixRowNumSect[8-1]=15.0;
PixRowNumSect[120-1]=16.0;
PixRowNumSect[105-1]=16.0;
PixRowNumSect[86-1]=16.0;
PixRowNumSect[63-1]=16.0;
PixRowNumSect[43-1]=16.0;
PixRowNumSect[24-1]=16.0;
PixRowNumSect[9-1]=16.0;
PixRowNumSect[119-1]=17.0;
PixRowNumSect[104-1]=17.0;
PixRowNumSect[85-1]=17.0;
PixRowNumSect[66-1]=17.0;
PixRowNumSect[44-1]=17.0;
PixRowNumSect[25-1]=17.0;
PixRowNumSect[10-1]=17.0;
PixRowNumSect[125-1]=18.0;
PixRowNumSect[113-1]=18.0;
PixRowNumSect[95-1]=18.0;
PixRowNumSect[74-1]=18.0;
PixRowNumSect[55-1]=18.0;
PixRowNumSect[34-1]=18.0;
PixRowNumSect[16-1]=18.0;
PixRowNumSect[4-1]=18.0;
PixRowNumSect[124-1]=19.0;
PixRowNumSect[112-1]=19.0;
PixRowNumSect[94-1]=19.0;
PixRowNumSect[73-1]=19.0;
PixRowNumSect[56-1]=19.0;
PixRowNumSect[35-1]=19.0;
PixRowNumSect[17-1]=19.0;
PixRowNumSect[5-1]=19.0;
PixRowNumSect[123-1]=20.0;
PixRowNumSect[111-1]=20.0;
PixRowNumSect[93-1]=20.0;
PixRowNumSect[72-1]=20.0;
PixRowNumSect[57-1]=20.0;
PixRowNumSect[36-1]=20.0;
PixRowNumSect[18-1]=20.0;
PixRowNumSect[6-1]=20.0;
PixRowNumSect[127-1]=21.0;
PixRowNumSect[118-1]=21.0;
PixRowNumSect[103-1]=21.0;
PixRowNumSect[84-1]=21.0;
PixRowNumSect[65-1]=21.0;
PixRowNumSect[45-1]=21.0;
PixRowNumSect[26-1]=21.0;
PixRowNumSect[11-1]=21.0;
PixRowNumSect[2-1]=21.0;
PixRowNumSect[126-1]=22.0;
PixRowNumSect[117-1]=22.0;
PixRowNumSect[102-1]=22.0;
PixRowNumSect[83-1]=22.0;
PixRowNumSect[64-1]=22.0;
PixRowNumSect[46-1]=22.0;
PixRowNumSect[27-1]=22.0;
PixRowNumSect[12-1]=22.0;
PixRowNumSect[3-1]=22.0;
PixRowNumSect[128-1]=23.0;
PixRowNumSect[122-1]=23.0;
PixRowNumSect[110-1]=23.0;
PixRowNumSect[92-1]=23.0;
PixRowNumSect[71-1]=23.0;
PixRowNumSect[58-1]=23.0;
PixRowNumSect[37-1]=23.0;
PixRowNumSect[19-1]=23.0;
PixRowNumSect[7-1]=23.0;
PixRowNumSect[1-1]=23.0;
PixColNumSect[59-1]=0.0;
PixColNumSect[70-1]=0.0;
PixColNumSect[60-1]=0.0;
PixColNumSect[82-1]=-0.5;
PixColNumSect[47-1]=0.5;
PixColNumSect[81-1]=-0.5;
PixColNumSect[48-1]=0.5;
PixColNumSect[91-1]=-1.0;
PixColNumSect[69-1]=0.0;
PixColNumSect[38-1]=1.0;
PixColNumSect[101-1]=-1.5;
PixColNumSect[80-1]=-0.5;
PixColNumSect[49-1]=0.5;
PixColNumSect[28-1]=1.5;
PixColNumSect[100-1]=-1.5;
PixColNumSect[79-1]=-0.5;
PixColNumSect[50-1]=0.5;
PixColNumSect[29-1]=1.5;
PixColNumSect[99-1]=-1.5;
PixColNumSect[78-1]=-0.5;
PixColNumSect[51-1]=0.5;
PixColNumSect[30-1]=1.5;
PixColNumSect[109-1]=-2.0;
PixColNumSect[90-1]=-1.0;
PixColNumSect[61-1]=0.0;
PixColNumSect[39-1]=1.0;
PixColNumSect[20-1]=2.0;
PixColNumSect[108-1]=-2.0;
PixColNumSect[89-1]=-1.0;
PixColNumSect[68-1]=0.0;
PixColNumSect[40-1]=1.0;
PixColNumSect[21-1]=2.0;
PixColNumSect[107-1]=-2.0;
PixColNumSect[88-1]=-1.0;
PixColNumSect[62-1]=0.0;
PixColNumSect[41-1]=1.0;
PixColNumSect[22-1]=2.0;
PixColNumSect[116-1]=-2.5;
PixColNumSect[98-1]=-1.5;
PixColNumSect[77-1]=-0.5;
PixColNumSect[52-1]=0.5;
PixColNumSect[31-1]=1.5;
PixColNumSect[13-1]=2.5;
PixColNumSect[115-1]=-2.5;
PixColNumSect[97-1]=-1.5;
PixColNumSect[76-1]=-0.5;
PixColNumSect[53-1]=0.5;
PixColNumSect[32-1]=1.5;
PixColNumSect[14-1]=2.5;
PixColNumSect[114-1]=-2.5;
PixColNumSect[96-1]=-1.5;
PixColNumSect[75-1]=-0.5;
PixColNumSect[54-1]=0.5;
PixColNumSect[33-1]=1.5;
PixColNumSect[15-1]=2.5;
PixColNumSect[121-1]=-3.0;
PixColNumSect[106-1]=-2.0;
PixColNumSect[87-1]=-1.0;
PixColNumSect[67-1]=0.0;
PixColNumSect[42-1]=1.0;
PixColNumSect[23-1]=2.0;
PixColNumSect[8-1]=3.0;
PixColNumSect[120-1]=-3.0;
PixColNumSect[105-1]=-2.0;
PixColNumSect[86-1]=-1.0;
PixColNumSect[63-1]=0.0;
PixColNumSect[43-1]=1.0;
PixColNumSect[24-1]=2.0;
PixColNumSect[9-1]=3.0;
PixColNumSect[119-1]=-3.0;
PixColNumSect[104-1]=-2.0;
PixColNumSect[85-1]=-1.0;
PixColNumSect[66-1]=0.0;
PixColNumSect[44-1]=1.0;
PixColNumSect[25-1]=2.0;
PixColNumSect[10-1]=3.0;
PixColNumSect[125-1]=-3.5;
PixColNumSect[113-1]=-2.5;
PixColNumSect[95-1]=-1.5;
PixColNumSect[74-1]=-0.5;
PixColNumSect[55-1]=0.5;
PixColNumSect[34-1]=1.5;
PixColNumSect[16-1]=2.5;
PixColNumSect[4-1]=3.5;
PixColNumSect[124-1]=-3.5;
PixColNumSect[112-1]=-2.5;
PixColNumSect[94-1]=-1.5;
PixColNumSect[73-1]=-0.5;
PixColNumSect[56-1]=0.5;
PixColNumSect[35-1]=1.5;
PixColNumSect[17-1]=2.5;
PixColNumSect[5-1]=3.5;
PixColNumSect[123-1]=-3.5;
PixColNumSect[111-1]=-2.5;
PixColNumSect[93-1]=-1.5;
PixColNumSect[72-1]=-0.5;
PixColNumSect[57-1]=0.5;
PixColNumSect[36-1]=1.5;
PixColNumSect[18-1]=2.5;
PixColNumSect[6-1]=3.5;
PixColNumSect[127-1]=-4.0;
PixColNumSect[118-1]=-3.0;
PixColNumSect[103-1]=-2.0;
PixColNumSect[84-1]=-1.0;
PixColNumSect[65-1]=0.0;
PixColNumSect[45-1]=1.0;
PixColNumSect[26-1]=2.0;
PixColNumSect[11-1]=3.0;
PixColNumSect[2-1]=4.0;
PixColNumSect[126-1]=-4.0;
PixColNumSect[117-1]=-3.0;
PixColNumSect[102-1]=-2.0;
PixColNumSect[83-1]=-1.0;
PixColNumSect[64-1]=0.0;
PixColNumSect[46-1]=1.0;
PixColNumSect[27-1]=2.0;
PixColNumSect[12-1]=3.0;
PixColNumSect[3-1]=4.0;
PixColNumSect[128-1]=-4.5;
PixColNumSect[122-1]=-3.5;
PixColNumSect[110-1]=-2.5;
PixColNumSect[92-1]=-1.5;
PixColNumSect[71-1]=-0.5;
PixColNumSect[58-1]=0.5;
PixColNumSect[37-1]=1.5;
PixColNumSect[19-1]=2.5;
PixColNumSect[7-1]=3.5;
PixColNumSect[1-1]=4.5;
for (G4int ipixel=0;ipixel<NumberOfPadHpdSiPixels; ipixel++){
PixelAtSectEdge[ipixel]=false;
}
PixelAtSectEdge[59-1]=true;
PixelAtSectEdge[70-1]=true;
PixelAtSectEdge[59-1]=true;
PixelAtSectEdge[60-1]=true;
PixelAtSectEdge[82-1]=true;
PixelAtSectEdge[47-1]=true;
PixelAtSectEdge[81-1]=true;
PixelAtSectEdge[48-1]=true;
PixelAtSectEdge[91-1]=true;
PixelAtSectEdge[38-1]=true;
PixelAtSectEdge[101-1]=true;
PixelAtSectEdge[28-1]=true;
PixelAtSectEdge[100-1]=true;
PixelAtSectEdge[29-1]=true;
PixelAtSectEdge[99-1]=true;
PixelAtSectEdge[30-1]=true;
PixelAtSectEdge[109-1]=true;
PixelAtSectEdge[20-1]=true;
PixelAtSectEdge[108-1]=true;
PixelAtSectEdge[21-1]=true;
PixelAtSectEdge[107-1]=true;
PixelAtSectEdge[22-1]=true;
PixelAtSectEdge[116-1]=true;
PixelAtSectEdge[13-1]=true;
PixelAtSectEdge[115-1]=true;
PixelAtSectEdge[14-1]=true;
PixelAtSectEdge[114-1]=true;
PixelAtSectEdge[15-1]=true;
PixelAtSectEdge[121-1]=true;
PixelAtSectEdge[8-1]=true;
PixelAtSectEdge[120-1]=true;
PixelAtSectEdge[9-1]=true;
PixelAtSectEdge[119-1]=true;
PixelAtSectEdge[10-1]=true;
PixelAtSectEdge[125-1]=true;
PixelAtSectEdge[4-1]=true;
PixelAtSectEdge[124-1]=true;
PixelAtSectEdge[5-1]=true;
PixelAtSectEdge[123-1]=true;
PixelAtSectEdge[6-1]=true;
PixelAtSectEdge[127-1]=true;
PixelAtSectEdge[2-1]=true;
PixelAtSectEdge[126-1]=true;
PixelAtSectEdge[3-1]=true;
PixelAtSectEdge[128-1]=true;
PixelAtSectEdge[1-1]=true;
}
@@ -0,0 +1,522 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbGraphics.cc for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#include <iostream.h>
#include "RichTbDetectorConstruction.hh"
#include "RichTbHall.hh"
#include "RichTbComponent.hh"
#include "RichTbGeometryParameters.hh"
#include "RichTbPhotoDetector.hh"
#include "RichTbHpd.hh"
#include "RichTbSiDet.hh"
#include "RichTbGraphics.hh"
#include "G4LogicalVolume.hh"
#include "G4VisAttributes.hh"
#include "G4Colour.hh"
#include "RichTbRunConfig.hh"
RichTbGraphics::RichTbGraphics(){ ; }
RichTbGraphics::RichTbGraphics(RichTbHall* RTbHall,
RichTbComponent* RTbComponent,
RichTbPhotoDetector* RTbPhotoDetector,
RichTbROGeometry* RTbROGeom,
RichTbRunConfig* RConfig){
//For Following variables 0 means make the volume invisible;
// 1 means make it visible as a solid.
// 2 means make it visible as a wireframe.
G4int RichTbHall_vis= RConfig->getRichTbHall_visib();
G4int RichTbEnclosure_vis = RConfig->getRichTbEnclosure_visib() ;
G4int RichTbRadFrame_vis = RConfig->getRichTbRadFrame_visib() ;
G4int RichTbRadUpW_vis = RConfig->getRichTbRadUpW_visib() ;
G4int RichTbRadDnW_vis = RConfig->getRichTbRadDnW_visib() ;
G4int RichTbAerogel_vis = RConfig->getRichTbAerogel_visib() ;
G4int RichTbAerogelWrap_vis = RConfig->getRichTbAerogelWrap_visib() ;
G4int RichTbAerogelWrapTop_vis = RichTbAerogelWrap_vis;
G4int RichTbAerogelWrapBot_vis = RichTbAerogelWrap_vis;
G4int RichTbFilter_vis = RConfig->getRichTbFilter_visib() ;
G4int RichTbMirror_vis = RConfig->getRichTbMirror_visib();
G4int RichTbHpdMaster_vis= RConfig->getRichTbHpdMaster_visib() ;
G4int RichTbHpdEnvelopeTube_vis= RConfig->getRichTbHpdEnvelopeTube_visib();
G4int RichTbHpdQuartzW_vis= RConfig->getRichTbHpdQuartzW_visib() ;
G4int RichTbHpdPhCathode_vis= RConfig->getRichTbHpdPhCathode_visib() ;
G4int RichTbHpdSiDet_vis= RConfig->getRichTbHpdSiDet_visib() ;
G4int RichTbHpdSectCoat_vis =RConfig->getRichTbHpdSectCoat_visib() ;
G4int RichTbHpdSiPx_vis= RConfig->getRichTbHpdSiPx_visib() ;
//
//Now for the RichTbHall
G4LogicalVolume* RichTbHall_LV = RTbHall->getRichTbHallLogicalVolume();
if(RichTbHall_vis == 0 ) {
RichTbHall_LV->SetVisAttributes(G4VisAttributes::Invisible);
}else {
G4VisAttributes* RichTbHall_logVisAtt
= new G4VisAttributes(G4Colour(0.,1.,1.));
if(RichTbHall_vis == 2 ){
RichTbHall_logVisAtt->SetForceWireframe(true);
}
RichTbHall_logVisAtt->SetVisibility(true);
RichTbHall_LV->SetVisAttributes(RichTbHall_logVisAtt);
//
}
//
//
//Now for the RichTbEnclosure
G4LogicalVolume* RichTbEnclosure_LV =
RTbComponent->getEnclosureLogicalVolume();
if(RichTbEnclosure_vis == 0 ){
RichTbEnclosure_LV->SetVisAttributes (G4VisAttributes::Invisible);
}else {
G4VisAttributes* RichTbEnclosure_logVisAtt
= new G4VisAttributes(G4Colour(1.,1.,0.));
if( RichTbEnclosure_vis == 2) {
RichTbEnclosure_logVisAtt->SetForceWireframe(true);
}else {
RichTbEnclosure_logVisAtt->SetForceSolid(true);
}
RichTbEnclosure_logVisAtt->SetVisibility(true);
RichTbEnclosure_LV->
SetVisAttributes(RichTbEnclosure_logVisAtt);
}
//
//Now for the Radiator frame
G4LogicalVolume* RichTbRadFrame_LV =
RTbComponent->getRadFrameLogicalVolume();
if(RichTbRadFrame_vis == 0 ){
RichTbRadFrame_LV->SetVisAttributes (G4VisAttributes::Invisible);
}else {
G4VisAttributes* RichTbRadFrame_logVisAtt
= new G4VisAttributes(G4Colour(1.,1.,0.));
if( RichTbRadFrame_vis == 2) {
RichTbRadFrame_logVisAtt->SetForceWireframe(true);
}else {
RichTbRadFrame_logVisAtt->SetForceSolid(true);
}
RichTbRadFrame_logVisAtt->SetVisibility(true);
RichTbRadFrame_LV->
SetVisAttributes(RichTbRadFrame_logVisAtt);
}
//
//Now for the upstream window of the radiator frame
G4LogicalVolume* RichTbRadUpW_LV =
RTbComponent->getRadUpWLogicalVolume();
if(RichTbRadUpW_vis == 0 ){
RichTbRadUpW_LV->SetVisAttributes (G4VisAttributes::Invisible);
}else {
G4VisAttributes* RichTbRadUpW_logVisAtt
= new G4VisAttributes(G4Colour(0.0,0.3,0.7));
if( RichTbRadUpW_vis == 2) {
RichTbRadUpW_logVisAtt->SetForceWireframe(true);
}else {
RichTbRadUpW_logVisAtt->SetForceSolid(true);
}
RichTbRadUpW_logVisAtt->SetVisibility(true);
RichTbRadUpW_LV->
SetVisAttributes(RichTbRadUpW_logVisAtt);
}
//
// Now for the downstream window of the radiator frame
G4LogicalVolume* RichTbRadDnW_LV =
RTbComponent->getRadDnWLogicalVolume();
if(RichTbRadDnW_vis == 0 ){
RichTbRadDnW_LV->SetVisAttributes (G4VisAttributes::Invisible);
}else {
G4VisAttributes* RichTbRadDnW_logVisAtt
= new G4VisAttributes(G4Colour(0.0,0.2,0.8));
if( RichTbRadDnW_vis == 2) {
RichTbRadDnW_logVisAtt->SetForceWireframe(true);
}else {
RichTbRadDnW_logVisAtt->SetForceSolid(true);
}
RichTbRadDnW_logVisAtt->SetVisibility(true);
RichTbRadDnW_LV->
SetVisAttributes(RichTbRadDnW_logVisAtt);
}
//
//
//Now for the Aerogel
G4int NumTiles=RConfig->GetNumberOfAerogelTiles();
for (G4int ng=0; ng< NumTiles; ng++ ) {
G4LogicalVolume* RichTbAerogel_LV =
RTbComponent->getAgelLogicalVolume(ng);
if(RichTbAerogel_vis == 0 ){
RichTbAerogel_LV->SetVisAttributes (G4VisAttributes::Invisible);
}else {
G4VisAttributes* RichTbAerogel_logVisAtt;
if(ng == 0 || ng == 2 || ng || 4 ) {
RichTbAerogel_logVisAtt = new G4VisAttributes(G4Colour(1.,0.2,0.8));
}else {
RichTbAerogel_logVisAtt = new G4VisAttributes(G4Colour(0.7,0.6,0.9));
}
if( RichTbAerogel_vis == 2) {
RichTbAerogel_logVisAtt->SetForceWireframe(true);
}else {
RichTbAerogel_logVisAtt->SetForceSolid(true);
}
RichTbAerogel_logVisAtt->SetVisibility(true);
RichTbAerogel_LV->
SetVisAttributes(RichTbAerogel_logVisAtt);
}
//Now for the top Wrap of the Aerogel tile.
if( RTbComponent->getAgelWrapTopLogicalVolume(ng)) {
G4LogicalVolume* RichTbAerogelWrapTop_LV =
RTbComponent->getAgelWrapTopLogicalVolume(ng);
if(RichTbAerogelWrapTop_vis == 0 ){
RichTbAerogelWrapTop_LV->SetVisAttributes (G4VisAttributes::Invisible);
}else {
G4VisAttributes* RichTbAerogelWrapTop_logVisAtt;
if(ng == 0 || ng == 2 || ng || 4 ) {
RichTbAerogelWrapTop_logVisAtt =
new G4VisAttributes(G4Colour(0.2,0.2,0.6));
}else {
RichTbAerogelWrapTop_logVisAtt =
new G4VisAttributes(G4Colour(0.2,0.4,0.8));
}
if( RichTbAerogelWrapTop_vis == 2) {
RichTbAerogelWrapTop_logVisAtt->SetForceWireframe(true);
}else {
RichTbAerogelWrapTop_logVisAtt->SetForceSolid(true);
}
RichTbAerogelWrapTop_logVisAtt->SetVisibility(true);
RichTbAerogelWrapTop_LV->
SetVisAttributes(RichTbAerogelWrapTop_logVisAtt);
}
}
//Now for the Bottom Wrap of the Aerogel tile.
if(RTbComponent->getAgelWrapBotLogicalVolume(ng)){
G4LogicalVolume* RichTbAerogelWrapBot_LV =
RTbComponent->getAgelWrapBotLogicalVolume(ng);
if(RichTbAerogelWrapBot_vis == 0 ){
RichTbAerogelWrapBot_LV->SetVisAttributes (G4VisAttributes::Invisible);
}else {
G4VisAttributes* RichTbAerogelWrapBot_logVisAtt;
if(ng == 0 || ng == 2 || ng || 4 ) {
RichTbAerogelWrapBot_logVisAtt =
new G4VisAttributes(G4Colour(0.2,0.2,0.6));
}else {
RichTbAerogelWrapBot_logVisAtt =
new G4VisAttributes(G4Colour(0.2,0.4,0.8));
}
if( RichTbAerogelWrapBot_vis == 2) {
RichTbAerogelWrapBot_logVisAtt->SetForceWireframe(true);
}else {
RichTbAerogelWrapBot_logVisAtt->SetForceSolid(true);
}
RichTbAerogelWrapBot_logVisAtt->SetVisibility(true);
RichTbAerogelWrapBot_LV->
SetVisAttributes(RichTbAerogelWrapBot_logVisAtt);
}
}
}
//
//
//Now for the Filter
// First verify that the filter exists.
G4int Filnum=RConfig->GetFilterTNumber() ;
if(Filnum >=0 ) {
G4LogicalVolume* RichTbFilter_LV =
RTbComponent->getFilterLogicalVolume();
if(RichTbFilter_vis == 0 ){
RichTbFilter_LV->SetVisAttributes (G4VisAttributes::Invisible);
}else {
G4VisAttributes* RichTbFilter_logVisAtt
= new G4VisAttributes(G4Colour(0.3,0.9,0.4));
if( RichTbFilter_vis == 2) {
RichTbFilter_logVisAtt->SetForceWireframe(true);
}else {
RichTbFilter_logVisAtt->SetForceSolid(true);
}
RichTbFilter_logVisAtt->SetVisibility(true);
RichTbFilter_LV->
SetVisAttributes(RichTbFilter_logVisAtt);
}
}
//
//
//
//Now for the Mirror
G4LogicalVolume* RichTbMirror_LV =
RTbComponent->getMirrorLogicalVolume();
if(RichTbMirror_vis == 0 ){
RichTbMirror_LV->
SetVisAttributes (G4VisAttributes::Invisible);
}else {
G4VisAttributes* RichTbMirror_logVisAtt =
new G4VisAttributes(G4Colour(0.,0.5,0.5));
if(RichTbMirror_vis == 2 ){
RichTbMirror_logVisAtt->SetForceWireframe(true);
}else{
RichTbMirror_logVisAtt->SetForceWireframe(false);
RichTbMirror_logVisAtt->SetForceSolid(true);
}
RichTbMirror_logVisAtt->SetVisibility(true);
RichTbMirror_LV->
SetVisAttributes(RichTbMirror_logVisAtt);
}
//Now for the HPDs.
G4int numhpd= RTbPhotoDetector->getNumberOfHpds();
for(G4int ihpd=0; ihpd<numhpd; ihpd++){
//Now for the HPD master volume
G4LogicalVolume* RichTbHpdMaster_LV =
RTbPhotoDetector->getRichHPD(ihpd)->getHpdLogicalVolume();
if(RichTbHpdMaster_vis == 0 ){
RichTbHpdMaster_LV->
SetVisAttributes (G4VisAttributes::Invisible);
}else {
G4VisAttributes* RichTbHpdMaster_logVisAtt =
new G4VisAttributes(G4Colour(0.8,0.6,0.2));
if(RichTbHpdMaster_vis == 2 ){
RichTbHpdMaster_logVisAtt->SetForceWireframe(true);
}else{
RichTbHpdMaster_logVisAtt->SetForceWireframe(false);
RichTbHpdMaster_logVisAtt->SetForceSolid(true);
}
RichTbHpdMaster_logVisAtt->SetVisibility(true);
RichTbHpdMaster_LV->
SetVisAttributes(RichTbHpdMaster_logVisAtt);
}
//hpd Envelope Tube
G4LogicalVolume* RichTbHpdEnvelopeTube_LV =
RTbPhotoDetector->getRichHPD(ihpd)->getHpdEnvelopeTubeGrandLogicalVolume();
if(RichTbHpdEnvelopeTube_vis == 0 ){
RichTbHpdEnvelopeTube_LV->
SetVisAttributes (G4VisAttributes::Invisible);
}else {
G4VisAttributes* RichTbHpdEnvelopeTube_logVisAtt =
new G4VisAttributes(G4Colour(0.2,0.2,0.8));
if(RichTbHpdEnvelopeTube_vis == 2 ){
RichTbHpdEnvelopeTube_logVisAtt->SetForceWireframe(true);
}else{
RichTbHpdEnvelopeTube_logVisAtt->SetForceWireframe(false);
RichTbHpdEnvelopeTube_logVisAtt->SetForceSolid(true);
}
RichTbHpdEnvelopeTube_logVisAtt->SetVisibility(true);
RichTbHpdEnvelopeTube_LV->
SetVisAttributes(RichTbHpdEnvelopeTube_logVisAtt);
}
//hpd quartz window
G4LogicalVolume* RichTbHpdQuartzW_LV =
RTbPhotoDetector->getRichHPD(ihpd)->getHpdQuartzWLogicalVolume();
if(RichTbHpdQuartzW_vis == 0 ){
RichTbHpdQuartzW_LV->
SetVisAttributes (G4VisAttributes::Invisible);
}else {
G4VisAttributes* RichTbHpdQuartzW_logVisAtt =
new G4VisAttributes(G4Colour(0.8,0.8,0.8));
if(RichTbHpdQuartzW_vis == 2 ){
RichTbHpdQuartzW_logVisAtt->SetForceWireframe(true);
}else{
RichTbHpdQuartzW_logVisAtt->SetForceWireframe(false);
RichTbHpdQuartzW_logVisAtt->SetForceSolid(true);
}
RichTbHpdQuartzW_logVisAtt->SetVisibility(true);
RichTbHpdQuartzW_LV->
SetVisAttributes(RichTbHpdQuartzW_logVisAtt);
}
//hpd Ph Cathode
G4LogicalVolume* RichTbHpdPhCathode_LV =
RTbPhotoDetector->getRichHPD(ihpd)->getHpdPhCathodeLogicalVolume();
if(RichTbHpdPhCathode_vis == 0 ){
RichTbHpdPhCathode_LV->
SetVisAttributes (G4VisAttributes::Invisible);
}else {
G4VisAttributes* RichTbHpdPhCathode_logVisAtt =
new G4VisAttributes(G4Colour(0.2,0.3,0.3));
if(RichTbHpdPhCathode_vis == 2 ){
RichTbHpdPhCathode_logVisAtt->SetForceWireframe(true);
}else{
RichTbHpdPhCathode_logVisAtt->SetForceWireframe(false);
RichTbHpdPhCathode_logVisAtt->SetForceSolid(true);
}
RichTbHpdPhCathode_logVisAtt->SetVisibility(true);
RichTbHpdPhCathode_LV->
SetVisAttributes(RichTbHpdPhCathode_logVisAtt);
}
//Hpd Silicon Detector sectors
for(G4int isect=0; isect<NumberOfSiDetSectors; isect++) {
G4LogicalVolume* RichTbHpdSiDet_LV =
RTbPhotoDetector->getRichHPD(ihpd)->getRichHpdSiDetSect(isect)->
getHpdSiSectLogicalVolume();
if(RichTbHpdSiDet_vis == 0 ){
RichTbHpdSiDet_LV->
SetVisAttributes (G4VisAttributes::Invisible);
}else {
G4VisAttributes* RichTbHpdSiDet_logVisAtt =
new G4VisAttributes(G4Colour(0.6,0.6,0.9));
if(RichTbHpdSiDet_vis == 2 ){
RichTbHpdSiDet_logVisAtt->SetForceWireframe(true);
}else{
RichTbHpdSiDet_logVisAtt->SetForceWireframe(false);
RichTbHpdSiDet_logVisAtt->SetForceSolid(true);
}
RichTbHpdSiDet_logVisAtt->SetVisibility(true);
RichTbHpdSiDet_LV->
SetVisAttributes(RichTbHpdSiDet_logVisAtt);
}
//Coating on the silicon sector
G4LogicalVolume* RichTbHpdSectCoat_LV =
RTbPhotoDetector->getRichHPD(ihpd)->getRichHpdSiDetSect(isect)->
getHpdSectCoatLogicalVolume();
if(RichTbHpdSectCoat_vis == 0 ){
RichTbHpdSectCoat_LV->
SetVisAttributes (G4VisAttributes::Invisible);
}else {
G4VisAttributes* RichTbHpdSectCoat_logVisAtt =
new G4VisAttributes(G4Colour(0.8,0.3,0.9));
if(RichTbHpdSectCoat_vis == 2 ){
RichTbHpdSectCoat_logVisAtt->SetForceWireframe(true);
}else{
RichTbHpdSectCoat_logVisAtt->SetForceWireframe(false);
RichTbHpdSectCoat_logVisAtt->SetForceSolid(true);
}
RichTbHpdSectCoat_logVisAtt->SetVisibility(true);
RichTbHpdSectCoat_LV->
SetVisAttributes(RichTbHpdSectCoat_logVisAtt);
}
G4int numPix=RTbROGeom -> getROPhotDet()-> getRichHPD(ihpd) ->
getRichHpdSiDetSect(isect) ->getNumSiPixels();
for(G4int ipixel=0; ipixel<numPix ; ipixel++){
G4LogicalVolume* RichTbHpdSiPx_LV=
RTbROGeom -> getROPhotDet() -> getRichHPD(ihpd) ->
getRichHpdSiDetSect(isect) -> getHpdSiPx(ipixel) ->
getHpdSiPixelLogicalVolume();
if(RichTbHpdSiPx_vis == 0 ){
RichTbHpdSiPx_LV->SetVisAttributes (G4VisAttributes::Invisible);
}else {
G4VisAttributes* RichTbHpdSiPx_logVisAtt =
new G4VisAttributes(G4Colour(0.0,0.7,0.6));
if(RichTbHpdSiPx_vis == 2 ){
RichTbHpdSiPx_logVisAtt->SetForceWireframe(true);
}else{
RichTbHpdSiPx_logVisAtt->SetForceWireframe(false);
RichTbHpdSiPx_logVisAtt->SetForceSolid(true);
}
RichTbHpdSiPx_logVisAtt->SetVisibility(true);
RichTbHpdSiPx_LV-> SetVisAttributes(RichTbHpdSiPx_logVisAtt);
}
}
}
}
}
RichTbGraphics::~RichTbGraphics(){;}
+56
View File
@@ -0,0 +1,56 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbHall.cc for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#include <iostream.h>
#include "RichTbDetectorConstruction.hh"
#include "RichTbHall.hh"
#include "RichTbMaterial.hh"
#include "RichTbGeometryParameters.hh"
#include "G4Box.hh"
#include "G4ThreeVector.hh"
#include "G4LogicalVolume.hh"
#include "G4VPhysicalVolume.hh"
#include "G4PVPlacement.hh"
RichTbHall::RichTbHall() { ; }
RichTbHall::RichTbHall(RichTbMaterial* RMaterial) {
G4Box * RichTbHallBox
= new G4Box("World",ExpHallHalfX,ExpHallHalfY,ExpHallHalfZ);
G4LogicalVolume * RichTbHallLog
= new G4LogicalVolume(RichTbHallBox,RMaterial->getAir(),"World",0,0,0);
G4VPhysicalVolume * RichTbHallPhys
= new G4PVPlacement(0,G4ThreeVector(),"World",RichTbHallLog,0,false,0);
RichTbHallLVol = RichTbHallLog;
RichTbHallPVol = RichTbHallPhys;
}
RichTbHall::~RichTbHall() {; }
+123
View File
@@ -0,0 +1,123 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbHit.cc for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#include "RichTbHit.hh"
#include "G4VVisManager.hh"
#include "G4Circle.hh"
#include "G4Colour.hh"
#include "G4VisAttributes.hh"
#include "G4Transform3D.hh"
#include "G4LogicalVolume.hh"
#include "RichTbVisManager.hh"
#include "G4Transform3D.hh"
G4Allocator<RichTbHit> RichTbHitAllocator;
RichTbHit::RichTbHit()
{;}
RichTbHit::~RichTbHit()
{;}
RichTbHit::RichTbHit(const RichTbHit &right)
{
edep = right.edep;
posAtSilicon = right.posAtSilicon;
posAtPhotoCathode=right.posAtPhotoCathode;
CurHpdNum=right.CurHpdNum;
CurSectNum=right.CurSectNum;
CurPixelNum=right.CurPixelNum;
}
const RichTbHit& RichTbHit::operator=(const RichTbHit &right)
{
edep = right.edep;
posAtSilicon = right.posAtSilicon;
posAtPhotoCathode=right.posAtPhotoCathode;
CurHpdNum=right.CurHpdNum;
CurSectNum=right.CurSectNum;
CurPixelNum=right.CurPixelNum;
return *this;
}
int RichTbHit::operator==(const RichTbHit &right) const
{
return 0;
}
void RichTbHit::Draw()
{
// The folowing does not work anymore .. SE 26-04-01
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
if(pVVisManager)
{
G4Transform3D dummy;
G4Circle circle(posAtPhotoCathode);
circle.SetScreenSize(0.04);
circle.SetFillStyle(G4Circle::filled);
G4Colour colour(1.0,0.0,0.0);
G4VisAttributes attribs(colour);
circle.SetVisAttributes(attribs);
pVVisManager->Draw(circle,dummy);
}
}
void RichTbHit::DrawWithVisM(RichTbVisManager* pVisManager)
{
G4VisManager* pVVisManager = pVisManager;
if(pVVisManager)
{
G4Transform3D dummy2;
G4Circle circle(posAtPhotoCathode);
circle.SetScreenSize(0.04);
circle.SetFillStyle(G4Circle::filled);
G4Colour colour(1.0,0.0,0.0);
G4VisAttributes attribs(colour);
circle.SetVisAttributes(attribs);
pVVisManager->Draw(circle,dummy2);
}
}
void RichTbHit::Print()
{;}
// This is a forward declarations of an instantiated G4Allocator<Type> object.
// It has been added in order to make code portable for the GNU g++
// (release 2.7.2) compiler.
// Whenever a new Type is instantiated via G4Allocator, it has to be forward
// declared to make object code (compiled with GNU g++) link successfully.
//
#ifdef GNU_GCC
template class G4Allocator<RichTbHit>;
#endif
+290
View File
@@ -0,0 +1,290 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbHpd.cc for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#include <iostream.h>
#include "globals.hh"
#include "G4Box.hh"
#include "G4Trd.hh"
#include "G4Cons.hh"
#include "G4Tubs.hh"
#include "G4Sphere.hh"
#include "G4RotationMatrix.hh"
#include "G4ThreeVector.hh"
#include "G4Transform3D.hh"
#include "G4LogicalVolume.hh"
#include "G4VPhysicalVolume.hh"
#include "G4PVPlacement.hh"
#include "G4UnionSolid.hh"
#include "RichTbGeometryParameters.hh"
#include "G4LogicalBorderSurface.hh"
#include "G4LogicalSkinSurface.hh"
#include "G4OpticalSurface.hh"
#include "G4SDManager.hh"
#include "RichTbSD.hh"
#include "RichTbHpd.hh"
RichTbHpd::RichTbHpd() {; }
RichTbHpd::~RichTbHpd() { ; }
RichTbHpd::RichTbHpd(RichTbMaterial* RMaterial,
G4VPhysicalVolume* MotherOfHpd, G4int ihpd,
G4int NumberofSectorsInHpd,
G4bool ConstructTrackingGeomSwitch){
HpdNumber=ihpd;
NumSectInHpd= NumberofSectorsInHpd;
ConstructTrackGeomSwitch=ConstructTrackingGeomSwitch;
G4Tubs* HpdMaster=
new G4Tubs("HPDMaster",HpdMasterInnerRad,
HpdMasterRad,HpdMasterHalfZ,
HpdMasterStartPhi,HpdMasterEndPhi);
//Overall rotations of the HPD
G4RotationMatrix HpdMasterRotationX,HpdMasterRotationY;
G4RotationMatrix HpdMasterRotationZ;
HpdMasterRotationZ.rotateZ(HpdMasterRotZ[ihpd]);
G4ThreeVector HpdMasterTrsl(HpdMasterPosX[ihpd],HpdMasterPosY[ihpd],
HpdMasterPosZ[ihpd]);
G4Transform3D HpdMasterTransform(HpdMasterRotationZ,
HpdMasterTrsl);
//Now for the placements of the HpdMaster
// use vacuum . the photoelectrons travel in vacuum. hence
// just for simplicity the the hpdmaster is set as vacuum.
G4LogicalVolume* HpdMasterLog=
new G4LogicalVolume(HpdMaster,RMaterial->getVacuum(),
"HpdMaster",0,0,0);
G4VPhysicalVolume* HpdMasterPhys=
new G4PVPlacement(HpdMasterTransform,"HpdMaster",
HpdMasterLog, MotherOfHpd ,false,HpdNumber);
//Now create the Silicon Detector sectors inside the HPD.
for (G4int isec=0; isec<NumberOfSiDetSectors; isec++){
richSiliconDetectorSect[isec] = new RichTbSiDet(RMaterial,HpdMasterPhys,
ConstructTrackGeomSwitch,ihpd,isec);
}
//Now for the rest of the components of the HPD
if(ConstructTrackingGeomSwitch) {
G4Tubs* HpdEnvelopeLargeTube=
new G4Tubs("HpdEnvelopeLargeTube",HpdEnvelopeLargeTubeInnerRad,
HpdEnvelopeLargeTubeOuterRad,HpdEnvelopeLargeTubeHalfZ,
HpdEnvelopeLargeTubeStartPhi, HpdEnvelopeLargeTubeEndPhi);
G4Cons* HpdEnvelopeCone =
new G4Cons("HpdEnvelopeCone",HpdEnvelopeConeInnerR1,
HpdEnvelopeConeOuterR1,HpdEnvelopeConeInnerR2,
HpdEnvelopeConeOuterR2,HpdEnvelopeConeHalfZ,
HpdEnvelopeConeStartPhi,HpdEnvelopeConeEndPhi);
G4Tubs* HpdEnvelopeSmallTube=
new G4Tubs("HpdEnvelopeSmallTube",HpdEnvelopeSmallTubeInnerRad,
HpdEnvelopeSmallTubeOuterRad,HpdEnvelopeSmallTubeHalfZ,
HpdEnvelopeSmallTubeStartPhi, HpdEnvelopeSmallTubeEndPhi);
G4Tubs* HpdEnvelopeEndCap=
new G4Tubs("HpdEnvelopeEndcap",HpdEnvelopeEndCapInnerRad,
HpdEnvelopeEndCapRad,
HpdEnvelopeEndCapHalfZ,HpdEnvelopeEndCapStartPhi,
HpdEnvelopeEndCapEndPhi);
G4Sphere* HpdQuartzWindowSphereseg =
new G4Sphere("HpdQuartzWindow", HpdQuarzWindowRInner,
HpdQuarzWindowROuter,HpdQuartzWStartPhi,
HpdQuartzWPhiSize,HpdQuartzWStartTheta,
HpdQuartzWThetaSize);
G4Sphere* HpdPhCathodeSphereseg =
new G4Sphere("HpdPhCathodeWindow", HpdPhCathodeRInner,
HpdPhCathodeROuter,HpdPhCathodeStartPhi,
HpdPhCathodePhiSize,HpdPhCathodeStartTheta,
HpdPhCathodeThetaSize);
//rotations and translations
//Define Rotations for the HPD components
// even if they have no real rotations.
G4RotationMatrix HpdEnvelopeLargeTubeRotation,
HpdEnvelopeConeRotation,
HpdEnvelopeSmallTubeRotation;
G4RotationMatrix HpdEnvelopeEndCapRotation,HpdQuartzWRotation;
G4RotationMatrix HpdPhCathodeRotation;
G4ThreeVector HpdEnvelopeLargeTubeTrsl(HpdEnvelopeLargeTubePosX,
HpdEnvelopeLargeTubePosY,
HpdEnvelopeLargeTubePosZ);
G4Transform3D HpdEnvelopeLargeTubeTransform(HpdEnvelopeLargeTubeRotation,
HpdEnvelopeLargeTubeTrsl);
G4ThreeVector HpdEnvelopeConeTrsl(HpdEnvelopeConeShiftX,
HpdEnvelopeConeShiftY,
HpdEnvelopeConeShiftZ);
G4Transform3D HpdEnvelopeConeTransform(HpdEnvelopeConeRotation,
HpdEnvelopeConeTrsl);
G4ThreeVector HpdEnvelopeSmallTubeTrsl(HpdEnvelopeSmallTubeShiftX,
HpdEnvelopeSmallTubeShiftY,
HpdEnvelopeSmallTubeShiftZ);
G4Transform3D HpdEnvelopeSmallTubeTransform(HpdEnvelopeSmallTubeRotation,
HpdEnvelopeSmallTubeTrsl);
G4ThreeVector HpdEnvelopeEndCapTrsl(HpdEnvelopeEndCapShiftX,
HpdEnvelopeEndCapShiftY,
HpdEnvelopeEndCapShiftZ);
G4Transform3D HpdEnvelopeEndCapTransform(HpdEnvelopeEndCapRotation,
HpdEnvelopeEndCapTrsl);
G4ThreeVector HpdQuartzWTrsl(HpdQuartzWPosX,
HpdQuartzWPosY,
HpdQuartzWPosZ);
G4Transform3D HpdQuartzWTransform(HpdQuartzWRotation,
HpdQuartzWTrsl);
G4ThreeVector HpdPhCathodeTrsl(HpdPhCathodePosX,
HpdPhCathodePosY,
HpdPhCathodePosZ);
G4Transform3D HpdPhCathodeTransform(HpdPhCathodeRotation,
HpdPhCathodeTrsl);
//Now for the placements
G4UnionSolid* HpdEnvelopeTubeLC =
new G4UnionSolid("HpdEnvelopeTubeLC", HpdEnvelopeLargeTube,
HpdEnvelopeCone,
HpdEnvelopeConeTransform);
G4LogicalVolume* HpdEnvelopeTubeLCLog=
new G4LogicalVolume(HpdEnvelopeTubeLC,RMaterial->getHpdTubeMaterial(),
"HpdEnvelopeTubeLC",0,0,0);
G4UnionSolid* HpdEnvelopeTubeLCS =
new G4UnionSolid("HpdEnvelopeTubeLCS", HpdEnvelopeTubeLC,
HpdEnvelopeSmallTube,
HpdEnvelopeSmallTubeTransform);
G4LogicalVolume* HpdEnvelopeTubeLCSLog=
new G4LogicalVolume(HpdEnvelopeTubeLCS,RMaterial->getHpdTubeMaterial(),
"HpdEnvelopeTubeLCS",0,0,0);
G4UnionSolid* HpdEnvelopeTubeGrand =
new G4UnionSolid("HpdEnvelopeTubeGrand", HpdEnvelopeTubeLCS,
HpdEnvelopeEndCap,HpdEnvelopeEndCapTransform);
G4LogicalVolume* HpdEnvelopeTubeGrandLog=
new G4LogicalVolume(HpdEnvelopeTubeGrand,RMaterial->getHpdTubeMaterial(),
"HpdEnvelopeTubeGrand",0,0,0);
//
//
G4LogicalVolume* HpdQuartzWindowLog=
new G4LogicalVolume( HpdQuartzWindowSphereseg,
RMaterial->getPadHpdQuartzWMaterial(),
"HpdQuartzWindow",0,0,0);
G4LogicalVolume* HpdPhCathodeLog=
new G4LogicalVolume( HpdPhCathodeSphereseg,
RMaterial->getPadHpdPhCathodeMaterial(),
"HpdPhCathode",0,0,0);
//
//
G4VPhysicalVolume* HpdEnvelopeTubeGrandPhys=
new G4PVPlacement(HpdEnvelopeLargeTubeTransform,
"HpdEnvelopeTubeGrand",
HpdEnvelopeTubeGrandLog,HpdMasterPhys,false,HpdNumber);
G4VPhysicalVolume* HpdQuartzWindowPhys=
new G4PVPlacement(HpdQuartzWTransform,"HpdQuartzWindow",
HpdQuartzWindowLog,HpdMasterPhys,false,HpdNumber);
G4VPhysicalVolume* HpdPhCathodePhys=
new G4PVPlacement(HpdPhCathodeTransform,"HpdPhCathode",
HpdPhCathodeLog,HpdMasterPhys,false,HpdNumber);
G4LogicalBorderSurface* HpdQuartzWSurface =
new G4LogicalBorderSurface("HpdQuartzWSurface",HpdMasterPhys,
HpdQuartzWindowPhys,
RMaterial->getOpticalHpdTQuartzWSurface());
G4LogicalBorderSurface* HpdQPhCathodeSurface =
new G4LogicalBorderSurface("HpdQPhCathodeSurface",HpdQuartzWindowPhys,
HpdPhCathodePhys,
RMaterial->getOpticalHpdQuartzWPhCathodeSurface());
G4LogicalBorderSurface* HpdPhCathodeQSurface =
new G4LogicalBorderSurface("HpdQPhCathodeSurface", HpdPhCathodePhys,
HpdQuartzWindowPhys,
RMaterial->getOpticalHpdQuartzWPhCathodeSurface());
//change made on 26-9-01 SE to make photocathode transparent.
// G4LogicalSkinSurface* HpdPhCathodeSkinSurface =
// new G4LogicalSkinSurface("HpdPhCathodeSkinSurface",
// HpdPhCathodeLog,
// RMaterial->getOpticalPhCathodeSkinSurface());
G4LogicalBorderSurface* HpdPhCathodeMasterSurface =
new G4LogicalBorderSurface("HpdPhCathodeMasterSurface",
HpdPhCathodePhys,HpdMasterPhys,
RMaterial->getOpticalPhCathodeBorderSurface());
G4LogicalBorderSurface* HpdMasterPhCathodeSurface =
new G4LogicalBorderSurface("HpdMasterPhCathodeSurface",
HpdMasterPhys,HpdPhCathodePhys,
RMaterial->getOpticalPhCathodeBorderSurface());
G4LogicalBorderSurface* HpdEnvelopeSurface =
new G4LogicalBorderSurface("HpdEnvelopeSurface",HpdMasterPhys,
HpdEnvelopeTubeGrandPhys,
RMaterial->getOpticalHpdMetalSurface());
RichTbHpdEnvelopeTubeGrandLVol=HpdEnvelopeTubeGrandLog;
RichTbHpdEnvelopeTubeGrandPVol=HpdEnvelopeTubeGrandPhys;
RichTbHpdQuartzWLVol=HpdQuartzWindowLog;
RichTbHpdQuartzWPVol=HpdQuartzWindowPhys;
RichTbPhCathodeLVol=HpdPhCathodeLog;
RichTbPhCathodePVol=HpdPhCathodePhys;
}
RichTbHpdLVol=HpdMasterLog;
RichTbHpdPVol=HpdMasterPhys;
}
@@ -0,0 +1,85 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbIOData.cc for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#include "RichTbIOData.hh"
#include "G4HCofThisEvent.hh"
#include "G4VHitsCollection.hh"
#include "G4SDManager.hh"
#include "G4ios.hh"
#include "G4ThreeVector.hh"
#include "RichTbHit.hh"
#include <fstream>
RichTbIOData::RichTbIOData(RichTbRunConfig* RConfig )
:OutputDataFS((RConfig -> getOutputFileName()).c_str())
{
aOutFileString=RConfig -> getOutputFileName();
}
RichTbIOData::~RichTbIOData() { }
void RichTbIOData::WriteOutEventHeaderData( const G4Event* evt ) { }
void RichTbIOData::WriteOutHitData( const G4Event* evt ) {
G4SDManager * SDman = G4SDManager::GetSDMpointer();
G4String colNam;
G4int RichTbCID = SDman->GetCollectionID(colNam="RichTbHitsCollection");
if(RichTbCID<0) return;
G4HCofThisEvent * HCE = evt->GetHCofThisEvent();
RichTbHitsCollection* RHC = NULL;
if(HCE)
{
RHC = (RichTbHitsCollection*)(HCE->GetHC(RichTbCID));
}
if(RHC)
{
G4int n_hit = RHC->entries();
G4cout << " " << n_hit << "Hits being written out "<<G4endl;
// OutputDataFS<<n_hit<<G4endl;
for (G4int ih=0; ih<n_hit; ih++ ) {
RichTbHit* aHit = (*RHC)[ih];
G4int aHitHpdNum = aHit -> GetCurHpdNum();
G4int aHitSectNum = aHit -> GetCurSectNum();
G4int aHitPixelNum = aHit -> GetCurPixNum();
G4ThreeVector aHitPosPC = aHit -> GetPosPC();
OutputDataFS<<" "<< aHitHpdNum<<" "<< aHitSectNum
<<" "<<aHitPixelNum
<<" "<< aHitPosPC.x()<<" "<< aHitPosPC.y()
<<" "<< aHitPosPC.z()<<G4endl;
}
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,234 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbMaterialParameters.cc for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#include <iostream.h>
#include <fstream.h>
#include "globals.hh"
#include "RichTbGeometryParameters.hh"
#include "RichTbMaterialParameters.hh"
#include "FilterTrData.hh"
#include "AerogelTypeSpec.hh"
#include "RichTbAnalysisManager.hh"
void InitializeRichTbMaterial(){
}
vector<G4double> InitializePhotonMomentumVector() {
G4double PhotonEnergyStep=(PhotonMaxEnergy-PhotonMinEnergy)/
NumPhotWaveLengthBins;
vector<G4double>PhotMomVect(NumPhotWaveLengthBins);
for (G4int ibin=0; ibin<NumPhotWaveLengthBins; ibin++){
PhotMomVect[ibin]=PhotonMinEnergy+PhotonEnergyStep*ibin;
}
return PhotMomVect;
}
vector<G4double> InitN2RefIndex(G4double pressure, G4double temperature){
vector<G4double> PmV=InitN2RefPhotW();
vector<G4double> RefN2(NumPhotWaveLengthBins);
G4double GasRhoN2Cur=GasRhoN2atSTP*(GasTemperature_STP/temperature)*
(pressure/ GasPressure_STP);
G4double epho,pfe,cpfe;
for(G4int ibinwn =0; ibinwn<NumPhotWaveLengthBins ; ibinwn++ ){
epho = PmV[ibinwn]/eV;
pfe = SellN2F1/(SellN2E1*SellN2E1 - epho*epho ) +
SellN2F2/(SellN2E2*SellN2E2 - epho*epho );
cpfe=0.3738*(GasRhoN2Cur/GasMolWeightN2)*pfe;
RefN2[ibinwn]=pow((1.0+2*cpfe)/(1.0-cpfe),0.5);
}
return RefN2;
}
vector<G4double> InitN2RefPhotW() {
return InitializePhotonMomentumVector() ;
}
vector<G4double> InitAgelPhotW() {
return InitializePhotonMomentumVector() ;
}
vector<G4double> InitializeHpdQE(G4int ihpdqe) {
// Initialize the HPD QE
G4int iqb;
if(ihpdqe >= NumHpdTot ) {
G4cout<<"Wrong HPD Number for QE " <<ihpdqe<<" vs "
<<NumHpdTot <<G4endl;
}
vector<G4double>qeCurPerCent(NumQEbins);
if(ihpdqe == 0 ){
for(iqb=0; iqb<NumQEbins; iqb++){
qeCurPerCent[iqb] = Hpd0QEPerCent[iqb]* HpdQEReductionFactor;
}
}
if(ihpdqe == 1 ){
for(iqb=0; iqb<NumQEbins; iqb++){
qeCurPerCent[iqb] = Hpd1QEPerCent[iqb]* HpdQEReductionFactor;
}
}
if(ihpdqe == 2 ){
for(iqb=0; iqb<NumQEbins; iqb++){
qeCurPerCent[iqb] = Hpd2QEPerCent[iqb]* HpdQEReductionFactor;
}
}
if(ihpdqe == 3 ){
for(iqb=0; iqb<NumQEbins; iqb++){
qeCurPerCent[iqb] = Hpd3QEPerCent[iqb]* HpdQEReductionFactor;
}
}
return qeCurPerCent;
}
vector<G4double> InitializeHpdWaveL(G4int ihpdqe) {
G4int iqb;
if(ihpdqe >= NumHpdTot ) {
G4cout<<"Wrong HPD Number for QE wavelength " <<ihpdqe<<" vs "
<<NumHpdTot <<G4endl;
}
// for now all HPDs have the same wavelength bins.
vector<G4double>HpdQEW(NumQEbins);
for (iqb=0; iqb<NumQEbins; iqb++){
HpdQEW[iqb]= HpdQEWaveL[iqb];
}
return HpdQEW;
}
void HistoRichTbMaterialProperties(RichTbRunConfig* RConfig) {
G4int AerogelNum=0;
G4double waL=200;
G4double stepsize=7.0;
G4double thickness=(GetCurAerogelLength(AerogelNum))/cm;
AerogelType CurAerogelType=RConfig-> GetCurAerogelType(AerogelNum);
G4double Aparam, Cparam;
if(CurAerogelType == AerogelTypeA ) {
Aparam = AerogelTypeATotTrans;
Cparam = AerogelTypeAClarity*cm/(micrometer*micrometer*micrometer*micrometer);
}
for(G4int Iabin=0; Iabin<100; Iabin ++ ) {
G4double waLInmu = waL/1000.0;
G4double Aetr = Aparam* exp(-Cparam * thickness / pow(waLInmu,4) );
waL += stepsize;
}
G4int ihpdqa;
ihpdqa=0;
vector<G4double>WaveL1 = InitializeHpdWaveL(ihpdqa);
vector<G4double>QEff1 = InitializeHpdQE(ihpdqa);
}
vector<G4int> getDeadPixelList(G4int ihpdNum, G4int isectNum){
vector<G4int>DeadPixelList;
G4int isc,ipsc;
if(DeadPixelList.size() > MaxNumDeadPixelPerHpdSect ){
G4cout<<" Too Many dead Pixels in Hpd "<<DeadPixelList.size()
<<" in Hpd "<<ihpdNum<<G4endl;
}
return DeadPixelList;
}
vector<G4double>GetAerogelRScatLength(AerogelType CurrentAerogelType) {
vector<G4double>AgelRayleighScatLength(NumPhotWaveLengthBins);
vector<G4double>AgelPhotW = InitAgelPhotW();
G4double aClarity;
if(CurrentAerogelType == AerogelTypeA ) {
aClarity=AerogelTypeAClarity/(micrometer*micrometer*micrometer*micrometer);
}else if (CurrentAerogelType == AerogelTypeB ) {
aClarity=AerogelTypeBClarity/(micrometer*micrometer*micrometer*micrometer);
}else if (CurrentAerogelType == AerogelTypeC ) {
aClarity=AerogelTypeCClarity/(micrometer*micrometer*micrometer*micrometer);
}else if (CurrentAerogelType == AerogelTypeD ) {
aClarity=AerogelTypeDClarity/(micrometer*micrometer*micrometer*micrometer);
}else if (CurrentAerogelType == AerogelTypeE ) {
aClarity=AerogelTypeEClarity/(micrometer*micrometer*micrometer*micrometer);
}else {G4cout<<"Unknown Aerogel Type for Rayleigh Scat Length "<<endl; }
if(aClarity != 0.0 ) {
for(G4int ibinw=0; ibinw<NumPhotWaveLengthBins; ibinw++ ){
G4double ephoton=AgelPhotW[ibinw]/eV;
//In the following the 1000 is to convert form nm to micrometer
G4double wphoton=(PhotMomWaveConv/ephoton)/1000.0;
AgelRayleighScatLength[ibinw]=(pow(wphoton,4))/aClarity;
}
}
return AgelRayleighScatLength;
}
G4double GetCurrentBulkTrans(G4double currentMatRefIndex,
G4double currentNeighbourRefIndex,
G4double MaxTotMeasuredTransmission){
G4double ATrans=MaxTotMeasuredTransmission;
G4double ePhot;
// in the following the energy of the photon is not used since
// it is only an approximate calulation.
G4double na= currentMatRefIndex;
G4double nb= currentNeighbourRefIndex;
G4double LossAtEntrance=pow(((na-nb)/(na+nb)),2.0);
G4double LossAtExit=pow(((nb-na)/(nb+na)),2.0);
G4double LightLossAtExternalSurface= LossAtEntrance+ LossAtExit;
ATrans += LightLossAtExternalSurface;
if(ATrans >= 1.0) ATrans=1.0;
return ATrans;
}
@@ -0,0 +1,74 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbPhotoDetector.cc for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#include <iostream.h>
#include <fstream.h>
#include "globals.hh"
#include "RichTbPhotoDetector.hh"
#include "G4VPhysicalVolume.hh"
#include "RichTbGeometryParameters.hh"
#include "RichTbSiDet.hh"
#include "RichTbSiPixel.hh"
#include "G4ThreeVector.hh"
#include "G4RotationMatrix.hh"
RichTbPhotoDetector::RichTbPhotoDetector() {;}
RichTbPhotoDetector::RichTbPhotoDetector(RichTbMaterial* RMaterial,
RichTbComponent* RTbComponent, RichTbRunConfig* rConfig,
G4bool ConstructTrackingSwitch){
ConstructTrackingGeometrySwitch=ConstructTrackingSwitch;
G4VPhysicalVolume* EnclosurePhys=
RTbComponent-> getEnclosurePhysicalVolume();
//Now for the Individual HPDS
NumOfHpds=NumberOfHpds;
//Normally all hpds have the same number of Si sectors.
G4int NumSect= NumberOfSiDetSectors;
// Loop through the HPDs
for(G4int ihpd=0; ihpd<NumberOfHpds; ihpd++){
// create the HPDs
richHPD[ihpd] = new RichTbHpd(RMaterial,EnclosurePhys,ihpd,NumSect,
ConstructTrackingGeometrySwitch);
}
}
RichTbPhotoDetector::~RichTbPhotoDetector(){ ; }
@@ -0,0 +1,293 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbPhysicsList.cc for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#include "G4ios.hh"
#include <iomanip>
#include "globals.hh"
#include "RichTbPhysicsList.hh"
#include "G4ParticleDefinition.hh"
#include "G4ParticleTypes.hh"
#include "G4ParticleWithCuts.hh"
#include "G4ParticleTable.hh"
#include "G4VUserPhysicsList.hh"
#include "G4ParticleTable.hh"
#include "G4UserPhysicsListMessenger.hh"
#include "G4UImanager.hh"
#include "G4Material.hh"
#include "G4MaterialTable.hh"
#include "G4ProcessManager.hh"
#include "G4ProcessVector.hh"
#include "G4UnitsTable.hh"
RichTbPhysicsList::RichTbPhysicsList(RichTbRunConfig* RConfig)
: G4VUserPhysicsList() {
G4cout<<" Now define the physics List"<<G4endl;
rConfigPh = RConfig;
defaultCutValue = 0.1*mm;
// pointer to the particle table
theParticleTable = G4ParticleTable::GetParticleTable();
theParticleIterator = theParticleTable->GetIterator();
}
RichTbPhysicsList::RichTbPhysicsList() :G4VUserPhysicsList(){
// pointer to the particle table
theParticleTable = G4ParticleTable::GetParticleTable();
theParticleIterator = theParticleTable->GetIterator();
}
RichTbPhysicsList::~RichTbPhysicsList() {}
void RichTbPhysicsList::ConstructParticle()
{
// In this method, static member functions should be called
// for all particles which you want to use.
// This ensures that objects of these particle types will be
// created in the program.
ConstructBosons();
ConstructLeptons();
ConstructMesons();
ConstructBaryons();
}
void RichTbPhysicsList::ConstructBosons()
{
// pseudo-particles
G4Geantino::GeantinoDefinition();
G4ChargedGeantino::ChargedGeantinoDefinition();
// gamma
G4Gamma::GammaDefinition();
// optical photon
G4OpticalPhoton::OpticalPhotonDefinition();
}
void RichTbPhysicsList::ConstructLeptons()
{
// leptons
G4Electron::ElectronDefinition();
G4Positron::PositronDefinition();
G4NeutrinoE::NeutrinoEDefinition();
G4AntiNeutrinoE::AntiNeutrinoEDefinition();
G4MuonPlus::MuonPlusDefinition();
G4MuonMinus::MuonMinusDefinition();
G4NeutrinoMu::NeutrinoMuDefinition();
G4AntiNeutrinoMu::AntiNeutrinoMuDefinition();
}
void RichTbPhysicsList::ConstructMesons()
{
// mesons
G4PionPlus::PionPlusDefinition();
G4PionMinus::PionMinusDefinition();
G4PionZero::PionZeroDefinition();
}
void RichTbPhysicsList::ConstructBaryons()
{
// barions
G4Proton::ProtonDefinition();
G4AntiProton::AntiProtonDefinition();
G4Neutron::NeutronDefinition();
G4AntiNeutron::AntiNeutronDefinition();
}
void RichTbPhysicsList::ConstructProcess()
{
AddTransportation();
ConstructGeneral();
ConstructEM();
ConstructOp();
}
#include "G4Decay.hh"
void RichTbPhysicsList::ConstructGeneral()
{
G4Decay* theDecayProcess = new G4Decay();
theParticleIterator->reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
if (theDecayProcess->IsApplicable(*particle)) {
pmanager->AddDiscreteProcess(theDecayProcess);
}
}
}
#include "G4ComptonScattering.hh"
#include "G4GammaConversion.hh"
#include "G4PhotoElectricEffect.hh"
#include "G4MultipleScattering.hh"
#include "G4eIonisation.hh"
#include "G4eBremsstrahlung.hh"
#include "G4eplusAnnihilation.hh"
#include "G4MuIonisation.hh"
#include "G4MuBremsstrahlung.hh"
#include "G4MuPairProduction.hh"
#include "G4hIonisation.hh"
#include "HpdSiEnergyLoss.hh"
void RichTbPhysicsList::ConstructEM()
{
theParticleIterator->reset();
G4cout<<" Now creating EM processes"<<G4endl;
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4String particleName = particle->GetParticleName();
HpdSiEnergyLoss* HpdSiEnergyLossProcess =
new HpdSiEnergyLoss("Silicon","HpdSiEnergyLoss");
pmanager->AddProcess( HpdSiEnergyLossProcess ,-1,2,2);
if (particleName == "gamma") {
// gamma
// Construct processes for gamma
pmanager->AddDiscreteProcess(new G4GammaConversion());
pmanager->AddDiscreteProcess(new G4ComptonScattering());
pmanager->AddDiscreteProcess(new G4PhotoElectricEffect());
} else if (particleName == "e-") {
//electron
//Construct processes for electron
pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
pmanager->AddProcess(new G4eIonisation(),-1,2,2);
pmanager->AddProcess(new G4eBremsstrahlung(),-1,-1,3);
} else if (particleName == "e+") {
//positron
// Construct processes for positron
pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
pmanager->AddProcess(new G4eIonisation(),-1,2,2);
pmanager->AddProcess(new G4eBremsstrahlung(),-1,-1,3);
pmanager->AddProcess(new G4eplusAnnihilation(),0,-1,4);
} else if( particleName == "mu+" ||
particleName == "mu-" ) {
//muon
// Construct processes for muon
pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
pmanager->AddProcess(new G4MuIonisation(),-1,2,2);
pmanager->AddProcess(new G4MuBremsstrahlung(),-1,-1,3);
pmanager->AddProcess(new G4MuPairProduction(),-1,-1,4);
} else {
if ((particle->GetPDGCharge() != 0.0) &&
(particle->GetParticleName() != "chargedgeantino")) {
// all others charged particles except geantino
pmanager->AddProcess(new G4MultipleScattering(),-1,1,1);
pmanager->AddProcess(new G4hIonisation(),-1,2,2);
}
}
}
}
#include "G4Cerenkov.hh"
#include "G4OpAbsorption.hh"
#include "G4OpRayleigh.hh"
#include "G4OpBoundaryProcess.hh"
#include "PadHpdPhotoElectricEffect.hh"
#include "RichTbMaterialParameters.hh"
void RichTbPhysicsList::ConstructOp()
{
G4cout<<"Now creating Optical processes"<<G4endl;
G4Cerenkov* theCerenkovProcess = new G4Cerenkov("Cerenkov");
G4OpAbsorption* theAbsorptionProcess = new G4OpAbsorption();
G4cout<<"Now creating the Rayleigh scattering process "<<G4endl;
G4OpRayleigh* theRayleighScatteringProcess = new G4OpRayleigh();
G4cout<<"Now creating the boundary process "<<G4endl;
G4OpBoundaryProcess* theBoundaryProcess = new G4OpBoundaryProcess();
PadHpdPhotoElectricEffect* theHpdPhotoElectricProcess=
new PadHpdPhotoElectricEffect("PadHpdPhot",rConfigPh);
theCerenkovProcess->SetVerboseLevel(0);
theAbsorptionProcess->SetVerboseLevel(0);
theRayleighScatteringProcess->SetVerboseLevel(0);
theBoundaryProcess->SetVerboseLevel(0);
G4int MaxNumPhotons = 300;
theCerenkovProcess->SetTrackSecondariesFirst(true);
theCerenkovProcess->SetMaxNumPhotonsPerStep(MaxNumPhotons);
G4OpticalSurfaceModel themodel = unified;
theBoundaryProcess->SetModel(themodel);
theParticleIterator->reset();
while( (*theParticleIterator)() ){
G4ParticleDefinition* particle = theParticleIterator->value();
G4ProcessManager* pmanager = particle->GetProcessManager();
G4String particleName = particle->GetParticleName();
if (theCerenkovProcess->IsApplicable(*particle)) {
pmanager->AddContinuousProcess(theCerenkovProcess);
}
if (particleName == "opticalphoton") {
G4cout << " AddDiscreteProcess to OpticalPhoton " << G4endl;
pmanager->AddDiscreteProcess(theAbsorptionProcess);
pmanager->AddDiscreteProcess(theRayleighScatteringProcess);
pmanager->AddDiscreteProcess(theBoundaryProcess);
pmanager->AddDiscreteProcess(theHpdPhotoElectricProcess);
}
}
}
void RichTbPhysicsList::SetCuts()
{
if (verboseLevel >1){
G4cout << "RichTbPhysicsList::SetCuts:";
}
// " G4VUserPhysicsList::SetCutsWithDefault" method sets
// the default cut value for all particle types
SetCutsWithDefault();
}
@@ -0,0 +1,156 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbAnalysisManager.cc for Rich of LHCb
// History:
// Created: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#include "G4Timer.hh"
#include "RichTbPrimaryGeneratorAction.hh"
#include "RichTbDetectorConstruction.hh"
#include "RichTbPrimaryGeneratorMessenger.hh"
#include "G4Event.hh"
#include "G4ParticleGun.hh"
#include "G4ParticleTable.hh"
#include "G4ParticleDefinition.hh"
#include "Randomize.hh"
#include "G4ios.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
G4String RichTbPrimaryGeneratorAction::thePrimaryParticleName="proton" ;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
RichTbPrimaryGeneratorAction::RichTbPrimaryGeneratorAction(
RichTbDetectorConstruction* RichTbDC)
:RichTbDetector(RichTbDC),rndmFlag("off"),xvertex(0.),yvertex(0.),zvertex(0.),
vertexdefined(false)
{
G4int n_particle = 1;
particleGun = new G4ParticleGun(n_particle);
//create a messenger for this class
gunMessenger = new RichTbPrimaryGeneratorMessenger(this);
// default particle kinematic
G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
G4String particleName;
G4ParticleDefinition* particle
= particleTable->FindParticle(particleName="proton");
particleGun->SetParticleDefinition(particle);
thePrimaryParticleName = particle->GetParticleName() ;
particleGun->SetParticleMomentumDirection(G4ThreeVector(0.1,0.2,1.));
particleGun->SetParticleEnergy(100.*GeV);
particleGun->SetParticlePosition(G4ThreeVector(xvertex,yvertex,zvertex));
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
RichTbPrimaryGeneratorAction::~RichTbPrimaryGeneratorAction()
{
delete particleGun;
delete gunMessenger;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void RichTbPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
{
//this function is called at the begining of event
//
thePrimaryParticleName = particleGun->GetParticleDefinition()->
GetParticleName() ;
G4double x0,y0,z0 ;
G4double x1,y1,z1 ;
if(vertexdefined)
{
x1 = 0. ;
y1 = 0. ;
z1 = 1. ;
x0 = xvertex ;
y0 = yvertex ;
z0 = zvertex ;
}
else
{
x1 = 0. ;
y1 = 0. ;
z1 = 1. ;
x0 = 0. ;
y0 = 0. ;
z0 = 0. ; // -0.5*(RichTbDetector->GetWorldSizeZ()) ;
}
G4double r0,phi0 ;
particleGun->SetParticlePosition(G4ThreeVector(x0,y0,z0));
particleGun->GeneratePrimaryVertex(anEvent);
}
///////////////////////////////////////////////////////////////////////
//
//
G4String RichTbPrimaryGeneratorAction::GetPrimaryName()
{
return thePrimaryParticleName ;
}
void RichTbPrimaryGeneratorAction::Setxvertex(G4double x)
{
vertexdefined = true ;
xvertex = x ;
G4cout << " X coordinate of the primary vertex = " << xvertex/mm <<
" mm." << G4endl;
}
void RichTbPrimaryGeneratorAction::Setyvertex(G4double y)
{
vertexdefined = true ;
yvertex = y ;
G4cout << " Y coordinate of the primary vertex = " << yvertex/mm <<
" mm." << G4endl;
}
void RichTbPrimaryGeneratorAction::Setzvertex(G4double z)
{
vertexdefined = true ;
zvertex = z ;
G4cout << " Z coordinate of the primary vertex = " << zvertex/mm <<
" mm." << G4endl;
}
@@ -0,0 +1,89 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbPrimaryGeneratorMessenger.cc for Rich of LHCb
// History:
// Created: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#include "RichTbPrimaryGeneratorMessenger.hh"
#include "RichTbPrimaryGeneratorAction.hh"
#include "G4UIcmdWithAString.hh"
#include "G4UIcmdWithADoubleAndUnit.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
RichTbPrimaryGeneratorMessenger::RichTbPrimaryGeneratorMessenger(RichTbPrimaryGeneratorAction* RichTbGun)
:RichTbAction(RichTbGun)
{
RndmCmd = new G4UIcmdWithAString("/gun/random",this);
RndmCmd->SetGuidance("Shoot randomly the incident particle.");
RndmCmd->SetGuidance(" Choice : on, off(default)");
RndmCmd->SetParameterName("choice",true);
RndmCmd->SetDefaultValue("off");
RndmCmd->SetCandidates("on off");
RndmCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
setxvertexCmd = new G4UIcmdWithADoubleAndUnit("/gun/xvertex",this);
setxvertexCmd->SetGuidance(" Set x coord. of the primary vertex.");
setxvertexCmd->SetParameterName("xv",true);
setxvertexCmd->SetDefaultValue(0.0*mm) ;
setyvertexCmd = new G4UIcmdWithADoubleAndUnit("/gun/yvertex",this);
setyvertexCmd->SetGuidance(" Set y coord. of the primary vertex.");
setyvertexCmd->SetParameterName("yv",true);
setyvertexCmd->SetDefaultValue(0.0*mm) ;
setzvertexCmd = new G4UIcmdWithADoubleAndUnit("/gun/zvertex",this);
setzvertexCmd->SetGuidance(" Set z coord. of the primary vertex.");
setzvertexCmd->SetParameterName("zv",true);
setzvertexCmd->SetDefaultValue(0.0*mm) ;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
RichTbPrimaryGeneratorMessenger::~RichTbPrimaryGeneratorMessenger()
{
delete RndmCmd;
delete setxvertexCmd;
delete setyvertexCmd;
delete setzvertexCmd;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void RichTbPrimaryGeneratorMessenger::SetNewValue(G4UIcommand * command,G4String newValue)
{
if( command == RndmCmd )
{ RichTbAction->SetRndmFlag(newValue);}
if( command == setxvertexCmd)
{ RichTbAction->Setxvertex(setxvertexCmd->GetNewDoubleValue(newValue));}
if( command == setyvertexCmd)
{ RichTbAction->Setyvertex(setyvertexCmd->GetNewDoubleValue(newValue));}
if( command == setzvertexCmd)
{ RichTbAction->Setzvertex(setzvertexCmd->GetNewDoubleValue(newValue));}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -0,0 +1,62 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbROGeometry.cc for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#include "RichTbROGeometry.hh"
RichTbROGeometry::RichTbROGeometry(RichTbMaterial* RMaterial,
RichTbRunConfig* RConfig)
: G4VReadOutGeometry() {
rMaterial=RMaterial;
ROTbConfig=RConfig;
}
RichTbROGeometry::RichTbROGeometry(G4String aString,
RichTbMaterial* RMaterial,
RichTbRunConfig* RConfig)
: G4VReadOutGeometry(aString ) {
rMaterial=RMaterial;
ROTbConfig=RConfig;
}
RichTbROGeometry::~RichTbROGeometry() { }
G4VPhysicalVolume* RichTbROGeometry::Build() {
//Construct the ReadoutGeometry.
ROTbHall =new RichTbHall(rMaterial);
ROTbComponent = new RichTbComponent(rMaterial,ROTbHall,ROTbConfig,false);
ROPhotDet= new RichTbPhotoDetector(rMaterial,ROTbComponent,ROTbConfig,false);
return ROTbHall->getRichTbHallPhysicalVolume();
}
@@ -0,0 +1,94 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbRunAction.cc for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#include "G4Timer.hh"
#include "RichTbRunAction.hh"
#include "G4ios.hh"
#include "G4Run.hh"
#include "G4UImanager.hh"
#include "G4VVisManager.hh"
#include "RichTbAnalysisManager.hh"
#include "RichTbRunConfig.hh"
RichTbRunAction::RichTbRunAction(){
timer = new G4Timer;
}
RichTbRunAction::~RichTbRunAction()
{
delete timer;
}
void RichTbRunAction::BeginOfRunAction(const G4Run* aRun)
{
G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl;
if(G4VVisManager::GetConcreteInstance())
{
G4UImanager* UI = G4UImanager::GetUIpointer();
UI->ApplyCommand("/vis/scene/notifyHandlers");
}
timer->Start();
#ifdef G4ANALYSIS_USE
RichTbAnalysisManager * analysis = RichTbAnalysisManager::getInstance();
analysis->book();
#endif
}
void RichTbRunAction::EndOfRunAction(const G4Run* aRun)
{
#ifdef G4ANALYSIS_USE
RichTbAnalysisManager * analysis = RichTbAnalysisManager::getInstance();
#endif
timer->Stop();
G4cout << "number of event = " << aRun->GetNumberOfEvent()
<< " " << *timer << G4endl;
#ifdef G4ANALYSIS_USE
analysis->finish();
#endif
}
@@ -0,0 +1,246 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbRunConfig.cc for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <fstream.h>
#include "RichTbRunConfig.hh"
#include "RichTbMaterialParameters.hh"
#include "globals.hh"
RichTbRunConfig::RichTbRunConfig()
:CurAerogelTNumber(vector<G4int>(MaxNumberOfAerogelTiles)),
CurAerogelType(vector<AerogelType>(MaxNumberOfAerogelTiles)){
const char* RunConfigFile = "RunConfig.dat" ;
G4cout<<" Run Configuration Input is from "<< RunConfigFile<<G4endl;
G4double rPressureN2,rTemperatureN2;
G4double rMirrorAddTiltXDeg;
G4double rMirrorAddTiltYDeg;
G4double unitofPressureN2=1.0*bar;
G4double unitofTemperatureN2=1.0*kelvin;
// To reduce the number of control variables to input
// from the RunConfig.dat
// file, define a defualt set for most them here for the G4Example.
// Pressure in bar for the nitrogen.
rPressureN2=1.0;
//temperature of nitrogen in kelvin.
rTemperatureN2=292.0;
// refractive index parametrization for nitrogen.
// to be removed.
RefIndexPara=1;
// Mirror tilt in X and Y
rMirrorAddTiltXDeg=0.0;
rMirrorAddTiltYDeg=0.0;
// Assign a default for the graphics variables.
RichTbHall_visib=0;
RichTbEnclosure_visib=2;
RichTbRadFrame_visib=2;
RichTbRadUpW_visib=1;
RichTbRadDnW_visib=1;
RichTbAerogel_visib=1;
RichTbAerogelWrap_visib=1;
RichTbFilter_visib=1;
RichTbMirror_visib=1;
RichTbHpdMaster_visib=1;
RichTbHpdEnvelopeTube_visib=0;
RichTbHpdQuartzW_visib=1;
RichTbHpdPhCathode_visib=1;
RichTbHpdSiDet_visib=1;
RichTbHpdSectCoat_visib=0;
RichTbHpdSiPx_visib=0;
RichTbDrawTrajectory_visib=1;
// Photoelectron energy in keV
HpdPhElectronEnergy=16.0;
FilterTNumber=1;
NumberOfAerogelTiles=1;
CurAerogelTNumber[0]=0;
//
RichTbNumPartEvent=1;
RichTbParticleTypeCode=0;
RichTbParticleStartPosCode=0;
RichTbParticleDirectionCode=0;
RichTbParticleEnergyCode=0;
RichTbParticleEnergy=9.0;
RichTbPhotLowE=1.305;
RichTbPhotHighE=7.2;
WriteMiscOutputFlag=0;
OutputFileName ="../outputData/MyOutputDataFile";
OutputHistoDirName="../HistoOutputVop/";
AerogelRefDataInputFileName="../inputData/aerogelRefIndexInput.dat";
FilterTransDataInputFileName="../inputData/FilterTransInput.dat";
MiscOutFileName="../outputData/MyMiscOutputFile";
//
if(RunConfigFile == 0 ) {
G4cout<<"Unable to read the run configuration file "
<<" using default values for the control variables "
<<" and input and output file names "<<G4endl;
}else {
G4cout<<"Now getting the run configuration file. "
<< "the Runconfig file name is "<< RunConfigFile <<G4endl;
ifstream finp(RunConfigFile);
finp>>RichTbHall_visib;
finp>>RichTbEnclosure_visib;
finp>>RichTbRadFrame_visib;
finp>>RichTbRadUpW_visib;
finp>>RichTbRadDnW_visib;
finp>>RichTbAerogel_visib;
finp>>RichTbAerogelWrap_visib;
finp>>RichTbFilter_visib;
finp>>RichTbMirror_visib;
finp>>RichTbHpdMaster_visib;
finp>>RichTbHpdEnvelopeTube_visib;
finp>>RichTbHpdQuartzW_visib;
finp>>RichTbHpdPhCathode_visib;
finp>>RichTbHpdSiDet_visib;
finp>>RichTbHpdSectCoat_visib;
finp>>RichTbHpdSiPx_visib;
finp>>RichTbDrawTrajectory_visib;
finp>>RichTbParticleEnergy;
finp>>FilterTNumber;
finp>>WriteOutputFile;
finp>>OutputFileName;
finp>>OutputHistoDirName;
finp>>AerogelRefDataInputFileName;
finp>>FilterTransDataInputFileName;
}
CurrentPressureN2=rPressureN2*unitofPressureN2;
CurrentTemperatureN2=rTemperatureN2*unitofTemperatureN2;
MirrorAddTiltX = (rMirrorAddTiltXDeg*pi/180)*rad;
MirrorAddTiltY = (rMirrorAddTiltYDeg*pi/180)*rad;
G4cout<<"Current Run Configuration "<<G4endl;
G4cout<<"Nitrogen Gas Pressure= "<<
CurrentPressureN2/unitofPressureN2<<" bar"<<G4endl;
G4cout<<"Nitrogen Gas Temperature = "
<<CurrentTemperatureN2/unitofTemperatureN2<<
" kelvin"<<G4endl;
G4cout<<"Ref Index parametrization used "<<RefIndexPara<<G4endl;
G4cout<<"Addtional Mirror tilts wrt X and Y in rad "<<MirrorAddTiltX
<<" "<<MirrorAddTiltY<<G4endl;
//For Following variables 0 means make the volume invisible;
// 1 means make it visible as a solid.
// 2 means make it visible as a wireframe.
G4cout<<" RichTbHall_visib = "<<RichTbHall_visib<<G4endl;
G4cout<<"RichTbEnclosure_visib = "<<RichTbEnclosure_visib<<G4endl;
G4cout<<"RichTbRad Frame_visib, FrameUpW_visib, FrameDnW = "
<<RichTbRadFrame_visib
<<" "<<RichTbRadUpW_visib<<" "<<RichTbRadDnW_visib
<<G4endl;
G4cout<<"RichTbAerogel_visib, AerogelWrap_visib = "
<<RichTbAerogel_visib<<RichTbAerogelWrap_visib<<G4endl;
G4cout<<"RichTbFilter_visib = "<<RichTbFilter_visib<<G4endl;
G4cout<<"RichTbMirror_visib = "<<RichTbMirror_visib<<G4endl;
G4cout<<"RichTbHpdMaster_visib = "<<RichTbHpdMaster_visib<<G4endl;
G4cout<<"RichTbHpdEnvelopeTube_visib = "<<RichTbHpdEnvelopeTube_visib<<G4endl;
G4cout<<"RichTbHpdQuartzW_visib = "<<RichTbHpdQuartzW_visib<<G4endl;
G4cout<<"RichTbHpdPhCathode_visib = "<<RichTbHpdPhCathode_visib<<G4endl;
G4cout<<"RichTbHpdSiDet_visib = "<<RichTbHpdSiDet_visib<<G4endl;
G4cout<<"RichTbHpdSiSectCoat_visib = "<<RichTbHpdSectCoat_visib<<G4endl;
G4cout<<"RichTbHpdSiPx_visib = "<<RichTbHpdSiPx_visib<<G4endl;
G4cout<<"RichTbDrawTrajectory_visib = "<<RichTbDrawTrajectory_visib<<G4endl;
G4cout<<"RichTbPhElectronEnergy = "<< HpdPhElectronEnergy<<G4endl;
// In the G4example only upto 1 type of filter is used.
if (FilterTNumber > 0 ) {
G4cout<<"RichTbRunConfig: In the G4example "
<<" only 1 type of filter used " <<G4endl;
FilterTNumber =0;
}
FilterTransData =
new FilterTrData(FilterTNumber,FilterTransDataInputFileName);
CurFilterType= FilterTransData->GetFilterTypeIndex();
G4cout<<"Filter Number = "<<FilterTNumber<<G4endl;
if(FilterTNumber >= 0 ) {
G4cout<<" Filter Type = "<<CurFilterType<<G4endl;
} else {
G4cout<<"No Filter for this Run "<<G4endl;
}
// for the G4example 1 tile is used. In the LHCb implementation
// upto 5 tiles can be used.
if(NumberOfAerogelTiles > 1 ) {
G4cout<<" RichTbRunConfig: For the G4Example "
<<" the number of aerogel tiles is limited to 1 "
<<" Hence setting the number of Tiles to 1 "<<G4endl;
NumberOfAerogelTiles =1;
}
for(G4int iia=0; iia<NumberOfAerogelTiles; iia++) {
if(CurAerogelTNumber[iia] == 0 ) CurAerogelType[iia]=AerogelTypeA;
if(CurAerogelTNumber[iia] == 1 ) CurAerogelType[iia]=AerogelTypeB;
if(CurAerogelTNumber[iia] == 2 ) CurAerogelType[iia]=AerogelTypeC;
if(CurAerogelTNumber[iia] == 3 ) CurAerogelType[iia]=AerogelTypeD;
if(CurAerogelTNumber[iia] == 4 ) CurAerogelType[iia]=AerogelTypeE;
}
G4cout<<"Number of Aerogel Tiles "<<NumberOfAerogelTiles<<G4endl;
for(G4int ia=0; ia<NumberOfAerogelTiles; ia++ ) {
G4cout<<" AerogelNumber and Type "<<CurAerogelTNumber[ia]<<" "<<
CurAerogelType[ia]<<G4endl;
}
G4cout<<"Aerogel RefIndex Input file Name is "
<<AerogelRefDataInputFileName<<G4endl;
AerogelRefractiveInd= new AerogelRefData(AerogelRefDataInputFileName);
G4cout<<"Write Outfile File Flag set to "<<WriteOutputFile<<G4endl;
G4cout<<"OutputData file = "<<OutputFileName <<G4endl;
G4cout<<"OutputHistoDir = "<<OutputHistoDirName <<G4endl;
G4String PaType;
if(RichTbParticleTypeCode == 0 )PaType="piminus";
if(RichTbParticleTypeCode == 1 )PaType="optical photon";
if(RichTbParticleTypeCode == 2 )PaType="Mixture of piminus and proton";
G4cout<<"Number of beam particles per event = "<<RichTbNumPartEvent<<G4endl;
G4cout<<"Particle Type Code "<<RichTbParticleTypeCode
<<" "<< PaType <<G4endl;
G4cout<<"Particle Start Pos and Direction Energy codes "
<< RichTbParticleStartPosCode <<" "<< RichTbParticleDirectionCode
<<" "<<RichTbParticleEnergyCode<<G4endl;
G4cout<<"Energy code 0 is for charged particle and 1 is for photon generation"
<< " using particle gun "<<G4endl;
G4cout<<"Gun Gen Charged Particle energy in GeV is "
<<RichTbParticleEnergy<<G4endl;
G4cout<<"Gun Gen Photon energy range in eV is "<<RichTbPhotLowE
<<" "<< RichTbPhotHighE <<G4endl;
}
RichTbRunConfig::~RichTbRunConfig() { ; }
+149
View File
@@ -0,0 +1,149 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbSD.cc for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#include "RichTbSD.hh"
#include "RichTbHit.hh"
#include "G4Step.hh"
#include "G4HCofThisEvent.hh"
#include "G4Track.hh"
#include "G4SDManager.hh"
#include "G4ios.hh"
#include "G4VProcess.hh"
RichTbSD::RichTbSD(G4String DetName, G4int Numhpd , G4int NumSect,
G4int NumPixel,
G4String CollectionName)
:G4VSensitiveDetector(DetName),NumberOfSensitiveHpds(Numhpd),
NumberOfSensitiveSectorsInHpd(NumSect),
NumberOfSensitivePixelsInSector(NumPixel),
HpdSDID(Numhpd*NumSect*NumPixel),HCID(-1)
{
G4String HCname;
collectionName.insert(HCname="RichTbHitsCollection");
}
RichTbSD::~RichTbSD(){
}
void RichTbSD::Initialize(G4HCofThisEvent* HCE)
{
RichTbHitCollection = new RichTbHitsCollection
(SensitiveDetectorName,collectionName[0]);
for (G4int jhpd =0; jhpd < NumberOfHpds; jhpd++){
for(G4int jsect=0; jsect < NumberOfSiDetSectors; jsect++){
for (G4int jpixel = 0; jpixel < NumberOfPadHpdSiPixels ; jpixel++ ){
HpdSDID[NumberOfSensitiveSectorsInHpd*
NumberOfSensitivePixelsInSector*jhpd+
NumberOfSensitivePixelsInSector*jsect+jpixel]=-1;
}
}
}
}
G4bool RichTbSD::ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist)
{
G4Track* aTrack = aStep->GetTrack();
if(aTrack ->GetDefinition()->GetPDGCharge() == 0.0 ) return false;
G4double edep = aStep->GetTotalEnergyDeposit();
if(edep < 0.0001) return false;
G4StepPoint* PrePosition = aStep->GetPreStepPoint();
G4int CurrentHpdNumber = PrePosition->GetPhysicalVolume()
-> GetMother() -> GetCopyNo();
G4int CurrentSectorNumber= PrePosition->GetPhysicalVolume()
->GetCopyNo();
G4VPhysicalVolume* ROphysVol = ROhist -> GetVolume();
G4int CurrentPixelNumber = ROphysVol->GetCopyNo();
G4ThreeVector HitAtPhotoCathode;
if(aTrack->GetCreatorProcess() -> GetProcessName() == "PadHpdPhot") {
HitAtPhotoCathode=aTrack->GetVertexPosition();
}
G4int CopyId= NumberOfSensitiveSectorsInHpd*
NumberOfSensitivePixelsInSector*CurrentHpdNumber+
NumberOfSensitivePixelsInSector*CurrentSectorNumber+
CurrentPixelNumber;
if( HpdSDID[CopyId ] == -1 ) {
RichTbHit* newHit = new RichTbHit();
newHit->SetEdep( edep );
newHit->SetPos( aStep->GetPreStepPoint()->GetPosition() );
newHit->SetPosPC(HitAtPhotoCathode);
newHit->SetCurHpdNum ( CurrentHpdNumber );
newHit->SetCurSectNum ( CurrentSectorNumber );
newHit->SetCurPixNum ( CurrentPixelNumber );
//For now the same SD detector cell is allowed to have
//multiple hits from the same event. This is ok for
// analogue readout for photoelectron counting.
//This is to be changed in the future.
G4int NumHits = RichTbHitCollection->insert( newHit );
HpdSDID[CopyId]= NumHits -1 ;
} else {
// the current pixel is already hit in this event.
// here we can add extra energy (adc counts) to the
// existing hit. But this is not relevant to the
// current Tb analysis.
(*RichTbHitCollection)[HpdSDID[CopyId]]->AddEdep( edep );
G4cout << " Multiple hits in Hpd sector pixel " << CurrentHpdNumber
<<" "<< CurrentSectorNumber<<" "<< CurrentPixelNumber<< G4endl;
}
return true;
}
void RichTbSD::EndOfEvent(G4HCofThisEvent*HCE){
if( HCID < 0 ){
HCID = G4SDManager::GetSDMpointer()->GetCollectionID(collectionName[0]); }
HCE->AddHitsCollection( HCID, RichTbHitCollection );
}
void RichTbSD::clear(){}
void RichTbSD::DrawAll(){ }
void RichTbSD::PrintAll(){ }
+160
View File
@@ -0,0 +1,160 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbSiDet.cc for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#include <iostream.h>
#include "globals.hh"
#include "G4Box.hh"
#include "G4Trd.hh"
#include "G4RotationMatrix.hh"
#include "G4ThreeVector.hh"
#include "G4Transform3D.hh"
#include "G4LogicalVolume.hh"
#include "G4VPhysicalVolume.hh"
#include "G4PVPlacement.hh"
#include "G4UnionSolid.hh"
#include "RichTbSiDet.hh"
#include "G4SDManager.hh"
#include "RichTbSD.hh"
#include "G4LogicalBorderSurface.hh"
RichTbSiDet::RichTbSiDet() {;}
RichTbSiDet::~RichTbSiDet() {;}
RichTbSiDet::RichTbSiDet(RichTbMaterial* RMaterial,
G4VPhysicalVolume* MotherOfSiDet,
G4bool ConstructTrackingGeomSwitch,
G4int IHpdNum, G4int SectNum){
//
//
ConstructTrackGeomSwitch=ConstructTrackingGeomSwitch;
IHpdNumber=IHpdNum;
CurSiSectNum=SectNum;
//This is done for each sector.
G4double SiSectRotZ;
G4double SiSectPosX,SiSectPosY;
G4double SiSectCoatingRotZ;
G4double SiSectCoatingPosX,SiSectCoatingPosY;
G4int isec=SectNum;
G4Trd* HpdSiSect=
new G4Trd("HpdSiSect",SiSectTrapHalfX1, SiSectTrapHalfX2,
SiSectTrapHalfY1,SiSectTrapHalfY2,SiSectTrapHalfZ);
G4RotationMatrix SiSectRotationX,SiSectRotationZ;
SiSectRotationX.rotateX(SiSectRotX);
SiSectRotZ = SiSectAngStart-isec*SiSectAngSize;
SiSectRotationZ.rotateZ(SiSectRotZ);
SiSectPosX=SiSectTrapHalfZ*cos(SiSectRotZ-pi/2.0);
//
if(isec < NumberOfSiDetSectors/2 ) {
SiSectPosY=SiSectTrapHalfZ*sin(SiSectRotZ-pi/2.0)-SiSectHalfMoonGap/2.0;
}else{
SiSectPosY=SiSectTrapHalfZ*sin(SiSectRotZ-pi/2.0)+SiSectHalfMoonGap/2.0;
}
G4ThreeVector SiSectTrapPos(SiSectPosX,SiSectPosY,SiSectPosZ);
G4Transform3D SiSectTransform(SiSectRotationZ*SiSectRotationX,
SiSectTrapPos);
G4LogicalVolume* HpdSiSectLog =
new G4LogicalVolume(HpdSiSect,RMaterial->getHpdSiDetMaterial(),
"HpdSiSect",0,0,0);
G4VPhysicalVolume* HpdSiSectPhys=
new G4PVPlacement(SiSectTransform,"HpdSiSect",
HpdSiSectLog,MotherOfSiDet,false,SectNum);
if(ConstructTrackingGeomSwitch) {
G4Trd* HpdSectCoat=
new G4Trd("HpdSectCoat",SiSectCoatingTrapHalfX1,
SiSectCoatingTrapHalfX2,
SiSectCoatingTrapHalfY1,SiSectCoatingTrapHalfY2,
SiSectCoatingTrapHalfZ);
G4RotationMatrix SiSectCoatingRotationX,SiSectCoatingRotationZ;
SiSectCoatingRotationX.rotateX(SiSectCoatingRotX);
SiSectCoatingRotZ = SiSectRotZ;
SiSectCoatingRotationZ.rotateZ(SiSectCoatingRotZ);
SiSectCoatingPosX= SiSectPosX;
SiSectCoatingPosY=SiSectPosY;
G4ThreeVector SiSectCoatingTrapPos(SiSectCoatingPosX,SiSectCoatingPosY,
SiSectCoatingPosZ);
G4Transform3D SiSectCoatingTransform(SiSectCoatingRotationZ*SiSectCoatingRotationX, SiSectCoatingTrapPos);
G4LogicalVolume* HpdSectCoatLog =
new G4LogicalVolume(HpdSectCoat,RMaterial->getHpdSiCoatingMaterial(),
"HpdSectCoat",0,0,0);
G4VPhysicalVolume* HpdSectCoatPhys=
new G4PVPlacement(SiSectCoatingTransform,"HpdSectCoat",
HpdSectCoatLog,MotherOfSiDet,false,SectNum);
G4LogicalBorderSurface* HpdSectCoatSurface =
new G4LogicalBorderSurface("HpdSectCoatSurface",MotherOfSiDet ,
HpdSectCoatPhys ,
RMaterial-> getHpdSiCoatSurface());
RichTbHpdSectCoatLVol=HpdSectCoatLog;
RichTbHpdSectCoatPVol=HpdSectCoatPhys;
}
//Construct the Silicon Pixels
NumHpdSiPix=NumberOfPadHpdSiPixels;
if(!ConstructTrackingGeomSwitch) {
for (G4int ipix=0; ipix<NumberOfPadHpdSiPixels; ipix++){
hpdSiPixel[ipix] = new RichTbSiPixel(RMaterial,HpdSiSectPhys,
IHpdNum,isec,ipix);
}
}
RichTbHpdSiSectLVol=HpdSiSectLog;
RichTbHpdSiSectPVol=HpdSiSectPhys;
}
+145
View File
@@ -0,0 +1,145 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbSiPixel.cc for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#include <iostream.h>
#include "globals.hh"
#include "G4Box.hh"
#include "G4Trd.hh"
#include "G4RotationMatrix.hh"
#include "G4ThreeVector.hh"
#include "G4Transform3D.hh"
#include "G4LogicalVolume.hh"
#include "G4VPhysicalVolume.hh"
#include "G4PVPlacement.hh"
#include "G4UnionSolid.hh"
#include "RichTbSiPixel.hh"
#include "G4SDManager.hh"
#include "RichTbSD.hh"
#include "RichTbRODummySD.hh"
#include "RichTbMaterialParameters.hh"
#include "G4IntersectionSolid.hh"
RichTbSiPixel::RichTbSiPixel() {;}
RichTbSiPixel::~RichTbSiPixel() {;}
RichTbSiPixel::RichTbSiPixel(RichTbMaterial* RMaterial,
G4VPhysicalVolume* MotherOfSiPixel,
G4int IHpdNum, G4int Isector ,G4int ipixel){
//
//
ICurSectorNumber=Isector;
HpdSiPixelnum=ipixel;
ICurHpdNumber=IHpdNum;
G4Trd* HpdSiSectTrapInt=
new G4Trd("HpdSiSectTrapInt",SiSectTrapHalfX1, SiSectTrapHalfX2,
SiSectTrapHalfY1,SiSectTrapHalfY2,SiSectTrapHalfZ);
G4Box* HpdSiPxBox;
if(ipixel == BigPixelNum ) {
HpdSiPxBox=new G4Box("HpdSiPxBigBox",
SiPixelHalfX,SiPixelHalfY,SiBigPixelHalfZ);
}else {
HpdSiPxBox=new G4Box("HpdSiPxBox",SiPixelHalfX,SiPixelHalfY,SiPixelHalfZ);
}
//
//For the rotation and translation of the Si Pixel.
G4RotationMatrix HpdSiPxRotation, HpdSiSectTrapIntRotation;
G4double RichTbHpdSiPxShiftY=HpdSiPixPosZ;
G4double RichTbHpdSiPxShiftX
=RichTbPadHpdSiPixPos(ipixel).getPadHpdSiPixPosX();
G4double RichTbHpdSiPxShiftZ
=RichTbPadHpdSiPixPos(ipixel).getPadHpdSiPixPosY()-SiSectTrapHalfZ;
G4ThreeVector HpdSiPxTrsl( RichTbHpdSiPxShiftX,
RichTbHpdSiPxShiftY,
RichTbHpdSiPxShiftZ);
G4Transform3D HpdSiPxTransform(HpdSiPxRotation,HpdSiPxTrsl);
G4ThreeVector HpdSiSectTrapIntTrsl(0.0*mm, 0.0*mm, 0.0*mm);
G4Transform3D HpdSiSectTrapIntTransform( HpdSiSectTrapIntRotation,
HpdSiSectTrapIntTrsl);
//Now for the placements
G4LogicalVolume* HpdSiPxLog;
G4VPhysicalVolume* HpdSiPxPhys;
// The pixels at the pixel edge are intersected with the
// sector. The BigPixel is also at the edge.
if(PixelAtSectEdge[ipixel]){
G4IntersectionSolid* HpdSiPxTrapBox
= new G4IntersectionSolid("PixelSectTrapInt", HpdSiSectTrapInt,
HpdSiPxBox, HpdSiPxTransform);
HpdSiPxLog=
new G4LogicalVolume( HpdSiPxTrapBox,RMaterial->getHpdSiDetMaterial(),
"PixelSectTrapInt",0,0,0);
HpdSiPxPhys=
new G4PVPlacement(HpdSiSectTrapIntTransform,"PixelSectTrapInt",
HpdSiPxLog,MotherOfSiPixel,false,ipixel);
}else{
HpdSiPxLog=
new G4LogicalVolume( HpdSiPxBox,RMaterial->getHpdSiDetMaterial(),
"HpdSiPxBox",0,0,0);
HpdSiPxPhys=
new G4PVPlacement(HpdSiPxTransform,"HpdSiPxBox",
HpdSiPxLog,MotherOfSiPixel,false,ipixel);
}
//Now for the readout dummy sensitive detector
// This just flags the pixel as active.
//First Get the deadPixel List
G4bool thisPixelisAlive=true;
vector<G4int>DeadPxL = getDeadPixelList(IHpdNum,Isector);
for(G4int ideadP=0; ideadP<DeadPxL.size(); ideadP++){
if(ipixel == DeadPxL[ideadP] )thisPixelisAlive=false;
}
PixelIsAlive= thisPixelisAlive;
if(thisPixelisAlive){
RichTbRODummySD * DummySensi = new RichTbRODummySD;
HpdSiPxLog->SetSensitiveDetector(DummySensi);
}
RichTbHpdSiPixelLVol=HpdSiPxLog;
RichTbHpdSiPixelPVol=HpdSiPxPhys;
}
@@ -0,0 +1,32 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbStackingAction.cc for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#include "RichTbStackingAction.hh"
RichTbStackingAction::RichTbStackingAction() { ;}
RichTbStackingAction::~RichTbStackingAction() { ;}
@@ -0,0 +1,256 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbSteppingAction.cc for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#include "globals.hh"
#include "RichTbSteppingAction.hh"
#include "G4SteppingManager.hh"
#include "RichTbAnalysisManager.hh"
#include "RichTbMaterial.hh"
#include "RichTbGeometryParameters.hh"
#include "RichTbMaterialParameters.hh"
#include "RichTbRunConfig.hh"
#include "RichTbPrimaryGeneratorAction.hh"
#include "G4ParticleDefinition.hh"
#include "G4DynamicParticle.hh"
#include "G4Material.hh"
#include "G4Step.hh"
#include "G4Track.hh"
#include "G4Electron.hh"
#include "G4ThreeVector.hh"
#include "G4OpticalPhoton.hh"
#include "G4PionMinus.hh"
#include "AIDA/AIDA.h"
RichTbSteppingAction::RichTbSteppingAction(RichTbRunConfig* rConfig , RichTbPrimaryGeneratorAction* RPrimGenAction){
richtbRunConfig= rConfig;
rPrimGenAction = RPrimGenAction;
HpdPhElectronKE=rConfig->getHpdPhElectronEnergy();
uParticleChange=new G4VParticleChange();
}
RichTbSteppingAction::~RichTbSteppingAction() { ;}
void RichTbSteppingAction::UserSteppingAction(const G4Step* aStep){
RichTbGenericHisto(aStep);
}
void RichTbSteppingAction:: RichTbDebugHisto(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
// 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 (pPostStepPoint->GetStepStatus() == fGeomBoundary){
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";
//
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 ) {
#ifdef G4ANALISYS_USE
RichTbAnalysisManager * analysis = RichTbAnalysisManager::getInstance();
analysis->bumpNumPhotonsBeforeAerogel();
#endif
}
}
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
#ifdef G4ANALYSIS_USE
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();
#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
RichTbAnalysisManager * analysis = RichTbAnalysisManager::getInstance();
analysis->bumpNumPhotonsBeforeAerogel();
#endif
}
}
}
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());
// 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();
const G4ThreeVector PhotOrgUnitMom =
aPhotTrack->GetVertexMomentumDirection();
G4double Ckv_angle= acos(PhotOrgUnitMom.z());
analysis->getfhistoCkvProdSmall()->fill(Ckv_angle);
//Now for the photon emission point in aerogel
const G4ThreeVector PhotEmisPt = aPhotTrack->GetVertexPosition();
analysis->getfhistoEmisZ()->fill( PhotEmisPt.z());
#endif
}
}
}
}
}
}
}
@@ -0,0 +1,31 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbTrackingAction.cc for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#include "RichTbTrackingAction.hh"
RichTbTrackingAction::RichTbTrackingAction() { ;}
RichTbTrackingAction::~RichTbTrackingAction() { ;}
@@ -0,0 +1,154 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// Rich advanced example for Geant4
// RichTbVisManager.cc for Rich of LHCb
// History:
// Created: Sajan Easo (Sajan.Easo@cern.ch)
// Revision and changes: Patricia Mendez (Patricia.Mendez@cern.ch)
/////////////////////////////////////////////////////////////////////////////
#ifdef G4VIS_USE
#include "RichTbVisManager.hh"
// Supported drivers...
#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"
#endif
#ifdef G4VIS_USE_OPENGLWIN32
#include "G4OpenGLImmediateWin32.hh"
#include "G4OpenGLStoredWin32.hh"
#endif
#ifdef G4VIS_USE_OPENGLXM
#include "G4OpenGLImmediateXm.hh"
#include "G4OpenGLStoredXm.hh"
#endif
#ifdef G4VIS_USE_OIX
// #include "G4OpenInventorX.hh"
#endif
#ifdef G4VIS_USE_OIWIN32
#include "G4OpenInventorWin32.hh"
#endif
#ifdef G4VIS_USE_VRML
#include "G4VRML1.hh"
#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 () { ; }
RichTbVisManager::~RichTbVisManager () {;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void RichTbVisManager::RegisterGraphicsSystems () {
#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);
#endif
#ifdef G4VIS_USE_OPENGLWIN32
RegisterGraphicsSystem (new G4OpenGLImmediateWin32);
RegisterGraphicsSystem (new G4OpenGLStoredWin32);
#endif
#ifdef G4VIS_USE_OPENGLXM
RegisterGraphicsSystem (new G4OpenGLImmediateXm);
RegisterGraphicsSystem (new G4OpenGLStoredXm);
#endif
#ifdef G4VIS_USE_OIX
// RegisterGraphicsSystem (new G4OpenInventorX);
#endif
#ifdef G4VIS_USE_OIWIN32
RegisterGraphicsSystem (new G4OpenInventorWin32);
#endif
#ifdef G4VIS_USE_VRML
RegisterGraphicsSystem (new G4VRML1);
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."
<< G4endl;
PrintAvailableGraphicsSystems ();
}
}
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
+24
View File
@@ -0,0 +1,24 @@
# $Id: GNUmakefile,v 1.2 2003/06/16 17:06:43 dressel Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-05-02 $
# --------------------------------------------------------------
TIARA_SRC_DIRS = tiaraPhysicsPackaging tiaraPhysicsLists tiara
TIARA_SRC_SWIG_DIRS = CLHEPWrapper G4KernelWrapper TiaraWrapper
include $(G4INSTALL)/config/architecture.gmk
.PHONY: Tiara tiaraClean swigClean
Tiara:
@for dir in $(TIARA_SRC_DIRS); do ( cd source/$$dir && $(MAKE)); done;:
@for dir in $(TIARA_SRC_SWIG_DIRS); do ( cd source/$$dir && $(MAKE)); done;:
tiaraClean:
@for dir in $(TIARA_SRC_DIRS); do ( cd source/$$dir && $(MAKE) tiaraClean); done;:
@for dir in $(TIARA_SRC_SWIG_DIRS); do ( cd source/$$dir && $(MAKE) tiaraClean); done;:
swigClean:
@for dir in $(TIARA_SRC_SWIG_DIRS); do ( cd source/$$dir && $(MAKE) swigClean); done;:
+36
View File
@@ -0,0 +1,36 @@
# $Id: History,v 1.8 2003/06/20 15:34:37 dressel Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-05-02 $
# -------------------------------------------------------------------
=========================================================
Geant4 - an Object-Oriented Toolkit for Simulation in HEP
=========================================================
Category History file
---------------------
This file should be used by G4 developers and category coordinators
to briefly summarize all major modifications introduced in the code
and keep track of all category-tags.
It DOES NOT substitute the CVS log-message one should put at every
committal in the CVS repository !
----------------------------------------------------------
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
Jun 20th, 2003 M.Dressel - Tiara-V05-01-04
- using CLHEP units replacing G4Dimensions.hh
Jun 18th, 2003 M.Dressel - Tiara-V05-01-03
- change environment configuration for swig
Jun 17th, 2003 M.Dressel - Tiara-V05-01-02
- changes for rh73 with gcc-2.95.2 and rh73 with gcc-3.2
June 16th, 2003 M.Dressel - Tiara-V05-01-01
- building with gmake supported, cvs meta info added
June 12th, 2003 M.Dressel - Tiara-V05-01-00
- Created
+271
View File
@@ -0,0 +1,271 @@
# $Id: README,v 1.11 2003/06/18 12:27:46 dressel Exp $
# -------------------------------------------------------------------
# GEANT4 tag $Name: geant4-05-02 $
# -------------------------------------------------------------------
Simulation of the TIARA experiment using importance sampling
============================================================
This example is a simulation of the neutron shielding experiment TIARA
see http://idsun1.kek.jp/nakao/research/tiara/tiara.htm.
The example is meant to provide a realistic example for
applying geometrical importance sampling (geometrical splitting and
Russian roulette).
In the TIARA experiment neutrons of two different energy distributions
created by 43 MeV and 68 MeV protons bombarding a 7Li target are measured
behind several shields. The simulation starts from the neutron spectra.
In this example the interactions of the neutrons with the (concrete)
shields are simulated and energy dependent neutron fluxes are measured
behind the shields. Users may chose to run the simulation for different
shielding configuration with or without importance sampling.
The simulated neutron fluxes are compared to the published
experimental data. The efficiency of applying importance sampling
depends strongly on the shied thickness and importance configuration.
The efficiency of the simulations may be obtained as FOM values.
See also "Geant4 User's Guide
For Application Developers", Chapter "Toolkit Fundamentals"
Section "Event Biasing Techniques" and references there.
The example has been tested on CERN RH 7.3 with the
gcc-3.2 and gcc-2.95.2 compilers.
Note for system testing without analysis: see points 1, 1.3 and 3.2.
1) Setting the environment
==========================
You should have Geant4 compiled with:
"G4LIB_BUILD_SHARED" set to 1.
You need to set:
"NeutronHPCrossSections" (e.g. to ${G4INSTALL}/data/G4NDL3.7)
Three examples are given of how to set environment variables
in the three cases:
1.1) Anaphe via AFS (most simple):
--------------------
You have access to afs and you want to use Anaphe for the
analysis:
Set the following environment variables:
"G4ANALYSIS_USE"
"ANAPHETOP" (e.g. /afs/cern.ch/sw/lhcxx)
"AIDA_DIR" (e.g. /afs/cern.ch/sw/contrib/AIDA/3.0/src/cpp)
"ANAPHE_SCRIPTS" (e.g. /afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.4/scripts)
Finally source the script envCommon.csh
1.2) No afs but a local Anphe and AIDA installation:
----------------------------------------------------
You don't use afs but you have a local installation of Anaphe and AIDA
(e.g. from http://anaphe.web.cern.ch/anaphe/.
Set the following environment variables:
"G4ANALYSIS_USE"
"ANAPHETOP" (e.g. <directory>/Anaphe/release)
"AIDA_DIR" (e.g. <directory>/AIDA/3.0.0/3.0.0/AIDA/3.0/src/cpp)
"ANAPHE_SCRIPTS" (e.g. ${ANAPHETOP}/share/LHCXX/5.0.5/scripts)
here <directory> is a place holder for your directory with the
respective installations of Anaphe and AIDA
Finally source the script envCommon.csh
1.3) No afs and no Anaphe and no AIDA (e.g. for system testing):
----------------------------------------------------------------
You don't want to use Anaphe and AIDA and you don't have no afs access.
Make sure "G4ANALYSIS_USE" is unset (e.g. unsetenv G4ANALYSIS_USE).
Note: python must be built against a "libc".
You may do this by creating a shared library by a command
similar to this
"ld -shared -o libpython2.2.so --whole-archive libpython2.2.a /usr/lib/libc.so"
Set the following environment variables:
"PYTHONVERSION" (2.2 or higher)
"PYTHON_BASE_DIR" (e.g. to /usr/)
"SWIG_VERSION" (e.g. 1.3 or higher)
"SWIG_BASE_DIR" (e.g. /users/dressel/local)
"CLHEP_BASE_DIR" (e.g. to /users/dressel/CLHEP)
Finally source the script envCommon.csh
2) Building the example
=======================
Geant4 has to be compiled using G4LIB_BUILD_SHARED 1 and the one of the
above environment settings have to be set.
Type "gmake".
2.1) In more detail
-------------------
Geant4 should be compiled into granular shared libraries.
Therefore before compiling Geant4 set "G4LIB_BUILD_SHARED" to "1".
External packages used in this example are Anaphe, SWIG and Python.
The Anaphe package comes with SWIG and Python versions used to build
Anaphe itself. These SWIG and Python versions should also be used with
this example if Anaphe is used.
2.2) Cleaning up
----------------
To remove the files created by swig ( *_wrap.cc, the corresponding
.py files) use "gmake swigClean.
To remove the directories of compiled code related to this example under
$G4WORKDIR/tmp/$G4SYSTEM/ use "gmake tiaraClean".
3) Running the example:
=======================
3.1) Using Anaphe
-----------------
Change to the sub directory "run" and execute "runSim.py".
"runSim.py" runs an example configuration which nay be
changed by the user. The results of the simulation are stored in
the directory "simData".
The script "runSim.py" periodically prints scoring information to the
screen.
It also prints out the relative path of a ".shelve" file.
This file can be used to access results of the simulation.
In case the example was build using analysis
results may be viewed e.g. using lizard and scripts:
1) Start python2.2 or lizard
2) type: import dataAcess
3) type: p = dataAcess.ExpMcPlot (shelveFileName,detectorposition)
where "shelveFileName" is the name (enclosed in quotes) of the
shelve file created during the execution of anaSim.py.
The name is printed on the screen during execution of runSim.py.
"detectorposition" may be "00, "20" or "40" and stand for the
detectors 00, 20, 40 cm off beam axis respectively.
4) type: p.display ()
5) type: import extractShelve
6) type: extractShelve.getFluxes (p.she)
p.she is the shelve object containing simulation results.
This prints the FOM values for the used detectors
for two energy regions below and in the peak region.
The FOM are should be compared to unbiased simulations. To run
an unbiased simulation set the importance values to one (see
runSim.py)
Note: the output files written after every run are incremental! Meaning
the file with the highest run number contains the data from
all the runs!
The modules (dataAcess, extractShelve) imported in the above steps are
placed in source/py_modules in files named after the module ending with
".py".
Since the simulation time used by "runSim.py" is only 5 minutes the
calculated results have large errors. If you want to see a better result
do the following changes in "naSim.py".
Extend the total run time to e,g, 2 hours by setting:
"totalTime = 2 * myUtils.hour",
set the print out period to 30 minutes by setting:
"timeForOneRun = 30 * myUtils.min".
3.2) Not using Anaphe (mainly for system testing)
-------------------------------------------------
Change to the sub directory "run" and execute
runSimNoAnalysis.py.
4) Content of the directory:
============================
simCommon.csh - a script to setup environment variables
in case the above one of the above environment settings have been
done beforehand.
GNUmakefile - for building the example
data / - directory containing experimental data
expDataOrig - experimental data taken from
http://idsun1.kek.jp/nakao/research/tiara/tiara.htm
expDataConverted - some of the experimental data and the source
spectra converted into Anaphes DataPointSet
and stored in Anaphes xml format
source / - directory containing the source code
tiara - C++ source code
tiaraPhysicsLists - C++ source code of physics lists
tiaraPhysicsPackaging - C++ source cod with common
classes for the physics lists
CLHEPWrapper - wrapper classes for usage in python
\include\CLHEP.i - specification file for swig
\src\CLHEP_wrap.cc - wrapper created with swig
G4KernelWrapper - wrapper classes for usage in python
TiaraWrapper - wrapper classes for usage in python
py_modules - python modules for running and analysing
swig.gmk - makefile rules for using swig
run / - directory for running the example
runSim.py - executable example script
runSimNoAnalysis.py - executable script for running without
analysis
5) Technicalities about this example
===================================
This example is composed out of a layer of classes written in C++
(source/tiara/include, source/tiara/src), a layer of python
shadow classes created by swig (source/CLHEPWrapper,
source/G4KernelWrapper, source/TiaraWrapper) and layer of
python modules (source/py_modules).
The C++ layer under source/tiara provides lower level classes closely
related to the Geant4 kernel.
The shadow classes in the source/*Wrapper directories provide classes
that may be instantiated in a python script or session. This way the
lower level C++ code can be used directly for scripting in python. The
shadow classes are declared in the files with extensions ".i" in the
source/*Wrapper/include directories. Swig is used to create C++ code for
a library that can be loaded into python and python modules (files with
extensions .py in the source/*Wrapper directories). When the python
modules created by swig are imported into python (in a session or a
script) the corresponding C++ library is automatically loaded as well.
The python modules in source/py_modules provide classes and functions
that may be changed or customized more frequently than the C++ classes
in source/tiara. These classes complete the construction of geometries
take care of the procedure of setting up the simulation, the run sequence
and the analysis after the simulation has been ran.
The script runSim.py is an commented example of using the python modules
to run a simulation.
@@ -0,0 +1,55 @@
Experimental neutron spectra measured by BC501A at TIARA1992/10 [43c100-00]
Proton Energy : 43 MeV
Shielding Material :100.0cm thick Concrete
Iron collimator (10.9cm diam.) : 0cm thick
Distance from Li target to the shield surface(0cm thickness) = 403 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-a) =3.15E+09 [sr/micro-Coulomb]
1.94E+04 [cm^2/micro-Coulomb] at 403 cm
Measured position : beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
4.350E+07 7.982E+00 5.061E-01
4.250E+07 1.658E+01 6.119E-01
4.150E+07 2.741E+01 5.229E-01
4.050E+07 3.590E+01 3.551E-01
3.950E+07 3.730E+01 8.271E-01
3.850E+07 3.104E+01 1.231E+00
3.750E+07 2.133E+01 1.067E+00
3.650E+07 1.310E+01 4.923E-01
3.550E+07 8.372E+00 1.973E-01
3.450E+07 6.416E+00 3.824E-01
3.350E+07 5.779E+00 3.854E-01
3.250E+07 5.528E+00 3.429E-01
3.150E+07 5.311E+00 3.288E-01
3.050E+07 5.061E+00 3.218E-01
2.950E+07 4.796E+00 3.132E-01
2.850E+07 4.537E+00 3.387E-01
2.750E+07 4.291E+00 4.334E-01
2.650E+07 4.037E+00 5.823E-01
2.550E+07 3.746E+00 7.262E-01
2.449E+07 3.404E+00 7.922E-01
2.349E+07 3.033E+00 7.398E-01
2.249E+07 2.676E+00 5.752E-01
2.149E+07 2.381E+00 3.341E-01
2.049E+07 2.166E+00 8.100E-02
1.949E+07 2.025E+00 2.460E-01
1.849E+07 1.931E+00 4.035E-01
1.749E+07 1.847E+00 3.831E-01
1.649E+07 1.751E+00 2.060E-01
1.549E+07 1.645E+00 5.948E-02
1.449E+07 1.545E+00 8.809E-02
1.349E+07 1.463E+00 3.949E-02
1.249E+07 1.394E+00 1.751E-01
1.149E+07 1.333E+00 2.621E-01
1.049E+07 1.297E+00 2.578E-01
9.487E+06 1.314E+00 2.050E-01
8.485E+06 1.378E+00 9.701E-02
7.483E+06 1.441E+00 1.518E-01
6.481E+06 1.522E+00 3.396E-01
5.477E+06 1.655E+00 2.592E-01
4.472E+06 1.570E+00 4.268E-01
@@ -0,0 +1,54 @@
Experimental neutron spectra measured by BC501A at TIARA1992/10 [43c150-00]
Proton Energy : 43 MeV
Shielding Material :150.0cm thick Concrete
Iron collimator (10.9cm diam.) : 0cm thick
Distance from Li target to the shield surface(0cm thickness) = 403 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-a) =3.15E+09 [sr/micro-Coulomb]
1.94E+04 [cm^2/micro-Coulomb] at 403 cm
Measured position : beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
4.350E+07 2.026E-01 2.202E-02
4.250E+07 3.907E-01 3.008E-02
4.150E+07 6.249E-01 3.566E-02
4.050E+07 8.164E-01 3.072E-02
3.950E+07 8.651E-01 1.940E-02
3.850E+07 7.466E-01 5.153E-02
3.750E+07 5.400E-01 8.088E-02
3.650E+07 3.566E-01 7.398E-02
3.550E+07 2.514E-01 3.792E-02
3.450E+07 2.110E-01 1.171E-02
3.350E+07 1.996E-01 2.589E-02
3.250E+07 1.934E-01 3.038E-02
3.150E+07 1.847E-01 2.773E-02
3.050E+07 1.737E-01 2.382E-02
2.950E+07 1.626E-01 2.135E-02
2.850E+07 1.532E-01 2.124E-02
2.750E+07 1.462E-01 2.321E-02
2.650E+07 1.410E-01 2.611E-02
2.550E+07 1.358E-01 2.840E-02
2.449E+07 1.288E-01 2.859E-02
2.349E+07 1.184E-01 2.576E-02
2.249E+07 1.046E-01 1.975E-02
2.149E+07 8.811E-02 1.143E-02
2.049E+07 7.128E-02 3.505E-03
1.949E+07 5.705E-02 6.866E-03
1.849E+07 4.810E-02 1.058E-02
1.749E+07 4.529E-02 9.983E-03
1.649E+07 4.671E-02 6.501E-03
1.549E+07 4.872E-02 3.379E-03
1.449E+07 4.830E-02 2.474E-03
1.349E+07 4.499E-02 3.959E-03
1.249E+07 4.057E-02 7.091E-03
1.149E+07 3.714E-02 9.308E-03
1.049E+07 3.589E-02 9.567E-03
9.487E+06 3.780E-02 7.504E-03
8.485E+06 4.511E-02 1.241E-03
7.483E+06 5.828E-02 1.303E-02
6.481E+06 6.872E-02 2.887E-02
5.477E+06 6.311E-02 3.449E-02
@@ -0,0 +1,55 @@
Experimental neutron spectra measured by BC501A at TIARA1992/10 [43c25-00a]
Proton Energy : 43 MeV
Shielding Material : 25.0cm thick Concrete
Iron collimator (10.9cm diam.) : 40cm thick
Distance from Li target to the shield surface(0cm thickness) = 443 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-b) =3.45E+09 [sr/micro-Coulomb]
1.76E+04 [cm^2/micro-Coulomb] at 443 cm
Measured position : beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
4.350E+07 6.744E+03 6.263E+02
4.250E+07 1.317E+04 5.875E+02
4.150E+07 1.965E+04 2.960E+02
4.050E+07 2.265E+04 3.991E+02
3.950E+07 2.023E+04 6.325E+02
3.850E+07 1.396E+04 5.659E+02
3.750E+07 7.428E+03 3.056E+02
3.650E+07 3.133E+03 1.181E+02
3.550E+07 1.325E+03 1.603E+02
3.450E+07 1.019E+03 1.766E+02
3.350E+07 1.274E+03 1.672E+02
3.250E+07 1.611E+03 1.699E+02
3.150E+07 1.878E+03 1.768E+02
3.050E+07 2.054E+03 1.720E+02
2.950E+07 2.147E+03 1.632E+02
2.850E+07 2.168E+03 1.734E+02
2.750E+07 2.130E+03 2.189E+02
2.650E+07 2.043E+03 2.937E+02
2.550E+07 1.930E+03 3.658E+02
2.449E+07 1.818E+03 3.990E+02
2.349E+07 1.725E+03 3.741E+02
2.249E+07 1.665E+03 2.899E+02
2.149E+07 1.640E+03 1.681E+02
2.049E+07 1.642E+03 3.660E+01
1.949E+07 1.649E+03 1.259E+02
1.849E+07 1.630E+03 2.058E+02
1.749E+07 1.551E+03 1.964E+02
1.649E+07 1.417E+03 1.066E+02
1.549E+07 1.267E+03 2.618E+01
1.449E+07 1.157E+03 4.025E+01
1.349E+07 1.108E+03 1.904E+01
1.249E+07 1.089E+03 8.798E+01
1.149E+07 1.054E+03 1.310E+02
1.049E+07 9.850E+02 1.281E+02
9.487E+06 9.110E+02 1.015E+02
8.485E+06 8.461E+02 4.836E+01
7.483E+06 7.555E+02 7.453E+01
6.481E+06 6.756E+02 1.505E+02
5.477E+06 6.938E+02 3.724E+01
4.472E+06 6.344E+02 2.723E+02
@@ -0,0 +1,53 @@
Experimental neutron spectra measured by BC501A at TIARA1995/2 [43c25-20a]
Proton Energy : 43 MeV
Shielding Material : 25.0cm thick Concrete
Iron collimator (10.9cm diam.) : 40cm thick
Distance from Li target to the shield surface(0cm thickness) = 443 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-b) =3.45E+09 [sr/micro-Coulomb]
1.76E+04 [cm^2/micro-Coulomb] at 443 cm
Measured position : 20cm from beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
4.350E+07 1.029E+02 5.729E+01
4.250E+07 1.864E+02 1.201E+02
4.150E+07 3.223E+02 1.284E+02
4.050E+07 4.607E+02 5.482E+01
3.950E+07 5.036E+02 5.250E+01
3.850E+07 4.150E+02 9.947E+01
3.750E+07 2.740E+02 8.055E+01
3.650E+07 1.732E+02 3.748E+01
3.550E+07 1.304E+02 1.279E+01
3.450E+07 1.189E+02 1.230E+01
3.350E+07 1.165E+02 1.132E+01
3.250E+07 1.156E+02 9.308E+00
3.150E+07 1.144E+02 8.170E+00
3.050E+07 1.127E+02 8.258E+00
2.950E+07 1.105E+02 9.341E+00
2.850E+07 1.078E+02 1.121E+01
2.750E+07 1.048E+02 1.364E+01
2.650E+07 1.018E+02 1.615E+01
2.550E+07 9.920E+01 1.795E+01
2.449E+07 9.722E+01 1.825E+01
2.349E+07 9.574E+01 1.653E+01
2.249E+07 9.453E+01 1.271E+01
2.149E+07 9.336E+01 7.264E+00
2.049E+07 9.201E+01 1.853E+00
1.949E+07 9.031E+01 4.591E+00
1.849E+07 8.799E+01 7.237E+00
1.749E+07 8.493E+01 6.927E+00
1.649E+07 8.127E+01 4.560E+00
1.549E+07 7.751E+01 2.286E+00
1.449E+07 7.421E+01 1.610E+00
1.349E+07 7.164E+01 2.670E+00
1.249E+07 6.964E+01 4.689E+00
1.149E+07 6.788E+01 6.075E+00
1.049E+07 6.627E+01 6.198E+00
9.487E+06 6.503E+01 4.849E+00
8.485E+06 6.352E+01 7.540E-01
7.483E+06 5.906E+01 8.406E+00
6.481E+06 4.854E+01 1.869E+01
@@ -0,0 +1,53 @@
Experimental neutron spectra measured by BC501A at TIARA1995/2 [43c25-40a]
Proton Energy : 43 MeV
Shielding Material : 25.0cm thick Concrete
Iron collimator (10.9cm diam.) : 40cm thick
Distance from Li target to the shield surface(0cm thickness) = 443 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-b) =3.45E+09 [sr/micro-Coulomb]
1.76E+04 [cm^2/micro-Coulomb] at 443 cm
Measured position : 40cm from beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
4.350E+07 1.240E+01 2.475E+00
4.250E+07 2.332E+01 5.019E+00
4.150E+07 3.197E+01 5.360E+00
4.050E+07 3.461E+01 2.346E+00
3.950E+07 3.263E+01 2.697E+00
3.850E+07 2.852E+01 4.865E+00
3.750E+07 2.322E+01 3.978E+00
3.650E+07 1.833E+01 1.766E+00
3.550E+07 1.551E+01 6.330E-01
3.450E+07 1.463E+01 8.040E-01
3.350E+07 1.454E+01 7.655E-01
3.250E+07 1.452E+01 6.638E-01
3.150E+07 1.438E+01 6.204E-01
3.050E+07 1.416E+01 6.446E-01
2.950E+07 1.391E+01 7.280E-01
2.850E+07 1.365E+01 8.705E-01
2.750E+07 1.342E+01 1.058E+00
2.650E+07 1.324E+01 1.258E+00
2.550E+07 1.310E+01 1.401E+00
2.449E+07 1.302E+01 1.425E+00
2.349E+07 1.299E+01 1.291E+00
2.249E+07 1.301E+01 9.958E-01
2.149E+07 1.306E+01 5.761E-01
2.049E+07 1.309E+01 1.641E-01
1.949E+07 1.304E+01 3.370E-01
1.849E+07 1.286E+01 5.304E-01
1.749E+07 1.253E+01 5.027E-01
1.649E+07 1.210E+01 3.256E-01
1.549E+07 1.166E+01 1.650E-01
1.449E+07 1.132E+01 1.218E-01
1.349E+07 1.112E+01 2.006E-01
1.249E+07 1.103E+01 3.591E-01
1.149E+07 1.100E+01 4.709E-01
1.049E+07 1.102E+01 4.840E-01
9.487E+06 1.114E+01 3.799E-01
8.485E+06 1.130E+01 6.600E-02
7.483E+06 1.109E+01 6.604E-01
6.481E+06 9.770E+00 1.462E+00
@@ -0,0 +1,55 @@
Experimental neutron spectra measured by BC501A at TIARA1992/10 [43c50-00a]
Proton Energy : 43 MeV
Shielding Material : 50.0cm thick Concrete
Iron collimator (10.9cm diam.) : 40cm thick
Distance from Li target to the shield surface(0cm thickness) = 443 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-b) =3.45E+09 [sr/micro-Coulomb]
1.76E+04 [cm^2/micro-Coulomb] at 443 cm
Measured position : beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
4.350E+07 9.291E+02 9.291E+01
4.250E+07 1.609E+03 7.717E+01
4.150E+07 2.215E+03 3.532E+01
4.050E+07 2.429E+03 4.096E+01
3.950E+07 2.112E+03 5.964E+01
3.850E+07 1.451E+03 5.239E+01
3.750E+07 7.942E+02 2.636E+01
3.650E+07 3.710E+02 1.163E+01
3.550E+07 1.905E+02 2.092E+01
3.450E+07 1.515E+02 2.113E+01
3.350E+07 1.635E+02 1.827E+01
3.250E+07 1.829E+02 1.789E+01
3.150E+07 1.973E+02 1.909E+01
3.050E+07 2.052E+02 1.913E+01
2.950E+07 2.071E+02 1.841E+01
2.850E+07 2.028E+02 1.944E+01
2.750E+07 1.919E+02 2.413E+01
2.650E+07 1.756E+02 3.208E+01
2.550E+07 1.578E+02 3.968E+01
2.449E+07 1.425E+02 4.333E+01
2.349E+07 1.330E+02 4.046E+01
2.249E+07 1.295E+02 3.158E+01
2.149E+07 1.302E+02 1.828E+01
2.049E+07 1.324E+02 4.021E+00
1.949E+07 1.333E+02 1.368E+01
1.849E+07 1.297E+02 2.277E+01
1.749E+07 1.192E+02 2.189E+01
1.649E+07 1.033E+02 1.205E+01
1.549E+07 8.752E+01 2.788E+00
1.449E+07 7.839E+01 4.361E+00
1.349E+07 7.748E+01 2.085E+00
1.249E+07 8.043E+01 9.733E+00
1.149E+07 8.144E+01 1.441E+01
1.049E+07 7.837E+01 1.404E+01
9.487E+06 7.365E+01 1.110E+01
8.485E+06 6.797E+01 5.263E+00
7.483E+06 5.690E+01 8.178E+00
6.481E+06 4.823E+01 1.841E+01
5.477E+06 5.012E+01 1.414E+01
4.472E+06 3.196E+01 2.353E+01
@@ -0,0 +1,53 @@
Experimental neutron spectra measured by BC501A at TIARA1995/2 [43c50-20a]
Proton Energy : 43 MeV
Shielding Material : 50.0cm thick Concrete
Iron collimator (10.9cm diam.) : 40cm thick
Distance from Li target to the shield surface(0cm thickness) = 443 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-b) =3.45E+09 [sr/micro-Coulomb]
1.76E+04 [cm^2/micro-Coulomb] at 443 cm
Measured position : 20cm from beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
4.350E+07 7.643E+01 2.326E+01
4.250E+07 1.393E+02 4.860E+01
4.150E+07 2.224E+02 5.188E+01
4.050E+07 2.958E+02 2.187E+01
3.950E+07 3.163E+02 2.127E+01
3.850E+07 2.661E+02 4.021E+01
3.750E+07 1.792E+02 3.244E+01
3.650E+07 1.072E+02 1.513E+01
3.550E+07 7.055E+01 5.007E+00
3.450E+07 5.836E+01 4.528E+00
3.350E+07 5.551E+01 4.164E+00
3.250E+07 5.460E+01 3.473E+00
3.150E+07 5.362E+01 3.213E+00
3.050E+07 5.230E+01 3.443E+00
2.950E+07 5.074E+01 4.002E+00
2.850E+07 4.911E+01 4.864E+00
2.750E+07 4.751E+01 5.939E+00
2.650E+07 4.597E+01 7.031E+00
2.550E+07 4.440E+01 7.822E+00
2.449E+07 4.265E+01 7.948E+00
2.349E+07 4.063E+01 7.203E+00
2.249E+07 3.830E+01 5.544E+00
2.149E+07 3.575E+01 3.172E+00
2.049E+07 3.312E+01 7.357E-01
1.949E+07 3.061E+01 1.993E+00
1.849E+07 2.843E+01 3.164E+00
1.749E+07 2.669E+01 3.030E+00
1.649E+07 2.535E+01 1.973E+00
1.549E+07 2.424E+01 9.422E-01
1.449E+07 2.314E+01 6.386E-01
1.349E+07 2.198E+01 1.144E+00
1.249E+07 2.085E+01 2.038E+00
1.149E+07 1.988E+01 2.644E+00
1.049E+07 1.921E+01 2.695E+00
9.487E+06 1.899E+01 2.106E+00
8.485E+06 1.943E+01 2.844E-01
7.483E+06 2.016E+01 3.657E+00
6.481E+06 1.947E+01 8.138E+00
@@ -0,0 +1,52 @@
Experimental neutron spectra measured by BC501A at TIARA1995/2 [43c50-40a]
Proton Energy : 43 MeV
Shielding Material : 50.0cm thick Concrete
Iron collimator (10.9cm diam.) : 40cm thick
Distance from Li target to the shield surface(0cm thickness) = 443 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-b) =3.45E+09 [sr/micro-Coulomb]
1.76E+04 [cm^2/micro-Coulomb] at 443 cm
Measured position : 40cm from beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
4.350E+07 1.148E+01 2.295E+00
4.250E+07 2.235E+01 4.648E+00
4.150E+07 3.336E+01 4.966E+00
4.050E+07 4.007E+01 2.185E+00
3.950E+07 4.012E+01 2.536E+00
3.850E+07 3.390E+01 4.569E+00
3.750E+07 2.466E+01 3.745E+00
3.650E+07 1.692E+01 1.653E+00
3.550E+07 1.283E+01 5.953E-01
3.450E+07 1.140E+01 7.710E-01
3.350E+07 1.095E+01 7.247E-01
3.250E+07 1.064E+01 6.112E-01
3.150E+07 1.027E+01 5.526E-01
3.050E+07 9.846E+00 5.641E-01
2.950E+07 9.362E+00 6.351E-01
2.850E+07 8.812E+00 7.602E-01
2.750E+07 8.207E+00 9.271E-01
2.650E+07 7.606E+00 1.101E+00
2.550E+07 7.097E+00 1.227E+00
2.449E+07 6.766E+00 1.249E+00
2.349E+07 6.657E+00 1.131E+00
2.249E+07 6.765E+00 8.699E-01
2.149E+07 7.027E+00 5.021E-01
2.049E+07 7.326E+00 1.347E-01
1.949E+07 7.502E+00 2.975E-01
1.849E+07 7.403E+00 4.675E-01
1.749E+07 6.978E+00 4.435E-01
1.649E+07 6.344E+00 2.858E-01
1.549E+07 5.747E+00 1.404E-01
1.449E+07 5.398E+00 1.006E-01
1.349E+07 5.338E+00 1.737E-01
1.249E+07 5.433E+00 3.142E-01
1.149E+07 5.513E+00 4.122E-01
1.049E+07 5.508E+00 4.231E-01
9.487E+06 5.412E+00 3.316E-01
8.485E+06 5.059E+00 5.120E-02
7.483E+06 4.087E+00 5.762E-01
@@ -0,0 +1,66 @@
Experimental neutron spectra measured by BC501A at TIARA1992/12 [68c100-00]
Proton Energy : 68 MeV
Shielding Material :100.0cm thick Concrete
Iron collimator (10.9cm diam.) : 0cm thick
Distance from Li target to the shield surface(0cm thickness) = 403 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-a) =4.00E+09 [sr/micro-Coulomb]
2.46E+04 [cm^2/micro-Coulomb] at 403 cm
Measured position : beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
6.899E+07 1.414E+02 4.815E+00
6.699E+07 2.831E+02 7.960E+00
6.499E+07 3.986E+02 6.056E+00
6.299E+07 4.097E+02 4.991E+00
6.099E+07 3.137E+02 8.514E+00
5.899E+07 1.820E+02 7.124E+00
5.699E+07 8.636E+01 2.849E+00
5.499E+07 4.693E+01 3.020E+00
5.299E+07 4.307E+01 3.444E+00
5.099E+07 4.971E+01 2.929E+00
4.899E+07 5.391E+01 2.609E+00
4.699E+07 5.237E+01 2.450E+00
4.499E+07 4.658E+01 2.242E+00
4.350E+07 4.145E+01 2.170E+00
4.250E+07 3.843E+01 2.205E+00
4.150E+07 3.602E+01 2.321E+00
4.050E+07 3.424E+01 2.510E+00
3.950E+07 3.298E+01 2.766E+00
3.850E+07 3.201E+01 2.947E+00
3.750E+07 3.104E+01 3.030E+00
3.650E+07 2.982E+01 3.020E+00
3.550E+07 2.819E+01 2.944E+00
3.450E+07 2.616E+01 2.837E+00
3.350E+07 2.392E+01 2.724E+00
3.250E+07 2.180E+01 2.608E+00
3.150E+07 2.019E+01 2.482E+00
3.050E+07 1.930E+01 2.351E+00
2.950E+07 1.909E+01 2.257E+00
2.850E+07 1.926E+01 2.246E+00
2.750E+07 1.933E+01 2.336E+00
2.650E+07 1.895E+01 2.494E+00
2.550E+07 1.798E+01 2.629E+00
2.449E+07 1.655E+01 2.624E+00
2.349E+07 1.490E+01 2.392E+00
2.249E+07 1.321E+01 1.913E+00
2.149E+07 1.158E+01 1.289E+00
2.049E+07 9.976E+00 7.099E-01
1.949E+07 8.437E+00 1.187E+00
1.849E+07 7.065E+00 1.580E+00
1.749E+07 6.038E+00 1.588E+00
1.649E+07 5.496E+00 1.272E+00
1.549E+07 5.423E+00 8.433E-01
1.449E+07 5.626E+00 5.475E-01
1.349E+07 5.872E+00 5.197E-01
1.249E+07 6.052E+00 7.146E-01
1.149E+07 6.199E+00 8.919E-01
1.049E+07 6.401E+00 9.085E-01
9.487E+06 6.731E+00 7.199E-01
8.485E+06 7.120E+00 2.334E-01
7.483E+06 7.186E+00 1.163E+00
6.481E+06 6.380E+00 2.414E+00
@@ -0,0 +1,66 @@
Experimental neutron spectra measured by BC501A at TIARA1992/12 [68c150-00]
Proton Energy : 68 MeV
Shielding Material :150.0cm thick Concrete
Iron collimator (10.9cm diam.) : 0cm thick
Distance from Li target to the shield surface(0cm thickness) = 403 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-a) =4.00E+09 [sr/micro-Coulomb]
2.46E+04 [cm^2/micro-Coulomb] at 403 cm
Measured position : beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
6.899E+07 4.219E+00 2.187E-01
6.699E+07 9.864E+00 3.778E-01
6.499E+07 1.682E+01 3.018E-01
6.299E+07 2.072E+01 2.816E-01
6.099E+07 1.844E+01 4.484E-01
5.899E+07 1.210E+01 3.656E-01
5.699E+07 6.539E+00 1.538E-01
5.499E+07 4.037E+00 1.936E-01
5.299E+07 3.649E+00 1.979E-01
5.099E+07 3.848E+00 1.726E-01
4.899E+07 3.880E+00 1.799E-01
4.699E+07 3.553E+00 1.907E-01
4.499E+07 2.958E+00 1.819E-01
4.350E+07 2.507E+00 1.727E-01
4.250E+07 2.286E+00 1.705E-01
4.150E+07 2.154E+00 1.764E-01
4.050E+07 2.107E+00 1.935E-01
3.950E+07 2.116E+00 2.169E-01
3.850E+07 2.143E+00 2.333E-01
3.750E+07 2.153E+00 2.380E-01
3.650E+07 2.118E+00 2.304E-01
3.550E+07 2.030E+00 2.146E-01
3.450E+07 1.893E+00 1.976E-01
3.350E+07 1.724E+00 1.856E-01
3.250E+07 1.554E+00 1.802E-01
3.150E+07 1.417E+00 1.761E-01
3.050E+07 1.344E+00 1.664E-01
2.950E+07 1.338E+00 1.520E-01
2.850E+07 1.372E+00 1.435E-01
2.750E+07 1.396E+00 1.490E-01
2.650E+07 1.375E+00 1.684E-01
2.550E+07 1.305E+00 1.905E-01
2.449E+07 1.206E+00 2.017E-01
2.349E+07 1.104E+00 1.891E-01
2.249E+07 1.008E+00 1.521E-01
2.149E+07 9.192E-01 1.000E-01
2.049E+07 8.301E-01 5.036E-02
1.949E+07 7.348E-01 9.630E-02
1.849E+07 6.316E-01 1.371E-01
1.749E+07 5.323E-01 1.413E-01
1.649E+07 4.606E-01 1.072E-01
1.549E+07 4.339E-01 5.644E-02
1.449E+07 4.465E-01 4.556E-02
1.349E+07 4.733E-01 2.382E-02
1.249E+07 4.922E-01 5.187E-02
1.149E+07 4.984E-01 6.799E-02
1.049E+07 5.006E-01 6.646E-02
9.487E+06 5.143E-01 5.413E-02
8.485E+06 5.508E-01 3.059E-02
7.483E+06 5.917E-01 5.520E-02
6.481E+06 5.733E-01 1.587E-01
@@ -0,0 +1,66 @@
Experimental neutron spectra measured by BC501A at TIARA1992/12 [68c200-00]
Proton Energy : 68 MeV
Shielding Material :200.0cm thick Concrete
Iron collimator (10.9cm diam.) : 0cm thick
Distance from Li target to the shield surface(0cm thickness) = 403 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-a) =4.00E+09 [sr/micro-Coulomb]
2.46E+04 [cm^2/micro-Coulomb] at 403 cm
Measured position : beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
6.899E+07 5.347E-01 4.621E-02
6.699E+07 1.240E+00 7.555E-02
6.499E+07 2.100E+00 6.124E-02
6.299E+07 2.617E+00 6.205E-02
6.099E+07 2.422E+00 1.006E-01
5.899E+07 1.714E+00 8.274E-02
5.699E+07 1.036E+00 3.380E-02
5.499E+07 6.847E-01 4.307E-02
5.299E+07 5.882E-01 4.369E-02
5.099E+07 5.836E-01 3.780E-02
4.899E+07 5.824E-01 3.986E-02
4.699E+07 5.545E-01 4.276E-02
4.499E+07 4.990E-01 4.096E-02
4.350E+07 4.542E-01 3.875E-02
4.250E+07 4.324E-01 3.839E-02
4.150E+07 4.210E-01 4.013E-02
4.050E+07 4.200E-01 4.445E-02
3.950E+07 4.258E-01 4.992E-02
3.850E+07 4.324E-01 5.379E-02
3.750E+07 4.335E-01 5.493E-02
3.650E+07 4.247E-01 5.308E-02
3.550E+07 4.044E-01 4.902E-02
3.450E+07 3.740E-01 4.433E-02
3.350E+07 3.381E-01 4.046E-02
3.250E+07 3.024E-01 3.813E-02
3.150E+07 2.722E-01 3.647E-02
3.050E+07 2.502E-01 3.396E-02
2.950E+07 2.355E-01 3.054E-02
2.850E+07 2.245E-01 2.805E-02
2.750E+07 2.132E-01 2.807E-02
2.650E+07 2.004E-01 3.029E-02
2.550E+07 1.874E-01 3.317E-02
2.449E+07 1.756E-01 3.449E-02
2.349E+07 1.651E-01 3.227E-02
2.249E+07 1.543E-01 2.629E-02
2.149E+07 1.424E-01 1.820E-02
2.049E+07 1.303E-01 1.101E-02
1.949E+07 1.192E-01 1.916E-02
1.849E+07 1.099E-01 2.653E-02
1.749E+07 1.023E-01 2.790E-02
1.649E+07 9.634E-02 2.253E-02
1.549E+07 9.137E-02 1.341E-02
1.449E+07 8.724E-02 9.807E-03
1.349E+07 8.511E-02 5.466E-03
1.249E+07 8.613E-02 9.634E-03
1.149E+07 8.881E-02 1.189E-02
1.049E+07 9.013E-02 1.171E-02
9.487E+06 9.109E-02 9.624E-03
8.485E+06 9.619E-02 5.636E-03
7.483E+06 1.040E-01 7.985E-03
6.481E+06 1.098E-01 1.223E-02
@@ -0,0 +1,66 @@
Experimental neutron spectra measured by BC501A at TIARA1992/12 [68c25-00a]
Proton Energy : 68 MeV
Shielding Material : 25.0cm thick Concrete
Iron collimator (10.9cm diam.) : 80cm thick
Distance from Li target to the shield surface(0cm thickness) = 483 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-b) =4.77E+09 [sr/micro-Coulomb]
2.04E+04 [cm^2/micro-Coulomb] at 483 cm
Measured position : beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
6.899E+07 1.600E+04 3.408E+02
6.699E+07 3.239E+04 5.661E+02
6.499E+07 4.576E+04 4.326E+02
6.299E+07 4.658E+04 3.534E+02
6.099E+07 3.478E+04 5.994E+02
5.899E+07 1.947E+04 5.009E+02
5.699E+07 9.141E+03 2.031E+02
5.499E+07 5.437E+03 2.195E+02
5.299E+07 5.548E+03 2.515E+02
5.099E+07 6.558E+03 2.183E+02
4.899E+07 7.050E+03 1.987E+02
4.699E+07 6.736E+03 1.889E+02
4.499E+07 5.920E+03 1.724E+02
4.350E+07 5.279E+03 1.642E+02
4.250E+07 4.937E+03 1.632E+02
4.150E+07 4.688E+03 1.679E+02
4.050E+07 4.526E+03 1.801E+02
3.950E+07 4.424E+03 2.020E+02
3.850E+07 4.351E+03 2.198E+02
3.750E+07 4.273E+03 2.296E+02
3.650E+07 4.166E+03 2.349E+02
3.550E+07 4.017E+03 2.366E+02
3.450E+07 3.830E+03 2.372E+02
3.350E+07 3.627E+03 2.370E+02
3.250E+07 3.441E+03 2.356E+02
3.150E+07 3.305E+03 2.322E+02
3.050E+07 3.238E+03 2.282E+02
2.950E+07 3.230E+03 2.299E+02
2.850E+07 3.238E+03 2.436E+02
2.750E+07 3.210E+03 2.714E+02
2.650E+07 3.102E+03 3.068E+02
2.550E+07 2.900E+03 3.343E+02
2.449E+07 2.626E+03 3.381E+02
2.349E+07 2.314E+03 3.075E+02
2.249E+07 1.996E+03 2.402E+02
2.149E+07 1.690E+03 1.468E+02
2.049E+07 1.401E+03 5.814E+01
1.949E+07 1.140E+03 1.143E+02
1.849E+07 9.224E+02 1.604E+02
1.749E+07 7.642E+02 1.567E+02
1.649E+07 6.718E+02 1.158E+02
1.549E+07 6.321E+02 6.894E+01
1.449E+07 6.167E+02 4.468E+01
1.349E+07 5.992E+02 5.408E+01
1.249E+07 5.708E+02 8.711E+01
1.149E+07 5.408E+02 1.115E+02
1.049E+07 5.224E+02 1.134E+02
9.487E+06 5.211E+02 8.868E+01
8.485E+06 5.353E+02 1.933E+01
7.483E+06 5.494E+02 1.528E+02
6.481E+06 5.213E+02 3.332E+02
@@ -0,0 +1,65 @@
Experimental neutron spectra measured by BC501A at TIARA1995/2 [68c25-20a]
Proton Energy : 68 MeV
Shielding Material : 25.0cm thick Concrete
Iron collimator (10.9cm diam.) : 80cm thick
Distance from Li target to the shield surface(0cm thickness) = 483 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-b) =4.77E+09 [sr/micro-Coulomb]
2.04E+04 [cm^2/micro-Coulomb] at 483 cm
Measured position : 20cm from beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
6.899E+07 1.075E+02 1.161E+01
6.699E+07 2.578E+02 3.584E+01
6.499E+07 4.950E+02 5.163E+01
6.299E+07 5.337E+02 5.786E+01
6.099E+07 3.761E+02 5.715E+01
5.899E+07 1.767E+02 2.683E+01
5.699E+07 1.227E+02 1.586E+01
5.499E+07 1.511E+02 1.293E+01
5.299E+07 1.752E+02 7.720E+00
5.099E+07 1.886E+02 6.939E+00
4.899E+07 2.004E+02 7.982E+00
4.699E+07 2.139E+02 9.695E+00
4.499E+07 2.236E+02 9.849E+00
4.350E+07 2.260E+02 9.252E+00
4.250E+07 2.257E+02 8.648E+00
4.150E+07 2.251E+02 8.233E+00
4.050E+07 2.246E+02 9.058E+00
3.950E+07 2.247E+02 1.055E+01
3.850E+07 2.254E+02 1.168E+01
3.750E+07 2.266E+02 1.202E+01
3.650E+07 2.281E+02 1.145E+01
3.550E+07 2.297E+02 1.029E+01
3.450E+07 2.308E+02 9.231E+00
3.350E+07 2.304E+02 9.033E+00
3.250E+07 2.279E+02 9.938E+00
3.150E+07 2.229E+02 1.136E+01
3.050E+07 2.159E+02 1.159E+01
2.950E+07 2.081E+02 9.616E+00
2.850E+07 2.007E+02 7.213E+00
2.750E+07 1.938E+02 7.256E+00
2.650E+07 1.867E+02 1.026E+01
2.550E+07 1.787E+02 1.458E+01
2.449E+07 1.697E+02 1.716E+01
2.349E+07 1.599E+02 1.598E+01
2.249E+07 1.500E+02 1.211E+01
2.149E+07 1.406E+02 7.582E+00
2.049E+07 1.321E+02 3.391E+00
1.949E+07 1.239E+02 6.874E+00
1.849E+07 1.153E+02 1.162E+01
1.749E+07 1.064E+02 1.269E+01
1.649E+07 9.818E+01 8.522E+00
1.549E+07 9.107E+01 4.777E+00
1.449E+07 8.510E+01 6.005E+00
1.349E+07 8.112E+01 2.627E+00
1.249E+07 7.975E+01 4.568E+00
1.149E+07 7.988E+01 6.147E+00
1.049E+07 8.000E+01 5.095E+00
9.487E+06 7.939E+01 3.646E+00
8.485E+06 7.886E+01 2.627E+00
7.483E+06 8.070E+01 1.763E+00
@@ -0,0 +1,65 @@
Experimental neutron spectra measured by BC501A at TIARA1995/2 [68c25-40a]
Proton Energy : 68 MeV
Shielding Material : 25.0cm thick Concrete
Iron collimator (10.9cm diam.) : 80cm thick
Distance from Li target to the shield surface(0cm thickness) = 483 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-b) =4.77E+09 [sr/micro-Coulomb]
2.04E+04 [cm^2/micro-Coulomb] at 483 cm
Measured position : 40cm from beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
6.899E+07 5.036E+00 6.597E-01
6.699E+07 9.936E+00 2.103E+00
6.499E+07 2.360E+01 3.078E+00
6.299E+07 3.368E+01 3.594E+00
6.099E+07 2.137E+01 3.929E+00
5.899E+07 1.346E+01 1.802E+00
5.699E+07 1.407E+01 1.112E+00
5.499E+07 1.517E+01 9.061E-01
5.299E+07 1.580E+01 5.613E-01
5.099E+07 1.669E+01 5.294E-01
4.899E+07 1.857E+01 6.233E-01
4.699E+07 2.082E+01 7.906E-01
4.499E+07 2.203E+01 8.311E-01
4.350E+07 2.221E+01 7.548E-01
4.250E+07 2.226E+01 6.694E-01
4.150E+07 2.244E+01 6.097E-01
4.050E+07 2.285E+01 6.978E-01
3.950E+07 2.349E+01 8.529E-01
3.850E+07 2.432E+01 9.626E-01
3.750E+07 2.531E+01 9.946E-01
3.650E+07 2.638E+01 9.480E-01
3.550E+07 2.743E+01 8.611E-01
3.450E+07 2.829E+01 8.054E-01
3.350E+07 2.875E+01 8.581E-01
3.250E+07 2.868E+01 1.048E+00
3.150E+07 2.810E+01 1.251E+00
3.050E+07 2.720E+01 1.241E+00
2.950E+07 2.632E+01 9.555E-01
2.850E+07 2.567E+01 6.602E-01
2.750E+07 2.533E+01 6.997E-01
2.650E+07 2.519E+01 1.192E+00
2.550E+07 2.507E+01 1.900E+00
2.449E+07 2.478E+01 2.302E+00
2.349E+07 2.418E+01 2.154E+00
2.249E+07 2.323E+01 1.616E+00
2.149E+07 2.195E+01 9.498E-01
2.049E+07 2.040E+01 3.315E-01
1.949E+07 1.877E+01 7.951E-01
1.849E+07 1.743E+01 1.465E+00
1.749E+07 1.660E+01 1.602E+00
1.649E+07 1.619E+01 9.539E-01
1.549E+07 1.590E+01 4.526E-01
1.449E+07 1.545E+01 7.515E-01
1.349E+07 1.485E+01 2.838E-01
1.249E+07 1.439E+01 5.722E-01
1.149E+07 1.438E+01 8.423E-01
1.049E+07 1.462E+01 6.867E-01
9.487E+06 1.468E+01 4.628E-01
8.485E+06 1.481E+01 3.424E-01
7.483E+06 1.542E+01 1.937E-01
@@ -0,0 +1,66 @@
Experimental neutron spectra measured by BC501A at TIARA1992/12 [68c50-00a]
Proton Energy : 68 MeV
Shielding Material : 50.0cm thick Concrete
Iron collimator (10.9cm diam.) : 80cm thick
Distance from Li target to the shield surface(0cm thickness) = 483 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-b) =4.77E+09 [sr/micro-Coulomb]
2.04E+04 [cm^2/micro-Coulomb] at 483 cm
Measured position : beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
6.899E+07 3.117E+03 7.820E+01
6.699E+07 6.407E+03 1.225E+02
6.499E+07 9.058E+03 9.158E+01
6.299E+07 9.240E+03 7.787E+01
6.099E+07 6.949E+03 1.328E+02
5.899E+07 3.924E+03 1.132E+02
5.699E+07 1.790E+03 4.630E+01
5.499E+07 9.298E+02 4.262E+01
5.299E+07 8.462E+02 5.280E+01
5.099E+07 9.845E+02 4.554E+01
4.899E+07 1.073E+03 3.703E+01
4.699E+07 1.053E+03 3.152E+01
4.499E+07 9.530E+02 2.784E+01
4.350E+07 8.570E+02 2.708E+01
4.250E+07 7.926E+02 2.732E+01
4.150E+07 7.340E+02 2.847E+01
4.050E+07 6.823E+02 3.080E+01
3.950E+07 6.375E+02 3.397E+01
3.850E+07 5.984E+02 3.685E+01
3.750E+07 5.634E+02 3.900E+01
3.650E+07 5.307E+02 4.038E+01
3.550E+07 4.997E+02 4.114E+01
3.450E+07 4.710E+02 4.123E+01
3.350E+07 4.461E+02 4.109E+01
3.250E+07 4.273E+02 4.043E+01
3.150E+07 4.162E+02 3.993E+01
3.050E+07 4.123E+02 3.979E+01
2.950E+07 4.130E+02 4.054E+01
2.850E+07 4.140E+02 4.237E+01
2.750E+07 4.105E+02 4.513E+01
2.650E+07 3.989E+02 4.774E+01
2.550E+07 3.777E+02 4.884E+01
2.449E+07 3.478E+02 4.691E+01
2.349E+07 3.110E+02 4.110E+01
2.249E+07 2.698E+02 3.160E+01
2.149E+07 2.266E+02 2.034E+01
2.049E+07 1.846E+02 1.077E+01
1.949E+07 1.466E+02 1.411E+01
1.849E+07 1.160E+02 1.909E+01
1.749E+07 9.447E+01 1.954E+01
1.649E+07 8.218E+01 1.672E+01
1.549E+07 7.687E+01 1.317E+01
1.449E+07 7.567E+01 1.111E+01
1.349E+07 7.639E+01 1.157E+01
1.249E+07 7.824E+01 1.403E+01
1.149E+07 8.126E+01 1.614E+01
1.049E+07 8.545E+01 1.564E+01
9.487E+06 9.058E+01 1.012E+01
8.485E+06 9.563E+01 6.890E+00
7.483E+06 9.737E+01 2.881E+01
6.481E+06 9.009E+01 4.976E+01
@@ -0,0 +1,65 @@
Experimental neutron spectra measured by BC501A at TIARA1995/2 [68c50-20a]
Proton Energy : 68 MeV
Shielding Material : 25.0cm thick Concrete
Iron collimator (10.9cm diam.) : 80cm thick
Distance from Li target to the shield surface(0cm thickness) = 483 cm
Number of monoenergetic peak neutrons of p-7Li neutron source
(case-b) =4.77E+09 [sr/micro-Coulomb]
2.04E+04 [cm^2/micro-Coulomb] at 483 cm
Measured position : 20cm from beam line
Reference :Nucl. Sci. Eng. 124(1996)p228 , JAERI-Data/Code97-020(1997)
Graph
Neutron Energy [eV]
Neutron Flux [n/cm^2/micro-Coulomb/lethargy]
Absolute Error [n/cm^2/micro-Coulomb/lethargy]
6.899E+07 1.766E+02 8.249E+00
6.699E+07 4.777E+02 4.283E+01
6.499E+07 7.983E+02 4.415E+01
6.299E+07 7.486E+02 3.923E+01
6.099E+07 4.569E+02 5.239E+01
5.899E+07 2.162E+02 3.237E+01
5.699E+07 1.275E+02 1.073E+01
5.499E+07 1.322E+02 1.482E+01
5.299E+07 1.528E+02 9.732E+00
5.099E+07 1.667E+02 7.347E+00
4.899E+07 1.735E+02 7.634E+00
4.699E+07 1.754E+02 8.007E+00
4.499E+07 1.733E+02 7.531E+00
4.350E+07 1.696E+02 7.158E+00
4.250E+07 1.663E+02 7.187E+00
4.150E+07 1.628E+02 7.550E+00
4.050E+07 1.593E+02 8.346E+00
3.950E+07 1.557E+02 9.339E+00
3.850E+07 1.520E+02 1.004E+01
3.750E+07 1.482E+02 1.023E+01
3.650E+07 1.441E+02 9.894E+00
3.550E+07 1.394E+02 9.205E+00
3.450E+07 1.340E+02 8.436E+00
3.350E+07 1.278E+02 7.854E+00
3.250E+07 1.209E+02 7.538E+00
3.150E+07 1.137E+02 7.309E+00
3.050E+07 1.068E+02 6.900E+00
2.950E+07 1.008E+02 6.270E+00
2.850E+07 9.587E+01 5.795E+00
2.750E+07 9.165E+01 5.831E+00
2.650E+07 8.759E+01 6.360E+00
2.550E+07 8.326E+01 7.030E+00
2.449E+07 7.859E+01 7.340E+00
2.349E+07 7.373E+01 6.861E+00
2.249E+07 6.890E+01 5.547E+00
2.149E+07 6.428E+01 3.752E+00
2.049E+07 6.002E+01 2.077E+00
1.949E+07 5.612E+01 3.820E+00
1.849E+07 5.240E+01 5.359E+00
1.749E+07 4.851E+01 5.584E+00
1.649E+07 4.439E+01 4.400E+00
1.549E+07 4.049E+01 2.493E+00
1.449E+07 3.753E+01 1.935E+00
1.349E+07 3.571E+01 1.055E+00
1.249E+07 3.449E+01 2.030E+00
1.149E+07 3.340E+01 2.567E+00
1.049E+07 3.267E+01 2.516E+00
9.487E+06 3.281E+01 2.056E+00
8.485E+06 3.377E+01 1.171E+00
7.483E+06 3.222E+01 1.671E+00

Some files were not shown because too many files have changed in this diff Show More