Import Geant4 6.2.0 source tree
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
-------------------------------------------------------------------
|
||||
$Id: History,v 1.21 2003/12/05 07:38:38 gcosmo Exp $
|
||||
$Id: History,v 1.23 2004/05/27 09:07:50 ribon Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -9,6 +9,13 @@ $Id: History,v 1.21 2003/12/05 07:38:38 gcosmo Exp $
|
||||
Example History file
|
||||
---------------------
|
||||
|
||||
27.05.04 - A.Ribon (ccal-V06-01-01)
|
||||
- Changed use of the ntuple. Now it is simpler and the ntuple
|
||||
is always correctly filled.
|
||||
|
||||
18.05.04 - A.Ribon (ccal-V06-01-00)
|
||||
- Ported to PI. Only the setup is changed, no changes in the code.
|
||||
|
||||
05.12.03 - G.Cosmo (ccal-V05-02-07)
|
||||
- Changed LISTS_BASE to G4LISTS_BASE for hadronic physics lists path.
|
||||
Cowork with "ghad-lists-V05-02-01".
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-------------------------------------------------------------------
|
||||
$Id: README,v 1.10 2003/12/04 16:49:55 ribon Exp $
|
||||
$Id: README,v 1.11 2004/05/18 14:57:48 ribon Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -50,24 +50,15 @@ $Id: README,v 1.10 2003/12/04 16:49:55 ribon Exp $
|
||||
The user should first setup, as "usual", the Geant4 environmental
|
||||
variables (in particular, the variable G4ANALYSIS_USE must be set
|
||||
if you want to have the histograms and the ntuple).
|
||||
Then the specific setup for this example should be run:
|
||||
Then the specific setup for this example, including the AIDA/PI part
|
||||
used in the analysis, should be run:
|
||||
|
||||
> source envExample.csh in the case of C-shell
|
||||
or
|
||||
> . envExample.sh in the case of bash-shell
|
||||
|
||||
The analysis part is based on:
|
||||
*** AIDA version 3.0 & Anaphe version 5.0.6 ***
|
||||
|
||||
NB) Be careful that if you want to have this analysis part,
|
||||
you have not only to set the variable G4ANALYSIS_USE but
|
||||
also to edit the above script file (envExample.csh or envExample.sh)
|
||||
and remove the comments "#" on the setup of AIDA/Anaphe,
|
||||
because, by default, the analysis is not done (the reason being
|
||||
that, in some platform, such AIDA/Anaphe setup does not work).
|
||||
|
||||
Please take a look to the Anaphe/Lizard web page
|
||||
http://anaphe.web.cern.ch/anaphe
|
||||
The analysis part is based on AIDA/PI.
|
||||
Please take a look to the web page: http://www.cern.ch/PI .
|
||||
|
||||
|
||||
2. Sample run
|
||||
@@ -368,10 +359,8 @@ No Noise and Digitization
|
||||
----------------------------
|
||||
|
||||
The analysis part of CompositeCalorimeter is kept in class CCalAnalysis,
|
||||
and is based on the AIDA interfaces and their implementation in Anaphe:
|
||||
*** AIDA version 3.0 & Anaphe version 5.0.6 ***
|
||||
please look at their documentation for more details:
|
||||
http://anaphe.web.cern.ch/anaphe
|
||||
and is based on the AIDA interfaces and their implementation in PI.
|
||||
Please take a look to the web page: http://www.cern.ch/PI .
|
||||
Both the histograms and the ntuple are saved at the end of the run in the
|
||||
HBOOK file "ccal.his". You can than analyze offline the contents of such
|
||||
a file, using Lizard (or any other AIDA-compliant package) or with
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
#------------------------------------------------------------------
|
||||
# C-shell script to be run before building/executing this example.
|
||||
# It has two parts: one for the Aida setup (for the histograms,
|
||||
# ntuples, and more in general for the data analysis); and one
|
||||
# more specific for this test-beam example.
|
||||
# Please notice that before running this script, you have to define
|
||||
# the usual Geant4 variables (in particular, the variable
|
||||
# G4ANALYSIS_USE must be set to 1).
|
||||
#------------------------------------------------------------------
|
||||
#
|
||||
# --- Aida 3.0 , Anaphe 5.0.6 ---
|
||||
#source /afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.6/scripts/setupAnaphe.csh
|
||||
#setenv PATH ${PATH}:/afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.6/scripts
|
||||
# --- Geant4 specific ---
|
||||
setenv G4ANALYSIS_USE 1
|
||||
#
|
||||
# --- Aida / PI ---
|
||||
eval `aida-config --runtime csh`
|
||||
#
|
||||
# --- Specific setup for this test-beam example ---
|
||||
setenv CCAL_CONFPATH ./dataconf
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
#------------------------------------------------------------------
|
||||
# Bash-shell script to be run before building/executing this example.
|
||||
# It has two parts: one for the Aida setup (for the histograms,
|
||||
# ntuples, and more in general for the data analysis); and one
|
||||
# more specific for this test-beam example.
|
||||
# Please notice that before running this script, you have to define
|
||||
# the usual Geant4 variables (in particular, the variable
|
||||
# G4ANALYSIS_USE must be set to 1).
|
||||
#------------------------------------------------------------------
|
||||
#
|
||||
# --- Aida 3.0 , Anaphe 5.0.6 ---
|
||||
#. /afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.6/scripts/setupAnaphe
|
||||
#export PATH=$PATH:/afs/cern.ch/sw/lhcxx/share/LHCXX/5.0.6/scripts
|
||||
# --- Geant4 specific ---
|
||||
export G4ANALYSIS_USE=1
|
||||
#
|
||||
# --- Aida / PI ---
|
||||
eval `aida-config --runtime sh`
|
||||
#
|
||||
# --- Specific setup for this test-beam example ---
|
||||
export CCAL_CONFPATH=./dataconf
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
|
||||
#include <AIDA/AIDA.h>
|
||||
|
||||
#include <typeinfo>
|
||||
|
||||
//#define debug
|
||||
|
||||
CCalAnalysis* CCalAnalysis::instance = 0;
|
||||
@@ -80,8 +82,8 @@ CCalAnalysis::CCalAnalysis() :analysisFactory(0), tree(0), tuple(0), energy(0) {
|
||||
tag2 = tag + " ELAB, XPOS, YPOS, ZPOS";
|
||||
tag = tag2 + ", EDEP, EDEC, EDHC";
|
||||
|
||||
//tuple = tupleFactory->create("1","Event info", tag); // Column wise (default)
|
||||
tuple = tupleFactory->create("1","Event info", tag, "--preferRWN"); // Row wise
|
||||
tuple = tupleFactory->create("1","Event info", tag); // Column wise (default)
|
||||
//tuple = tupleFactory->create("1","Event info", tag, "--preferRWN"); // Row wise
|
||||
|
||||
assert(tuple);
|
||||
|
||||
@@ -292,25 +294,24 @@ void CCalAnalysis::setNtuple(float* hcalE, float* ecalE, float elab,
|
||||
float x, float y, float z, float edep,
|
||||
float edec, float edhc) {
|
||||
|
||||
AIDA::ITuple * ntuple = dynamic_cast<AIDA::ITuple *> ( tree->find("1") );
|
||||
if (ntuple) {
|
||||
if (tuple) {
|
||||
char tag[10];
|
||||
for (int i=0; i<28; i++) {
|
||||
sprintf (tag, "hcal%d", i);
|
||||
ntuple->fill(tuple->findColumn(tag),hcalE[i]);
|
||||
tuple->fill(tuple->findColumn(tag),hcalE[i]);
|
||||
}
|
||||
for (int i=0; i<49; i++) {
|
||||
sprintf (tag, "ecal%d", i);
|
||||
ntuple->fill(tuple->findColumn(tag),ecalE[i]);
|
||||
tuple->fill(tuple->findColumn(tag),ecalE[i]);
|
||||
}
|
||||
ntuple->fill(tuple->findColumn("ELAB"),elab);
|
||||
ntuple->fill(tuple->findColumn("XPOS"),x);
|
||||
ntuple->fill(tuple->findColumn("YPOS"),y);
|
||||
ntuple->fill(tuple->findColumn("ZPOS"),z);
|
||||
ntuple->fill(tuple->findColumn("EDEP"),edep);
|
||||
ntuple->fill(tuple->findColumn("EDEC"),edec);
|
||||
ntuple->fill(tuple->findColumn("EDHC"),edhc);
|
||||
ntuple->addRow();
|
||||
tuple->fill(tuple->findColumn("ELAB"),elab);
|
||||
tuple->fill(tuple->findColumn("XPOS"),x);
|
||||
tuple->fill(tuple->findColumn("YPOS"),y);
|
||||
tuple->fill(tuple->findColumn("ZPOS"),z);
|
||||
tuple->fill(tuple->findColumn("EDEP"),edep);
|
||||
tuple->fill(tuple->findColumn("EDEC"),edec);
|
||||
tuple->fill(tuple->findColumn("EDHC"),edhc);
|
||||
tuple->addRow();
|
||||
#ifdef debug
|
||||
G4cout << "CCalAnalysis:: Fill Ntuple " << G4endl;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user