Import Geant4 5.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:15:15 +02:00
parent 37fff30d2e
commit fbd4999cf7
4396 changed files with 56662 additions and 52446 deletions
@@ -1,250 +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. *
// ********************************************************************
//
//
// $Id: FCALAnalysisManager.cc
// GEANT4 tag $Name:
//
// Author: Alex Howard (a.s.howard@ic.ac.uk)
// Author: Patricia Mendez (patricia.mendez@cern.ch)
//
// History:
// -----------
// 3 Oct 2002 Alex Howard Created
// 5 Nov 2002 Alex Howard Successfully Modified to AIDA 3.x
//
// 12 Feb 2003 Patricia Mendez Created
// -------------------------------------------------------------------
#ifdef G4ANALYSIS_USE
#include <stdlib.h>
#include "G4VProcess.hh"
#include "g4std/fstream"
#include "G4ios.hh"
#ifdef G4ANALYSIS_USE
#include "AIDA/AIDA.h"
#include "FCALAnalysisManager.hh"
#include "FCALAnalysisMessenger.hh"
//#include "g4std/iomanip"
#include "G4Step.hh"
FCALAnalysisManager* FCALAnalysisManager::instance = 0;
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
FCALAnalysisManager::FCALAnalysisManager() :
af(0), tree(0), hf(0), tpf(0), pf(0)
FCALAnalysisManager::FCALAnalysisManager()
:outputFileName("fcal.his"),analysisFactory(0), tree(0),histogramFactory(0),
OutOfWorld(0), Secondary(0), EmEdep(0), HadEdep(0)
{
// tree is created and booked inside book()
;
analisysMessenger = new FCALAnalysisMessenger(this);
// Hooking an AIDA compliant analysis system.
analysisFactory = AIDA_createAnalysisFactory();
if(analysisFactory) {
AIDA::ITreeFactory* treeFactory = analysisFactory->createTreeFactory();
if(treeFactory) {
// tree = treeFactory->create(); // Tree in memory.
//porebbe essere qua il memory leak//
tree = treeFactory->create(outputFileName,"hbook",false,true);
delete treeFactory; // Will not delete the ITree.
histogramFactory = analysisFactory->createHistogramFactory(*tree);
tupleFactory = analysisFactory->createTupleFactory(*tree);
}
}
G4cout << "FCALAnalysisManager created" << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
FCALAnalysisManager::~FCALAnalysisManager()
{
delete histogramFactory;
histogramFactory=0;
delete pf;
pf=0;
delete analysisFactory;
analysisFactory = 0;
delete tpf;
tpf=0;
delete tupleFactory;
tupleFactory=0;
delete hf;
hf=0;
delete instance;
delete tree;
tree=0;
delete af;
af = 0;
G4cout << "FCALAnalysisManager delete" << G4endl;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
FCALAnalysisManager* FCALAnalysisManager::getInstance()
{
if (instance == 0) instance = new FCALAnalysisManager;
if (instance == 0) {instance = new FCALAnalysisManager;}
return instance;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void FCALAnalysisManager::book()
{
// histoManager->selectStore("FCAL.his");
G4String histogramfile = "FCAL.his";
// Book histograms
G4cout << " Histogramfile: " << histogramfile << G4endl;
histo_1 = histogramFactory->createHistogram1D("1","Number of Out Of World", 100,0.,10.);
histo_2 = histogramFactory->createHistogram1D("2","Number of Secondaries", 100,0.,100.);
histo_3 = histogramFactory->createHistogram1D("3","Electromagnetic Energy/MeV", 100,0.,100.);
histo_4 = histogramFactory->createHistogram1D("4","hadronic Energy/MeV", 100,0.,100.);
// Create a tuple
// tuple = tupleFactory->create("FCAL","FCAL","energy counts");
//build up the factories
af = AIDA_createAnalysisFactory();
//parameters for the TreeFactory
G4bool fileExists = false;
G4bool readOnly = false;
AIDA::ITreeFactory * tf = af->createTreeFactory();
tree = tf->create(histogramfile, "hbook", readOnly, fileExists);
G4cout << "Tree store : " << tree->storeName() << G4endl;
G4cout << " Booked Hbook File " << G4endl;
//HistoFactory and TupleFactory depend on theTree
hf = af->createHistogramFactory( *tree );
tpf = af->createTupleFactory(*tree );
// ---- primary ntuple ------
AIDA::ITuple* ntuple1 = tpf->create( "1", "Number out of World",
"float OutOfWorld,i,j" );
assert(ntuple1);
// ---- secondary ntuple ------
AIDA::ITuple* ntuple2 = tpf->create( "2", "Secondary Info",
"float Secondary,i,j");
assert(ntuple2);
// ---- tertiary ntuple ------
AIDA::ITuple* ntuple3 = tpf->create( "3", "Energy Deposits",
"float EmEdep,HadEdep" );
assert(ntuple3);
// Creating an 1-dimensional histogram in the root directory of the tree
AIDA::IHistogram1D* hOutOfWorld;
hOutOfWorld = hf->createHistogram1D("10","Number Of OutOfWorld", 100,0.,100.);
AIDA::IHistogram1D* hSecondary;
hSecondary = hf->createHistogram1D("20","Number Of Secondaries", 100,0.,100.);
ntuple_1 = tupleFactory->create("100","Number Out of World","float OutOfWorld, i, j");
ntuple_2 = tupleFactory->create("200","Secondary Info","float Secondary, i, j");
AIDA::IHistogram1D* hEmEdep;
hEmEdep = hf->createHistogram1D("30","Electromagnetic Energy /MeV", 100,0.,100.);
AIDA::IHistogram1D* hHadEdep;
hHadEdep = hf->createHistogram1D("30","Hadronic Energy /MeV", 100,0.,100.);
delete tf;
}
ntuple_3 = tupleFactory->create("300","Energy Deposits","float EmEdep, HadEdep");
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void FCALAnalysisManager::finish()
{
// Committing the transaction with the tree
G4std::cout << "Committing..." << G4std::endl;
// write all histograms to file
tree->commit();
G4std::cout << "Closing the tree..." << G4std::endl;
// close (will again commit)
tree->close();
// extra delete as objects are created in book() method rather than during
// initialisation of class
delete pf;
delete tpf;
delete hf;
delete tree;
delete af;
if(tree) {
tree->commit(); // Write histos and tuple in file.
tree->close();
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void FCALAnalysisManager::NumOutOfWorld(G4double OutOfWorld, G4int i, G4int j)
////....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//
void FCALAnalysisManager::analyseEnergyDep(G4double Edep)
{
AIDA::IHistogram1D* h1 = dynamic_cast<AIDA::IHistogram1D *> ( tree->find("10") );
h1->fill(OutOfWorld); // fill(x,y,weight)
AIDA::ITuple * ntuple = dynamic_cast<AIDA::ITuple *> ( tree->find("1") );
//histo_1 =dynamic_cast<IHistogram1D *> ( tree->find("1") );
// Fill the ntuple
ntuple->fill( ntuple->findColumn( "OutOfWorld" ), (G4float) OutOfWorld );
ntuple->fill( ntuple->findColumn( "i" ), (G4float) i );
ntuple->fill( ntuple->findColumn( "j" ), (G4float) j );
//ntuple->fill( ntuple->findColumn( "Event" ), static_cast<float>(event_id) );
// G4double OutOfWorld, Secondary, EmEdep, HadEdep;
//Values of attributes are prepared; store them to the nTuple:
ntuple->addRow();
histo_1->fill(OutOfWorld);
histo_2->fill(Secondary);
histo_3->fill(EmEdep);
histo_4->fill(HadEdep);
if(ntuple_1) {
ntuple_1->fill(0,OutOfWorld);
ntuple_1->fill(1,1);
ntuple_1->addRow();
}
if(ntuple_2) {
ntuple_2->fill(0,Secondary);
ntuple_2->fill(1,1);
ntuple_2->addRow();
}
if(ntuple_3) {
ntuple_3->fill(0,EmEdep);
ntuple_3->fill(1,1);
ntuple_3->addRow();
}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void FCALAnalysisManager::Secondaries(G4double Secondary, G4int i, G4int j)
void FCALAnalysisManager::SetOutputFileName(G4String newName)
{
AIDA::IHistogram1D* h2 = dynamic_cast<AIDA::IHistogram1D *> ( tree->find("20") );
h2->fill(Secondary); // fill(x,y,weight)
AIDA::ITuple * ntuple = dynamic_cast<AIDA::ITuple *> ( tree->find("2") );
// Fill the ntuple
ntuple->fill( ntuple->findColumn( "Secondary" ), (G4float) Secondary );
ntuple->fill( ntuple->findColumn( "i" ), (G4float) i );
ntuple->fill( ntuple->findColumn( "j" ), (G4float) j );
//ntuple->fill( ntuple->findColumn( "Event" ), static_cast<float>(event_id) );
//Values of attributes are prepared; store them to the nTuple:
ntuple->addRow();
outputFileName = newName;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void FCALAnalysisManager::Edep(G4double EmEdep, G4double HadEdep)
{
//EM:
AIDA::IHistogram1D* h3 = dynamic_cast<AIDA::IHistogram1D *> ( tree->find("30") );
h3->fill(EmEdep); // fill(x,y,weight)
//Had:
AIDA::IHistogram1D* h4 = dynamic_cast<AIDA::IHistogram1D *> ( tree->find("40") );
h4->fill(HadEdep); // fill(x,y,weight)
AIDA::ITuple * ntuple = dynamic_cast<AIDA::ITuple *> ( tree->find("3") );
// Fill the ntuple
ntuple->fill( ntuple->findColumn( "EmEdep" ), (G4float) EmEdep );
ntuple->fill( ntuple->findColumn( "HadEdep" ), (G4float) HadEdep );
//ntuple->fill( ntuple->findColumn( "Event" ), static_cast<float>(event_id) );
//Values of attributes are prepared; store them to the nTuple:
ntuple->addRow();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#endif
@@ -253,3 +163,6 @@ void FCALAnalysisManager::Edep(G4double EmEdep, G4double HadEdep)
@@ -0,0 +1,67 @@
// Author: Patricia Mendez (patricia.mendez@cern.ch)
//
// History:
// -----------
// 14 Feb 2003 Patricia Mendez Created
//--------------------------------------------------------------------------
#ifdef G4ANALYSIS_USE
#include "FCALAnalysisMessenger.hh"
#include "FCALAnalysisManager.hh"
#include "G4UIdirectory.hh"
#include "G4UIcmdWithAString.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
FCALAnalysisMessenger::FCALAnalysisMessenger(FCALAnalysisManager* analysisManager)
:xrayFluoAnalysis(analysisManager)
{
FCALAnalysisDir = new G4UIdirectory("/analysis/");
FCALAnalysisDir->SetGuidance("analysis control.");
ouputFileCommand = new G4UIcmdWithAString("/analysis/outputFile",this);
ouputFileCommand->SetGuidance("specify the name of the output file (lowercase for Hbook)");
ouputFileCommand->SetGuidance("default: xrayfluo.hbk");
ouputFileCommand->SetParameterName("choice",true);
ouputFileCommand->SetDefaultValue("fcal.his");
ouputFileCommand->AvailableForStates(G4State_Idle);
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
FCALAnalysisMessenger::~FCALAnalysisMessenger()
{
delete FCALAnalysisDir;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void FCALAnalysisMessenger::SetNewValue(G4UIcommand* command,G4String newValue)
{
if(command == ouputFileCommand)
{xrayFluoAnalysis->SetOutputFileName(newValue);}
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#endif
@@ -24,7 +24,7 @@
// and all its terms.
//
// $Id: FCALCalorHit.cc,v 1.2 2002/12/12 19:16:33 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -52,7 +52,7 @@
#include "G4Colour.hh"
FCALCryostatVolumes::FCALCryostatVolumes() {
#include "FCALCryostatVolumesParameters.icc"
#include "FCALCryostatVolumesParameters.input"
};
FCALCryostatVolumes::~FCALCryostatVolumes() {;};
@@ -80,7 +80,7 @@ G4LogicalVolume * FCALCryostatVolumes::Construct()
// Cryostat
//-----------------------------
G4Tubs * SolidCryostat =
new G4Tubs("CryostatSolid", CryostatRMin, CryostatRMax, CryostatLength,
new G4Tubs("CryostatSolid", CryostatRMin, CryostatRMax, CryostatLenght,
StartingPhi, DPhi);
G4LogicalVolume * LogicalCryostat =
new G4LogicalVolume(SolidCryostat,FCALMaterials->Material("Iron"),
@@ -95,7 +95,7 @@ G4LogicalVolume * FCALCryostatVolumes::Construct()
//------------------------------
G4Tubs * SolidInsulation =
new G4Tubs("InsulationSolid", InsulationRMin, InsulationRMax,
InsulationLength, StartingPhi, DPhi);
InsulationLenght, StartingPhi, DPhi);
G4LogicalVolume * LogicalInsulation =
new G4LogicalVolume(SolidInsulation, FCALMaterials->Material("Air"),
"InsulationLogical");
@@ -130,7 +130,7 @@ G4LogicalVolume * FCALCryostatVolumes::Construct()
// Liquid Argon
//--------------------
G4Tubs * SolidLArg =
new G4Tubs("LArgSolid", LArgRMin, LArgRMax, LArgLength,StartingPhi,DPhi);
new G4Tubs("LArgSolid", LArgRMin, LArgRMax, LArgLenght,StartingPhi,DPhi);
G4LogicalVolume * LogicalLArg =
new G4LogicalVolume(SolidLArg, FCALMaterials->Material("LiquidArgon"),
"LArgLogical");
@@ -188,7 +188,7 @@ G4LogicalVolume * FCALCryostatVolumes::Construct()
//------------------------
G4Tubs * SolidFCALEnvelope =
new G4Tubs("FCALEnvelopeSolid", FCALEnvelopeRMin, FCALEnvelopeRMax,
FCALEnvelopeLength, FCALEnvelopeStartPhi, FCALEnvelopeDPhi);
FCALEnvelopeLenght, FCALEnvelopeStartPhi, FCALEnvelopeDPhi);
G4LogicalVolume * LogicalFCALEnvelope =
new G4LogicalVolume(SolidFCALEnvelope, FCALMaterials->Material("LiquidArgon"),
@@ -1,106 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
CryostatRMin = 0.0*cm;
CryostatRMax = 135.0*cm;
CryostatLength = 147.5*cm;
StartingPhi = 0.;
DPhi = 2*pi;
//---------------------
// Insulation
//---------------------
InsulationRMin = 127.75*cm;
InsulationRMax = 134.75*cm;
InsulationLength = 147.5*cm;
//---------------------
// Inactive LArg
//---------------------
LArgRMin = 0.0;
LArgRMax = 127.45*cm;
LArgLength = 97.5*cm;
LArgPosX = 0.0;
LArgPosY = 0.0;
LArgPosZ = -50.*cm;
//----------------------
// Front Excluder
//----------------------
FrontExcluderSizeX = 31.926*cm;
FrontExcluderSizeY = 17.218*cm;
FrontExcluderSizeZ = 31.926*cm;
FrontExcluderPosX = 0.;
FrontExcluderPosY = -106.168*cm;
FrontExcluderPosZ = 0.;
//----------------------
// Back Excluder
//----------------------
BackExcluderSize1X = 39.53*cm;
BackExcluderSize2X = 52.29*cm;
BackExcluderSize1Y = 25.56*cm;
BackExcluderSize2Y = 51.84*cm;
BackExcluderSizeZ = 52.325*cm;
BackExcluderPosX = 0.;
BackExcluderPosY = 63.904*cm;
BackExcluderPosZ = 0.;
BackExcluderRotX = 90.0*deg;
//------------------------
// FCAL Enveloppe
//------------------------
FCALEnvelopeRMin = 0.0*cm;
FCALEnvelopeRMax = 45.15*cm;
FCALEnvelopeLength = 45.975*cm;
FCALEnvelopeStartPhi = pi/4;
FCALEnvelopeDPhi = pi/2 + pi/180. ;
FCALEnvelopePosX = 0.0*cm;
FCALEnvelopePosY = -38.156*cm;
FCALEnvelopePosZ = -25.341*cm;
FCALEnvelopeRotX = 2.8291*deg-pi/2;
FCALEnvelopeRotY = 0.*deg;
//-----------------------------
// FCAL electromagnetic Module
//-----------------------------
FCALEmModulePosX = 0.0*cm;
FCALEmModulePosY = 0.0*cm;
FCALEmModulePosZ = 23.675*cm;
ModuleRotZ = -45*deg;
//-----------------------------
// FCAL Hadronic Module
//-----------------------------
FCALHadModulePosX = 0.;
FCALHadModulePosY = 0.;
FCALHadModulePosZ = -23.675*cm;
@@ -73,7 +73,7 @@ FCALEMModule::~FCALEMModule(){
void FCALEMModule::InitializeGeometry() {
#include "FCALEMModuleParameters.icc"
#include "FCALEMModuleParameters.input"
ifstream File
("geom_data/FCal1Electrodes.dat");
@@ -86,7 +86,7 @@ void FCALEMModule::InitializeGeometry() {
File >> F1LArGapID[NF1LarGap] >> F1LArGapPosX[NF1LarGap] >> F1LArGapPosY[NF1LarGap]
>> F1LArIX[NF1LarGap] >> F1LArJY[NF1LarGap] >> F1LArITile[NF1LarGap];
};
G4cout << "********" << " Number of Rods in FCAL1 : " << NF1LarGap-1 << endl;;
G4cout << "********" << " Number of Rods in FCAL1 : " << NF1LarGap-1 << G4endl;;
};
@@ -111,7 +111,7 @@ G4LogicalVolume * FCALEMModule::Construct()
// Logical to be returned (FCAL EM module)
//-----------------------------------------
G4Tubs * SolidEmModule =
new G4Tubs("EmModuleSold", EmModuleRMin, EmModuleRMax, EmModuleLength,
new G4Tubs("EmModuleSold", EmModuleRMin, EmModuleRMax, EmModuleLenght,
EmModuleStartPhi,EmModuleDPhi);
G4LogicalVolume * LogicalEmModule =
new G4LogicalVolume(SolidEmModule, FCALMaterials->Material("Copper"),
@@ -128,7 +128,7 @@ G4LogicalVolume * FCALEMModule::Construct()
//---------------------
G4Tubs * SolidF1CableTroff =
new G4Tubs("F1CableTroffSolid", F1CableTroffRMin, F1CableTroffRMax,
F1CableTroffLength, F1CableTroffStartPhi, F1CableTroffDPhi);
F1CableTroffLenght, F1CableTroffStartPhi, F1CableTroffDPhi);
G4LogicalVolume * LogicalF1CableTroff =
new G4LogicalVolume(SolidF1CableTroff, FCALMaterials->Material("FCAL1CuArKap"),
"F1CableTroffLogical");
@@ -155,7 +155,7 @@ G4LogicalVolume * FCALEMModule::Construct()
//----------------------
G4Tubs * SolidF1LArGap =
new G4Tubs("F1LArGapSolid",F1LArGapRmin, F1LArGapRmax, F1LArGapLength,
new G4Tubs("F1LArGapSolid",F1LArGapRmin, F1LArGapRmax, F1LArGapLenght,
F1LArGapStartPhi,F1LArGapDPhi);
G4LogicalVolume * LogicalF1LArGap =
@@ -172,7 +172,7 @@ G4LogicalVolume * FCALEMModule::Construct()
LogicalF1LArGap->SetVisAttributes(G4VisAttributes::Invisible);
// Sensitive Volumes
// Sensitive Volumes
G4SDManager* SDman = G4SDManager::GetSDMpointer();
if(!FcalEmModuleSD)
@@ -1,53 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
EmModuleRMin = 0.0*cm;
EmModuleRMax = 45.15*cm;
EmModuleLength = 22.3*cm;
EmModuleStartPhi = 0.0*deg;
EmModuleDPhi = 90.0*deg;
FCALEmSmart = 0.2;
//---------------------
// FCAL Cable Troff
//---------------------
NCableTroff = 4;
F1CableTroffRMin = 44.16*cm;
F1CableTroffRMax = 45.15*cm;
F1CableTroffLength = 22.3*cm;
F1CableTroffStartPhi = 8.438*deg;
F1CableTroffDPhi = 5.624*deg;
F1CableTroffRotZ = 22.5*deg;
//-----------------------
// Active LArg Gap
//-----------------------
F1LArGapRmin = 0.236*cm;
F1LArGapRmax = 0.263*cm;
F1LArGapLength = 22.3*cm;
F1LArGapStartPhi = 0.0*deg;
F1LArGapDPhi = 2*pi;
@@ -23,8 +23,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: FCALEMModuleSD.cc,v 1.4 2002/12/12 19:16:33 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: FCALEMModuleSD.cc,v 1.5 2002/12/17 15:53:30 pmendez Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -114,7 +114,7 @@ void FCALEMModuleSD::EndOfEvent(G4HCofThisEvent* HCE)
EvisTileP[NF1Tile] = EvisF1Tile[i];
};};
G4cout << "Number of F1 Tiles with Positive energy : " << NF1Tile << endl;
G4cout << "Number of F1 Tiles with Positive energy : " << NF1Tile << G4endl;
// Write in File
//--------------
@@ -75,7 +75,7 @@ FCALHadModule::~FCALHadModule() {
void FCALHadModule::InitializeGeometry() {
#include "FCALHadModuleParameters.icc"
#include "FCALHadModuleParameters.input"
ifstream File
("geom_data/FCal2Electrodes.dat");
@@ -119,7 +119,7 @@ G4LogicalVolume * FCALHadModule::Construct()
//-----------------------------------------
G4Tubs * SolidHadModule =
new G4Tubs("HadModuleSolid", HadModuleRMin, HadModuleRMax, HadModuleLength,
new G4Tubs("HadModuleSolid", HadModuleRMin, HadModuleRMax, HadModuleLenght,
HadModuleStartPhi,HadModuleDPhi);
G4LogicalVolume * LogicalHadModule =
new G4LogicalVolume(SolidHadModule, FCALMaterials->Material("Copper"),
@@ -135,7 +135,7 @@ G4LogicalVolume * FCALHadModule::Construct()
// Tungsten Absorber
//-----------------------------------------
G4Tubs * SolidWAbsorber =
new G4Tubs("WAbsorberSolid", WAbsorberRMin, WAbsorberRMax, WAbsorberLength,
new G4Tubs("WAbsorberSolid", WAbsorberRMin, WAbsorberRMax, WAbsorberLenght,
WAbsorberStartPhi, WAbsorberDPhi);
G4LogicalVolume * LogicalWAbsorber =
new G4LogicalVolume(SolidWAbsorber, FCALMaterials->Material("FCAL2WFeNi"),
@@ -152,7 +152,7 @@ G4LogicalVolume * FCALHadModule::Construct()
// Copper Plates
//------------------
G4Tubs * SolidCuPlate =
new G4Tubs("CuPlateSolid",HadModuleRMin, HadModuleRMax, CuPlateLength,
new G4Tubs("CuPlateSolid",HadModuleRMin, HadModuleRMax, CuPlateLenght,
HadModuleStartPhi, HadModuleDPhi);
G4LogicalVolume * LogicalCuPlate =
new G4LogicalVolume(SolidCuPlate, FCALMaterials->Material("Copper"), "CuPlateLogical");
@@ -171,14 +171,14 @@ G4LogicalVolume * FCALHadModule::Construct()
// Had Module (F2) Main and A/B Cable Troff
//------------------------------------------
G4Tubs * SolidF2TroffMain =
new G4Tubs("F2TroffMainSolid", F2TroffRmin, F2TroffRmax, F2TroffMainLength,
new G4Tubs("F2TroffMainSolid", F2TroffRmin, F2TroffRmax, F2TroffMainLenght,
F2TroffStartPhi, F2TroffDphi);
G4LogicalVolume * LogicalF2TroffMain =
new G4LogicalVolume(SolidF2TroffMain, FCALMaterials->Material("FCAL2CuArKap"),
"F2TroffMainLogical");
G4Tubs * SolidF2TroffAB =
new G4Tubs("F2TroffABSolid", F2TroffRmin, F2TroffRmax, F2TroffABLength,
new G4Tubs("F2TroffABSolid", F2TroffRmin, F2TroffRmax, F2TroffABLenght,
F2TroffStartPhi, F2TroffDphi);
G4LogicalVolume * LogicalF2TroffAB =
new G4LogicalVolume(SolidF2TroffAB, FCALMaterials->Material("FCAL2CuArKap"),
@@ -210,7 +210,7 @@ G4LogicalVolume * FCALHadModule::Construct()
// LArg Gaps + F2 Rod
//----------------------
G4Tubs * SolidF2LArGap =
new G4Tubs("F2LArGapSolid", F2LArGapRmin, F2LArGapRmax, F2LArGapLength,
new G4Tubs("F2LArGapSolid", F2LArGapRmin, F2LArGapRmax, F2LArGapLenght,
F2LArGapStartPhi, F2LArGapDphi);
G4LogicalVolume * LogicalF2LArGap =
new G4LogicalVolume(SolidF2LArGap, FCALMaterials->Material("LiquidArgon"),
@@ -220,7 +220,7 @@ G4LogicalVolume * FCALHadModule::Construct()
// LogicalF2LArGap->SetVisAttributes(G4VisAttributes::Invisible);
G4Tubs * SolidF2Rod =
new G4Tubs("F2RodSolid", F2RodRmin, F2RodRmax, F2RodLength, F2RodStartPhi, F2RodDphi);
new G4Tubs("F2RodSolid", F2RodRmin, F2RodRmax, F2RodLenght, F2RodStartPhi, F2RodDphi);
G4LogicalVolume * LogicalF2Rod =
new G4LogicalVolume(SolidF2Rod, FCALMaterials->Material("Tungsten"),"F2RodLogical");
G4VPhysicalVolume * PhysicalF2Rod =
@@ -1,95 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
HadModuleRMin = 7.923*cm;
HadModuleRMax = 45.15*cm;
HadModuleLength = 22.3*cm;
HadModuleStartPhi = 0.;
HadModuleDPhi = 90.*deg;
FCAL2HadSmart = 0.2;
//---------------------
// Tungsten Absorber
//---------------------
WAbsorberRMin = 7.923*cm;
WAbsorberRMax = 45.15*cm;
WAbsorberLength = 19.8*cm;
WAbsorberStartPhi = 0.;
WAbsorberDPhi = 90.*deg;
//---------------------
// Copper Plates
//---------------------
CuPlateLength = 1.25*cm;
CuPlateAPosZ = 21.05*cm;
CuPlateBPosZ = -21.05*cm;
//-------------------------------
// Had Module (F2) Cable Troff
//-------------------------------
NCableTroff = 4;
F2TroffRmin = 44.16*cm;
F2TroffRmax = 45.15*cm;
F2TroffMainLength = 19.8*cm; // 22.3*cm;
F2TroffABLength = 1.25*cm;
F2TroffStartPhi = 8.438*deg;
F2TroffDphi = 5.624*deg;
F2TroffRotZ = 22.5*deg;
F2TroffABPosZ = 21.05*cm;
//----------------------
// LArg Gaps + F2 Rod
//----------------------
F2LArGapRmin = 0.0*cm;
F2LArGapRmax = 0.284*cm;
F2LArGapLength = 22.3*cm;
F2LArGapStartPhi = 0.0*deg;
F2LArGapDphi = 2*pi;
F2RodRmin = 0.0*cm;
F2RodRmax = 0.247*cm;
F2RodLength = 22.3*cm;
F2RodStartPhi = 0.0*deg;
F2RodDphi = 2*pi;
/*
LArgGapRMin = 2.375*mm;
LArgGapRMax = 2.625*mm;
LArgGapDZ = 223.*mm;
LArgGapSPhi = 0.;
LArgGapDPhi = 2*pi;
CopperRodRMin = 0.;
CopperRodRMax = 2.375*mm;
CopperRodDZ = 223.*mm;
CopperRodSPhi = 0.;
CopperRodDPhi = 2*pi;
*/
@@ -24,7 +24,7 @@
// and all its terms.
//
// $Id: FCALHadModuleSD.cc,v 1.3 2002/12/12 19:16:33 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -48,7 +48,6 @@
//----------------------------------------------------------------------------------
#include "FCALMaterialConsultant.hh"
#include "PhysicalConstants.h"
#include "globals.hh"
@@ -24,7 +24,7 @@
// and all its terms.
//
// $Id: FCALPhysicsList.cc,v 1.3 2002/12/12 19:16:33 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -22,8 +22,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: FCALPrimaryGeneratorAction.cc,v 1.2 2002/12/12 19:16:33 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: FCALPrimaryGeneratorAction.cc,v 1.3 2002/12/17 15:53:30 pmendez Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -111,10 +111,10 @@ void FCALPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
particleGun->GeneratePrimaryVertex(anEvent);
G4cout << "--------------------------------------------" << endl;
G4cout << "--------------------------------------------" << G4endl;
G4cout << " Event, X,Y,Z Generated Vertex : " << endl;
G4cout << Nevent << " " << X[Nevent] << " " << Y[Nevent] << " " << Z[Nevent]<< endl;
G4cout << "--------------------------------------------" << endl;
G4cout << Nevent << " " << X[Nevent] << " " << Y[Nevent] << " " << Z[Nevent]<< G4endl;
G4cout << "--------------------------------------------" << G4endl;
}
@@ -23,21 +23,28 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: FCALRunAction.cc,v 1.2 2002/12/12 19:16:33 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: FCALRunAction.cc,v 1.4 2003/02/14 15:55:20 pmendez Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//#ifndef G4ANALYSIS_USE
#include "FCALRunAction.hh"
#include "G4Run.hh"
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "G4VVisManager.hh"
#include "G4ios.hh"
#include "Randomize.hh"
#include "FCALAnalysisManager.hh"
//#include <AIDA/AIDA.h>
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
FCALRunAction::FCALRunAction()
@@ -47,7 +54,66 @@ FCALRunAction::FCALRunAction()
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
FCALRunAction::~FCALRunAction()
{}
{
// cleanHisto();
}
//void FCALRunAction::bookHisto(){
//
// AIDA::IAnalysisFactory* af = AIDA_createAnalysisFactory();
//
// // Creating the tree factory
// AIDA::ITreeFactory* tf = af->createTreeFactory();
//
// // Creating a tree mapped to an hbook file.
// tree = tf->create("fcal.paw", "hbook", false, true);
//
// // Creating a histogram factory, whose histograms will be handled by the tree
// AIDA::IHistogramFactory* hf = af->createHistogramFactory(*tree);
//
// // Creating a ntuple factory.
//
// AIDA::ITupleFactory* nf = af->createTupleFactory(*tree);
//
// // Creating ntuples
//
// ntuple[1] = nf->create("100","Number Out of World","float OutOfWorld, i, j");
//
// ntuple[2] = nf->create("200","Secondary Info","float Secondary, i, j");
//
// ntuple[3] = nf->create("300","Energy Deposits","float EmEdep, HadEdep");
//
// // Creating Histograms
//
// histo[1] = hf->createHistogram1D("1","Number of OutOfWorld",100, 0., 100.);
// histo[2] = hf->createHistogram1D("2","Number of Secondaries",100, 0., 100.);
// histo[3] = hf->createHistogram1D("3","Electromagnetic Energy / MeV",100, 0., 100.);
// histo[4] = hf->createHistogram1D("4","Hadronic Energy / MeV",100, 0., 100.);
//
// delete hf;
// delete tf;
// delete af;
// delete nf;
//
//}
//
////....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//
//void FCALRunAction::cleanHisto()
//{
//
// tree->commit(); // Writing the histograms to the file
// tree->close(); // and closing the tree (and the file)
//
// delete tree;
//
//
//}
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -56,20 +122,51 @@ void FCALRunAction::BeginOfRunAction(const G4Run* aRun)
G4cout << "### Run " << aRun->GetRunID() << " start." << G4endl;
// if (aRun->GetRunID() == 0) bookHisto();
if (G4VVisManager::GetConcreteInstance())
{
G4UImanager* UI = G4UImanager::GetUIpointer();
UI->ApplyCommand("/vis/scene/notifyHandlers");
}
}
#ifdef G4ANALYSIS_USE
// book histograms and ntuples
FCALAnalysisManager * analysis = FCALAnalysisManager::getInstance();
analysis->book();
#endif
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
void FCALRunAction::EndOfRunAction(const G4Run* )
{
#ifdef G4ANALYSIS_USE
FCALAnalysisManager* analysis = FCALAnalysisManager::getInstance();
#endif
if (G4VVisManager::GetConcreteInstance()) {
G4UImanager::GetUIpointer()->ApplyCommand("/vis/viewer/update");
}
#ifdef G4ANALYSIS_USE
analysis->finish();
#endif
}
//#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -23,8 +23,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: FCALSteppingAction.cc,v 1.2 2002/12/12 19:16:34 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: FCALSteppingAction.cc,v 1.3 2002/12/17 15:53:30 pmendez Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -53,7 +53,7 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
FCALSteppingAction::FCALSteppingAction() : IDold(-1), IDout(-1)
FCALSteppingAction::FCALSteppingAction():IDold(-1),IDout(-1)
{;}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -128,8 +128,8 @@ void FCALSteppingAction::UserSteppingAction(const G4Step* astep)
Secondaries[NSecondaries][9] = aDynamicParticle->GetTotalEnergy();
Secondaries[NSecondaries][10] = aDynamicParticle->GetKineticEnergy();
G4cout << " **** Primary : " << EventNo << endl;
G4cout << " Vertex : " << PrimaryVertex << endl;
G4cout << " **** Primary : " << EventNo << G4endl;
G4cout << " Vertex : " << PrimaryVertex << G4endl;
}
@@ -24,7 +24,7 @@
// and all its terms.
//
// $Id: FCALSteppingVerbose.cc,v 1.2 2002/12/12 19:16:34 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
// GEANT4 tag $Name: geant4-05-01 $
//
//
//---------------------------------------------------------------
@@ -23,23 +23,24 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: FCALTBEventAction.cc,v 1.3 2002/12/12 19:16:34 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: FCALTBEventAction.cc,v 1.5 2003/02/14 15:55:20 pmendez Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
#ifdef G4ANALYSIS_USE
#include "FCALTBEventAction.hh"
#include "FCALTBEventActionMessenger.hh"
#include "FCALRunAction.hh"
#include "FCALCalorHit.hh"
#ifdef G4ANALYSIS_USE
#include "FCALAnalysisManager.hh"
#endif
//#include "g4rw/tvordvec.h"
#include "g4std/vector"
#include "G4Event.hh"
@@ -56,20 +57,33 @@
#include "Randomize.hh"
#include "FCALSteppingAction.hh"
#include "FCALAnalysisManager.hh"
#include "G4ios.hh"
#include "iostream.h"
#include "fstream.h"
#include <AIDA/AIDA.h>
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
FCALTBEventAction::FCALTBEventAction(FCALSteppingAction* SA)
:calorimeterCollID(-1),drawFlag("all"),printModulo(10), StepAction(SA)
{;}
:calorimeterCollID(-1),drawFlag("all"),printModulo(10), StepAction(SA), eventMessenger(0)
{
eventMessenger = new FCALTBEventActionMessenger(this);
runManager = new FCALRunAction();
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
FCALTBEventAction::~FCALTBEventAction()
{;}
{
delete eventMessenger;
eventMessenger = 0;
delete runManager;
runManager = 0;
}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -92,8 +106,9 @@ void FCALTBEventAction::BeginOfEventAction(const G4Event* evt)
void FCALTBEventAction::EndOfEventAction(const G4Event* evt)
{
NTracksOutOfWorld = StepAction->GetOutOfWorldTracks(0, 0);
G4cout << "N Tracks out of world " << NTracksOutOfWorld << endl;
G4cout << "N Tracks out of world " << NTracksOutOfWorld << G4endl;
// Write Leaving Particles in File
//--------------------------------
@@ -107,26 +122,43 @@ void FCALTBEventAction::EndOfEventAction(const G4Event* evt)
};
ofstream OutTracks(FileName1, iostemp1);
OutTracks << NTracksOutOfWorld << endl;
G4double OutOfWorld;
OutTracks << NTracksOutOfWorld << G4endl;
for(G4int i=1; i<= NTracksOutOfWorld ; i++){
for(G4int j=1; j<11 ; j++) {
G4double OutOfWorld = StepAction->GetOutOfWorldTracks(i,j);
OutTracks << OutOfWorld << " " ; }
OutTracks << endl;
// G4double OutOfWorld = StepAction->GetOutOfWorldTracks(i,j);
OutOfWorld = StepAction->GetOutOfWorldTracks(i,j);
OutTracks << OutOfWorld << " " ;
}
OutTracks << G4endl;
G4double OutOfWorld2 = StepAction->GetOutOfWorldTracks(i,j);
#ifdef G4ANALYSIS_USE
// pass first event for histogram record:
G4double OutOfWorld2 = StepAction->GetOutOfWorldTracks(i,j);
FCALAnalysisManager* analysis = FCALAnalysisManager::getInstance();
analysis->NumOutOfWorld(OutOfWorld2,i,j);
FCALAnalysisManager* analysis = FCALAnalysisManager::getInstance();
analysis->analyseEnergyDep(OutOfWorld);
#endif
}
// RunAction->GetHisto(1)->fill(OutOfWorld);
// RunAction->GetTuple(1)->fill(0,OutOfWorld);
// RunAction->GetTuple(1)->fill(1,i);
// RunAction->GetTuple(1)->fill(2,j);
//
//
// RunAction->GetTuple(1)->addRow();
}
OutTracks.close();
NSecondaries = StepAction->GetSecondaries(0,0);
G4cout << "N Scondaries " << NSecondaries << endl;
G4cout << "N Scondaries " << NSecondaries << G4endl;
// Write Secondary Particles in File
//--------------------------------
@@ -138,24 +170,37 @@ void FCALTBEventAction::EndOfEventAction(const G4Event* evt)
} else {
iostemp2 = ios::out|ios::app; // ios::app;
};
ofstream SecndTracks(FileName2, iostemp2);
SecndTracks << NSecondaries << endl;
G4double Secondary;
SecndTracks << NSecondaries << G4endl;
for(i=1; i<= NSecondaries ; i++){
for(G4int j=1; j<11 ; j++) {
G4double Secondary = StepAction->GetSecondaries(i,j);
Secondary = StepAction->GetSecondaries(i,j);
SecndTracks << Secondary << " " ; }
SecndTracks << endl;
SecndTracks << G4endl;
G4double Secondary2 = StepAction->GetSecondaries(i,j);
#ifdef G4ANALYSIS_USE
// pass first event for histogram record:
G4double Secondary2 = StepAction->GetSecondaries(i,j);
FCALAnalysisManager* analysis = FCALAnalysisManager::getInstance();
analysis->Secondaries(Secondary2,i,j);
FCALAnalysisManager* analysis = FCALAnalysisManager::getInstance();
analysis->analyseEnergyDep(Secondary);
#endif
// RunAction->GetHisto(2)->fill(Secondary);
//
// RunAction->GetTuple(2)->fill(0,Secondary);
// RunAction->GetTuple(2)->fill(1,i);
// RunAction->GetTuple(2)->fill(2,j);
//
//
// RunAction->GetTuple(2)->addRow();
}
SecndTracks.close();
// Write Edep in FCAL1 and FCAL2
G4String FileName3 = "EdepFCAL_802_1mm.dat";
@@ -166,29 +211,43 @@ void FCALTBEventAction::EndOfEventAction(const G4Event* evt)
} else {
iostemp3 = ios::out|ios::app; // ios::app;
};
ofstream EdepFCAL(FileName3, iostemp3);
G4double EmEdep = StepAction->GetEdepFCAL("FCALEm");
G4double HadEdep = StepAction->GetEdepFCAL("FCALHad");
EdepFCAL << EmEdep << " ";
EdepFCAL << HadEdep;
EdepFCAL << endl;
EdepFCAL << G4endl;
EdepFCAL.close();
#ifdef G4ANALYSIS_USE
// pass first event for histogram record:
FCALAnalysisManager* analysis = FCALAnalysisManager::getInstance();
analysis->Edep(EmEdep,HadEdep);
FCALAnalysisManager* analysis = FCALAnalysisManager::getInstance();
analysis->analyseEnergyDep(EmEdep);
analysis->analyseEnergyDep(HadEdep);
#endif
// RunAction->GetHisto(3)->fill(EmEdep);
// RunAction->GetHisto(4)->fill(HadEdep);
//
//
// RunAction->GetTuple(3)->fill(0,EmEdep);
// RunAction->GetTuple(3)->fill(1,HadEdep);
//
//
//
// RunAction->GetTuple(3)->addRow();
G4cout << "Edep in FCAL1 FCAl2 : " << StepAction->GetEdepFCAL("FCALEm") << " ";
G4cout << StepAction->GetEdepFCAL("FCALHad") << endl;
G4cout << StepAction->GetEdepFCAL("FCALHad") << G4endl;
}
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
@@ -22,6 +22,10 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
// Author: Patricia Mendez (patricia.mendez@cern.ch)
#include "FCALTBEventActionMessenger.hh"
#include "FCALTBEventAction.hh"
@@ -32,7 +36,7 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
FCALTBEventActionMessenger::FCALTBEventActionMessenger(FCALTBEventAction* EvAct)
:fcaltbeventAction(EvAct)
:eventAction(EvAct)
{
DrawCmd = new G4UIcmdWithAString("/event/drawTracks",this);
DrawCmd->SetGuidance("Draw the tracks in the event");
@@ -63,10 +67,10 @@ void FCALTBEventActionMessenger::SetNewValue(G4UIcommand* command,
G4String newValue)
{
if(command == DrawCmd)
{fcaltbeventAction->SetDrawFlag(newValue);}
{eventAction->SetDrawFlag(newValue);}
if(command == PrintCmd)
{fcaltbeventAction->SetPrintModulo(PrintCmd->GetNewIntValue(newValue));}
{eventAction->SetPrintModulo(PrintCmd->GetNewIntValue(newValue));}
}
@@ -60,7 +60,7 @@
FCALTestbeamSetup::FCALTestbeamSetup() {
#include "FCALTestbeamSetupParameters.icc"
#include "FCALTestbeamSetupParameters.input"
};
FCALTestbeamSetup::~FCALTestbeamSetup() {};
@@ -142,7 +142,7 @@ G4VPhysicalVolume * FCALTestbeamSetup::Construct()
"HoleCntrScintLogical");
// Hole in scintillator Counter
G4Tubs * SolidHole =
new G4Tubs("HoleSolid", ScintHoleRmin, ScintHoleRmax, ScintHoleLength,
new G4Tubs("HoleSolid", ScintHoleRmin, ScintHoleRmax, ScintHoleLenght,
HoleStartPhi, HoleDPhi);
G4LogicalVolume * LogicalHole =
new G4LogicalVolume(SolidHole, FCALMaterials->Material("Air"), "HoleLogical");
@@ -163,7 +163,7 @@ G4VPhysicalVolume * FCALTestbeamSetup::Construct()
//hole in ABsorber, both Lead and Al.
G4Tubs * SolidHoleAbs =
new G4Tubs("HoleSolidAbs", AbsrbHoleRmin, AbsrbHoleRmax, AbsrbHoleLength,
new G4Tubs("HoleSolidAbs", AbsrbHoleRmin, AbsrbHoleRmax, AbsrbHoleLenght,
HoleStartPhi, HoleDPhi);
G4LogicalVolume * LogicalHoleAbs =
new G4LogicalVolume(SolidHoleAbs, FCALMaterials->Material("Air"),"HoleAbsLogical");
@@ -1,205 +0,0 @@
//
// ********************************************************************
// * 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. *
// ********************************************************************
MotherSizeX = 500.*cm;
MotherSizeY = 500.*cm ;
MotherSizeZ = 3300.*cm;
//---------------------------
// Sciantillators S1, S2, S3
//---------------------------
ScintS1andS3SizeX = 3.5*cm;
ScintS1andS3SizeY = 3.5*cm;
ScintS1andS3SizeZ = 0.5*cm;
ScintS2SizeX = 7.5*cm;
ScintS2SizeY = 15.*cm;
ScintS2SizeZ = 0.5*cm;
ScintS1_S3PosX = 0.*cm;
ScintS1_S3PosY = 0.*cm;
ScintS1PosZ = 3221.5*cm;
ScintS2PosZ = 3107.5*cm;
ScintS3PosZ = 3104.5*cm;
//----------
// MWPC's
//----------
MWPCSizeX = 6.4*cm;
MWPCSizeY = 6.4*cm;
MWPCSizeZ = 2.*cm;
MWPCPosX = 0.;
MWPCPosY = 0.;
MWPCPosZ[0] = 2591.*cm;
MWPCPosZ[1] = 895.*cm;
MWPCPosZ[2] = 440.*cm;
MWPCPosZ[3] = 352.*cm;
MWPCPosZ[4] = 349.*cm;
//-------------------
// Hole Counter
//-------------------
HoleCntrSizeX = 10.0*cm;
HoleCntrSizeY = 40.0*cm;
HoleCntrScintSizeZ = 1.0*cm;
HoleCntrAbsrbSizeZ = 0.5*cm; // Absrb = Pb or Al
HoleCntrScintPosX = 0.0*cm;
HoleCntrScintPosY = 18.75*cm;
HoleCntrScintPosZ = 289.0*cm;
HoleCntrPbPosX = 0.0*cm;
HoleCntrPbPosY = 18.75*cm;
HoleCntrPbPosZ = 290.5*cm;
HoleCntrAlPosX = 0.0*cm;
HoleCntrAlPosY = 18.75*cm;
HoleCntrAlPosZ = 291.5*cm;
ScintHoleRmin = 0.0*cm;
ScintHoleRmax = 2.5*cm;
ScintHoleLength = 1.0*cm;
AbsrbHoleRmin = 0.0*cm; // Absrb = Pb or Al
AbsrbHoleRmax = 2.75*cm;
AbsrbHoleLength = 0.5*cm;
HoleStartPhi = 0.;
HoleDPhi = 2.*pi;
HolePosX = 0.0*cm;
HolePosY = -18.75*cm;
HolePosZ = 0.0*cm;
//------------------
// Lead Wall
//------------------
LeadWallSizeX = 100.0*cm;
LeadWallSizeY = 67.5*cm;
LeadWallSizeZ = 0.55*cm;
LeadWallSlitSizeX = 2.5*cm;
LeadWallSlitSizeY = 10.0*cm;
LeadWallSlitSizeZ = 0.55*cm;
LeadWallPosX = 0.0*cm;
LeadWallPosY = 0.0*cm;
LeadWallPosZ = 249.55*cm;
//------------------
// Iron Wall
//------------------
IronWallSizeX = 130.0*cm;
IronWallSizeY = 75.0*cm;
IronWallSizeZ = 20.0*cm;
IronWallSlitSizeX = 5.0*cm;
IronWallSlitSizeY = 30.0*cm;
IronWallSlitSizeZ = 20.0*cm;
IronWallPosX = 0.0*cm;
IronWallPosY = 0.0*cm;
IronWallPosZ = 162.0*cm;
//----------------
// Tail Catcher
//----------------
NBigScint = 3;
BigScintSizeX = 60.0*cm;
BigScintSizeY = 60.0*cm;
NSmallScint = 4;
SmallScintSizeX = 20.0*cm;
SmallScintSizeY = 20.0*cm;
ScintSizeZ = 1.0*cm;
ScintPosX = 0.0*cm;
ScintPosY = 0.0*cm;
ScintPosZ[0] = -188.0*cm; // Big Scintillators
ScintPosZ[1] = -208.0*cm;
ScintPosZ[2] = -229.0*cm;
ScintPosZ[3] = -247.0*cm; // Small Scintillators
ScintPosZ[4] = -261.0*cm;
ScintPosZ[5] = -275.0*cm;
ScintPosZ[6] = -289.0*cm;
NBigIron = 2;
BigIronSizeX = 60.0*cm;
BigIronSizeY = 60.0*cm;
NSmallIron = 4;
SmallIronSizeX = 20.0*cm;
SmallIronSizeY = 20.0*cm;
IronSizeZ = 5.0*cm;
IronPosX = 0.0*cm;
IronPosY = 0.0*cm;
IronPosZ[0] = -200.0*cm; // Big Iron Plates
IronPosZ[1] = -219.0*cm;
IronPosZ[2] = -240.0*cm; // Small Iron Plates
IronPosZ[3] = -254.0*cm;
IronPosZ[4] = -268.0*cm;
IronPosZ[5] = -282.0*cm;
//-------------------------
// Concrete Walls A and B
//-------------------------
ConcWallSizeX = 130.0*cm;
ConcWallSizeY = 120.*cm;
ConcWallSizeZ = 80.*cm;
ConcWallPosX = 0.0*cm;
ConcWallPosY = 0.0*cm;
ConcWallAPosZ = -375.0*cm;
ConcWallBPosZ = -535.0*cm;
ConcWallInsSizeX = 40.0*cm;
ConcWallInsSizeY = 40.0*cm;
ConcWallInsSizeZ = 80.0*cm;
ConcWallInsPosZ = 0.0*cm;
//------------------
// Muon Counter
//------------------
MuCntrSIzeX = 20.0*cm;
MuCntrSIzeY = 20.0*cm;
MuCntrSIzeZ = 1.0*cm;
MuCntrPosX = 0.0*cm;
MuCntrPosY = 0.0*cm;
MuCntrPosZ = -681.0*cm;
//------------------
// Cryostat
//------------------
CryostatPosX = 0.;
CryostatPosY = 50.*cm;
CryostatPosZ = 0.;
/*
EMModulePosX = 0.;
EMModulePosY = 0.;
EMModulePosZ = -1.691*cm;
HadModulePosX = 0.;
HadModulePosY = 0.;
HadModulePosZ = -48.991*cm;
*/
@@ -23,8 +23,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: FCALTestbeamSetupSD.cc,v 1.4 2002/12/12 19:16:34 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: FCALTestbeamSetupSD.cc,v 1.5 2002/12/17 15:53:30 pmendez Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//
@@ -127,20 +127,20 @@ G4bool FCALTestbeamSetupSD::ProcessHits(G4Step* aStep,G4TouchableHistory* ROhist
void FCALTestbeamSetupSD::EndOfEvent(G4HCofThisEvent* HCE)
{
G4cout << " Visisble Energy in S1 , S2 , S3 in (MeV)" << endl;
G4cout << EBeamS1/MeV << " " << EBeamS2/MeV << " " << EBeamS3/MeV << " " << endl;
G4cout << " Visisble Energy in S1 , S2 , S3 in (MeV)" << G4endl;
G4cout << EBeamS1/MeV << " " << EBeamS2/MeV << " " << EBeamS3/MeV << " " << G4endl;
G4cout << " Visible Energy in Hole Counter (MeV) " << endl;
G4cout << EHoleScint/MeV << " " << EBeamHole/MeV << endl;
G4cout << " Visible Energy in Hole Counter (MeV) " << G4endl;
G4cout << EHoleScint/MeV << " " << EBeamHole/MeV << G4endl;
G4cout << " Visible Energy in Upstream Dead Materials " << endl;
G4cout << EBeamDead/MeV << endl;
G4cout << " Visible Energy in Upstream Dead Materials " << G4endl;
G4cout << EBeamDead/MeV << G4endl;
G4cout << " Visible Energy in Tail Catcher Scintillator" << endl;
for (G4int j=1; j<8 ; j++) {G4cout << ETailVis[j]/MeV << " " ;}; G4cout << endl;
G4cout << " Visible Energy in Tail Catcher Scintillator" << G4endl;
for (G4int j=1; j<8 ; j++) {G4cout << ETailVis[j]/MeV << " " ;}; G4cout << G4endl;
G4cout << " Visible Energy in Tail Catcher Absorber" << endl;
for (j=1; j<7 ; j++) {G4cout << ETailDep[j]/MeV << " " ;}; G4cout << endl;
G4cout << " Visible Energy in Tail Catcher Absorber" << G4endl;
for (j=1; j<7 ; j++) {G4cout << ETailDep[j]/MeV << " " ;}; G4cout << G4endl;
// Write data in File
//-------------------
@@ -156,11 +156,11 @@ void FCALTestbeamSetupSD::EndOfEvent(G4HCofThisEvent* HCE)
ofstream BeamDatafile(FileName, iostemp);
// BeamDatafile.precision(5);
BeamDatafile << EBeamS1/MeV << " " << EBeamS2/MeV << " " << EBeamS3/MeV << endl;
BeamDatafile << EBeamHole/MeV << endl;
BeamDatafile << EBeamDead/MeV << endl;
for (j=1; j<8 ; j++) { BeamDatafile << ETailVis[j]/MeV << " " ;} ; BeamDatafile << endl;
for (j=1; j<7 ; j++) { BeamDatafile << ETailDep[j]/MeV << " " ;} ; BeamDatafile << endl;
BeamDatafile << EBeamS1/MeV << " " << EBeamS2/MeV << " " << EBeamS3/MeV << G4endl;
BeamDatafile << EBeamHole/MeV << G4endl;
BeamDatafile << EBeamDead/MeV << G4endl;
for (j=1; j<8 ; j++) { BeamDatafile << ETailVis[j]/MeV << " " ;} ; BeamDatafile << G4endl;
for (j=1; j<7 ; j++) { BeamDatafile << ETailDep[j]/MeV << " " ;} ; BeamDatafile << G4endl;
BeamDatafile.close();
@@ -23,8 +23,8 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: FCALVisManager.cc,v 1.4 2002/12/12 19:16:34 gunter Exp $
// GEANT4 tag $Name: geant4-05-00 $
// $Id: FCALVisManager.cc,v 1.5 2002/12/17 15:53:30 pmendez Exp $
// GEANT4 tag $Name: geant4-05-01 $
//
//
// John Allison 24th January 1998.
@@ -41,7 +41,7 @@
#include "G4DAWNFILE.hh"
#include "G4GAGTree.hh"
#include "G4HepRepFile.hh"
#include "G4HepRep.hh"
//#include "G4HepRep.hh"
#include "G4RayTracer.hh"
#include "G4VRML1File.hh"
#include "G4VRML2File.hh"
@@ -116,8 +116,8 @@ void FCALVisManager::RegisterGraphicsSystems () {
RegisterGraphicsSystem (new G4ASCIITree);
RegisterGraphicsSystem (new G4DAWNFILE);
RegisterGraphicsSystem (new G4GAGTree);
RegisterGraphicsSystem (new G4HepRepFile);
RegisterGraphicsSystem (new G4HepRep);
// RegisterGraphicsSystem (new G4HepRepFile);
// RegisterGraphicsSystem (new G4HepRep);
RegisterGraphicsSystem (new G4RayTracer);
RegisterGraphicsSystem (new G4VRML1File);
RegisterGraphicsSystem (new G4VRML2File);