+++ /dev/null
-// $Id$
-// Category: geometry
-//
-// Author: I. Hrivnacova
-//
-// Class AliDetConstruction
-// ------------------------
-// See the class description in the header file.
-
-#include "AliDetConstruction.h"
-#include "AliDetSwitch.h"
-#include "AliGlobals.h"
-#include "AliFiles.h"
-#include "AliRun.h"
-#include "AliModule.h"
-
-#include "TG4XMLGeometryGenerator.h"
-#include "TG4GeometryServices.h"
-#include "TG4LVTree.h"
-
-#include <G4VPhysicalVolume.hh>
-
-//_____________________________________________________________________________
-AliDetConstruction::AliDetConstruction()
- : AliModulesComposition()
-{
- // initialize det switch vector:
- // moduleName nofVersions defaultVersion [type]
- // det switch objects are deleted in fDetSwitchVector destructor
-
- fDetSwitchVector.Add(new AliDetSwitch("MAG", 1, 0, kStructure));
- fDetSwitchVector.Add(new AliDetSwitch("ABSO", 1, 0, kStructure));
- fDetSwitchVector.Add(new AliDetSwitch("DIPO", 3, 2, kStructure));
- fDetSwitchVector.Add(new AliDetSwitch("FRAME", 3, 2, kStructure));
- fDetSwitchVector.Add(new AliDetSwitch("HALL", 1, 0, kStructure));
- fDetSwitchVector.Add(new AliDetSwitch("PIPE", 5, 0, kStructure));
- fDetSwitchVector.Add(new AliDetSwitch("SHIL", 2, 2, kStructure));
- fDetSwitchVector.Add(new AliDetSwitch("CRT", 1, 0));
- fDetSwitchVector.Add(new AliDetSwitch("EMCAL", 2, 1));
- fDetSwitchVector.Add(new AliDetSwitch("FMD", 2, 1));
- fDetSwitchVector.Add(new AliDetSwitch("ITS", 7, 5));
- fDetSwitchVector.Add(new AliDetSwitch("MUON", 2, 1));
- fDetSwitchVector.Add(new AliDetSwitch("PHOS", 2, 1));
- fDetSwitchVector.Add(new AliDetSwitch("PMD", 3, 1));
- fDetSwitchVector.Add(new AliDetSwitch("RICH", 4, 3));
- fDetSwitchVector.Add(new AliDetSwitch("START", 2, 1));
- fDetSwitchVector.Add(new AliDetSwitch("TOF", 6, 5));
- fDetSwitchVector.Add(new AliDetSwitch("TPC", 4, 2));
- fDetSwitchVector.Add(new AliDetSwitch("TRD", 2, 1));
- fDetSwitchVector.Add(new AliDetSwitch("VZERO", 3, 2));
- fDetSwitchVector.Add(new AliDetSwitch("ZDC", 3, 2));
-
- // update messenger
- fDetSwitchVector.UpdateMessenger();
-
- // instantiate LVtree browser
- TG4LVTree::Instance();
-}
-
-//_____________________________________________________________________________
-AliDetConstruction::AliDetConstruction(const AliDetConstruction& right)
- : AliModulesComposition(right)
-{
- // AliModuleComposition is protected from copying
-}
-
-//_____________________________________________________________________________
-AliDetConstruction::~AliDetConstruction()
-{
- // delete LVtree browser
- delete TG4LVTree::Instance();
-}
-
-// operators
-
-//_____________________________________________________________________________
-AliDetConstruction&
-AliDetConstruction::operator=(const AliDetConstruction& right)
-{
- // check assignement to self
- if (this == &right) return *this;
-
- // base class assignement
- // AliModuleComposition is protected from assigning
- AliModulesComposition::operator=(right);
-
- return *this;
-}
-
-// private methods
-
-//_____________________________________________________________________________
-void AliDetConstruction::BuildDetectors()
-{
-// Create module constructions for AliModules
-// that have been created and registered by gAlice
-// ---
-
- TObjArray* pDetectors = gAlice->Detectors();
- TIter next(pDetectors);
-
- // the first AliModule is expected to be the top volume
- AliModule *module = (AliModule*)next();
- if (G4String(module->GetName()) != "BODY") {
- G4String text = "AliDetConstruction::BuildDetectors():\n";
- text = text + " Instead of BODY - the first module ";
- text = text + module->GetName() + " has been found.";
- AliGlobals::Exception(text);
- }
- AddModule("BODY", 0, kStructure);
-
- G4bool first = true;
- while ((module = (AliModule*)next())) {
-
- // register moduleConstruction in fDetSwitchVector
- // in order to keep availability of /aliDet/list command
- G4String modName = module->GetName();
- G4int modVersion = module->IsVersion();
- if (first)
- // skip registering of the top volume
- first = false;
- else
- fDetSwitchVector.SwitchDetOn(modName, modVersion);
-
- // all modules will be processed alltogether
- AddModule(modName, modVersion, fDetSwitchVector.GetDetSwitch(modName)->GetType());
-
- if (VerboseLevel() > 0) {
- G4cout << "Created module construction for "
- << modName << "v" << modVersion << "." << G4endl;
- }
- }
-
- // do not process Config.C
- // (it was processed when creating modules by gAlice)
- SetProcessConfigToModules(false);
-}
-
-//_____________________________________________________________________________
-void AliDetConstruction::CreateDetectors()
-{
-// Creates AliModules and their module constructions
-// according to the fDetSwitchVector
-// ---
-
- // add top volume (AliBODY) construction first
- AddModule("BODY", 0, kStructure);
-
- // add modules constructions
- for (G4int i=0; i<fDetSwitchVector.GetSize(); i++)
- {
- AliDetSwitch* detSwitch = fDetSwitchVector.GetDetSwitch(i);
- G4String detName = detSwitch->GetDetName();
- G4int version = detSwitch->GetSwitchedVersion();
- AliModuleType type = detSwitch->GetType();
-
- if (version > -1)
- AddModule(detName, version, type);
- }
-}
-
-//_____________________________________________________________________________
-void AliDetConstruction::CheckDependence(const G4String& master,
- const G4String& slave)
-{
-// Checks modules dependence.
-// If master is switch on and slave off, the default version
-// of slave is switched on and a warning is issued.
-// ---
-
- AliDetSwitch* masterSwitch = fDetSwitchVector.GetDetSwitch(master);
- AliDetSwitch* slaveSwitch = fDetSwitchVector.GetDetSwitch(slave);
-
- if ( masterSwitch->GetSwitchedVersion() > -1 &&
- slaveSwitch->GetSwitchedVersion() < 0 ) {
-
- slaveSwitch->SwitchOnDefault();
-
- // warning
- G4String text = "AliDetConstruction::CheckDetDependence: \n";
- text = text + " Switched " + master + " requires " + slave + ".\n";
- text = text + " The det switch for " + slave + " has been changed.";
- AliGlobals::Warning(text);
- }
-}
-
-//_____________________________________________________________________________
-void AliDetConstruction::CheckDetDependencies()
-{
-// Checks modules dependencies.
-// ---
-
- CheckDependence("TOF", "FRAME");
- CheckDependence("TRD", "FRAME");
- CheckDependence("ZDC", "PIPE");
- CheckDependence("ZDC", "ABSO");
- CheckDependence("ZDC", "DIPO");
- CheckDependence("ZDC", "SHIL");
-}
-
-// public methods
-
-//_____________________________________________________________________________
-G4VPhysicalVolume* AliDetConstruction::Construct()
-{
-// Constructs geometry.
-// This method is called by G4RunManager in initialization.
-// ---
-
- if (gAlice->Modules()->GetLast() < 0) {
- // create geometry (including AliModules) according to
- // the fDetSwitchVector
- CheckDetDependencies();
- CreateDetectors();
- }
- else {
- // create geometry for AliModules
- // that have been created and registered by gAlice
- BuildDetectors();
- }
- // construct modules geometry
- ConstructModules();
-
- return TG4GeometryServices::Instance()->GetWorld();
-}
-
-//_____________________________________________________________________________
-void AliDetConstruction::GenerateXMLGeometry() const
-{
-// Generates XML geometry file from the top volume.
-// The file name is set according the last switched detector
-// registered in the det switch vector.
-// ---
-
- G4VPhysicalVolume* world = TG4GeometryServices::Instance()->GetWorld();
-
- // XML filename
- // according to last switched detector
- G4String detName;
- G4String detVersion = "";
- G4int version = -1;
- for (G4int i=fDetSwitchVector.GetSize()-1; i>=0; i--) {
- version = fDetSwitchVector.GetDetSwitch(i)->GetSwitchedVersion();
- if (version > -1) {
- detName = fDetSwitchVector.GetDetSwitch(i)->GetDetName();
- AliGlobals::AppendNumberToString(detVersion,version);
- break;
- }
- }
- G4String filePath
- = AliFiles::Instance()->GetXMLFilePath(detName, version);
-
- // set top volume name
- G4String topName = world->GetName() + "_comp";
-
- // generate XML
-
- TG4XMLGeometryGenerator xml;
- xml.OpenFile(filePath);
-
- // generate materials
- // not implemented
- // xml.GenerateMaterials(version, "today", "Generated from G4",
- // "v4", world->GetLogicalVolume());
-
- // generate volumes tree
- xml.GenerateSection("v6", detName, detVersion, "today", "Generated from Geant4",
- topName, world->GetLogicalVolume());
- xml.CloseFile();
-
- if (VerboseLevel() > 0) {
- G4cout << "File " << detName << "v" << version << ".xml has been generated."
- << G4endl;
- }
-}
-
+++ /dev/null
-// $Id$
-// Category: geometry
-//
-// Author: I. Hrivnacova
-//
-// Class AliDetConstruction
-// ------------------------
-// Detector construction class with interactive setting of detectors setup
-// available.
-// In case the detector setup is not defined in Root macro Config.C
-// the commands /alDet/switchOn/Off can be used either interactively or
-// in Geant4 macro.
-
-#ifndef ALI_DET_CONSTRUCTION_H
-#define ALI_DET_CONSTRUCTION_H
-
-#include "AliModulesComposition.h"
-#include "AliDetSwitchVector.h"
-
-#include <globals.hh>
-
-class G4VPhysicalVolume;
-
-class AliDetConstruction : public AliModulesComposition
-{
- public:
- AliDetConstruction();
- // --> protected
- // AliDetConstruction(const AliDetConstruction& right);
- virtual ~AliDetConstruction();
-
- // methods
- virtual G4VPhysicalVolume* Construct();
- virtual void GenerateXMLGeometry() const;
-
- protected:
- AliDetConstruction(const AliDetConstruction& right);
-
- // operators
- AliDetConstruction& operator=(const AliDetConstruction& right);
-
- private:
- // methods
- void BuildDetectors();
- void CreateDetectors();
- void CheckDependence(const G4String& master, const G4String& slave);
- void CheckDetDependencies();
-
- // data members
- AliDetSwitchVector fDetSwitchVector; //vector of AliDetSwitch
-};
-
-#endif //ALI_DET_CONSTRUCTION_H
-
+++ /dev/null
-// $Id$
-// Category: geometry
-//
-// Author: I. Hrivnacova
-//
-// Class AliDetSwitch
-// ------------------
-// See the class description in the header file.
-
-#include "AliDetSwitch.h"
-#include "AliGlobals.h"
-
-//_____________________________________________________________________________
-AliDetSwitch::AliDetSwitch(G4String detName, G4int nofVersions,
- G4int defaultVersion, AliModuleType modType)
- : fDetName(detName),
- fNofVersions(nofVersions),
- fDefaultVersion(defaultVersion),
- fType(modType),
- fSwitchedVersion(-1)
-{
-//
-}
-
-//_____________________________________________________________________________
-AliDetSwitch::AliDetSwitch(const AliDetSwitch& right) {
-//
- // copy stuff
- *this = right;
-}
-
-//_____________________________________________________________________________
-AliDetSwitch::~AliDetSwitch(){
-//
-}
-
-// operators
-
-//_____________________________________________________________________________
-AliDetSwitch& AliDetSwitch::operator=(const AliDetSwitch& right)
-{
- // check assignement to self
- if (this == &right) return *this;
-
- fDetName = right.fDetName;
- fNofVersions = right.fNofVersions;
- fDefaultVersion = right.fDefaultVersion;
- fSwitchedVersion = right.fSwitchedVersion;
- fType = right.fType;
-
- return *this;
-}
-
-//_____________________________________________________________________________
-G4int AliDetSwitch::operator==(const AliDetSwitch& right) const
-{
-//
- G4int returnValue = 0;
- if (fDetName == right.fDetName )
- returnValue = 1;
-
- return returnValue;
-}
-
-//_____________________________________________________________________________
-G4int AliDetSwitch::operator!=(const AliDetSwitch& right) const
-{
-//
- G4int returnValue = 1;
- if (*this == right) returnValue = 0;
-
- return returnValue;
-}
-
-// public methods
-
-//_____________________________________________________________________________
-void AliDetSwitch::SwitchOn(G4int iVersion)
-{
-// Switchs on the iVersion version.
-// ---
-
- if ((iVersion < 0) || (iVersion >= fNofVersions)) {
- G4String text = "Wrong version number for ";
- text = text + fDetName + ".";
- AliGlobals::Exception(text);
- }
-
- fSwitchedVersion = iVersion;
-}
-
-//_____________________________________________________________________________
-void AliDetSwitch::SwitchOnDefault()
-{
-// Switchs on the default version.
-// ---
-
- fSwitchedVersion = fDefaultVersion;
-}
-
-//_____________________________________________________________________________
-void AliDetSwitch::SwitchOff()
-{
-// No version is switched on.
-// ---
-
- fSwitchedVersion = -1;
-}
+++ /dev/null
-// $Id$
-// Category: geometry
-//
-// Author: I. Hrivnacova
-//
-// Class AliDetSwitch
-// ------------------
-// Data type class that stores available detector options.
-// Used in interactive detector setup.
-
-#ifndef ALI_DET_SWITCH_H
-#define ALI_DET_SWITCH_H
-
-#include "AliModuleType.h"
-
-#include <globals.hh>
-
-class AliDetSwitch
-{
- public:
- AliDetSwitch(G4String detName,
- G4int nofVersions,
- G4int defaultVersion,
- AliModuleType modType = kDetector);
- AliDetSwitch(const AliDetSwitch& right);
- virtual ~AliDetSwitch();
-
- //operators
- AliDetSwitch& operator=(const AliDetSwitch& right);
- G4int operator==(const AliDetSwitch& right) const;
- G4int operator!=(const AliDetSwitch& right) const;
-
- // methods
- void SwitchOn(G4int version);
- void SwitchOnDefault();
- void SwitchOff();
-
- // get methods
- G4String GetDetName() const;
- G4int GetNofVersions() const;
- G4int GetDefaultVersion() const;
- AliModuleType GetType() const;
- G4int GetSwitchedVersion() const;
-
- private:
- // data members
- G4String fDetName; //module name
- G4int fNofVersions; //number of versions
- G4int fDefaultVersion; //default version
- AliModuleType fType; //type of module (detector or structure)
- G4int fSwitchedVersion; //current selected version
-};
-
-// inline methods
-
-inline G4String AliDetSwitch::GetDetName() const
-{ return fDetName; }
-
-inline G4int AliDetSwitch::GetNofVersions() const
-{ return fNofVersions; }
-
-inline G4int AliDetSwitch::GetDefaultVersion() const
-{ return fDefaultVersion; }
-
-inline G4int AliDetSwitch::GetSwitchedVersion() const
-{ return fSwitchedVersion; }
-
-inline AliModuleType AliDetSwitch::GetType() const
-{ return fType; }
-
-#endif //ALI_DET_SWITCH_H
+++ /dev/null
-// $Id$
-// Category: geometry
-//
-// Author: I. Hrivnacova
-//
-// Class AliDetSwitchVector
-// ---------------------------
-// See the class description in the header file.
-
-#include "AliDetSwitchVector.h"
-#include "AliDetSwitch.h"
-#include "AliGlobals.h"
-#include "AliFiles.h"
-
-//_____________________________________________________________________________
-AliDetSwitchVector::AliDetSwitchVector()
- : fMessenger(this)
-{
-//
-}
-
-//_____________________________________________________________________________
-AliDetSwitchVector::AliDetSwitchVector(const AliDetSwitchVector& right)
- : fMessenger(this)
-{
-//
- AliGlobals::Exception("AliDetSwitchVector is protected from copying.");
-}
-
-//_____________________________________________________________________________
-AliDetSwitchVector::~AliDetSwitchVector() {
-//
- // destroy det switch vector
- DetSwitchIterator it;
- for (it = fDetSwitchVector.begin(); it != fDetSwitchVector.end(); it++)
- delete *it;
-}
-
-// operators
-
-//_____________________________________________________________________________
-AliDetSwitchVector&
-AliDetSwitchVector::operator=(const AliDetSwitchVector& right)
-{
- // check assignement to self
- if (this == &right) return *this;
-
- AliGlobals::Exception("AliDetSwitchVector is protected from assigning.");
-
- return *this;
-}
-
-// protected methods
-
-//_____________________________________________________________________________
-AliDetSwitch*
-AliDetSwitchVector::GetDetSwitch(const G4String& moduleName) const
-{
-// Returns the detector switch with given detector name.
-// ---
-
- DetSwitchConstIterator it;
- for (it = fDetSwitchVector.begin(); it != fDetSwitchVector.end(); it++)
- if ((*it)->GetDetName() == moduleName) return *it;
-
- G4String text = "AliDetSwitchVector::GetDetSwitch:\n";
- text = text + "Wrong detector name for " + moduleName;
- AliGlobals::Exception(text);
- return 0;
-}
-
-// public methods
-
-//_____________________________________________________________________________
-void AliDetSwitchVector::Add(AliDetSwitch* detSwitch)
-{
-// Adds detSwitch to the detSwitch vector.
-// ---
-
- fDetSwitchVector.push_back(detSwitch);
- fMessenger.Update();
-}
-
-//_____________________________________________________________________________
-void AliDetSwitchVector::SwitchDetOn(const G4String& moduleNameVer)
-{
-// Switchs on module specified by name and version.
-// ---
-
- DetSwitchIterator it;
-
- if (moduleNameVer == "ALL") {
- for (it = fDetSwitchVector.begin(); it != fDetSwitchVector.end(); it++)
- (*it)->SwitchOnDefault();
- }
- else if (moduleNameVer == "NONE") {
- for (it = fDetSwitchVector.begin(); it != fDetSwitchVector.end(); it++)
- (*it)->SwitchOff();
- }
- else {
- // get version number
- G4int len = moduleNameVer.length();
- G4String moduleName = moduleNameVer.substr(0, len-1);
- G4String version = moduleNameVer.substr(len-1, 1);
- G4int iVersion = AliGlobals::StringToInt(version);
-
- if (iVersion < 0) {
- // in case the version number is not provided
- // the default one is set
- SwitchDetOnDefault(moduleNameVer);
- }
- else
- SwitchDetOn(moduleName, iVersion);
- }
-}
-
-//_____________________________________________________________________________
-void AliDetSwitchVector::SwitchDetOn(const G4String& moduleName,
- G4int version)
-{
-// Switchs on module specified by name and version.
-// ---
-
- GetDetSwitch(moduleName)->SwitchOn(version);
-}
-
-//_____________________________________________________________________________
-void AliDetSwitchVector::SwitchDetOnDefault(const G4String& moduleName)
-{
-// Switchs on module specified by name with default version.
-// ---
-
- GetDetSwitch(moduleName)->SwitchOnDefault();
-}
-
-//_____________________________________________________________________________
-void AliDetSwitchVector::SwitchDetOff(const G4String& moduleName)
-{
-// Switchs off module specified by name.
-// ---
-
- if (moduleName == "ALL") {
- DetSwitchIterator it;
- for (it = fDetSwitchVector.begin(); it != fDetSwitchVector.end(); it++)
- (*it)->SwitchOff();
- }
- else
- GetDetSwitch(moduleName)->SwitchOff();
-}
-
-//_____________________________________________________________________________
-void AliDetSwitchVector::PrintSwitchedDets() const
-{
-// Lists switched detectors.
-// ---
-
- G4String svList = GetSwitchedDetsList();
-
- G4cout << "Switched Alice detectors: " << G4endl;
- G4cout << "--------------------------" << G4endl;
- G4cout << svList << G4endl;
-}
-
-//_____________________________________________________________________________
-void AliDetSwitchVector::PrintAvailableDets() const
-{
-// Lists available detectors.
-// ---
-
- G4String avList = GetAvailableDetsList();
-
- G4cout << "Available Alice detectors: " << G4endl;
- G4cout << "---------------------------" << G4endl;
- G4cout << avList << G4endl;
-}
-
-//_____________________________________________________________________________
-G4String AliDetSwitchVector::GetSwitchedDetsList() const
-{
-// Returns list of switched detectors.
-// ---
-
- G4String svList = "";
- G4int nofSwitchedDets = 0;
- DetSwitchConstIterator it;
-
- for (it = fDetSwitchVector.begin(); it != fDetSwitchVector.end(); it++) {
- G4int iVersion = (*it)->GetSwitchedVersion();
- if (iVersion > -1) {
- nofSwitchedDets++;
- G4String moduleNameVer = (*it)->GetDetName();
- AliGlobals::AppendNumberToString(moduleNameVer, iVersion);
- svList += moduleNameVer;
- svList += " ";
- }
- }
-
- if (nofSwitchedDets == G4int(fDetSwitchVector.size())) svList = "ALL: " + svList;
- if (nofSwitchedDets == 0) svList = "NONE";
-
- return svList;
-}
-
-//_____________________________________________________________________________
-G4String AliDetSwitchVector::GetAvailableDetsList() const
-{
-// Returns list of available detectors.
-// ---
-
- G4String svList = "";
- DetSwitchConstIterator it;
-
- for (it = fDetSwitchVector.begin(); it != fDetSwitchVector.end(); it++)
- for (G4int iv=0; iv<(*it)->GetNofVersions(); iv++) {
- G4String moduleNameVer = (*it)->GetDetName();
- AliGlobals::AppendNumberToString(moduleNameVer, iv);
- svList += moduleNameVer;
- svList += " ";
- }
-
- return svList;
-}
-
-//_____________________________________________________________________________
-G4String AliDetSwitchVector::GetAvailableDetsListWithCommas() const
-{
-// Returns list of available detectors with commas.
-// ---
-
- G4String svList = "";
- G4int id =0;
- DetSwitchConstIterator it;
-
- for (it = fDetSwitchVector.begin(); it != fDetSwitchVector.end(); it++)
- for (G4int iv=0; iv<(*it)->GetNofVersions(); iv++) {
- G4String moduleNameVer = (*it)->GetDetName();
- AliGlobals::AppendNumberToString(moduleNameVer, iv);
- svList += moduleNameVer;
- if (iv < (*it)->GetNofVersions()-1)
- svList += "/";
- else if (id++ < G4int(fDetSwitchVector.size())-1)
- svList += ", ";
- }
-
- return svList;
-}
-
-//_____________________________________________________________________________
-G4String AliDetSwitchVector::GetDetNamesList() const
-{
-// Returns list of detector names.
-// ---
-
- G4String svList = "";
- DetSwitchConstIterator it;
-
- for (it = fDetSwitchVector.begin(); it != fDetSwitchVector.end(); it++) {
- svList += (*it)->GetDetName();
- svList += " ";
- }
-
- return svList;
-}
-
-//_____________________________________________________________________________
-G4String AliDetSwitchVector::GetDetNamesListWithCommas() const
-{
-// Returns list of detector names with commas.
-// ---
-
- G4String svList = "";
- G4int id =0;
- DetSwitchConstIterator it;
-
- for (it = fDetSwitchVector.begin(); it != fDetSwitchVector.end(); it++) {
- svList += (*it)->GetDetName();
- if (id++ < G4int(fDetSwitchVector.size())-1)
- svList += ", ";
- }
-
- return svList;
-}
-
+++ /dev/null
-// $Id$
-// Category: geometry
-//
-// Author: I. Hrivnacova
-//
-// Class AliDetSwitchVector
-// ---------------------------
-// The class contains a vector of detector switches
-// and provides methods for their interactive setting.
-
-#ifndef ALI_DET_SWITCH_VECTOR_H
-#define ALI_DET_SWITCH_VECTOR_H
-
-#include "AliDetSwitchVectorMessenger.h"
-
-#include <globals.hh>
-#include <g4std/vector>
-
-class AliDetSwitch;
-
-class AliDetSwitchVector
-{
- typedef G4std::vector<AliDetSwitch*> DetSwitchVector;
- typedef DetSwitchVector::iterator DetSwitchIterator;
- typedef DetSwitchVector::const_iterator DetSwitchConstIterator;
-
- public:
- AliDetSwitchVector();
- // --> protected
- // AliDetSwitchVector(const AliDetSwitchVector& right);
- virtual ~AliDetSwitchVector();
-
- // methods
- void Add(AliDetSwitch* detSwitch);
- void UpdateMessenger();
- void SwitchDetOn(const G4String& moduleNameVer);
- void SwitchDetOn(const G4String& moduleName, G4int version);
- void SwitchDetOnDefault(const G4String& moduleName);
- void SwitchDetOff(const G4String& moduleName);
- void PrintSwitchedDets() const;
- void PrintAvailableDets() const;
-
- // get methods
- G4int GetSize() const;
- AliDetSwitch* GetDetSwitch(G4int i) const;
- AliDetSwitch* GetDetSwitch(const G4String& moduleName) const;
- G4String GetSwitchedDetsList() const;
- G4String GetAvailableDetsList() const;
- G4String GetAvailableDetsListWithCommas() const;
- G4String GetDetNamesList() const;
- G4String GetDetNamesListWithCommas() const;
-
- protected:
- AliDetSwitchVector(const AliDetSwitchVector& right);
-
- // operators
- AliDetSwitchVector& operator=(const AliDetSwitchVector& right);
-
- private:
- // data members
- AliDetSwitchVectorMessenger fMessenger; //messenger
- DetSwitchVector fDetSwitchVector; //vector of AliDetSwitch
-};
-
-// inline methods
-
-inline void AliDetSwitchVector::UpdateMessenger()
-{ fMessenger.Update(); }
-
-inline G4int AliDetSwitchVector::GetSize() const
-{ return fDetSwitchVector.size(); }
-
-inline AliDetSwitch* AliDetSwitchVector::GetDetSwitch(G4int i) const
-{ return fDetSwitchVector[i]; }
-
-#endif //ALI_DET_SWITCH_VECTOR_H
-
+++ /dev/null
-// $Id$
-// Category: geometry
-//
-// Author: I. Hrivnacova
-//
-// Class AliDetSwitchVectorMessenger
-// ------------------------------------
-// See the class description in the header file.
-
-#include "AliDetSwitchVectorMessenger.h"
-#include "AliDetSwitchVector.h"
-#include "AliGlobals.h"
-
-#include <G4UIdirectory.hh>
-#include <G4UIcmdWithAString.hh>
-#include <G4UIcmdWithoutParameter.hh>
-
-//_____________________________________________________________________________
-AliDetSwitchVectorMessenger::AliDetSwitchVectorMessenger(
- AliDetSwitchVector* switchVector)
- : fDetSwitchVector(switchVector)
-{
-//
- fSwitchOnCmd = new G4UIcmdWithAString("/aliDet/switchOn", this);
- fSwitchOnCmd->SetGuidance("Define the module to be built.");
- fSwitchOnCmd->SetGuidance("Available modules:");
- G4String listAvailableDets = "NONE, ALL";
- fSwitchOnCmd->SetGuidance(listAvailableDets);
- fSwitchOnCmd->SetParameterName("module", false);
- fSwitchOnCmd->AvailableForStates(PreInit);;
-
- fSwitchOffCmd = new G4UIcmdWithAString("/aliDet/switchOff", this);
- fSwitchOffCmd->SetGuidance("Define the module not to be built.");
- fSwitchOffCmd->SetGuidance("Available modules:");
- G4String listDetsNames = "ALL";
- fSwitchOffCmd->SetGuidance(listDetsNames);
- fSwitchOffCmd->SetParameterName("module", false);
- fSwitchOffCmd->AvailableForStates(PreInit);;
-
- fListCmd
- = new G4UIcmdWithoutParameter("/aliDet/list", this);
- fListCmd->SetGuidance("List the currently switched modules.");
- fListCmd
- ->AvailableForStates(PreInit, Init, Idle, GeomClosed, EventProc);
-
- fListAvailableCmd
- = new G4UIcmdWithoutParameter("/aliDet/listAvailable", this);
- fListAvailableCmd->SetGuidance("List all available modules.");
- fListAvailableCmd
- ->AvailableForStates(PreInit, Init, Idle, GeomClosed, EventProc);
-}
-
-//_____________________________________________________________________________
-AliDetSwitchVectorMessenger::AliDetSwitchVectorMessenger() {
-//
-}
-
-//_____________________________________________________________________________
-AliDetSwitchVectorMessenger::AliDetSwitchVectorMessenger(
- const AliDetSwitchVectorMessenger& right)
-{
-//
- AliGlobals::Exception(
- "AliDetSwitchVectorMessenger is protected from copying.");
-}
-
-//_____________________________________________________________________________
-AliDetSwitchVectorMessenger::~AliDetSwitchVectorMessenger() {
-//
- delete fSwitchOnCmd;
- delete fSwitchOffCmd;
- delete fListCmd;
- delete fListAvailableCmd;
-}
-
-// operators
-
-//_____________________________________________________________________________
-AliDetSwitchVectorMessenger&
-AliDetSwitchVectorMessenger::operator=(const AliDetSwitchVectorMessenger& right)
-{
- // check assignement to self
- if (this == &right) return *this;
-
- AliGlobals::Exception(
- "AliDetSwitchVectorMessenger is protected from assigning.");
-
- return *this;
-}
-
-// private methods
-
-//_____________________________________________________________________________
-void AliDetSwitchVectorMessenger::SetGuidance()
-{
-// Updates guidance, candidates list.
-// ---
-
- G4String listAvailableDets = "NONE, ALL, ";
- listAvailableDets
- = listAvailableDets + fDetSwitchVector->GetAvailableDetsListWithCommas();
- fSwitchOnCmd->SetGuidance(listAvailableDets);
-
- G4String listDetsNames = "ALL, ";
- listDetsNames
- = listDetsNames + fDetSwitchVector->GetDetNamesListWithCommas();
- fSwitchOffCmd->SetGuidance(listDetsNames);
-}
-
-//_____________________________________________________________________________
-void AliDetSwitchVectorMessenger::SetCandidates()
-{
-// Builds candidates list.
-// ---
-
- G4String candidatesList = "NONE ALL ";
- candidatesList += fDetSwitchVector->GetDetNamesList();;
- candidatesList += fDetSwitchVector->GetAvailableDetsList();
- fSwitchOnCmd->SetCandidates(candidatesList);
-
- candidatesList = "ALL ";
- candidatesList += fDetSwitchVector->GetDetNamesList();;
- fSwitchOffCmd->SetCandidates(candidatesList);
-}
-
-// public methods
-
-//_____________________________________________________________________________
-void AliDetSwitchVectorMessenger::SetNewValue(G4UIcommand* command,
- G4String newValues)
-{
-// Applies command to the associated object.
-// ---
-
- if (command == fSwitchOnCmd) {
- fDetSwitchVector->SwitchDetOn(newValues);
- }
- else if (command == fSwitchOffCmd) {
- fDetSwitchVector->SwitchDetOff(newValues);
- }
- else if (command == fListCmd) {
- fDetSwitchVector->PrintSwitchedDets();
- }
- else if (command == fListAvailableCmd) {
- fDetSwitchVector->PrintAvailableDets();
- }
-}
-
-//_____________________________________________________________________________
-void AliDetSwitchVectorMessenger::Update()
-{
-// Updates guidance, candidates list.
-// ---
-
- SetGuidance();
- SetCandidates();
-
- // set default values to a detector
- fDetSwitchVector->SwitchDetOn("NONE");
-}
+++ /dev/null
-// $Id$
-// Category: geometry
-//
-// Author: I. Hrivnacova
-//
-// Class AliDetSwitchVectorMessenger
-// ------------------------------------
-// Messenger class that defines commands for AliDetSwitchVector.
-
-#ifndef ALI_DET_SWITCH_VECTOR_MESSENGER_H
-#define ALI_DET_SWITCH_VECTOR_MESSENGER_H
-
-#include <G4UImessenger.hh>
-#include <globals.hh>
-
-class AliDetSwitchVector;
-
-class G4UIcommand;
-class G4UIdirectory;
-class G4UIcmdWithAString;
-class G4UIcmdWithoutParameter;
-
-class AliDetSwitchVectorMessenger: public G4UImessenger
-{
- public:
- AliDetSwitchVectorMessenger(AliDetSwitchVector* detSwitchVector);
- // --> protected
- // AliDetSwitchVectorMessenger();
- // AliDetSwitchVectorMessenger(const AliDetSwitchVectorMessenger& right);
- virtual ~AliDetSwitchVectorMessenger();
-
- // methods
- virtual void SetNewValue(G4UIcommand* command, G4String newValues);
- void Update();
-
- protected:
- AliDetSwitchVectorMessenger();
- AliDetSwitchVectorMessenger(const AliDetSwitchVectorMessenger& right);
-
- // operators
- AliDetSwitchVectorMessenger&
- operator=(const AliDetSwitchVectorMessenger &right);
-
- private:
- // methods
- void SetGuidance();
- void SetCandidates();
-
- AliDetSwitchVector* fDetSwitchVector; //associated class
-
- // commands data members
- G4UIcmdWithAString* fSwitchOnCmd; //command: switchOn
- G4UIcmdWithAString* fSwitchOffCmd; //command: switchOn
- G4UIcmdWithoutParameter* fListCmd; //command: list
- G4UIcmdWithoutParameter* fListAvailableCmd;//command: listAvailable
-};
-
-#endif //ALI_DET_SWITCH_VECTOR_MESSENGER_H
-
+++ /dev/null
-// $Id$
-// Category: global
-//
-// Author: I. Hrivnacova
-//
-// Class AliFiles
-// --------------
-// See the class description in the header file.
-
-#include "AliFiles.h"
-#include "AliGlobals.h"
-
-#include <stdlib.h>
-
-// static data members
-
-AliFiles* AliFiles::fgInstance = 0;
-const G4String AliFiles::fgkTop = getenv("AG4_INSTALL");
-const G4String AliFiles::fgkDefaultMacroName = "Config";
-const G4String AliFiles::fgkDefaultG3CallsName = "g3calls";
-const G4String AliFiles::fgkRootMacroExtension = ".C";
-const G4String AliFiles::fgkG4MacroExtension = ".in";
-const G4String AliFiles::fgkG3CallsExtension = ".dat";
-const G4String AliFiles::fgkXMLFileExtension = ".xml";
-
-//_____________________________________________________________________________
-AliFiles::AliFiles()
- : fMacroName(fgkDefaultMacroName),
- fG3CallsName(fgkDefaultG3CallsName)
-{
-//
- if (fgInstance) {
- AliGlobals::Exception(
- "AliFiles: attempt to create two instances of singleton.");
- };
-
- fgInstance = this;
-}
-
-//_____________________________________________________________________________
-AliFiles::AliFiles(const G4String& config)
- : fMacroName(config),
- fG3CallsName(fgkDefaultG3CallsName)
-{
-//
- if (fgInstance) {
- AliGlobals::Exception(
- "AliFiles: attempt to create two instances of singleton.");
- };
-
- fgInstance = this;
-}
-
-//_____________________________________________________________________________
-AliFiles::AliFiles(const G4String& config, const G4String& g3calls)
- : fMacroName(config),
- fG3CallsName(g3calls)
-{
-//
- if (fgInstance) {
- AliGlobals::Exception(
- "AliFiles: attempt to create two instances of singleton.");
- };
-
- fgInstance = this;
-}
-
-//_____________________________________________________________________________
-AliFiles::AliFiles(const AliFiles& right) {
-//
- AliGlobals::Exception("Attempt to copy AliFiles singleton.");
-}
-
-
-//_____________________________________________________________________________
-AliFiles::~AliFiles() {
-//
-}
-
-// operators
-
-//_____________________________________________________________________________
-AliFiles&
-AliFiles::operator=(const AliFiles& right)
-{
- // check assignement to self
- if (this == &right) return *this;
-
- AliGlobals::Exception("Attempt to assign AliFiles singleton.");
-
- return *this;
-}
-
-// private methods
-
-//_____________________________________________________________________________
-G4String AliFiles::GetMacroPath(const G4String& macroName,
- const G4String& moduleName,
- G4bool isStructure) const
-{
-// Returns the filepath to Config.C/in with filename extension:
-// $AG4_INSTALL/macro/XXX/Config
-// $AG4_INSTALL/macro/STRUCT/XXXConfig
-// ---
-
- G4String name = fgkTop + "/macro/";
-
- if (!isStructure)
- name = name + moduleName + "/" + macroName;
- else
- name = name + "STRUCT/"+ fgkDefaultMacroName + moduleName;
-
- return name;
-}
-
-// public methods
-
-//_____________________________________________________________________________
-G4String AliFiles::GetRootMacroPath() const
-{
-// Returns the filepath:
-// $AG4_INSTALL/macro/ag4Config.C
-// ---
-
- G4String name
- = fgkTop + "/macro/ag4" + fMacroName + fgkRootMacroExtension;
-
- return name;
-}
-
-//_____________________________________________________________________________
-G4String AliFiles::GetRootMacroPath(const G4String& moduleName,
- G4bool isStructure) const
-{
-// Returns the filepath:
-// $AG4_INSTALL/macro/XXX/Config.C
-// $AG4_INSTALL/macro/STRUCT/XXXConfig.C
-// ---
-
- G4String name = GetMacroPath(fMacroName, moduleName, isStructure);
- name = name + fgkRootMacroExtension;
-
- return name;
-}
-
-//_____________________________________________________________________________
-G4String AliFiles::GetG4MacroPath(const G4String& moduleName,
- G4bool isStructure) const
-{
-// Returns the filepath:
-// $AG4_INSTALL/macro/XXX/Config.in
-// $AG4_INSTALL/macro/STRUCT/XXXConfig.in
-// ---
-
- G4String name = GetMacroPath(fgkDefaultMacroName, moduleName, isStructure);
- name = name + fgkG4MacroExtension;
-
- return name;
-}
-
-//_____________________________________________________________________________
-G4String AliFiles::GetG3CallsDatPath(const G4String& moduleName,
- G4int moduleVersion, G4bool isStructure) const
-{
-// Returns the filepath:
-// $AG4_INSTALL/macro/XXX/g3calls_vN.dat
-// $AG4_INSTALL/macro/STRUCT/g3calls_XXXvN.dat
-// ---
-
- G4String version("v");
- AliGlobals::AppendNumberToString(version, moduleVersion);
-
- G4String name = fgkTop + "/macro/";
-
- if (!isStructure)
- name = name + moduleName + "/" + fG3CallsName + "_";
- else
- name = name + "STRUCT/" + fG3CallsName + "_" + moduleName;
-
- name = name + version + fgkG3CallsExtension;
-
- return name;
-}
-
-//_____________________________________________________________________________
-G4String AliFiles::GetXMLFilePath(const G4String& moduleName,
- G4int moduleVersion) const
-{
-// Returns the filepath:
-// $AG4_INSTALL/xml/XXXvN.xml
-// ---
-
- G4String version = "v";
- AliGlobals::AppendNumberToString(version, moduleVersion);
-
- G4String name
- = fgkTop + "/xml/" + moduleName + version + fgkXMLFileExtension;
-
- return name;
-}
+++ /dev/null
-// $Id$
-// Category: global
-//
-// Author: I. Hrivnacova
-//
-// Class AliFiles
-// --------------
-// Class for generating file names and paths.
-// The input files:
-// Config.C - the basic AliRoot configuration file (Root macro)
-// When detector setup is defined interactively,
-// the alternative Config.C files per detector
-// are used.
-// Config.in - G4 specific configuration macros per detector
-// The output files:
-// g3calls.dat - the ASCII file with G3 geometry calls;
-// generation is switched on with /aliDet/writeGeometry command
-// in PreInit phase
-// DetvN.xml - XML geometry description file;
-// generation is switched on with /aliDet/generateXML command
-// in Init phase
-
-#ifndef ALI_FILES_H
-#define ALI_FILES_H
-
-#include <globals.hh>
-
-class AliFiles
-{
- public:
- AliFiles();
- AliFiles(const G4String& config);
- AliFiles(const G4String& config, const G4String& g3calls);
- // --> protected
- //AliFiles(const AliFiles& right);
- virtual ~AliFiles();
-
- // static access method
- static AliFiles* Instance();
-
- // methods
- G4String GetRootMacroPath() const;
- G4String GetRootMacroPath(const G4String& moduleName,
- G4bool isStructure) const;
- G4String GetG4MacroPath(const G4String& moduleName,
- G4bool isStructure) const;
- G4String GetG3CallsDatPath(const G4String& moduleName,
- G4int moduleVersion, G4bool isStructure) const;
- G4String GetXMLFilePath(const G4String& moduleName,
- G4int moduleVersion) const;
-
- // set methods
- void SetMacroName(const G4String& name);
- void SetG3CallsName(const G4String& name);
-
- // get methods
- G4String GetMacroName() const;
- G4String GetG3CallsName() const;
- G4String GetDefaultMacroName() const;
- G4String GetDefaultG3CallsName() const;
-
- protected:
- AliFiles(const AliFiles& right);
-
- // operators
- AliFiles& operator=(const AliFiles& right);
-
- private:
- // methods
- G4String GetMacroPath(const G4String& macroName,
- const G4String& moduleName,
- G4bool isStructure) const;
-
- // static data members
- static AliFiles* fgInstance; //this instance
- static const G4String fgkTop; //top directory
- static const G4String fgkDefaultMacroName; // default config. macro name
- static const G4String fgkDefaultG3CallsName; // default g3calls name
- static const G4String fgkRootMacroExtension; //".C" Root macro extension
- static const G4String fgkG4MacroExtension; //".in" G4 macro extension
- static const G4String fgkG3CallsExtension; //".dat"
- static const G4String fgkXMLFileExtension; //".xml"
-
- // data members
- G4String fMacroName; //configuration macro name
- G4String fG3CallsName; //g3calls data file name
-};
-
-// inline methods
-
-inline AliFiles* AliFiles::Instance()
-{ return fgInstance; }
-
-inline void AliFiles::SetMacroName(const G4String& name)
-{ fMacroName = name; }
-
-inline void AliFiles::SetG3CallsName(const G4String& name)
-{ fG3CallsName = name; }
-
-inline G4String AliFiles::GetMacroName() const
-{ return fMacroName; }
-
-inline G4String AliFiles::GetG3CallsName() const
-{ return fG3CallsName; }
-
-inline G4String AliFiles::GetDefaultMacroName() const
-{ return fgkDefaultMacroName; }
-
-inline G4String AliFiles::GetDefaultG3CallsName() const
-{ return fgkDefaultG3CallsName; }
-
-#endif //ALI_FILES_H
+++ /dev/null
-// $Id$
-
-#ifdef __CINT__
-
-#pragma link off all globals;
-#pragma link off all classes;
-#pragma link off all functions;
-
-#pragma link C++ class AliRunConfiguration+;
-
-#endif
+++ /dev/null
-// $Id$
-// Category: global
-//
-// Author: I. Hrivnacova
-//
-// Class AliGlobals
-// ----------------
-// See the class description in the header file.
-
-#include "AliGlobals.h"
-#include "TG4Globals.h"
-
-#include <stdlib.h>
-
-// static data members
-const G4double AliGlobals::fgkDefaultCut = 2.0*mm;
-
-//_____________________________________________________________________________
-AliGlobals::AliGlobals() {
-//
-}
-
-//_____________________________________________________________________________
-AliGlobals::~AliGlobals() {
-//
-}
-
-// static methods
-
-//_____________________________________________________________________________
-void AliGlobals::Exception(const char* s)
-{
-// Prints error message end exits the program.
-// ---
-
- if (s)
- { G4cerr << G4endl << " " << s << G4endl; }
- G4cerr << "*** AliceException: Aborting execution ***" << G4endl;
- exit(1);
-}
-
-//_____________________________________________________________________________
-void AliGlobals::Warning(const char* s)
-{
-// Prints warning message.
-// ---
-
- G4cerr << "+++ Alice Warning: +++" << G4endl;
- if (s)
- { G4cerr << " " << s << G4endl; }
- G4cerr << "++++++++++++++++++++++" << G4endl;
-}
-
-#ifdef G4USE_STL
-//_____________________________________________________________________________
-void AliGlobals::Exception(G4std::string s) {
-//
- AliGlobals::Exception(s.c_str());
-}
-
-//_____________________________________________________________________________
-void AliGlobals::Exception(G4String s) {
-//
- AliGlobals::Exception(s.c_str());
-}
-
-//_____________________________________________________________________________
-void AliGlobals::Warning(G4std::string s) {
-//
- AliGlobals::Warning(s.c_str());
-}
-
-//_____________________________________________________________________________
-void AliGlobals::Warning(G4String s) {
-//
- AliGlobals::Warning(s.c_str());
-}
-#endif
-
-//_____________________________________________________________________________
-void AliGlobals::AppendNumberToString(G4String& s, G4int a)
-{
-// Appends number to string.
-// ---
- TG4Globals::AppendNumberToString(s, a);
-}
-
-//_____________________________________________________________________________
-G4int AliGlobals::StringToInt(G4String s)
-{
-// Converts one char string to integer number.
-// ---
-
- // make better
- if (s=="0") return 0;
- if (s=="1") return 1;
- if (s=="2") return 2;
- if (s=="3") return 3;
- if (s=="4") return 4;
- if (s=="5") return 5;
- if (s=="6") return 6;
- if (s=="7") return 7;
- if (s=="8") return 8;
- if (s=="9") return 9;
- return -1;
-}
-
+++ /dev/null
-// $Id$
-// Category: global
-//
-// Author: I. Hrivnacova
-//
-// Class AliGlobals
-// ----------------
-// Class provides the functions of general use.
-// It is protected from instantiating (only static data members
-// and static methods are defined).
-
-
-#ifndef ALI_GLOBALS_H
-#define ALI_GLOBALS_H
-
-#include <globals.hh>
-
-#ifdef G4USE_STL
-#include <string>
-#endif
-
-class AliGlobals
-{
- public:
- // --> protected
- // AliGlobals();
- virtual ~AliGlobals();
-
- // static methods
- static void Exception(const char* s=0);
- // Global error function prints string to cerr, and aborts
- // program - according to G4Exception.cc
- static void Warning(const char* s=0);
- // Global warning function prints string to cerr
-#ifdef G4USE_STL
- static void Exception(G4std::string s);
- static void Exception(G4String s);
- static void Warning(G4std::string s);
- static void Warning(G4String s);
-#endif
-
- static void AppendNumberToString(G4String& string, G4int number);
- static G4int StringToInt(G4String string);
-
- // static get methods
- static G4double DefaultCut();
-
- protected:
- AliGlobals();
- // only static data members and methods
-
- private:
- // static data members
- static const G4double fgkDefaultCut; //default cut value
-};
-
-// inline methods
-
-inline G4double AliGlobals::DefaultCut()
-{ return fgkDefaultCut; }
-
-#endif //ALI_GLOBALS_H
+++ /dev/null
-// $Id$
-// Category: event
-//
-// Author: I. Hrivnacova
-//
-// Class AliGunParticle
-// --------------------
-// See the class description in the header file.
-
-#include "AliGunParticle.h"
-
-#include <G4ParticleDefinition.hh>
-
-//_____________________________________________________________________________
-AliGunParticle::AliGunParticle()
- : fParticleDefinition(0),
- fParticleMomentum(G4ThreeVector(0., 0., 1.)),
- fPosition(G4ThreeVector()),
- fTime(0),
- fPolarization(G4ThreeVector())
-{
-//
-}
-
-//_____________________________________________________________________________
-AliGunParticle::AliGunParticle(G4ParticleDefinition* particleDef,
- G4ParticleMomentum momentum,
- G4ThreeVector position,
- G4double time,
- G4ThreeVector polarization )
- : fParticleDefinition(particleDef),
- fParticleMomentum(momentum),
- fPosition(position),
- fTime(time),
- fPolarization(polarization)
-{
-//
-}
-
-//_____________________________________________________________________________
-AliGunParticle::AliGunParticle(G4ParticleDefinition* particleDef,
- G4ParticleMomentum momentumDir,
- G4double kinEnergy,
- G4ThreeVector position,
- G4double time,
- G4ThreeVector polarization )
- : fParticleDefinition(particleDef),
- fPosition(position),
- fTime(time),
- fPolarization(polarization)
-{
-//
- G4double mass = fParticleDefinition->GetPDGMass();
- G4double energy = kinEnergy + mass;
- G4double pmag = sqrt(energy*energy - mass*mass);
- fParticleMomentum = pmag*momentumDir;
-}
-
-//_____________________________________________________________________________
-AliGunParticle::AliGunParticle(const AliGunParticle& right) {
-//
- // copy stuff
- *this = right;
-}
-
-//_____________________________________________________________________________
-AliGunParticle::~AliGunParticle() {
-//
-}
-
-// operators
-
-//_____________________________________________________________________________
-AliGunParticle& AliGunParticle::operator=(const AliGunParticle& right)
-{
- // check assignement to self
- if (this == &right) return *this;
-
- fParticleDefinition = right.fParticleDefinition;
- fParticleMomentum = right.fParticleMomentum;
- fPosition = right.fPosition;
- fTime = right.fTime;
- fPolarization = right.fPolarization;
-
- return *this;
-}
-
-//_____________________________________________________________________________
-G4int AliGunParticle::operator==(const AliGunParticle& right) const
-{
-//
- G4int returnValue = 0;
- if (fParticleDefinition == right.fParticleDefinition
- && fParticleMomentum == right.fParticleMomentum
- && fPosition == right.fPosition
- && fTime == right.fTime
- && fPolarization == right.fPolarization) returnValue = 1;
-
- return returnValue;
-}
-
-//_____________________________________________________________________________
-G4int AliGunParticle::operator!=(const AliGunParticle& right) const
-{
-//
- G4int returnValue = 1;
- if (*this == right) returnValue = 0;
-
- return returnValue;
-}
-
-// public methods
-
-//_____________________________________________________________________________
-void AliGunParticle::Print() const
-{
-// Prints particle properties.
-// ---
-
- G4cout << " particle name: ";
- G4cout << fParticleDefinition->GetParticleName() << G4endl;
- G4cout << " particle momentum: ";
- G4cout << fParticleMomentum << G4endl;
- G4cout << " particle position: ";
- G4cout << fPosition << " mm" << G4endl;
- G4cout << " particle time: ";
- G4cout << fTime << " s" << G4endl;
- G4cout << " particle polarization: ";
- G4cout << fPolarization << G4endl;
-}
-
-//_____________________________________________________________________________
-void AliGunParticle::SetKineticEnergy(G4double kinEnergy)
-{
-// Sets kinetic energy.
-// ---
-
- G4double mass = fParticleDefinition->GetPDGMass();
- G4double energy = kinEnergy + mass;
- G4double pmag = sqrt(energy*energy - mass*mass);
- fParticleMomentum.setMag(pmag);
-}
-
-//_____________________________________________________________________________
-G4double AliGunParticle::GetKineticEnergy() const
-{
-// Gets kinetic energy.
-// ---
-
- G4double mass = fParticleDefinition->GetPDGMass();
- G4double energy
- = sqrt(fParticleMomentum.mag()*fParticleMomentum.mag() + mass*mass);
- return energy - mass;
-}
+++ /dev/null
-// $Id$
-// Category: event
-//
-// Author: I. Hrivnacova
-//
-// Class AliGunParticle
-// --------------------
-// Data type class that stores properties of a gun particle.
-// Used in AliParticleGun.
-
-#ifndef ALI_GUN_PARTICLE_H
-#define ALI_GUN_PARTICLE_H
-
-#include <G4ParticleMomentum.hh>
-#include <G4ThreeVector.hh>
-#include <globals.hh>
-
-class G4ParticleDefinition;
-
-class AliGunParticle
-{
- public:
- AliGunParticle();
- AliGunParticle(G4ParticleDefinition* particleDef,
- G4ParticleMomentum momentum,
- G4ThreeVector position,
- G4double time,
- G4ThreeVector polarization );
- AliGunParticle(G4ParticleDefinition* particleDef,
- G4ParticleMomentum momentumDir,
- G4double kinEnergy,
- G4ThreeVector position,
- G4double time,
- G4ThreeVector polarization );
- AliGunParticle(const AliGunParticle& right);
- ~AliGunParticle();
-
- // operators
- AliGunParticle& operator=(const AliGunParticle& right);
- G4int operator==(const AliGunParticle& right) const;
- G4int operator!=(const AliGunParticle& right) const;
-
- // methods
- void Print() const;
-
- // set methods
- void SetParticleDefinition(G4ParticleDefinition* particleDef);
- void SetMomentum(G4ParticleMomentum momentum);
- void SetPosition(G4ThreeVector position);
- void SetTime(G4double time);
- void SetPolarization(G4ThreeVector polarization);
- void SetMomentumDirection(G4ParticleMomentum momentumDir);
- void SetKineticEnergy(G4double kinEnergy);
-
- // get methods
- G4ParticleDefinition* GetParticleDefinition() const;
- G4ParticleMomentum GetMomentum() const;
- G4ThreeVector GetPosition() const;
- G4double GetTime() const;
- G4ThreeVector GetPolarization() const;
- G4ParticleMomentum GetMomentumDirection() const;
- G4double GetKineticEnergy() const;
-
- private:
- // data members
- G4ParticleDefinition* fParticleDefinition; //G4ParticleDefinition
- G4ParticleMomentum fParticleMomentum; //G4ParticleMomentum
- G4ThreeVector fPosition; //position
- G4double fTime; //time
- G4ThreeVector fPolarization; //polarization
-};
-
-// inline methods
-
-inline void AliGunParticle::SetParticleDefinition(G4ParticleDefinition* particleDef)
-{ fParticleDefinition = particleDef; }
-
-inline void AliGunParticle::SetMomentum(G4ParticleMomentum momentum)
-{ fParticleMomentum = momentum; }
-
-inline void AliGunParticle::SetPosition(G4ThreeVector position)
-{ fPosition = position; }
-
-inline void AliGunParticle::SetTime(G4double time)
-{ fTime = time; }
-
-inline void AliGunParticle::SetPolarization(G4ThreeVector polarization)
-{ fPolarization = polarization; }
-
-inline void AliGunParticle::SetMomentumDirection(G4ParticleMomentum momentumDir)
-{ fParticleMomentum = fParticleMomentum.mag()*momentumDir.unit(); }
-
-inline G4ParticleDefinition* AliGunParticle::GetParticleDefinition() const
-{ return fParticleDefinition; }
-
-inline G4ParticleMomentum AliGunParticle::GetMomentum() const
-{ return fParticleMomentum; }
-
-inline G4ThreeVector AliGunParticle::GetPosition() const
-{ return fPosition; }
-
-inline G4double AliGunParticle::GetTime() const
-{ return fTime; }
-
-inline G4ThreeVector AliGunParticle::GetPolarization() const
-{ return fPolarization; }
-
-inline G4ParticleMomentum AliGunParticle::GetMomentumDirection() const
-{ return fParticleMomentum.unit(); }
-
-#endif //ALI_GUN_PARTICLE_H
-
-
+++ /dev/null
-// $Id$
-// Category: geometry
-//
-// Author: I. Hrivnacova
-//
-// Class AliModuleConstruction
-// ---------------------------
-// See the class description in the header file.
-
-#include "AliModuleConstruction.h"
-#include "AliGlobals.h"
-#include "AliFiles.h"
-#include "AliRun.h"
-#include "AliModule.h"
-
-#include <G4UImanager.hh>
-
-#include <TROOT.h>
-#include <TCint.h>
-
-
-//_____________________________________________________________________________
-AliModuleConstruction::AliModuleConstruction(const G4String& moduleName,
- G4int version,
- AliModuleType moduleType)
- : fAliModule(0),
- fModuleName(moduleName),
- fType(moduleType),
- fVersion(version),
- fProcessConfig(true),
- fReadGeometry(false),
- fWriteGeometry(false),
- fDataFilePath("") {
-//
-}
-
-//_____________________________________________________________________________
-AliModuleConstruction::AliModuleConstruction()
- : fAliModule(0),
- fModuleName(""),
- fType(kDetector),
- fVersion(-1),
- fProcessConfig(true),
- fReadGeometry(false),
- fWriteGeometry(false),
- fDataFilePath("") {
-//
-}
-
-//_____________________________________________________________________________
-AliModuleConstruction::AliModuleConstruction(const AliModuleConstruction& right)
-{
-//
- // copy stuff
- *this = right;
-}
-
-//_____________________________________________________________________________
-AliModuleConstruction::~AliModuleConstruction()
-{
-//
-}
-
-// operators
-
-//_____________________________________________________________________________
-AliModuleConstruction&
-AliModuleConstruction::operator=(const AliModuleConstruction& right)
-{
- // check assignement to self
- if (this == &right) return *this;
-
- fAliModule = right.fAliModule;
- fModuleName = right.fModuleName;
- fVersion = right.fVersion;
- fType = right.fType;
- fProcessConfig = right.fProcessConfig;
- fReadGeometry = right.fReadGeometry;
- fWriteGeometry = right.fWriteGeometry;
- fDataFilePath = right.fDataFilePath;
-
- return *this;
-}
-
-//_____________________________________________________________________________
-G4int
-AliModuleConstruction::operator==(const AliModuleConstruction& right) const
-{
-//
- return 0;
-}
-
-//_____________________________________________________________________________
-G4int
-AliModuleConstruction::operator!=(const AliModuleConstruction& right) const
-{
-//
- G4int returnValue = 1;
- if (*this == right) returnValue = 0;
-
- return returnValue;
-}
-
-//_____________________________________________________________________________
-void AliModuleConstruction::Configure()
-{
-// Executes the detector setup Root macro
-// (extracted from AliRoot Config.C) and
-// G4 macro.
-// ---
-
- AliFiles* files = AliFiles::Instance();
-
- // filepaths and macro names
- G4bool isStructure = (fType == kStructure);
- G4String rootFilePath
- = files->GetRootMacroPath(GetDetName(), isStructure);
- G4String g4FilePath
- = files->GetG4MacroPath(GetDetName(), isStructure);
- fDataFilePath
- = files->GetG3CallsDatPath(GetDetName(), fVersion, isStructure);
-
- // load and execute aliroot config macro
- if (fProcessConfig) {
- gROOT->LoadMacro(rootFilePath);
- G4String macroName = files->GetDefaultMacroName();
- //macroName = macroName + "_" + GetDetName();
- macroName = macroName + "(";
- AliGlobals::AppendNumberToString(macroName, fVersion);
- macroName = macroName + ")";
- gInterpreter->ProcessLine(macroName);
- }
-
- // process g4 config macro
- G4String command = "/control/execute ";
- G4UImanager* pUI = G4UImanager::GetUIpointer();
- pUI->ApplyCommand(command + g4FilePath);
-
- // get AliModule created in Config.C macro
- fAliModule = gAlice->GetModule(GetDetName());
- if (!fAliModule) {
- G4String text = "AliModuleConstruction::Configure:\n";
- text = text + " AliModule " + GetDetName();
- text = text + " has not been found in gAlice.";
- AliGlobals::Exception(text);
- }
-}
-
+++ /dev/null
-// $Id$
-// Category: geometry
-//
-// Author: I. Hrivnacova
-//
-// Class AliModuleConstruction
-// ---------------------------
-// Composite of AliDetector and additional parameters
-// used for optional writing/reading geometry ASCII
-// files, interactive detector setup and processing
-// of module related G4 macros.
-
-
-#ifndef ALI_MODULE_CONSTRUCTION_H
-#define ALI_MODULE_CONSTRUCTION_H
-
-#include "AliModuleType.h"
-
-#include <globals.hh>
-
-class AliModule;
-class AliFiles;
-
-class AliModuleConstruction
-{
- public:
- AliModuleConstruction(const G4String& moduleName,
- G4int version,
- AliModuleType moduleType = kDetector);
- AliModuleConstruction(const AliModuleConstruction& right);
- // --> protected
- // AliModuleConstruction();
- virtual ~AliModuleConstruction();
-
- // operators
- AliModuleConstruction& operator=(const AliModuleConstruction &right);
- G4int operator==(const AliModuleConstruction& right) const;
- G4int operator!=(const AliModuleConstruction& right) const;
-
- // methods
- void Configure();
-
- // set methods
- void SetModuleType(AliModuleType type);
- void SetProcessConfig(G4bool processConfig);
- void SetReadGeometry(G4bool readGeometry);
- void SetWriteGeometry(G4bool writeGeometry);
-
- // get methods
- AliModule* GetAliModule() const;
- AliModuleType GetType() const;
- G4String GetDetName() const;
- G4int GetVersion() const;
- G4bool GetProcessConfig() const;
- G4bool GetReadGeometry() const;
- G4bool GetWriteGeometry() const;
- G4String GetDataFilePath() const;
-
- private:
- AliModuleConstruction();
-
- // data members
- AliModule* fAliModule; //AliModule
- G4String fModuleName; //module name
- AliModuleType fType; //module type (detector/structure)
- G4int fVersion; //module version
- G4bool fProcessConfig; //control for processing Config.C
- G4bool fReadGeometry; //if true: geometry is read from file
- G4bool fWriteGeometry; //if true: geometry is written to file
- G4String fDataFilePath; //path to geometry data file
-
- // data members
-};
-
-// inline methods
-
-inline void AliModuleConstruction::SetModuleType(AliModuleType type)
-{ fType = type; }
-
-inline void AliModuleConstruction::SetProcessConfig(G4bool processConfig)
-{ fProcessConfig = processConfig; }
-
-inline void AliModuleConstruction::SetReadGeometry(G4bool readGeometry)
-{ fReadGeometry = readGeometry; }
-
-inline void AliModuleConstruction::SetWriteGeometry(G4bool writeGeometry)
-{ fWriteGeometry = writeGeometry; }
-
-inline AliModuleType AliModuleConstruction::GetType() const
-{ return fType; }
-
-inline AliModule* AliModuleConstruction::GetAliModule() const
-{ return fAliModule; }
-
-inline G4String AliModuleConstruction::GetDetName() const
-{ return fModuleName; }
-
-inline G4int AliModuleConstruction::GetVersion() const
-{ return fVersion; }
-
-inline G4bool AliModuleConstruction::GetProcessConfig() const
-{ return fProcessConfig; }
-
-inline G4bool AliModuleConstruction::GetReadGeometry() const
-{ return fReadGeometry; }
-
-inline G4bool AliModuleConstruction::GetWriteGeometry() const
-{ return fWriteGeometry; }
-
-inline G4String AliModuleConstruction::GetDataFilePath() const
-{ return fDataFilePath; }
-
-#endif //ALI_MODULE_CONSTRUCTION_H
-
+++ /dev/null
-// $Id$
-// Category: geometry
-//
-// Author: I. Hrivnacova
-//
-// Enum AliModuleType
-// ------------------
-// Enumeration type for distinguishing between detector
-// and structure modules.
-
-#ifndef ALI_MODULE_TYPE_H
-#define ALI_MODULE_TYPE_H
-
-enum AliModuleType { kDetector, kStructure };
-
-#endif //ALI_MODULE_TYPE_H
+++ /dev/null
-// $Id$
-// Category: geometry
-//
-// Author: I. Hrivnacova
-//
-// Class AliModulesComposition
-// ---------------------------
-// See the class description in the header file.
-
-#include "AliModulesComposition.h"
-#include "AliModuleConstruction.h"
-#include "AliGlobals.h"
-#include "AliFiles.h"
-#include "AliModule.h"
-
-#include "TG4GeometryManager.h"
-#include "TG4MagneticField.h"
-#include "TG4UniformMagneticField.h"
-
-#include <G4Material.hh>
-
-//_____________________________________________________________________________
-AliModulesComposition::AliModulesComposition()
- : AliVerbose("modulesComposition"),
- fMessenger(this),
- fMagneticFieldType(kMCApplicationField),
- fMagneticField(0),
- fReadGeometry(false),
- fWriteGeometry(false) {
-//
-}
-
-//_____________________________________________________________________________
-AliModulesComposition::AliModulesComposition(const AliModulesComposition& right)
- : AliVerbose("modulesComposition"),
- fMessenger(this)
-{
-//
- AliGlobals::Exception("AliModulesComposition is protected from copying.");
-}
-
-//_____________________________________________________________________________
-AliModulesComposition::~AliModulesComposition() {
-//
- delete fMagneticField;
-}
-
-// operators
-
-//_____________________________________________________________________________
-AliModulesComposition&
-AliModulesComposition::operator=(const AliModulesComposition& right)
-{
- // check assignement to self
- if (this == &right) return *this;
-
- AliGlobals::Exception("AliModulesComposition is protected from assigning.");
-
- return *this;
-}
-
-//
-// private methods
-//
-
-//_____________________________________________________________________________
-void AliModulesComposition::CreateMagneticField()
-{
-// Creates standard magnetic field (defined by TVirtualMCApplication).
-// ---
-
- switch (fMagneticFieldType) {
-
- case kMCApplicationField:
- fMagneticField = new TG4MagneticField();
- G4cout << "kMCApplicationField" << G4endl;
- break;
-
- case kUniformField:
- fMagneticField = new TG4UniformMagneticField();
- G4cout << "kUniformField" << G4endl;
- break;
-
- case kNoField:
- G4cout << "kNoField" << G4endl;
- ;;
- }
-}
-
-//_____________________________________________________________________________
-void AliModulesComposition::Configure()
-{
-// Executes the detectors setup Root macros
-// (extracted from AliRoot Config.C) and
-// G4 macros.
-// ---
-
- // number of modules
- G4int nofModules = fModuleConstructionVector.size();
-
- if (nofModules == 0) {
- AliGlobals::Warning(
- "AliModulesComposition::Configure: No modules are defined.");
- return;
- }
-
- for (G4int i=0; i<nofModules; i++)
- fModuleConstructionVector[i]->Configure();
-}
-
-
-//_____________________________________________________________________________
-void AliModulesComposition::CreateG4Geometry()
-{
-// Constructs geometry.
-// G3 tables are process for all modules alltogether.
-// --
-
- // number of modules
- G4int nofModules = fModuleConstructionVector.size();
-
- if (nofModules == 0) {
- AliGlobals::Warning(
- "AliModulesComposition::CreateG4Geometry: No modules are defined.");
- return;
- }
-
- // get geometry manager
- TG4GeometryManager* pGeometryManager = TG4GeometryManager::Instance();
-
- G4int i;
- for (i=0; i<nofModules; i++) {
-
- // fModuleConstructionVector[i]->Configure(files);
-
- // register module name in the name map
- AliModule* module = fModuleConstructionVector[i]->GetAliModule();
- pGeometryManager->SetMapSecond(module->GetName());
-
- G4bool readGeometry = fModuleConstructionVector[i]->GetReadGeometry();
- G4bool writeGeometry = fModuleConstructionVector[i]->GetWriteGeometry();
- G4String dataFilePath = fModuleConstructionVector[i]->GetDataFilePath();
-
- if (readGeometry) {
- // TG4GeometryManager uses g3tog4 methods for reading
- // g3calls.dat files - as these methods do not fill name map
- // they cannot be used for constructing more modules
- // together
- //
- // pGeometryManager->SetWriteGeometry(false);
- // pGeometryManager->ReadG3Geometry(dataFilePath);
-
- G4String text = "AliModulesComposition::Construct - Limitation:\n";
- text = text + " Reading g3calls.dat is not implemented.";
- AliGlobals::Exception(text);
- }
- else {
- // set geometry output stream for this module
- pGeometryManager->SetWriteGeometry(writeGeometry);
- if (writeGeometry)
- pGeometryManager->OpenOutFile(dataFilePath);
-
- // create geometry from AliRoot
-
- // construct materials
- module->CreateMaterials();
-
- // construct G3 geometry
- module->CreateGeometry();
-
- if (writeGeometry)
- pGeometryManager->CloseOutFile();
- }
- }
-
- // construct G4 geometry
- pGeometryManager->CreateG4Geometry();
-
- // print name map
- // pGeometryManager->PrintNameMap();
-
-/*
- // moved to AliSDConstruction
- // to be performed after Init (required for MUON)
-
- for (i=0; i<nofModules; i++) {
-
- // construct geometry for display
- fModuleConstructionVector[i]->GetAliModule()->BuildGeometry();
- }
-*/
-
- // reset TG4GeometryManager
- pGeometryManager->ClearG3Tables();
-}
-
-//_____________________________________________________________________________
-void AliModulesComposition::SetReadGeometryToModules(G4bool readGeometry)
-{
-// Sets readGeometry control to all modules.
-// ---
-
- for (G4int i=0; i<G4int(fModuleConstructionVector.size()); i++)
- fModuleConstructionVector[i]->SetReadGeometry(readGeometry);
-}
-
-//_____________________________________________________________________________
-void AliModulesComposition::SetWriteGeometryToModules(G4bool writeGeometry)
-{
-// Sets writeGeometry control to all modules.
-// ---
-
- for (G4int i=0; i<G4int(fModuleConstructionVector.size()); i++)
- fModuleConstructionVector[i]->SetWriteGeometry(writeGeometry);
-}
-
-//
-// protected methods
-//
-
-//_____________________________________________________________________________
-void AliModulesComposition::AddModule(const G4String& name,
- G4int version,
- AliModuleType moduleType)
-{
-// Adds module to the module construction vector.
-// ---
-
- AliModuleConstruction* moduleConstruction
- = new AliModuleConstruction(name, version, moduleType);
-
- fModuleConstructionVector.push_back(moduleConstruction);
-}
-
-//_____________________________________________________________________________
-void AliModulesComposition::ConstructModules()
-{
-// Construct geometry of all modules (both standalone and dependent.)
-// ---
-
- // create magnetic field
- CreateMagneticField();
-
- // set common options
- SetReadGeometryToModules(fReadGeometry);
- SetWriteGeometryToModules(fWriteGeometry);
-
- // configure modules
- Configure();
-
- // construct dependent modules
- CreateG4Geometry();
-}
-
-//_____________________________________________________________________________
-void AliModulesComposition::SetProcessConfigToModules(G4bool processConfig)
-{
-// Sets processConfig control to all modules.
-// ---
-
- for (G4int i=0; i<G4int(fModuleConstructionVector.size()); i++)
- fModuleConstructionVector[i]->SetProcessConfig(processConfig);
-}
-
-//
-// public methods
-//
-
-//_____________________________________________________________________________
-void AliModulesComposition::PrintMaterials() const
-{
-// Prints all materials.
-// ---
-
- const G4MaterialTable* matTable = G4Material::GetMaterialTable();
- G4cout << *matTable;
-}
-
-
-//_____________________________________________________________________________
-void AliModulesComposition::SetFieldType(TG4MagneticFieldType fieldType)
-{
-// Selects from available magnetic field types:
-// field defined by TVirtualMCApplication, uniform magnetic field
-// or no magnetic field.
-// Applicable only when no field has been yet created (PreInit).
-// ---
-
- if (fMagneticField) {
- G4String text = "AliModulesComposition::SetFieldType :\n";
- text = text + " The magnetic field already exists.";
- text = text + " Selection was ignored.";
- AliGlobals::Warning(text);
- }
-
- fMagneticFieldType = fieldType;
-}
-
-//_____________________________________________________________________________
-void AliModulesComposition::SetUniformFieldValue(G4double fieldValue)
-{
-// Sets uniform magnetic field to specified value.
-// ---
-
- if (!fMagneticField) {
- G4String text = "AliModulesComposition::SetUniformMagField: \n";
- text = text + " Magnetic field is not defined.";
- AliGlobals::Exception(text);
- }
-
- // Check field type
- TG4UniformMagneticField* uniformField
- =dynamic_cast<TG4UniformMagneticField*>(fMagneticField);
-
- if (!uniformField) {
- G4String text = "AliModulesComposition::SetUniformMagField: \n";
- text = text + " Defined magnetic field is not uniform.";
- AliGlobals::Exception(text);
- }
-
- // Set value
- uniformField->SetFieldValue(fieldValue);
-}
+++ /dev/null
-// $Id$
-// Category: geometry
-//
-// Author: I. Hrivnacova
-//
-// Class AliModulesComposition
-// ---------------------------
-// Detector construction base class for building geometry
-// composed from modules.
-
-#ifndef ALI_MODULES_COMPOSITION_H
-#define ALI_MODULES_COMPOSITION_H
-
-#include "AliModulesCompositionMessenger.h"
-#include "AliModuleType.h"
-#include "AliVerbose.h"
-
-#include <TG4MagneticFieldType.h>
-
-#include <G4VUserDetectorConstruction.hh>
-#include <globals.hh>
-#include <g4std/vector>
-
-class AliModuleConstruction;
-class G4MagneticField;
-
-class G4VPhysicalVolume;
-
-class AliModulesComposition : public G4VUserDetectorConstruction,
- public AliVerbose
-{
- typedef G4std::vector<AliModuleConstruction*> AliModuleConstructionVector;
-
- public:
- AliModulesComposition();
- // --> protected
- // AliModulesComposition(const AliModulesComposition& right);
- virtual ~AliModulesComposition();
-
- // methods
- virtual G4VPhysicalVolume* Construct() = 0;
- virtual void GenerateXMLGeometry() const = 0;
- virtual void PrintMaterials() const;
-
- // set methods
- void SetFieldType(TG4MagneticFieldType fieldType);
- void SetUniformFieldValue(G4double fieldValue);
- void SetReadGeometry(G4bool readGeometry);
- void SetWriteGeometry(G4bool writeGeometry);
-
- protected:
- AliModulesComposition(const AliModulesComposition& right);
-
- // operators
- AliModulesComposition& operator=(const AliModulesComposition& right);
-
- // methods
- void AddModule(const G4String& name,
- G4int version,
- AliModuleType moduleType = kDetector);
- void ConstructModules();
- void SetProcessConfigToModules(G4bool processConfig);
-
- private:
- // methods
- void CreateMagneticField();
- void Configure();
- void CreateG4Geometry();
- void SetReadGeometryToModules(G4bool readGeometry);
- void SetWriteGeometryToModules(G4bool writeGeometry);
-
- // data members
- AliModulesCompositionMessenger fMessenger; //messenger
- AliModuleConstructionVector fModuleConstructionVector; //..
- //vector of AliModuleConstruction
- TG4MagneticFieldType fMagneticFieldType;//magnetic field type
- G4MagneticField* fMagneticField; //magnetic field
- G4bool fReadGeometry; //option applied to all modules
- G4bool fWriteGeometry; //option applied to all modules
-};
-
-// inline methods
-
-inline void AliModulesComposition::SetReadGeometry(G4bool readGeometry)
-{ fReadGeometry = readGeometry; }
-
-inline void AliModulesComposition::SetWriteGeometry(G4bool writeGeometry)
-{ fWriteGeometry = writeGeometry; }
-
-#endif //ALI_MODULES_COMPOSITION_H
-
+++ /dev/null
-// $Id$
-// Category: geometry
-//
-// Author: I. Hrivnacova
-//
-// Class AliModulesCompositionMessenger
-// ------------------------------------
-// See the class description in the header file.
-
-#include "AliModulesCompositionMessenger.h"
-#include "AliModulesComposition.h"
-#include "AliGlobals.h"
-
-#include <G4UIdirectory.hh>
-#include <G4UIcmdWithoutParameter.hh>
-#include <G4UIcmdWithABool.hh>
-#include <G4UIcmdWithAString.hh>
-#include <G4UIcmdWithADoubleAndUnit.hh>
-
-//_____________________________________________________________________________
-AliModulesCompositionMessenger::AliModulesCompositionMessenger(
- AliModulesComposition* modulesComposition)
- : fModulesComposition(modulesComposition)
-{
-//
- fDirectory = new G4UIdirectory("/aliDet/");
- fDirectory->SetGuidance("Detector construction control commands.");
-
- fFieldTypeCmd = new G4UIcmdWithAString("/aliDet/fieldType", this);
- G4String guidance = "Select type of magnetic field:\n";
- guidance = guidance + " MCApplication: field defined by MC application (default)\n";
- guidance = guidance + " Uniform: uniform magnetic field\n";
- guidance = guidance + " None: no magnetic field";
- fFieldTypeCmd->SetGuidance(guidance);
- fFieldTypeCmd->SetParameterName("FieldType", true);
- fFieldTypeCmd->SetCandidates("MCApplication Uniform None");
- fFieldTypeCmd->SetDefaultValue("MCApplication");
- fFieldTypeCmd->AvailableForStates(PreInit);
-
- fUniformFieldValueCmd
- = new G4UIcmdWithADoubleAndUnit("/aliDet/uniformFieldValue", this);
- fUniformFieldValueCmd
- ->SetGuidance("Define uniform magnetic field in Z direction.");
- fUniformFieldValueCmd
- ->SetGuidance("(Uniform magnetic field type has to be selected first.)");
- fUniformFieldValueCmd->SetParameterName("UniformFieldValue", false, false);
- fUniformFieldValueCmd->SetDefaultUnit("tesla");
- fUniformFieldValueCmd->SetUnitCategory("Magnetic flux density");
- fUniformFieldValueCmd->AvailableForStates(Idle);
-
- fSetReadGeometryCmd
- = new G4UIcmdWithABool("/aliDet/readGeometry", this);
- fSetReadGeometryCmd->SetGuidance("Read geometry from g3calls.dat files");
- fSetReadGeometryCmd->SetParameterName("readGeometry", false);
- fSetReadGeometryCmd->AvailableForStates(PreInit);
-
- fSetWriteGeometryCmd
- = new G4UIcmdWithABool("/aliDet/writeGeometry", this);
- fSetWriteGeometryCmd->SetGuidance("Write geometry to g3calls.dat file");
- fSetWriteGeometryCmd->SetParameterName("writeGeometry", false);
- fSetWriteGeometryCmd->AvailableForStates(PreInit);
-
- fPrintMaterialsCmd
- = new G4UIcmdWithoutParameter("/aliDet/printMaterials", this);
- fPrintMaterialsCmd->SetGuidance("Prints all materials.");
- fPrintMaterialsCmd->AvailableForStates(PreInit, Init, Idle);
-
- fGenerateXMLCmd
- = new G4UIcmdWithoutParameter("/aliDet/generateXML", this);
- fGenerateXMLCmd->SetGuidance("Generate geometry XML file.");
- fGenerateXMLCmd->AvailableForStates(Idle);
-}
-
-//_____________________________________________________________________________
-AliModulesCompositionMessenger::AliModulesCompositionMessenger() {
-//
-}
-
-//_____________________________________________________________________________
-AliModulesCompositionMessenger::AliModulesCompositionMessenger(
- const AliModulesCompositionMessenger& right)
-{
-//
- AliGlobals::Exception(
- "AliModulesCompositionMessenger is protected from copying.");
-}
-
-//_____________________________________________________________________________
-AliModulesCompositionMessenger::~AliModulesCompositionMessenger() {
-//
- delete fDirectory;
- delete fFieldTypeCmd;
- delete fUniformFieldValueCmd;
- delete fSetReadGeometryCmd;
- delete fSetWriteGeometryCmd;
- delete fPrintMaterialsCmd;
- delete fGenerateXMLCmd;
-}
-
-// operators
-
-//_____________________________________________________________________________
-AliModulesCompositionMessenger&
-AliModulesCompositionMessenger::operator=(
- const AliModulesCompositionMessenger& right)
-{
- // check assignement to self
- if (this == &right) return *this;
-
- AliGlobals::Exception(
- "AliModulesCompositionMessenger is protected from assigning.");
-
- return *this;
-}
-
-// public methods
-
-//_____________________________________________________________________________
-void AliModulesCompositionMessenger::SetNewValue(G4UIcommand* command, G4String newValues)
-{
-// Applies command to the associated object.
-// ---
-
- if( command == fFieldTypeCmd ) {
- if (newValues == "MCApplication")
- fModulesComposition->SetFieldType(kMCApplicationField);
- if (newValues == "Uniform")
- fModulesComposition->SetFieldType(kUniformField);
- if (newValues == "None")
- fModulesComposition->SetFieldType(kNoField);
- }
- if (command == fUniformFieldValueCmd) {
- fModulesComposition
- ->SetUniformFieldValue(fUniformFieldValueCmd->GetNewDoubleValue(newValues));
- }
- else if (command == fSetReadGeometryCmd) {
- fModulesComposition->SetReadGeometry(
- fSetReadGeometryCmd->GetNewBoolValue(newValues));
- }
- else if (command == fSetWriteGeometryCmd) {
- fModulesComposition->SetWriteGeometry(
- fSetWriteGeometryCmd->GetNewBoolValue(newValues));
- }
- else if (command == fPrintMaterialsCmd) {
- fModulesComposition->PrintMaterials();
- }
- else if (command == fGenerateXMLCmd) {
- fModulesComposition->GenerateXMLGeometry();
- }
-}
+++ /dev/null
-// $Id$
-// Category: geometry
-//
-// Author: I. Hrivnacova
-//
-// Class AliModulesCompositionMessenger
-// ------------------------------------
-// Messenger class that defines commands for AliModulesComposition.
-
-#ifndef ALI_MODULES_COMPOSITION_MESSENGER_H
-#define ALI_MODULES_COMPOSITION_MESSENGER_H
-
-#include <G4UImessenger.hh>
-#include <globals.hh>
-
-class AliModulesComposition;
-
-class G4UIcommand;
-class G4UIdirectory;
-class G4UIcmdWithoutParameter;
-class G4UIcmdWithABool;
-class G4UIcmdWithAString;
-class G4UIcmdWithADoubleAndUnit;
-
-class AliModulesCompositionMessenger: public G4UImessenger
-{
- public:
- AliModulesCompositionMessenger(AliModulesComposition* modulesComposition);
- // --> protected
- // AliModulesCompositionMessenger();
- // AliModulesCompositionMessenger(
- // const AliModulesCompositionMessenger& right);
- virtual ~AliModulesCompositionMessenger();
-
- // methods
- virtual void SetNewValue(G4UIcommand* command, G4String newValues);
-
- protected:
- AliModulesCompositionMessenger();
- AliModulesCompositionMessenger(
- const AliModulesCompositionMessenger& right);
-
- // operators
- AliModulesCompositionMessenger& operator=(
- const AliModulesCompositionMessenger &right);
-
- private:
- AliModulesComposition* fModulesComposition; //associated class
- G4UIdirectory* fDirectory; //command directory
-
- // commands data members
- G4UIcmdWithAString* fFieldTypeCmd; //command: fieldType
- G4UIcmdWithADoubleAndUnit* fUniformFieldValueCmd;//command: uniformFieldValue
- G4UIcmdWithABool* fSetReadGeometryCmd; //command: readGeometry
- G4UIcmdWithABool* fSetWriteGeometryCmd; //command: writeGeometry
- G4UIcmdWithoutParameter* fPrintMaterialsCmd; //command: printMatrials
- G4UIcmdWithoutParameter* fGenerateXMLCmd; //command: generateXML
-};
-
-#endif //ALI_MODULES_COMPOSITION_MESSENGER_H
-
+++ /dev/null
-// $Id$
-// Category: event
-//
-// Author: I. Hrivnacova
-//
-// Class AliParticleGun
-// --------------------
-// See the class description in the header file.
-
-#include "AliParticleGun.h"
-#include "AliParticleGunMessenger.h"
-#include "AliGunParticle.h"
-#include "AliGlobals.h"
-
-#include <G4ParticleDefinition.hh>
-#include <G4PrimaryParticle.hh>
-#include <G4PrimaryVertex.hh>
-#include <G4Event.hh>
-
-//_____________________________________________________________________________
-AliParticleGun::AliParticleGun()
- : G4VPrimaryGenerator(),
- AliVerbose("particleGun"),
- fMessenger(this) {
-//
-}
-
-//_____________________________________________________________________________
-AliParticleGun::AliParticleGun(const AliParticleGun& right)
- : G4VPrimaryGenerator(right),
- AliVerbose("particleGun"),
- fMessenger(this)
-{
- // copy stuff
- *this = right;
-}
-
-//_____________________________________________________________________________
-AliParticleGun::~AliParticleGun() {
-//
- // delete gun particles
- Reset();
-}
-
-// operators
-
-//_____________________________________________________________________________
-AliParticleGun& AliParticleGun::operator=(const AliParticleGun& right)
-{
- // check assignement to self
- if (this == &right) return *this;
-
- // base class assignment
- this->G4VPrimaryGenerator::operator=(right);
-
- // delete gun particles
- Reset();
-
- // copy gun particles
- GunParticleConstIterator it;
- for (it = (right.fGunParticleVector).begin();
- it != (right.fGunParticleVector).end(); it++)
- fGunParticleVector.push_back(new AliGunParticle(**it));
-
- return *this;
-}
-
-// public methods
-
-//_____________________________________________________________________________
-void AliParticleGun::AddParticle(AliGunParticle* particle)
-{
-// Adds particle.
-// ---
-
- fGunParticleVector.push_back(particle);
-}
-
-//_____________________________________________________________________________
-void AliParticleGun::RemoveParticle(G4int iParticle)
-{
-// Removes particle.
-// ---
-
- GunParticleIterator it = fGunParticleVector.begin();
- it += iParticle;
- //advance(it,iParticle);
-
- delete *it;
- fGunParticleVector.erase(it);
-}
-
-//_____________________________________________________________________________
-void AliParticleGun::GeneratePrimaryVertex(G4Event* event)
-{
-// Generates primary vertices.
-// ---
-
- G4PrimaryVertex* previousVertex = 0;
- G4ThreeVector previousPosition = G4ThreeVector();
- G4double previousTime = 0.;
-
- GunParticleIterator it;
- for (it = fGunParticleVector.begin(); it != fGunParticleVector.end(); it++) {
-
- AliGunParticle* particle = *it;
-
- G4ParticleDefinition* particleDefinition
- = particle->GetParticleDefinition();
- if (particleDefinition==0) {
- AliGlobals::Exception(
- "AliParticleGun::GeneratePrimaryVertex: Unknown particle definition.");
- }
-
- G4ThreeVector position = particle->GetPosition();
- G4double time = particle->GetTime();
- G4PrimaryVertex* vertex;
- if (it == fGunParticleVector.begin() ||
- position != previousPosition || time != previousTime ) {
- // create a new vertex
- // in case position and time of gun particle are different from
- // previous values
- // (vertex objects are destroyed in G4EventManager::ProcessOneEvent()
- // when event is deleted)
- vertex = new G4PrimaryVertex(position, time);
- event->AddPrimaryVertex(vertex);
-
- previousVertex = vertex;
- previousPosition = position;
- previousTime = time;
- }
- else
- vertex = previousVertex;
-
- // create a primary particle and add it to the vertex
- // (primaryParticle objects are destroyed in G4EventManager::ProcessOneEvent()
- // when event and then vertex is deleted)
- G4double px = particle->GetMomentum().x();
- G4double py = particle->GetMomentum().y();
- G4double pz = particle->GetMomentum().z();
- G4PrimaryParticle* primaryParticle
- = new G4PrimaryParticle(particleDefinition, px, py, pz);
-
- G4double mass = particleDefinition->GetPDGMass();
- primaryParticle->SetMass(mass);
- primaryParticle->SetPolarization(particle->GetPolarization().x(),
- particle->GetPolarization().y(),
- particle->GetPolarization().z());
-
- vertex->SetPrimary(primaryParticle);
- }
-
- if (VerboseLevel() > 0) {
- G4cout << "AliParticleGun::GeneratePrimaryVertex:" << G4endl;
- G4cout << " "
- << event->GetNumberOfPrimaryVertex() << " of primary vertices,"
- << " " << fGunParticleVector.size() << " of primary particles "
- << G4endl;
- }
-
- // delete gun particles
- Reset();
-}
-
-//_____________________________________________________________________________
-void AliParticleGun::Reset()
-{
-// Resets the particle gun.
-// ---
-
- GunParticleIterator it;
- for (it = fGunParticleVector.begin(); it != fGunParticleVector.end(); it++)
- delete *it;
-
- fGunParticleVector.clear();
-}
-
-//_____________________________________________________________________________
-void AliParticleGun::List()
-{
-// Lists the particle gun.
-// ---
-
- G4cout << "Particle Gun: " << G4endl;
-
- if (fGunParticleVector.size() == 0)
- G4cout << " No particles are defined." << G4endl;
- else {
- G4int i = 0;
- GunParticleIterator it;
- for (it = fGunParticleVector.begin();
- it != fGunParticleVector.end(); it++) {
-
- G4cout << i++ << " th particle properties: " << G4endl;
- G4cout << "============================" << G4endl;
- (*it)->Print();
- }
- }
-}
-
+++ /dev/null
-// $Id$
-// Category: event
-//
-// Author: I. Hrivnacova
-//
-// Class AliParticleGun
-// --------------------
-// Particle gun that can be interactively composed by a user.
-
-#ifndef ALI_PARTICLE_GUN_H
-#define ALI_PARTICLE_GUN_H
-
-#include "AliVerbose.h"
-#include "AliParticleGunMessenger.h"
-
-#include <G4VPrimaryGenerator.hh>
-#include <globals.hh>
-#include <g4std/vector>
-
-
-class AliGunParticle;
-
-class G4Event;
-
-class AliParticleGun : public G4VPrimaryGenerator,
- public AliVerbose
-{
- typedef G4std::vector<AliGunParticle*> GunParticleVector;
- typedef GunParticleVector::iterator GunParticleIterator;
- typedef GunParticleVector::const_iterator GunParticleConstIterator;
-
- public:
- AliParticleGun();
- AliParticleGun(const AliParticleGun &right);
- virtual ~AliParticleGun();
-
- // operators
- AliParticleGun& operator=(const AliParticleGun& right);
-
- // methods
- void AddParticle(AliGunParticle* particle);
- void RemoveParticle(G4int iParticle);
- virtual void GeneratePrimaryVertex(G4Event* evt);
- void Reset();
- void List();
-
- // get methods
- G4int GetNofGunParticles() const;
-
- private:
- // data members
- GunParticleVector fGunParticleVector; //vector of AliGunParticle
- AliParticleGunMessenger fMessenger; //messenger
-};
-
-// inline methods
-
-inline G4int AliParticleGun::GetNofGunParticles() const
-{ return fGunParticleVector.size(); }
-
-#endif //ALI_PARTICLE_GUN_H
-
-
-
-
-
-
-
+++ /dev/null
-// $Id$
-// Category: event
-//
-// Author: I. Hrivnacova
-//
-// Class AliParticleGunMessenger
-// -----------------------------
-// See the class description in the header file.
-
-#include "AliParticleGunMessenger.h"
-#include "AliParticleGun.h"
-#include "AliGunParticle.h"
-#include "AliGlobals.h"
-
-#include <G4Geantino.hh>
-#include <G4ThreeVector.hh>
-#include <G4ParticleTable.hh>
-#include <G4UIdirectory.hh>
-#include <G4UIcmdWithoutParameter.hh>
-#include <G4UIcmdWithAString.hh>
-#include <G4UIcmdWithADoubleAndUnit.hh>
-#include <G4UIcmdWithAnInteger.hh>
-#include <G4UIcmdWith3Vector.hh>
-#include <G4UIcmdWith3VectorAndUnit.hh>
-
-//_____________________________________________________________________________
-AliParticleGunMessenger::AliParticleGunMessenger(AliParticleGun* gun)
- :fGun(gun)
-{
-//
- fParticleTable = G4ParticleTable::GetParticleTable();
-
- fGunDirectory = new G4UIdirectory("/aliGun/");
- fGunDirectory->SetGuidance("AliParticleGun control commands.");
-
- fListAvailableCmd
- = new G4UIcmdWithoutParameter("/aliGun/listAvailable", this);
- fListAvailableCmd->SetGuidance("List available particles.");
- fListAvailableCmd->SetGuidance(" Invoke G4ParticleTable.");
- fListAvailableCmd->AvailableForStates(PreInit,Idle);
-
- fListCurrentCmd
- = new G4UIcmdWithoutParameter("/aliGun/listCurrent", this);
- fListCurrentCmd->SetGuidance("List current particle properties.");
- fListCurrentCmd
- ->SetGuidance("(Use addParticle to add this particle to the gun.");
- fListCurrentCmd->AvailableForStates(PreInit,Idle);
-
- fParticleCmd
- = new G4UIcmdWithAString("/aliGun/particle", this);
- fParticleCmd->SetGuidance("Set particle to be generated.");
- fParticleCmd->SetGuidance(" (geantino is default)");
- fParticleCmd->SetParameterName("particleName", true);
- fParticleCmd->SetDefaultValue("geantino");
- G4String candidateList;
- G4int nofPTEntries = fParticleTable->entries();
- for (G4int i=0; i<nofPTEntries; i++)
- {
- candidateList += fParticleTable->GetParticleName(i);
- candidateList += " ";
- }
- fParticleCmd->SetCandidates(candidateList);
- fParticleCmd->AvailableForStates(PreInit,Idle);
-
- fMomentumCmd
- = new G4UIcmdWith3VectorAndUnit("/aliGun/momentum", this);
- fMomentumCmd->SetGuidance("Set momentum.");
- fMomentumCmd->SetParameterName("Px","Py","Pz", true, true);
- fMomentumCmd->SetDefaultUnit("MeV");
- fMomentumCmd->SetUnitCategory("Energy");
- fMomentumCmd->SetRange("Px != 0 || Py != 0 || Pz != 0");
- fMomentumCmd->AvailableForStates(PreInit,Idle);
-
- fPositionCmd
- = new G4UIcmdWith3VectorAndUnit("/aliGun/position", this);
- fPositionCmd->SetGuidance("Set starting position of the particle.");
- fPositionCmd->SetParameterName("X","Y","Z", true, true);
- fPositionCmd->SetDefaultUnit("cm");
- fPositionCmd->SetUnitCategory("Length");
- fPositionCmd->AvailableForStates(PreInit,Idle);
-
- fTimeCmd
- = new G4UIcmdWithADoubleAndUnit("/aliGun/time", this);
- fTimeCmd->SetGuidance("Set initial time of the particle.");
- fTimeCmd->SetParameterName("t0", true, true);
- fTimeCmd->SetDefaultUnit("ns");
- fTimeCmd->SetUnitCategory("Time");
- fTimeCmd->AvailableForStates(PreInit,Idle);
-
- fPolarizationCmd
- = new G4UIcmdWith3Vector("/aliGun/polarization", this);
- fPolarizationCmd->SetGuidance("Set polarization.");
- fPolarizationCmd->SetParameterName("Px","Py","Pz", true, true);
- fPolarizationCmd
- ->SetRange("Px>=-1. && Px<=1. && Py>=-1. && Py<=1. && Pz>=-1. && Pz<=1.");
- fPolarizationCmd->AvailableForStates(PreInit,Idle);
-
- fDirectionCmd
- = new G4UIcmdWith3Vector("/aliGun/direction", this);
- fDirectionCmd->SetGuidance("Set momentum direction.");
- fDirectionCmd->SetGuidance("Direction needs not to be a unit vector.");
- fDirectionCmd->SetParameterName("Dx","Dy","Dz", true, true);
- fDirectionCmd->SetRange("Dx != 0 || Dy != 0 || Dz != 0");
- fDirectionCmd->AvailableForStates(PreInit,Idle);
-
- fKinEnergyCmd
- = new G4UIcmdWithADoubleAndUnit("/aliGun/kinEnergy", this);
- fKinEnergyCmd->SetGuidance("Set kinetic energy.");
- fKinEnergyCmd->SetParameterName("KineticEnergy", true, true);
- fKinEnergyCmd->SetDefaultUnit("GeV");
- fKinEnergyCmd->SetUnitCategory("Energy");
- fKinEnergyCmd->AvailableForStates(PreInit,Idle);
-
- fListCmd
- = new G4UIcmdWithoutParameter("/aliGun/list",this);
- fListCmd->SetGuidance("List the Alice gun particles.");
- fListCmd->AvailableForStates(PreInit,Idle);
-
- fAddParticleCmd
- = new G4UIcmdWithoutParameter("/aliGun/addParticle", this);
- fAddParticleCmd->SetGuidance("Add the particle to the Alice particle gun.");
- fAddParticleCmd->AvailableForStates(PreInit,Idle);
-
- fRemoveParticleCmd
- = new G4UIcmdWithAnInteger("/aliGun/removeParticle", this);
- fRemoveParticleCmd
- ->SetGuidance("Remove the i-th particle friom the Alice particle gun.");
- fRemoveParticleCmd->SetParameterName("iParticle", false);
- fRemoveParticleCmd->SetRange("iParticle>=0");
- fRemoveParticleCmd->AvailableForStates(PreInit,Idle);
-
- fResetCmd
- = new G4UIcmdWithoutParameter("/aliGun/reset", this);
- fResetCmd->SetGuidance("ReSet the Alice particle gun.");
- fResetCmd->AvailableForStates(PreInit,Idle);
-
- // Set initial value to AliGunParticle
- fParticle = new AliGunParticle();
-
- fParticle->SetParticleDefinition(G4Geantino::Geantino());
- fParticle->SetMomentumDirection(G4ThreeVector(1.0,0.0,0.0));
- fParticle->SetKineticEnergy(1.0*GeV);
- fParticle->SetPosition(G4ThreeVector(0.0*cm, 0.0*cm, 0.0*cm));
- fParticle->SetTime(0.0*ns);
- fParticle->SetPolarization(G4ThreeVector(0.0*cm, 0.0*cm, 0.0*cm));
-}
-
-//_____________________________________________________________________________
-AliParticleGunMessenger::AliParticleGunMessenger() {
-//
-}
-
-//_____________________________________________________________________________
-AliParticleGunMessenger::AliParticleGunMessenger(
- const AliParticleGunMessenger& right) {
-//
- AliGlobals::Exception("AliParticleGunMessenger is protected from copying.");
-}
-
-//_____________________________________________________________________________
-AliParticleGunMessenger::~AliParticleGunMessenger() {
-//
- delete fListAvailableCmd;
- delete fParticleCmd;
- delete fMomentumCmd;
- delete fPositionCmd;
- delete fTimeCmd;
- delete fPolarizationCmd;
- delete fDirectionCmd;
- delete fKinEnergyCmd;
- delete fListCmd;
- delete fAddParticleCmd;
- delete fRemoveParticleCmd;
- delete fResetCmd;
- delete fGunDirectory;
- delete fParticle;
-}
-
-// operators
-
-AliParticleGunMessenger&
-AliParticleGunMessenger::operator=(const AliParticleGunMessenger &right)
-{
- // check assignement to self
- if (this == &right) return *this;
-
- AliGlobals::Exception("AliParticleGunMessenger is protected from assigning.");
-
- return *this;
-}
-
-// public methods
-
-//_____________________________________________________________________________
-void AliParticleGunMessenger::SetNewValue(G4UIcommand * command,
- G4String newValues)
-{
-// Applies command to the associated object.
-// ---
-
- // Alice gun particle set commands
- if (command==fListAvailableCmd)
- {
- fParticleTable->DumpTable();
- }
- else if (command == fParticleCmd)
- {
- G4ParticleDefinition* particleDef
- = fParticleTable->FindParticle(newValues);
- if (particleDef != 0)
- { fParticle->SetParticleDefinition(particleDef); }
- }
- else if (command == fListCurrentCmd)
- {
- fParticle->Print();
- }
- else if (command == fMomentumCmd)
- {
- fParticle->SetMomentum(fMomentumCmd->GetNew3VectorValue(newValues));
- }
- else if (command == fPositionCmd)
- {
- fParticle->SetPosition(fDirectionCmd->GetNew3VectorValue(newValues));
- }
- else if (command == fTimeCmd)
- {
- fParticle->SetTime(fTimeCmd->GetNewDoubleValue(newValues));
- }
- else if (command == fPolarizationCmd)
- {
- fParticle
- ->SetPolarization(fPolarizationCmd->GetNew3VectorValue(newValues));
- }
- else if (command == fDirectionCmd)
- {
- fParticle
- ->SetMomentumDirection(fDirectionCmd->GetNew3VectorValue(newValues));
- }
- else if (command == fKinEnergyCmd)
- {
- fParticle->SetKineticEnergy(fKinEnergyCmd->GetNewDoubleValue(newValues));
- }
-
- // Alice particle gun commands
- else if (command == fListCmd)
- {
- fGun->List();
- }
- else if (command == fAddParticleCmd)
- {
- fGun->AddParticle(fParticle);
- fParticle = new AliGunParticle(*fParticle);
- }
- else if (command == fRemoveParticleCmd)
- {
- fGun->RemoveParticle(fRemoveParticleCmd->GetNewIntValue(newValues));
- }
- else if (command == fResetCmd)
- {
- fGun->Reset();
- }
-}
-
-//_____________________________________________________________________________
-G4String AliParticleGunMessenger::GetCurrentValue(G4UIcommand * command)
-{
-// Returns current command parameters as string.
-// ---
-
- G4String curValue;
-
- if( command==fDirectionCmd )
- {
- curValue
- = fDirectionCmd->ConvertToString(fParticle->GetMomentumDirection());
- }
- else if( command==fKinEnergyCmd )
- {
- curValue
- = fKinEnergyCmd->ConvertToString(fParticle->GetKineticEnergy(),"GeV");
- }
- else if( command==fPositionCmd )
- {
- curValue = fPositionCmd->ConvertToString(fParticle->GetPosition(),"cm");
- }
- else if( command==fTimeCmd )
- {
- curValue = fTimeCmd->ConvertToString(fParticle->GetTime(),"ns");
- }
- else if( command==fPolarizationCmd )
- {
- curValue = fPolarizationCmd->ConvertToString(fParticle->GetPolarization());
- }
-
- return curValue;
-}
-
+++ /dev/null
-// $Id$
-// Category: event
-//
-// Author: I. Hrivnacova
-//
-// Class AliParticleGunMessenger
-// -----------------------------
-// Messenger class that defines commands for AliParticleGun.
-
-#ifndef ALI_PARTICLE_GUN_MESSENGER_H
-#define ALI_PARTICLE_GUN_MESSENGER_H
-
-#include <G4UImessenger.hh>
-#include <globals.hh>
-
-class AliParticleGun;
-class AliGunParticle;
-class G4ParticleTable;
-class G4UIcommand;
-class G4UIdirectory;
-class G4UIcmdWithoutParameter;
-class G4UIcmdWithAString;
-class G4UIcmdWithADoubleAndUnit;
-class G4UIcmdWithAnInteger;
-class G4UIcmdWith3Vector;
-class G4UIcmdWith3VectorAndUnit;
-
-class AliParticleGunMessenger: public G4UImessenger
-{
- public:
- AliParticleGunMessenger(AliParticleGun* gun);
- // --> protected
- // AliParticleGunMessenger();
- // AliParticleGunMessenger(const AliParticleGunMessenger& right);
- virtual ~AliParticleGunMessenger();
-
- // methods
- virtual void SetNewValue(G4UIcommand* command, G4String newValues);
- virtual G4String GetCurrentValue(G4UIcommand* command);
-
- protected:
- AliParticleGunMessenger();
- AliParticleGunMessenger(const AliParticleGunMessenger& right);
-
- // operators
- AliParticleGunMessenger& operator=(
- const AliParticleGunMessenger& right);
-
- private:
- // data members
- AliParticleGun* fGun; //associated class
- AliGunParticle* fParticle; //current AliGunParticle
- G4ParticleTable* fParticleTable; //G4ParticleTable
-
- // commands data members
- G4UIdirectory* fGunDirectory; //command directory
- G4UIcmdWithoutParameter* fListAvailableCmd; //command: listAvailable
- G4UIcmdWithoutParameter* fListCurrentCmd; //command: listCurrent
- G4UIcmdWithAString* fParticleCmd; //command: particle
- G4UIcmdWith3VectorAndUnit* fMomentumCmd; //command: momentum
- G4UIcmdWith3VectorAndUnit* fPositionCmd; //command: position
- G4UIcmdWithADoubleAndUnit* fTimeCmd; //command: time
- G4UIcmdWith3Vector* fPolarizationCmd; //command: polarization
- G4UIcmdWith3Vector* fDirectionCmd; //command: direction
- G4UIcmdWithADoubleAndUnit* fKinEnergyCmd; //command: kinEnergy
- G4UIcmdWithoutParameter* fListCmd; //command: list
- G4UIcmdWithoutParameter* fAddParticleCmd; //command: addParticle
- G4UIcmdWithAnInteger* fRemoveParticleCmd; //command: removeParticle
- G4UIcmdWithoutParameter* fResetCmd; //command: reset
-};
-
-#endif //ALI_PARTICLE_GUN_MESSENGER_H
-
-
+++ /dev/null
-// $Id$
-// Category: run
-//
-// Author: I. Hrivnacova
-//
-// Enum AliPrimaryGenerator
-// ------------------------
-// Enumaration of available primary generators.
-
-#ifndef ALI_PRIMARY_GENERATOR_H
-#define ALI_PRIMARY_GENERATOR_H
-
-// available primary generators
-
-enum AliPrimaryGenerator {
- kGun, // gun (can be set interactively)
- kGeantino, // geantino with random direction
- kChargedGeantino, // chargedgeantino with random direction
- kStack // AliGenerator from MC stack
-};
-
-#endif //ALI_PRIMARY_GENERATOR_H
+++ /dev/null
-// $Id$
-// Category: run
-//
-// Author: I. Hrivnacova
-//
-// Class AliPrimaryGeneratorAction
-// -------------------------------
-// See the class description in the header file.
-
-#include "AliPrimaryGeneratorAction.h"
-#include "AliPrimaryGeneratorMessenger.h"
-#include "AliParticleGun.h"
-#include "AliGunParticle.h"
-#include "AliGlobals.h"
-
-#include "TG4G3Units.h"
-#include "TG4PrimaryGeneratorAction.h"
-#include "TG4TrackingAction.h"
-
-#include <G4Event.hh>
-#include <G4ParticleTable.hh>
-#include <G4ParticleDefinition.hh>
-
-#include <Randomize.hh>
-
-#include <TParticle.h>
-#include <TVirtualMCApplication.h>
-
-//_____________________________________________________________________________
-AliPrimaryGeneratorAction::AliPrimaryGeneratorAction()
- : AliVerbose("primaryGeneratorAction"),
- fGenerator(kStack),
- fNofGunParticles(1),
- fParticleGun(),
- fMessenger(this) {
-//
-}
-
-//_____________________________________________________________________________
-AliPrimaryGeneratorAction::~AliPrimaryGeneratorAction() {
-//
-}
-
-// private methods
-
-//_____________________________________________________________________________
-void AliPrimaryGeneratorAction::ConstructGenerator()
-{
-// Constructs selected generator.
-// ---
-
- switch (fGenerator) {
- case kGun:
- // gun is constructed interactively
- return;
- case kGeantino:
- ConstructGeantinoGenerator(false);
- return;
- case kChargedGeantino:
- ConstructGeantinoGenerator(true);
- return;
- case kStack:
- return;
- }
-}
-
-//_____________________________________________________________________________
-void AliPrimaryGeneratorAction::ConstructGeantinoGenerator(G4bool isCharged)
-{
-// Geantino with random momentum direction
-// (the default generator).
-// ---
-
- // reset gun
- fParticleGun.Reset();
-
- G4ParticleTable* particleTable
- = G4ParticleTable::GetParticleTable();
-
- for (G4int i=0; i< fNofGunParticles; i++)
- {
- G4ParticleDefinition* particleDef = 0;
- if (!isCharged)
- particleDef = particleTable->FindParticle("geantino");
- else
- particleDef = particleTable->FindParticle("chargedgeantino");
-
- if (!particleDef) {
- G4String text = "AliPrimaryGeneratorAction::GenerateGeantino:\n";
- text = text + " G4ParticleTable::FindParticle() failed.";
- AliGlobals::Exception(text);
- }
-
- G4double rn[3];
- RandFlat::shootArray(3,rn);
- G4double px=rn[0];
- G4double py=rn[1];
- G4double pz=rn[2];
- G4ThreeVector momentumDir(px, py, pz);
-
- G4double energy = 1.*GeV;
- G4ThreeVector position(0.,0.,0.);
- G4double time = 0.;
- G4ThreeVector polarization(0.,0.,0.);
-
- AliGunParticle * gunParticle
- = new AliGunParticle(particleDef, momentumDir, energy, position, time,
- polarization);
-
- fParticleGun.AddParticle(gunParticle);
- }
- if (VerboseLevel() > 1) {
- G4cout << "Geantino generator has been built." << G4endl;
- }
-}
-
-// public methods
-
-//_____________________________________________________________________________
-void AliPrimaryGeneratorAction::GeneratePrimaries(G4Event* event)
-{
-// Generates primary particles by the selected generator.
-// ---
-
- if (fGenerator == kStack) {
-
- // Use MC stack
- TG4PrimaryGeneratorAction action;
- action.GeneratePrimaries(event);
-
- // Do not save primary particles
- // (they would be stored twice)
- TG4TrackingAction* trackingAction
- = TG4TrackingAction::Instance();
- if (trackingAction) trackingAction->SetSavePrimaries(false);
- }
- else {
-
- // Begin of Event
- TVirtualMCApplication::Instance()->BeginEvent();
-
- // Construct particle gun
- ConstructGenerator();
-
- // Generate primary vertices
- fParticleGun.GeneratePrimaryVertex(event);
-
- // Primary particles have to be saved in stack
- TG4TrackingAction* trackingAction
- = TG4TrackingAction::Instance();
- if (trackingAction) trackingAction->SetSavePrimaries(true);
- }
-}
-
-//_____________________________________________________________________________
-void AliPrimaryGeneratorAction::SetGenerator(AliPrimaryGenerator generator)
-{
-// Sets generator.
-// ---
-
- fGenerator = generator;
-}
-
-//_____________________________________________________________________________
-void AliPrimaryGeneratorAction::SetNofGunParticles(G4int nofParticles)
-{
-// Sets number of primary particles.
-// This method is applied only to "gun" type generators
-// (and not to AliGenerator from AliRoot).
-// ---
-
- fNofGunParticles = nofParticles;
-}
+++ /dev/null
-// $Id$
-// Category: run
-//
-// Author: I. Hrivnacova
-//
-// Class AliPrimaryGeneratorAction
-// -------------------------------
-// Class that defines primary generator action.
-// Available primary generators (AliPrimaryGenerator):
-// kGun, // gun (can be set interactively)
-// kGeantino, // geantino with random direction
-// kChargedGeantino, // chargedgeantino with random direction
-// kStack // AliGenerator from the MC stack
-
-#ifndef ALI_PRIMARY_GENERATOR_ACTION_H
-#define ALI_PRIMARY_GENERATOR_ACTION_H
-
-#include "AliVerbose.h"
-#include "AliPrimaryGenerator.h"
-#include "AliPrimaryGeneratorMessenger.h"
-#include "AliParticleGun.h"
-
-#include <G4VUserPrimaryGeneratorAction.hh>
-#include <globals.hh>
-
-class AliParticleGun;
-class G4ParticleGun;
-class G4Event;
-
-class AliPrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction,
- public AliVerbose
-{
- public:
- AliPrimaryGeneratorAction();
- virtual ~AliPrimaryGeneratorAction();
-
- // methods
- virtual void GeneratePrimaries(G4Event* event);
-
- // set methods
- void SetGenerator(AliPrimaryGenerator generator);
- void SetNofGunParticles(G4int nofParticles);
-
- // get methods
- AliPrimaryGenerator GetGenerator() const;
- G4int GetNofGunParticles() const;
-
- private:
- // methods
- void ConstructGenerator();
- void ConstructGeantinoGenerator(G4bool isCharged);
- void ConstructAliGenerator();
- void GenerateAliGeneratorPrimaries(G4Event* event);
-
- // data members
- AliPrimaryGenerator fGenerator; //selected AliPrimaryGenerator
- G4int fNofGunParticles; //number of gun particles
- AliParticleGun fParticleGun; //AliParticleGun
- AliPrimaryGeneratorMessenger fMessenger; //messenger
-};
-
-// inline methods
-
-inline AliPrimaryGenerator AliPrimaryGeneratorAction::GetGenerator() const
-{ return fGenerator; }
-
-inline G4int AliPrimaryGeneratorAction::GetNofGunParticles() const
-{ return fNofGunParticles; }
-
-#endif //ALI_PRIMARY_GENERATOR_ACTION_H
-
-
+++ /dev/null
-// $Id$
-// Category: run
-//
-// Author: I. Hrivnacova
-//
-// Class AliPrimaryGeneratorMessenger
-// ----------------------------------
-// See the class description in the header file.
-
-#include "AliPrimaryGeneratorMessenger.h"
-#include "AliPrimaryGeneratorAction.h"
-#include "AliGlobals.h"
-
-#include <G4UIdirectory.hh>
-#include <G4UIcmdWithAString.hh>
-#include <G4UIcmdWithAnInteger.hh>
-
-//_____________________________________________________________________________
-AliPrimaryGeneratorMessenger::AliPrimaryGeneratorMessenger(
- AliPrimaryGeneratorAction* primaryGenAction)
- : fPrimaryGenAction(primaryGenAction)
-{
-//
- fPrimariesDirectory = new G4UIdirectory("/aliGenerator/");
- fPrimariesDirectory->SetGuidance("AliPrimaryGeneratorAction control commands.");
-
- fGeneratorCmd = new G4UIcmdWithAString("/aliGenerator/set", this);
- G4String guidance = "Set one of the defined primary generators:\n";
- guidance = guidance + " Gun: particle gun (default)\n";
- guidance = guidance + " Geantino: geantino with random momentum(default)\n";
- guidance = guidance + " ChargedGeantino: chargedgeantino with random momentum\n";
- guidance = guidance + " Stack: standard generator from MC stack";
- fGeneratorCmd->SetGuidance(guidance);
- fGeneratorCmd->SetParameterName("Generator", true);
- fGeneratorCmd->SetCandidates("Gun Geantino ChargedGeantino Stack");
- fGeneratorCmd->SetDefaultValue("Stack");
- fGeneratorCmd->AvailableForStates(PreInit,Idle);
-
- fNofParticlesCmd = new G4UIcmdWithAnInteger("/aliGenerator/nofParticles", this);
- fNofParticlesCmd->SetGuidance("Give number of primary particles:");
- fNofParticlesCmd->SetGuidance("It is applied only to \"gun\" type generators.");
- fNofParticlesCmd->SetParameterName("NofParticles", true);
- fNofParticlesCmd->SetDefaultValue(1);
- fNofParticlesCmd->SetRange("NofParticles >= 0");
- fNofParticlesCmd->AvailableForStates(PreInit,Idle);
-}
-
-//_____________________________________________________________________________
-AliPrimaryGeneratorMessenger::AliPrimaryGeneratorMessenger() {
-//
-}
-
-//_____________________________________________________________________________
-AliPrimaryGeneratorMessenger::AliPrimaryGeneratorMessenger(
- const AliPrimaryGeneratorMessenger& right) {
-//
- AliGlobals::Exception(
- "AliPrimaryGeneratorMessenger is protected from copying.");
-}
-
-//_____________________________________________________________________________
-AliPrimaryGeneratorMessenger::~AliPrimaryGeneratorMessenger() {
-//
- delete fPrimariesDirectory;
- delete fGeneratorCmd;
- delete fNofParticlesCmd;
-}
-
-// operators
-
-//_____________________________________________________________________________
-AliPrimaryGeneratorMessenger&
-AliPrimaryGeneratorMessenger::operator=(
- const AliPrimaryGeneratorMessenger &right)
-{
- // check assignement to self
- if (this == &right) return *this;
-
- AliGlobals::Exception(
- "AliPrimaryGeneratorMessenger is protected from assigning.");
-
- return *this;
-}
-
-// public methods
-
-//_____________________________________________________________________________
-void AliPrimaryGeneratorMessenger::SetNewValue(G4UIcommand * command,
- G4String newValue)
-{
-// Applies command to the associated object.
-// ---
-
- if( command == fGeneratorCmd ) {
- if (newValue == "Gun")
- fPrimaryGenAction->SetGenerator(kGun);
- else if (newValue == "Geantino")
- fPrimaryGenAction->SetGenerator(kGeantino);
- else if (newValue == "ChargedGeantino")
- fPrimaryGenAction->SetGenerator(kChargedGeantino);
- else if (newValue == "Stack")
- fPrimaryGenAction->SetGenerator(kStack);
- }
- else if( command == fNofParticlesCmd ) {
- fPrimaryGenAction
- ->SetNofGunParticles(fNofParticlesCmd->GetNewIntValue(newValue));
- }
-}
-
+++ /dev/null
-// $Id$
-// Category: run
-//
-// Author: I. Hrivnacova
-//
-// Class AliPrimaryGeneratorMessenger
-// ----------------------------------
-// Messenger class that defines commands for AliPrimaryGeneratorAction.
-
-#ifndef ALI_PRIMARY_GENERATOR_MESSENGER_H
-#define ALI_PRIMARY_GENERATOR_MESSENGER_H
-
-#include <G4UImessenger.hh>
-#include <globals.hh>
-
-class AliPrimaryGeneratorAction;
-
-class G4UIdirectory;
-class G4UIcmdWithAString;
-class G4UIcmdWithAnInteger;
-
-class AliPrimaryGeneratorMessenger: public G4UImessenger
-{
- public:
- AliPrimaryGeneratorMessenger(AliPrimaryGeneratorAction* primaryGenAction);
- // --> protected
- // AliPrimaryGeneratorMessenger();
- // AliPrimaryGeneratorMessenger(const AliPrimaryGeneratorMessenger& right);
- virtual ~AliPrimaryGeneratorMessenger();
-
- // methods
- void SetNewValue(G4UIcommand* command, G4String string);
-
- protected:
- AliPrimaryGeneratorMessenger();
- AliPrimaryGeneratorMessenger(const AliPrimaryGeneratorMessenger& right);
-
- // operators
- AliPrimaryGeneratorMessenger& operator=(
- const AliPrimaryGeneratorMessenger& right);
-
- private:
- // data members
- AliPrimaryGeneratorAction* fPrimaryGenAction; //associated class
- G4UIdirectory* fPrimariesDirectory; //command directory
- G4UIcmdWithAString* fGeneratorCmd; //command: set
- G4UIcmdWithAnInteger* fNofParticlesCmd; //command: nofParticles
-};
-
-#endif //ALI_PRIMARY_GENERATOR_MESSENGER_H
-
+++ /dev/null
-// $Id$
-// Category: run
-//
-// Author: I. Hrivnacova
-//
-// Class AliRunConfiguration
-// -------------------------
-// See the class description in the header file.
-
-#include "AliRunConfiguration.h"
-#include "AliRunMessenger.h"
-#include "AliDetConstruction.h"
-#include "TG4SDConstruction.h"
-#include "AliPrimaryGeneratorAction.h"
-#include "TG4RunAction.h"
-#include "TG4EventAction.h"
-#include "TG4TrackingAction.h"
-#include "TG4SteppingAction.h"
-#include "TG4SpecialStackingAction.h"
-#include "AliFiles.h"
-
-#include "TG4ModularPhysicsList.h"
-
-ClassImp(AliRunConfiguration)
-
-Bool_t AliRunConfiguration::fgIsHoles = true;
-
-//_____________________________________________________________________________
-AliRunConfiguration::AliRunConfiguration()
- : TG4VRunConfiguration()
-{
-//
- CreateUserConfiguration();
-
- fRunMessenger = new AliRunMessenger();
- fFiles = new AliFiles();
-}
-
-//_____________________________________________________________________________
-AliRunConfiguration::AliRunConfiguration(const AliRunConfiguration& right)
- : TG4VRunConfiguration(right)
-{
- // TG4VRunConfiguration is protected from copying
-}
-
-//_____________________________________________________________________________
-AliRunConfiguration::~AliRunConfiguration() {
-//
- delete fRunMessenger;
- delete fFiles;
-
- // all user action data members are deleted
- // in G4RunManager::~G4RunManager()
-}
-
-// operators
-
-//_____________________________________________________________________________
-AliRunConfiguration&
-AliRunConfiguration::operator=(const AliRunConfiguration& right)
-{
- // check assignement to self
- if (this == &right) return *this;
-
- // base class assignement
- // TG4VRunConfiguration is protected from assigning
- TG4VRunConfiguration::operator=(right);
-
- return *this;
-}
-
-// protected methods
-
-//_____________________________________________________________________________
-void AliRunConfiguration::CreateUserConfiguration()
-{
-// Creates the mandatory Geant4 classes and
-// the other user action classes.
-// ---
-
- G4cout << "AliRunConfiguration::CreateUserConfiguration()" << G4endl;
-
- // create mandatory Geant4 classes
- fDetectorConstruction = new AliDetConstruction();
- fSDConstruction = new TG4SDConstruction();
- fPhysicsList = new TG4ModularPhysicsList();
- fPrimaryGenerator = new AliPrimaryGeneratorAction();
-
- // create the other user action classes
- fRunAction = new TG4RunAction();
- fEventAction = new TG4EventAction();
- fTrackingAction = new TG4TrackingAction();
- fSteppingAction = new TG4SteppingAction();
- fStackingAction = new TG4SpecialStackingAction();
-}
-
-// public methods
-
-//_____________________________________________________________________________
-void AliRunConfiguration::SetConfigName(const char* name)
-{
-// Sets the configuration macro name
-// ---
- fFiles->SetMacroName(name);
-}
-
-//_____________________________________________________________________________
-void AliRunConfiguration::SetG3CallsName(const char* name)
-{
-// Sets the configuration macro name
-// ---
- fFiles->SetG3CallsName(name);
-}
-
+++ /dev/null
-// $Id$
-// Category: run
-//
-// Author: I. Hrivnacova
-//
-// Class AliRunConfiguration
-// -------------------------
-// This class creates all Ali* specific action classes
-// that will be initialized and managed by Geant4 kernel (G4RunManager).
-// It creates also AliRunMessenger that implements commands for
-// AliRun methods.
-
-#ifndef ALI_RUN_CONFIGURATION_H
-#define ALI_RUN_CONFIGURATION_H
-
-#include "TG4VRunConfiguration.h"
-
-#include <TString.h>
-
-class AliRunMessenger;
-class AliFiles;
-
-class G4RunManager;
-
-class AliRunConfiguration : public TG4VRunConfiguration
-{
- public:
- AliRunConfiguration();
- // --> protected
- // AliRunConfiguration(const AliRunConfiguration& right);
- virtual ~AliRunConfiguration();
-
- // static methods
- static void SwitchHoles(Bool_t isHoles);
- static Bool_t Holes();
-
- void SetConfigName(const char* name);
- void SetG3CallsName(const char* name);
-
- protected:
- AliRunConfiguration(const AliRunConfiguration& right);
-
- // operators
- AliRunConfiguration& operator=(const AliRunConfiguration& right);
-
- // methods
- virtual void CreateUserConfiguration();
-
- private:
- // static data members
- static Bool_t fgIsHoles; //option for geometry with/without holes
-
- AliRunMessenger* fRunMessenger; //messenger
- AliFiles* fFiles; //file paths
-
- ClassDef(AliRunConfiguration, 1) // Ali* specific action classes for Geant4
-};
-
-// inline functions
-
-inline void AliRunConfiguration::SwitchHoles(Bool_t isHoles)
-{ fgIsHoles = isHoles;}
-
-inline Bool_t AliRunConfiguration::Holes()
-{ return fgIsHoles; }
-
-#endif //ALI_RUN_CONFIGURATION_H
-
+++ /dev/null
-// $Id$
-// Category: run
-//
-// Author: I. Hrivnacova
-//
-// Class AliRunMessenger
-// ---------------------
-// See the class description in the header file.
-
-#include "AliRunMessenger.h"
-#include "AliFiles.h"
-#include "AliGlobals.h"
-#include "AliRun.h"
-
-#include <G4UIdirectory.hh>
-#include <G4UIcmdWithAnInteger.hh>
-#include <G4UIcmdWithoutParameter.hh>
-#include <G4UIcmdWithAString.hh>
-
-//_____________________________________________________________________________
-AliRunMessenger::AliRunMessenger()
-{
-//
- fRunDirectory = new G4UIdirectory("/aliRun/");
- fRunDirectory->SetGuidance("AliRun control commands.");
-
- fConfigCmd = new G4UIcmdWithAString("/aliRun/setConfig", this);
- fConfigCmd->SetGuidance("Set configuration macro name");
- fConfigCmd->SetParameterName("ConfigName", true);
- fConfigCmd->SetDefaultValue("Config");
- fConfigCmd->AvailableForStates(PreInit);
-
- fInitializeCmd = new G4UIcmdWithoutParameter("/aliRun/initialize", this);
- fInitializeCmd->SetGuidance("Initialize AliRun");
- fInitializeCmd->AvailableForStates(PreInit);
-
- fBeamOnCmd = new G4UIcmdWithAnInteger("/aliRun/beamOn", this);
- fBeamOnCmd->SetGuidance("Run the specified number of events");
- fBeamOnCmd->SetParameterName("NofEvents", true);
- fBeamOnCmd->SetDefaultValue(1);
- fBeamOnCmd->SetRange("NofEvents >= 0");
- fBeamOnCmd->AvailableForStates(Idle);
-
- fLegoCmd = new G4UIcmdWithoutParameter("/aliRun/lego", this);
- fLegoCmd->SetGuidance("Lego run");
- fLegoCmd->AvailableForStates(Idle);
-}
-
-//_____________________________________________________________________________
-AliRunMessenger::AliRunMessenger(const AliRunMessenger& right) {
-//
- AliGlobals::Exception("AliRunMessenger is protected from copying.");
-}
-
-//_____________________________________________________________________________
-AliRunMessenger::~AliRunMessenger() {
-//
- delete fRunDirectory;
- delete fConfigCmd;
- delete fInitializeCmd;
- delete fBeamOnCmd;
- delete fLegoCmd;
-}
-
-// operators
-
-//_____________________________________________________________________________
-AliRunMessenger& AliRunMessenger::operator=(const AliRunMessenger &right)
-{
- // check assignement to self
- if (this == &right) return *this;
-
- AliGlobals::Exception("AliRunMessenger is protected from assigning.");
-
- return *this;
-}
-
-// public methods
-
-//_____________________________________________________________________________
-void AliRunMessenger::SetNewValue(G4UIcommand* command,
- G4String newValue)
-{
-// Applies command to the associated object.
-// ---
-
- // test gAlice
- if (!gAlice) {
- AliGlobals::Exception(
- "AliRunMessenger: gAlice has not been instantiated yet.");
- }
-
- if(command == fConfigCmd) {
- AliFiles::Instance()->SetMacroName(newValue);
- }
- else if(command == fInitializeCmd) {
- gAlice->Init(AliFiles::Instance()->GetRootMacroPath());
- }
- else if(command == fBeamOnCmd) {
- gAlice->Run(fBeamOnCmd->GetNewIntValue(newValue));
- }
- else if(command == fLegoCmd) {
- //gAlice->SetDebug(1);
- gAlice->RunLego();
- }
-}
+++ /dev/null
-// $Id$
-// Category: run
-//
-// Author: I. Hrivnacova
-//
-// Class AliRunMessenger
-// ---------------------
-// Messenger class that defines commands for AliRun.
-
-#ifndef ALI_RUN_MESSENGER_H
-#define ALI_RUN_MESSENGER_H
-
-#include <G4UImessenger.hh>
-#include <globals.hh>
-
-class G4UIdirectory;
-class G4UIcmdWithoutParameter;
-class G4UIcmdWithAnInteger;
-class G4UIcmdWithAString;
-
-class AliRunMessenger: public G4UImessenger
-{
- public:
- AliRunMessenger();
- // --> protected
- // AliRunMessenger(const AliRunMessenger& right);
- virtual ~AliRunMessenger();
-
- // methods
- virtual void SetNewValue(G4UIcommand* command, G4String string);
-
- protected:
- AliRunMessenger(const AliRunMessenger& right);
-
- // operators
- AliRunMessenger& operator=(const AliRunMessenger& right);
-
- private:
- // data members
- G4UIdirectory* fRunDirectory; //command directory
- G4UIcmdWithAString* fConfigCmd; //command: setConfig
- G4UIcmdWithoutParameter* fInitializeCmd; //command: initialize
- G4UIcmdWithAnInteger* fBeamOnCmd; //command: beamOn
- G4UIcmdWithoutParameter* fLegoCmd; //command: lego
-};
-
-#endif //ALI_RUN_MESSENGER_H
+++ /dev/null
-// $Id$
-// Category: global
-//
-// Author: I. Hrivnacova
-//
-// Class AliVerbose
-// -------------------
-// See the class description in the header file.
-
-#include "AliVerbose.h"
-#include "TG4Globals.h"
-
-#include <math.h>
-
-// static data members
-const G4String AliVerbose::fgkDirectoryName = "/aliVerbose/";
-TG4VerboseMessenger* AliVerbose::fgMessenger = 0;
-
-//_____________________________________________________________________________
-AliVerbose::AliVerbose(const G4String& cmdName)
- : TG4VVerbose() {
-//
- CreateMessenger();
-
- fgMessenger->AddCommand(this, cmdName);
-}
-
-//_____________________________________________________________________________
-AliVerbose::AliVerbose(const G4String& cmdName, G4int verboseLevel)
- : TG4VVerbose(verboseLevel) {
-//
- CreateMessenger();
-
- fgMessenger->AddCommand(this, cmdName);
-}
-
-//_____________________________________________________________________________
-AliVerbose::AliVerbose()
- : TG4VVerbose() {
-//
-}
-
-//_____________________________________________________________________________
-AliVerbose::~AliVerbose() {
-//
- if (fgMessenger) {
- delete fgMessenger;
- fgMessenger = 0;
- }
-}
-
-//
-// private methods
-//
-
-TG4VerboseMessenger* AliVerbose::CreateMessenger()
-{
-// Creates static messenger if it does not yet exists.
-// ---
-
- if (!fgMessenger)
- fgMessenger = new TG4VerboseMessenger(fgkDirectoryName);
-
- return fgMessenger;
-}
-
+++ /dev/null
-// $Id$
-// Category: global
-//
-// Author: I. Hrivnacova
-//
-// Class AliVerbose
-// ----------------
-// Class defines the verbose level
-// and the static messenger (common for all instances).
-// Used as a base class for all AliGeant4 verbose classes;
-// enables to handle the standard output in a common way.
-
-#ifndef ALI_VERBOSE_H
-#define ALI_VERBOSE_H
-
-#include "TG4VVerbose.h"
-#include "TG4VerboseMessenger.h"
-
-#include <globals.hh>
-
-class AliVerbose : public TG4VVerbose
-{
- public:
- // AliVerbose(); --> private
- AliVerbose(const G4String& cmdName);
- AliVerbose(const G4String& cmdName, G4int verboseLevel);
- virtual ~AliVerbose();
-
- private:
- AliVerbose();
-
- // methods
- virtual TG4VerboseMessenger* CreateMessenger();
-
- // static data members
- static const G4String fgkDirectoryName;// directory name
- static TG4VerboseMessenger* fgMessenger; // messenger
-};
-
-#endif //TG4_VERBOSE_H
+++ /dev/null
-# $Id$
-
-############################### AliGeant4 Makefile #############################
-
-# Include Geant4 specific definitions
-
-include $(G4INSTALL)/config/architecture.gmk
-
-# Include machine specific definitions
-
-include $(ALICE_ROOT)/conf/GeneralDef
-include $(ALICE_ROOT)/conf/MachineDef.$(ALICE_TARGET)
-
-# Include Alice Geant4 specific definitions
-
-NEED_G4_LIBS := 1
-include $(ALICE_ROOT)/conf/Geant4.gmk
-
-PACKAGE = AliGeant4
-TARGET = aligeant4
-
-# C++ sources
-
-#SRCS = $(wildcard *.cxx)
-#SRCS := $(filter-out $(TARGET).cxx,$(SRCS))
-
-SRCS1 := $(shell find . -maxdepth 1 -name "*.cxx" -exec grep -l "Category: global" {} \; | sed sx./xxg )
-SRCS1 += $(shell find . -maxdepth 1 -name "*.cxx" -exec grep -l "Category: geometry" {} \; | sed sx./xxg )
-SRCS1 += $(shell find . -maxdepth 1 -name "*.cxx" -exec grep -l "Category: visualization" {} \; | sed sx./xxg )
-
-SRCS2 := $(shell find . -maxdepth 1 -name "*.cxx" -exec grep -l "Category: digits+hits" {} \; | sed sx./xxg )
-SRCS2 += $(shell find . -maxdepth 1 -name "*.cxx" -exec grep -l "Category: event" {} \; | sed sx./xxg )
-SRCS2 += $(shell find . -maxdepth 1 -name "*.cxx" -exec grep -l "Category: run" {} \; | sed sx./xxg )
-
-# C++ Headers
-
-HDRS = $(wildcard *.icc) $(wildcard *.h)
-
-# Library Root dictionary
-# only for selected classes
-# (temporarily excluded for OSF1 due to compilation errors)
-
-ifneq ($(ALICE_TARGET),OSF1)
-DICT = AliGeant4Cint.cxx
-DICTH = AliRunConfiguration.h AliGeant4LinkDef.h
-DICTO = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(DICT))
-endif
-
-# C++ Objects
-
-OBJS1 = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(SRCS1))
-OBJS2 = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(SRCS2)) $(DICTO)
-
-# Program C++ source, objects
-
-PSRC = $(TARGET).cxx
-POBJ = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(PSRC))
-
-# C++ compilation flags
-
-CXXFLAGS = $(CXXOPTS) -I$(ROOTSYS)/include -I. -I$(ALICE_ROOT)/include \
- -I$(ALICE_ROOT)/TGeant4
-
-##### TARGETS #####
-
-# Target
-
-SLIBRARY = $(LIBDIR)/libAliGeant4_1.$(SL) $(LIBDIR)/libAliGeant4_2.$(SL)
-ALIBRARY = $(LIBDIR)/libAliGeant4_1.a $(LIBDIR)/libAliGeant4_2.a
-PROGRAM = $(BINDIR)/$(TARGET)
-
-default: $(SLIBRARY) $(PROGRAM)
-archived: $(ALIBRARY)
-
-$(LIBDIR)/libAliGeant4_1.$(SL): $(OBJS1)
-$(LIBDIR)/libAliGeant4_1.a: $(OBJS1)
-
-$(LIBDIR)/libAliGeant4_2.$(SL): $(OBJS2)
-$(LIBDIR)/libAliGeant4_2.a: $(OBJS2)
-
-$(BINDIR)/$(TARGET): $(POBJ)
-
-$(DICT): $(DICTH)
-
-depend: $(SRCS1) $(SRCS2)
-
-clean: macroclean
-
-#HEADERS = $(filter-out %LinkDef.h,$(HDRS))
-
-# filter-out Geant3 dependent libraries (ZDC requires symbols from G3)
-# and add Geant4 dependent ones
-ALILIBS := $(filter-out -lTGeant3,$(ALILIBS))
-ALILIBS := $(filter-out -lZDC,$(ALILIBS))
-ALILIBS := $(filter-out -lITS,$(ALILIBS))
-ALILIBS += -lAliGeant4_2 -lAliGeant4_1 -lTGeant4_2 -lTGeant4_1
-
-LIBS = $(ALILIBS) $(CLIBS) $(GLIBS) -lEG -lEGPythia6 -lpythia6 -lpdf \
- -lTHijing -lhijing -lTMevSim -lmevsim -lTHbtp -lHBTP \
- $(G4LDLIBS)
-
-TOCLEAN = $(OBJS) $(POBJ) *Cint.cxx *Cint.h
-
-CHECKS = $(patsubst %.cxx,check/%.viol,$(SRCS))
-
-############################### General Macros ################################
-
-include $(ALICE_ROOT)/conf/GeneralMacros
-
-
-# Geant4 specific compiler flags
-
-CXXFLAGS += $(CPPFLAGS)
-
-
-############################ Dependencies #####################################
-
--include tgt_$(ALICE_TARGET)/Make-depend
+++ /dev/null
-# $Id$
-
-############################### AliGeant4 Makefile #############################
-
-# Include Geant4 specific definitions
-
-include $(G4INSTALL)/config/architecture.gmk
-
-# Include machine specific definitions
-
-include $(ALICE_ROOT)/conf/GeneralDef
-include $(ALICE_ROOT)/conf/MachineDef.$(ALICE_TARGET)
-
-# Include Alice Geant4 specific definitions
-
-NEED_G4_LIBS := 1
-include $(ALICE_ROOT)/conf/Geant4.gmk
-
-PACKAGE = AliGeant4
-TARGET = aligeant4
-
-# C++ sources
-
-SRCS = $(wildcard *.cxx)
-SRCS := $(filter-out $(TARGET).cxx,$(SRCS))
-
-# C++ Headers
-
-HDRS = $(wildcard *.icc) $(wildcard *.h)
-
-# Library Root dictionary
-# only for selected classes
-# (temporarily excluded for OSF1 due to compilation errors)
-
-ifneq ($(ALICE_TARGET),OSF1)
-DICT = AliGeant4Cint.cxx
-DICTH = AliRunConfiguration.h AliGeant4LinkDef.h
-DICTO = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(DICT))
-endif
-
-# C++ Objects
-
-OBJS = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(SRCS)) $(DICTO)
-
-# Program C++ source, objects
-
-PSRC = $(TARGET).cxx
-POBJ = $(patsubst %.cxx,tgt_$(ALICE_TARGET)/%.o,$(PSRC))
-
-# C++ compilation flags
-
-CXXFLAGS = $(CXXOPTS) -I$(ROOTSYS)/include -I. -I$(ALICE_ROOT)/include \
- -I$(ALICE)/geant4_vmc/source/global/include \
- -I$(ALICE)/geant4_vmc/source/geometry/include \
- -I$(ALICE)/geant4_vmc/source/digits+hits/include \
- -I$(ALICE)/geant4_vmc/source/physics/include \
- -I$(ALICE)/geant4_vmc/source/event/include \
- -I$(ALICE)/geant4_vmc/source/run/include \
- -I$(ALICE)/geant4_vmc/source/interfaces/include \
- -I$(ALICE)/geant4_vmc/source/visualization/include
-##### TARGETS #####
-
-# Target
-
-SLIBRARY = $(LIBDIR)/libAliGeant4.$(SL)
-ALIBRARY = $(LIBDIR)/libAliGeant4.a
-PROGRAM = $(BINDIR)/$(TARGET)
-
-default: $(SLIBRARY) $(PROGRAM)
-archived: $(ALIBRARY)
-
-$(LIBDIR)/libAliGeant4.$(SL): $(OBJS)
-$(LIBDIR)/libAliGeant4.a: $(OBJS)
-
-$(BINDIR)/$(TARGET): $(POBJ)
-
-$(DICT): $(DICTH)
-
-depend: $(SRCS)
-
-clean: macroclean
-
-#HEADERS = $(filter-out %LinkDef.h,$(HDRS))
-
-# filter-out Geant3 dependent libraries (ZDC requires symbols from G3)
-# and add Geant4 dependent ones
-ALILIBS := $(filter-out -lgeant321,$(ALILIBS))
-ALILIBS := $(filter-out -lgeant3,$(ALILIBS))
-ALILIBS := $(filter-out -lZDC,$(ALILIBS))
-ALILIBS := $(filter-out -lITS,$(ALILIBS))
-ALILIBS += -lAliGeant4 -L$(ALICE)/geant4_vmc/lib/tgt_$(ALICE_TARGET) -lgeant4vmc
-
-LIBS = $(ALILIBS) $(CLIBS) $(GLIBS) -lEG -lEGPythia6 -lpythia6 -lpdf \
- -lTHijing -lhijing -lTMEVSIM -lmevsim -lTHbtp -lHBTP \
- -lTHerwig -lherwig $(G4LDLIBS)
-
-TOCLEAN = $(OBJS) $(POBJ) *Cint.cxx *Cint.h
-
-CHECKS = $(patsubst %.cxx,check/%.viol,$(SRCS))
-
-############################### General Macros ################################
-
-include $(ALICE_ROOT)/conf/GeneralMacros
-
-
-# Geant4 specific compiler flags
-
-CXXFLAGS += $(CPPFLAGS)
-
-
-############################ Dependencies #####################################
-
--include tgt_$(ALICE_TARGET)/Make-depend
+++ /dev/null
-// $Id$
-
-#include "AliRunConfiguration.h"
-#include "AliFiles.h"
-#include "AliRun.h"
-
-#include "TGeant4.h"
-#include "TG4RunManager.h"
-
-int main(int argc, char** argv)
-{
- // AliRun
- AliRun* run
- = new AliRun("gAlice","The Alice run manager");
- G4cout << "AliRun has been created." << G4endl;
-
- // AliRunConfiguration for Geant4
- AliRunConfiguration* runConfiguration
- = new AliRunConfiguration();
- G4cout << "AliRunConfiguration has been created." << G4endl;
-
- // Geant4 ======================
-
- // TGeant4
- new TGeant4("TGeant4", "The Geant4 Monte Carlo",
- runConfiguration, argc, argv );
- G4cout << "TGeant4 has been created." << G4endl;
-
- // start UI ===================
-
- TG4RunManager* runManager = TG4RunManager::Instance();
-
- // Root interactive session
- //runManager->StartRootUI();
-
- // Geant4 interactive session
- runManager->StartGeantUI();
-
- delete run;
- //runConfiguration is deleted in TG4RunManager
- //geant4 is deleted in AliRun destructor
-
- G4cout << "Everything has been deleted." << G4endl;
- return 0;
-}
-
+++ /dev/null
-#!/usr/bin/perl
-# $Id$
-# Ivana Hrivnacova 12.2.99
-#
-# HTML documentation is created for all
-# source code files: *.h *.cxx
-# makefiles: Makefile, *.gmk
-# and configuration setup scripts
-
-# create doc directory if it does not exist
-$CURDIR = `pwd`;
-chdir $ENV{'AG4_INSTALL'};
-if (! grep(/doc/, `ls`)) {
- `mkdir doc` ;
- print "Directory doc has been created." . "\n";
-};
-# move doc/HTML directory to doc/HTML.old
-chdir doc;
-if (grep(/HTML.old/, `ls`)) {
- print "Cleaning HTML.old" . "\n";
- `rm -fr HTML.old`;
-}
-if (grep(/HTML/, `ls`)) {
- `mkdir HTML.old`;
- `mv HTML HTML.old`;
- print "Old HTML directory has been saved." . "\n";
-}
-chdir $ENV{'AG4_INSTALL'};
-
-# create tmpdoc directory is it does not exist
-# or clean it
-if (! grep(/tmpdoc/, `ls`)) {
- `mkdir tmpdoc` ;
- print "Directory tmpdoc has been created." . "\n";
-} else {
- print "Cleaning tmpdoc" . "\n";
- `rm -fr tmpdoc/*`;
-}
-
-# select directory that will be processed
-$SOURCEDIR = ". ../TGeant4 ../STEER ../EVGEN ../TGeant3 ../ALIFAST ../ALIROOT ";
-$SOURCEDIR = $SOURCEDIR . ". ../CONTAINERS ../THijing ";
-$SOURCEDIR = $SOURCEDIR . "../CASTOR ../FMD ../ITS ../MUON ../PHOS ../PMD ";
-$SOURCEDIR = $SOURCEDIR . "../RICH ../START ../STRUCT ../TOF ../TPC ../TRD ../ZDC";
-
-# copy everything for documentation to tmpdoc
-@FILELIST = `find $SOURCEDIR -name "*.ddl"`;
-@FILELIST = (@FILELIST, `find $SOURCEDIR -name "*.h"`);
-@FILELIST = (@FILELIST, `find $SOURCEDIR -name "*.cxx"`);
-@FILELIST = (@FILELIST, `find $SOURCEDIR -name "*.icc"`);
-@FILELIST = (@FILELIST, `find $SOURCEDIR -name "Makefile"`);
-@FILELIST = (@FILELIST, `find $SOURCEDIR -name "*.gmk"`);
-@FILELIST = (@FILELIST, `find $SOURCEDIR -name "setup*"`);
-
-print "Copying files to tmpdoc" . "\n";
-foreach $FILE (@FILELIST) {
- chop $FILE;
- # exclude dictionary classes
- if (!grep(/Dict/,$FILE)) {
- `cp $FILE tmpdoc`;
- }
- #print "$FILE has been copied to tmpdoc" . "\n";
-}
-
-# mv *.cxx to *.C
-# what is recquired by ddl2html.pl
-chdir tmpdoc;
-print "Renaming files" . "\n";
-@CXXLIST = `ls *.cxx`;
-foreach $CXXFILE (@CXXLIST) {
- chop $CXXFILE;
- $CFILE = `echo $CXXFILE | sed s/.cxx/.C/g`;
- `mv $CXXFILE $CFILE`;
-}
-
-# execute the modified P.Binko's script
-system $ENV{'AG4_INSTALL'} . "/config/doc_alddl2html.pl ALICE G4 Project";
-
-# move HTML to doc and remove tmpdoc
-$DOCDIR = $ENV{'AG4_INSTALL'} . "/doc";
-`mv HTML $DOCDIR`;
-print "Removing tmpdoc" . "\n";
-chdir $ENV{'AG4_INSTALL'};
-`rm -fr tmpdoc`;
-
-# generate the category pages
-system $ENV{'AG4_INSTALL'} . "/config/doc_alsorthtml.pl";
-
-chdir $CURDIR;
+++ /dev/null
-#!/usr/bin/perl
-# $Id$
-# Ivana Hrivnacova 15.2.00
-#
-# This script generates the class category page
-# from all *.h files found in the category directory
-
-# no test of arguments is performed
-$CAT = $ARGV[0];
-$NAME = $ARGV[1];
-$SELECT = $ARGV[2];
-
-# open output file
-$output = $ENV{'AG4_INSTALL'} . "/doc/HTML/" . $NAME . "Category.html";
-open(OUTPUT, ">" . $output);
-
-print "Processing class category: " . $NAME . "\n";
-
-# print the begining of file
-print OUTPUT "<HTML>\n";
-print OUTPUT "\n";
-print OUTPUT "<HEAD>\n";
-print OUTPUT "<TITLE>Class category: ". $NAME . "</TITLE></HEAD>\n";
-print OUTPUT "\n";
-print OUTPUT "\n";
-print OUTPUT "<BODY bgcolor=#FFFFFF>\n";
-print OUTPUT "\n";
-print OUTPUT "<!-- Header material -->\n";
-print OUTPUT "<table border=0 cellpadding=5 cellspacing=0 width=\"100%\">\n";
-print OUTPUT " <tr bgcolor=#d0ffd0>\n";
-print OUTPUT " <td align=left width=30%>\n";
-print OUTPUT " <img alt=\"Alice\"\n";
-print OUTPUT " src=\"http://AliSoft.cern.ch/offline/geant4/gif/AliceLogo.gif\"\n";
-print OUTPUT " width=\"60\" height=\"60\" align=\"absmiddle\" border=1>\n";
-print OUTPUT " <td align=center width=40%>\n";
-print OUTPUT " <font size=\"+2\">\n";
-print OUTPUT " Alice Geant4 Simulation Code </font>\n";
-print OUTPUT " <td align=right width=30% valign=bottom>\n";
-print OUTPUT " <font size=\"-1\">\n";
-print OUTPUT " <script language=\"JavaScript\">\n";
-print OUTPUT " document.write(\"Last modified \"+ document.lastModified)\n";
-print OUTPUT " // end of script -->\n";
-print OUTPUT " </script></font>\n";
-print OUTPUT " </td>\n";
-print OUTPUT " </tr>\n";
-print OUTPUT "</table>\n";
-print OUTPUT "<CENTER>\n";
-print OUTPUT "<H2>Class category: " . $NAME . "</H2>\n";
-print OUTPUT "</CENTER>\n";
-print OUTPUT "\n";
-print OUTPUT "<P><HR SIZE=5><BR>\n";
-print OUTPUT "\n";
-print OUTPUT "<UL><BR>\n";
-print OUTPUT "\n";
-print OUTPUT "<LI><STRONG>C++ header files:</STRONG>\n";
-print OUTPUT "\n";
-print OUTPUT " <UL>\n";
-
-# print the linked header files
-$CATSTRING = "\"Category: " . $CAT . "\"";
-if ( $SELECT eq "TRUE" ) {
- @FILELIST = `find . -name \"*.h\" -exec grep -l $CATSTRING {} \\;`;
-}
-else {
- @FILELIST = `find . -name \"*.h\"`;
-}
-
-foreach $FILEPATH (@FILELIST) {
- @TEMP = split('/',$FILEPATH);
- $FILE = @TEMP[@TEMP - 1];
- chop $FILE;
- print " Linking file " . $FILE . "\n";
- print OUTPUT " <LI><A HREF=\"" . $FILE . ".html\">" . $FILE . "</A>\n";
-}
-
-# print the end of file
-$today = localtime(time);
-$today =~ s/ \d\d:\d\d:\d\d / /;
-@list = getpwuid($<);
-$user = $list[6];
-print OUTPUT "</UL>\n";
-print OUTPUT "\n";
-print OUTPUT "</UL>\n";
-print OUTPUT "\n";
-print OUTPUT "<P><HR SIZE=5>\n";
-print OUTPUT "\n";
-print OUTPUT "<ADDRESS>\n";
-print OUTPUT "Created on $today by <B>$user</B> <BR>\n";
-print OUTPUT "using the HTML generator\n";
-print OUTPUT "<A HREF=\"http://home.cern.ch/~binko/Ddl2Html/Ddl2Html.html\">Ddl2Html description</A>\n";
-print OUTPUT " (the source <A HREF=\"http://home.cern.ch/~binko/Ddl2Html/Ddl2Html.code\">Perl code</A>)\n";
-print OUTPUT "</ADDRESS>\n";
-print OUTPUT "\n";
-print OUTPUT "</BODY bgcolor=#FFFFFF >\n";
-print OUTPUT "\n";
-print OUTPUT "</HTML>\n";
-
-# close output file
-close(OUTPUT);
+++ /dev/null
-#!/usr/bin/perl
-# $Id$
-################################################################################
-#
-# Automatic HTML generator for projects using Objectivity
-#
-# Author : Pavel Binko
-#
-# Last update : 09/04/96
-#
-################################################################################
-# Modified for Alice specifics by Ivana Hrivnacova: 22.5.98;
-# some more changes 12.2.99;
-#
-# ------------------------------------------------------------------------------
-# Analyse the command arguments
-#
-if( $#ARGV == -1 )
-{
- $pwd = `pwd`;
- chop($pwd);
- @help = split(/\//,$pwd);
- $help[$#help] =~ tr/a-z/A-Z/;
- $html_title = "The ".$help[$#help]." Project";
- undef $help;
-}
-elsif( $#ARGV == 0 && $ARGV[0] =~ /^-[?hH]/ )
-{
- print "\n";
- print "The Ddl2Html functionality :\n\n";
- print " Ddl2Html has to be started from the project directory you'd like\n";
- print " to document (to convert to html)\n";
- print " Ddl2Html creates (if not existing) the directory HTML in the project\n";
- print " directory and adds the afs access rights \"cern:nodes rl\"\n";
- print " to both HTML and project directories\n";
- print " Ddl2Html creates index.html file and *.ddl.html, *.h.html and\n";
- print " *.C.html files in the HTML directory\n\n";
- print " Contents of the project directory remains unchanged.\n\n\n";
- print "The Ddl2Html command syntax :\n\n";
- print " Ddl2Html [ arguments ] \n\n";
- print " No argument : The project directory name will be chosen\n";
- print " as the project name (in upper case)\n\n";
- print " One argument : a) If the argument starts with -h or -H or -?,\n";
- print " this help text will be printed\n";
- print " b) If the argument matches with a file name\n";
- print " in the project directory, the first line\n";
- print " from the file will be the project title\n";
- print " c) Othetwise the whole text from the command\n";
- print " line will be the project title\n\n";
- print " More than one argument : The whole text from the command line\n";
- print " will be the project title\n\n\n";
- print "For further details see the :\n";
- die " http://home.cern.ch/~binko/Ddl2Html/Ddl2Html.html\n\n";
-}
-elsif( $#ARGV == 0 && -e $ARGV[0] )
-{
- $first = 1;
- while( <> )
- {
- if( $first )
- {
- chop($_);
- $html_title = $_;
- $first = 0;
- }
- }
- undef $first;
-}
-else
-{
- $html_title = join( " ", @ARGV );
-}
-
-study();
-
-print "\n\n";
-print "*****************************************************************\n";
-print "*\n";
-print "* $html_title\n";
-print "*\n";
-print "*****************************************************************\n\n\n";
-
-#
-# ------------------------------------------------------------------------------
-# Get some information about the creator
-#
-# UID is in the variable $<
-@list = getpwuid($<);
-$user = $list[6];
-
-#
-# ==============================================================================
-# Get a list of all .ddl files
-#
-@ddls = <*.ddl>;
-print "List of Objectivity DDL files = @ddls\n\n";
-
-#
-# ------------------------------------------------------------------------------
-# Get a list of .h files, where no .ddl files exist (ignore _ref.h files)
-#
-while( $hdrname = <*.h> )
-{
- if( ! ( $hdrname =~ /_ref.h$/ ) )
- {
- $helpname = $hdrname;
- $helpname =~ s/.h$/.ddl/;
- if( ! -e $helpname )
- { @hdrs = (@hdrs, $hdrname);
- }
- }
-}
-print "List of C++ header files = @hdrs\n\n";
-
-#
-# ------------------------------------------------------------------------------
-# Get a list of all C++ programs
-#
-while( $cppname = <*.C> )
-{
- if( ! ( $cppname =~ /_ddl.C$/ ) )
- {
- $helpname = $cppname;
- $helpname =~ s/.C$//;
- if( -e "$helpname.ddl" )
- { @cppddls = (@cppddls, $cppname);
- }
- elsif( -e "$helpname.h" )
- { @cpphdrs = (@cpphdrs, $cppname);
- }
- else
- { @cppmain = (@cppmain, $cppname);
- }
- }
-}
-print "List of C++ programs to the *.ddl = @cppddls\n\n";
-print "List of C++ programs to the *.h = @cpphdrs\n\n";
-print "List of main programs = @cppmain\n\n";
-
-#
-# ------------------------------------------------------------------------------
-# Get a list of all Makefiles, makefiles, s.Makefiles and s.makefiles
-#
-@maks = <*.gmk>;
-print "List of Makefiles = @maks\n\n";
-
-#
-# ------------------------------------------------------------------------------
-# Get a list of all config.* files
-#
-#@cnfs = <config.*>;
-@cnfs = <setup* *boot*>;
-print "List of configuration files = @cnfs\n\n";
-
-#
-# ==============================================================================
-# Analyse the .ddl and .h files
-#
-print "Analysing the .ddl and .h files ...\n\n";
-
-foreach $file (@ddls, @hdrs)
-{
- open (HF, $file);
- $fileline = 0;
-
- while (<HF>)
- {
- $fileline += 1;
- chop;
- if ( ! (/^[ \t]*\/\//) ) # ignore C++ comment lines
- {
- s/\/\/.*//; # ignore all after C++ comment sign //
-
- if ( /\bclass\b/ && ! ( /template.*<.*class.*>/ ) )
- {
- @words = split(); # split line read in
- for( $i = 0 ; $i < $#words ; $i++ )
- {
- if( $words[$i] eq "class" )
- {
- $words[$i+1] =~ s/:.*//;
- $words[$i+1] =~ s/{.*//;
- if( !($words[$i+1] =~ /;/ ) && !($words[$i+2] =~ /^;/ )
- && ($words[$i+1] ne "") )
- {
- $fileclass{$words[$i+1]} = $file."//".$fileline;
- $i = $#words;
- }
- }
- }
- }
-
- if ( /\benum\b/ )
- {
- @words = split(); # split line read in
- for( $i = 0 ; $i < $#words ; $i++ )
- {
- if( $words[$i] eq "enum" )
- {
- $words[$i+1] =~ s/{.*//;
- if( $words[$i+1] ne "" )
- {
- $fileenum{$words[$i+1]} = $file."//".$fileline;
- $i = $#words;
- }
- }
- }
- }
-
- }
- }
- close(HF);
-}
-
-# debug
-# print "\n\n\nDEBUG INFORMATION :\n";
-# foreach $class (keys %fileclass)
-# { print "DEBUG: class $class found in $fileclass{$class}\n";
-# }
-# foreach $enum (keys %fileenum)
-# { print "DEBUG: enum $enum found in $fileenum{$enum}\n";
-# }
-# print "\n\n";
-# end debug
-
-#
-# ==============================================================================
-# Some variables needed for html files
-#
-$today = localtime(time);
-$today =~ s/ \d\d:\d\d:\d\d / /;
-
-#
-# ------------------------------------------------------------------------------
-# Create the directory html (if not existing)
-#
-if( ! -e "HTML" )
-{
- `mkdir HTML`;
-}
-if( -e "/usr/sue/bin/fs" )
-{
- `/usr/sue/bin/fs setacl . cern:nodes rl`;
- `/usr/sue/bin/fs setacl HTML cern:nodes rl`;
-}
-
-#
-# ==============================================================================
-# Create *.ddl.html and *.h.html files
-#
-foreach $file (@ddls, @hdrs)
-{
-print "Writing file $file.html ... \n";
-
-# Open the .ddl or .h file and the .html file
-open (HDRF, $file);
-open (HLPF,">HTML/$file.html");
-
-&html_header($file);
-#print HLPF "<HR SIZE=5><P>\n\n";
-#¢red_header1($html_title);
-#print HLPF "<P><HR SIZE=5><P>\n\n";
-&see_source_file;
-print HLPF "<P><HR SIZE=5><P>\n\n";
-¢red_header1($file);
-print HLPF "<P><HR><P>\n\n";
-
-print HLPF "<PRE>\n\n";
-&html_ddl_h_cpp_code;
-print HLPF "\n</PRE>\n\n";
-
-print HLPF "<P><HR SIZE=5><P>\n\n";
-&back_to_index_see_source_file;
-&create_address;
-
-close(HLPF);
-close(HDRF);
-}
-print "\nHTML for Objectivity DDL files and C++ header files created ... \n\n";
-
-#
-# ------------------------------------------------------------------------------
-# Create *.C.html files
-#
-foreach $file (@cppddls, @cpphdrs, @cppmain)
-{
-print "Writing file $file.html ... \n";
-
-# Open the C++ file and the .html file
-open (HDRF, $file);
-open (HLPF,">HTML/$file.html");
-
-&html_header($file);
-#print HLPF "<HR SIZE=5><P>\n\n";
-#¢red_header1($html_title);
-#print HLPF "<P><HR SIZE=5><P>\n\n";
-&see_ddl_h_file;
-print HLPF "<P><HR SIZE=5><P>\n\n";
-¢red_header1($file);
-print HLPF "<P><HR><P>\n\n";
-
-print HLPF "<PRE>\n\n";
-&html_ddl_h_cpp_code;
-print HLPF "\n</PRE>\n\n";
-
-print HLPF "<P><HR SIZE=5><P>\n\n";
-&back_to_index_see_ddl_h_file;
-&create_address;
-
-close(HLPF);
-close(HDRF);
-}
-print "\nHTML for C++ files created ... \n\n";
-
-#
-# ------------------------------------------------------------------------------
-# Copy Make and Config files
-#
-foreach $file (@maks, @cnfs)
-{
-print "Copying file $file ... \n";
-`cp $file HTML/$file`;
-}
-print "\nMake and Config files copied ... \n\n";
-
-#
-# ------------------------------------------------------------------------------
-# Write index.html
-#
-print "Writing index file ... \n";
-
-open (HLPF,">HTML/index.html");
-
-&html_header($html_title);
-
-#print HLPF "<H1 ALIGN=RIGHT>";
-#print HLPF "<TABLE COLSPEC=\"20\" BORDER=5 CELLPADDING=0 CELLSPACING=0>\n";
-#print HLPF "<TR><TH>";
-#print HLPF "<A HREF=\"index.html\" TARGET=_top>No Frame</A>";
-#print HLPF "</TH></TR>\n";
-#print HLPF "</TABLE></H1>\n\n";
-
-print HLPF "<!-- Header material -->\n";
-print HLPF "<table border=0 cellpadding=5 cellspacing=0 width=\"100%\">\n";
-print HLPF " <tr bgcolor=#d0ffd0>\n";
-print HLPF " <td align=left width=30%>\n";
-print HLPF " <img alt=\"Alice\"\n";
-print HLPF " src=\"http://AliSoft.cern.ch/offline/geant4/gif/AliceLogo.gif\"\n";
-print HLPF " width=\"60\" height=\"60\" align=\"absmiddle\" border=1>\n";
-print HLPF " <td align=center width=40%>\n";
-print HLPF " <font size=\"+2\">\n";
-print HLPF " Alice Geant4 Simulation Code";
-print HLPF " </font>\n";
-print HLPF " <td align=right width=30% valign=bottom>\n";
-print HLPF " <font size=\"-1\">\n";
-print HLPF " <script language=\"JavaScript\">\n";
-print HLPF " document.write(\"Last modified \"+ document.lastModified)\n";
-print HLPF " // end of script -->\n";
-print HLPF " </script></font>\n";
-print HLPF " </td>\n";
-print HLPF " </tr>\n";
-print HLPF "</table>\n";
-
-#¢red_header1($html_title);
-#print HLPF "<P><HR SIZE=5><P>\n\n";
-
-print HLPF "<UL><BR>\n\n";
-
-if( @hdrs )
-{
-print HLPF "<LI><STRONG>C++ header files:</STRONG>\n";
- print HLPF " <UL>\n";
- foreach $file (@hdrs)
- { print HLPF " <LI><A HREF=\"$file.html\">$file</A>\n";
- }
-
-if( @cpphdrs )
-{
-# &and_cpp_code;
-# foreach $file (@cpphdrs)
-# { print HLPF " <LI><A HREF=\"$file.html\">$file</A>\n";
-# }
-}
-print HLPF " </UL>\n\n";
-
-print HLPF "<P><HR><P>\n\n";
-}
-
-if( @ddls )
-{
-print HLPF "<LI><STRONG>Objectivity DDL files:</STRONG>\n";
- print HLPF " <UL>\n";
- foreach $file (@ddls)
- { print HLPF " <LI><A HREF=\"$file.html\">$file</A>\n";
- }
-
-if( @cppddls )
-{
-# &and_cpp_code;
-# foreach $file (@cppddls)
-# { print HLPF " <LI><A HREF=\"$file.html\">$file</A>\n";
-# }
-}
-print HLPF " </UL>\n\n";
-
-print HLPF "<P><HR><P>\n\n";
-}
-
-if( @cppmain )
-{
-print HLPF "<LI><STRONG>Main programs/Extern methods:</STRONG>\n";
- print HLPF " <UL>\n";
- foreach $file (@cppmain)
- { print HLPF " <LI><A HREF=\"$file.html\">$file</A>\n";
- }
- print HLPF " </UL>\n\n";
-
-print HLPF "<P><HR><P>\n\n";
-}
-
-if( @maks || @cnfs )
-{
-print HLPF "<LI><STRONG>Makefiles and configuration files:</STRONG>\n";
- print HLPF " <UL>\n";
- foreach $file (@maks)
-# { print HLPF " <LI><A HREF=\"../$file\">$file</A>\n";
- { print HLPF " <LI><A HREF=\"$file\">$file</A>\n";
- }
- foreach $file (@cnfs)
-# { print HLPF " <LI><A HREF=\"../$file\">$file</A>\n";
- { print HLPF " <LI><A HREF=\"$file\">$file</A>\n";
- }
- print HLPF " </UL>\n\n";
-}
-
-print HLPF "</UL>\n\n";
-
-&create_address;
-
-close(HLPF);
-
-print "\n\n";
-
-######################## END OF THE PROGRAM ##################################
-
-#
-# ------------------------------------------------------------------------------
-# Subroutine create_address
-#
-sub create_address
-{
- print HLPF "<P><HR SIZE=5><BR>\n\n";
-
- print HLPF "<ADDRESS>\n";
- print HLPF "Created on $today by <B>$user</B> <BR>\n";
- print HLPF "using the HTML generator\n";
- print HLPF "<A HREF=\"http://home.cern.ch/~binko/Ddl2Html/Ddl2Html.html\">Ddl2Html description</A>\n";
- print HLPF " (the source ";
- print HLPF "<A HREF=\"http://home.cern.ch/~binko/Ddl2Html/Ddl2Html.code\">Perl code</A>)\n";
- print HLPF "</ADDRESS>\n\n";
-
- print HLPF "</BODY bgcolor=#FFFFFF >\n\n";
-
- print HLPF "</HTML>\n";
-}
-
-#
-# ------------------------------------------------------------------------------
-# Subroutine back_to_index
-#
-sub back_to_index
-{
- print HLPF "<H4>Back to: ";
- print HLPF "<A HREF=\"../CodePrototype.html\"> Class categories index, </A>";
- print HLPF "<A HREF=\"index.html\">Alphabetical index</A>";
- print HLPF "</H4>\n\n";
-}
-
-#
-# ------------------------------------------------------------------------------
-# Subroutine see_source_file
-#
-sub see_source_file
-{
- # The C++ file corresponding to the .ddl or .h file
- $cfile = $file;
- $cfile =~ s/.h$/.C/;
- $cfile =~ s/.ddl$/.C/;
-
- if( -e $cfile )
- {
- print HLPF "<H4>See the source file ";
- print HLPF "<A HREF=\"$cfile.html\">$cfile</A>";
- print HLPF "</H4>\n\n";
- }
- undef $cfile;
-}
-
-#
-# ------------------------------------------------------------------------------
-# Subroutine see_ddl_h_file
-#
-sub see_ddl_h_file
-{
- # The .ddl or .h file corresponding to the C++ file
- $ddlfile = $file;
- $ddlfile =~ s/.C$/.ddl/;
- if( -e $ddlfile )
- {
- print HLPF "<H4>See the Objectivity DDL file ";
- print HLPF "<A HREF=\"$ddlfile.html\">$ddlfile</A>";
- print HLPF "</H4>\n\n";
- }
- else
- {
- $hfile = $file;
- $hfile =~ s/.C$/.h/;
- if( -e $hfile )
- {
- print HLPF "<H4>See the C++ header file ";
- print HLPF "<A HREF=\"$hfile.html\">$hfile</A>";
- print HLPF "</H4>\n\n";
- }
- }
- undef $ddlfile;
- undef $hfile;
-}
-
-#
-# ------------------------------------------------------------------------------
-# Subroutine back_to_index_see_source_file
-#
-sub back_to_index_see_source_file
-{
- &back_to_index;
- &see_source_file;
-}
-
-#
-# ------------------------------------------------------------------------------
-# Subroutine back_to_index_see_ddl_h_file
-#
-sub back_to_index_see_ddl_h_file
-{
- &back_to_index;
- &see_ddl_h_file;
-}
-
-#
-# ------------------------------------------------------------------------------
-# Subroutine and_cpp_code
-#
-sub and_cpp_code
-{
- print HLPF "<P>\n";
- print HLPF "<STRONG>... and the corresponding C++ code :</STRONG>\n\n";
-}
-
-#
-# ------------------------------------------------------------------------------
-# Subroutine centred_header1
-#
-sub centred_header1
-{
- local($sometitle) = @_;
-
- print HLPF "<CENTER>\n";
- print HLPF "<H1>$sometitle</H1>\n";
- print HLPF "</CENTER>\n\n";
-}
-
-#
-# ------------------------------------------------------------------------------
-# Subroutine html_header
-#
-sub html_header
-{
- local($sometitle) = @_;
-
- print HLPF "<HTML>\n\n";
-
- print HLPF "<HEAD>\n";
- print HLPF "<TITLE>$sometitle</TITLE>";
- print HLPF "</HEAD>\n\n";
-
- print HLPF "<BODY bgcolor=#FFFFFF>\n\n";
-}
-
-#
-# ------------------------------------------------------------------------------
-# Subroutine html_ddl_h_cpp_code
-#
-sub html_ddl_h_cpp_code
-{
-$fileline = 0;
-
-while (<HDRF>)
-{
- $fileline += 1;
- chop;
-
- s/</<\;/g; # convert special characters to html
- s/>/>\;/g;
-
-# Write the HTML
- foreach $class (keys %fileclass) # add links for classes
- {
- undef $newstr;
- undef $newerstr;
-
- ( $locfileclass, $locfileline ) = split( /\/\//, $fileclass{$class} );
-
- if( ($file eq $locfileclass) && ($fileline eq $locfileline) )
- { print HLPF "<A NAME=\"$class\_classdef\">\n";
- }
-
- if ( /\b$class\b/ )
- {
- if( $file eq $locfileclass )
- { $newstr="<a href=\"\#$class\_classdef\">$class</a>";
- }
- else
- { $newstr="<a href=\"$locfileclass.html\#$class\_classdef\">$class</a>";
- }
-
-undef $hotovo;
-
-while( $_ ne "" )
-{
- if( /\b$class\b/ )
- {
- $hotovo = $hotovo.$`;
- $zbytek = $';
-
- if( !( ($hotovo =~ /<a href="$/) && ($zbytek =~ /^\./) ) )
- {
- $hotovo = $hotovo.$newstr;
- }
- else
- {
- $hotovo = $hotovo.$class
- }
-
- $_ = $zbytek;
- /\b$class\b/;
- }
- else
- {
- $hotovo = $hotovo.$_;
- $_ = "";
- }
-}
-
-$_ = $hotovo;
-
- if ( /$newstr\.h/ )
- {
- if( -e "$class.ddl" )
- { $newerstr="<a href=\"$class.ddl.html\">$class.h</a>";
- s/$newstr\.h/$newerstr/g;
- }
- else
- { $newerstr="<a href=\"$class.h.html\">$class.h</a>";
- s/$newstr\.h/$newerstr/g;
- }
- }
-
- if ( /$newstr\.C/ )
- { $newerstr="<a href=\"$class.C.html\">$class.C</a>";
- s/$newstr\.C/$newerstr/g;
- }
-
- }
- }
-
- foreach $enum (keys %fileenum) # add links for enums
- {
- undef $newstr;
- undef $newerstr;
-
- ( $locfileenum, $locfileline ) = split( /\/\//, $fileenum{$enum} );
-
- if( ($file eq $locfileenum) && ($fileline eq $locfileline) )
- { print HLPF "<A NAME=\"$enum\_enumdef\">\n";
- }
-
- if ( /\b$enum\b/ )
- {
- if( $file eq $locfileenum )
- { $newstr="<a href=\"\#$enum\_enumdef\">$enum</a>";
- s/\b$enum\b/$newstr/g;
- }
- else
- { $newstr="<a href=\"$locfileenum.html\#$enum\_enumdef\">$enum</a>";
- s/\b$enum\b/$newstr/g;
- }
-
- if ( /$newstr\.ddl/ )
- { $newerstr="<a href=\"$enum.ddl.html\">$enum.ddl</a>";
- s/$newstr\.ddl/$newerstr/g;
- }
-
- if ( /$newstr\.h/ )
- {
- if( -e "$enum.ddl" )
- { $newerstr="<a href=\"$enum.ddl.html\">$enum.h</a>";
- s/$newstr\.h/$newerstr/g;
- }
- else
- { $newerstr="<a href=\"$enum.h.html\">$enum.h</a>";
- s/$newstr\.h/$newerstr/g;
- }
- }
-
- if ( /$newstr\.C/ )
- { $newerstr="<a href=\"$enum.C.html\">$enum.C</a>";
- s/$newstr\.C/$newerstr/g;
- }
-
- }
- }
-
- print HLPF "$_\n"; # output line to html file
-}
-}
-
-# ------------------------------------------------------------------------------
-
+++ /dev/null
-#!/usr/bin/perl
-# $Id$
-# Ivana Hrivnacova 15.2.00
-#
-# This script defines the class categories
-# and calls doc_alcategory.pl to generate
-# the html category pages
-
-
-print "Generating html pages for class categories\n";
-
-# main categories (packages)
-@DIRLIST = "TGeant4";
-@DIRLIST = (@DIRLIST,"AliGeant4");
-@NAMELIST = "TGeant4";
-@NAMELIST = (@NAMELIST,"AliGeant4");
-
-# subcategories
-@CATLIST = "global";
-@CATLIST = (@CATLIST,"geometry");
-@CATLIST = (@CATLIST,"digits+hits");
-@CATLIST = (@CATLIST,"physics");
-@CATLIST = (@CATLIST,"event");
-@CATLIST = (@CATLIST,"run");
-@CATLIST = (@CATLIST,"visualization");
-@CATLIST = (@CATLIST,"interfaces");
-
-# AliRoot categories
-@EXTDIRLIST = "STEER";
-@EXTDIRLIST = (@EXTDIRLIST,"EVGEN");
-@EXTDIRLIST = (@EXTDIRLIST,"THijing");
-@EXTDIRLIST = (@EXTDIRLIST,"TGeant3");
-@EXTDIRLIST = (@EXTDIRLIST,"ALIFAST");
-@EXTDIRLIST = (@EXTDIRLIST,"CONTAINERS");
-@EXTDIRLIST = (@EXTDIRLIST,"CASTOR");
-@EXTDIRLIST = (@EXTDIRLIST,"FMD");
-@EXTDIRLIST = (@EXTDIRLIST,"ITS");
-@EXTDIRLIST = (@EXTDIRLIST,"MUON");
-@EXTDIRLIST = (@EXTDIRLIST,"PHOS");
-@EXTDIRLIST = (@EXTDIRLIST,"PMD");
-@EXTDIRLIST = (@EXTDIRLIST,"RICH");
-@EXTDIRLIST = (@EXTDIRLIST,"START");
-@EXTDIRLIST = (@EXTDIRLIST,"STRUCT");
-@EXTDIRLIST = (@EXTDIRLIST,"TOF");
-@EXTDIRLIST = (@EXTDIRLIST,"TPC");
-@EXTDIRLIST = (@EXTDIRLIST,"TRD");
-@EXTDIRLIST = (@EXTDIRLIST,"ZDC");
-
-# categories
-for( $i = 0 ; $i < $#DIRLIST+1 ; $i++ ) {
- $DIR = @DIRLIST[$i];
- $NAME = @NAMELIST[$i];
- $DIRPATH = $ENV{'AG4_INSTALL'} . "/../" . $DIR;
- chdir $DIRPATH;
- foreach $CAT (@CATLIST) {
-
- $CATDIRPATH = $DIRPATH . "/" . $CAT;
- $CATNAME = $NAME . "_" . $CAT;
-
- # generate the category pages
- system $ENV{'AG4_INSTALL'} . "/config/doc_alcategory.pl " . $CAT . " " . $CATNAME . " TRUE";
- }
-}
-
-# AliRoot categories
-for( $i = 0 ; $i < $#EXTDIRLIST+1 ; $i++ ) {
-#foreach $DIR (@EXTDIRLIST) {
- $DIR = @EXTDIRLIST[$i];
- $DIRPATH = $ENV{'ALICE_ROOT'} . "/" . $DIR;
- chdir $DIRPATH;
-
- # generate the category pages
- system $ENV{'AG4_INSTALL'} . "/config/doc_alcategory.pl " . $DIRPATH . " " . $DIR . " FALSE";
-}
+++ /dev/null
-#!/usr/bin/perl
-# $Id$
-# Ivana Hrivnacova 12.2.99
-#
-# HTML documentation is created for all
-# source code files: *.hh *.cc *.icc
-# generic makefiles: *.gmk
-# and configuration setup scripts
-
-# file extensions
-#$INCEXT = ".hh"
-#$SRCEXT = ".cc"
-#$MKFEXT = ".gmk"
-
-# create doc directory if it does not exist
-$CURDIR = `pwd`;
-chdir $ENV{'G4INSTALL'};
-if (! grep(/doc/, `ls`)) {
- `mkdir doc` ;
- print "Directory doc has been created." . "\n";
-};
-# move doc/HTML directory to doc/HTML.old
-chdir doc;
-if (grep(/HTML.old/, `ls`)) {
- print "Cleaning HTML.old" . "\n";
- `rm -fr HTML.old`;
-}
-if (grep(/HTML/, `ls`)) {
- `mkdir HTML.old`;
- `mv HTML HTML.old`;
- print "Old HTML directory has been saved." . "\n";
-}
-chdir $ENV{'G4INSTALL'};
-
-# create tmpdoc directory is it does not exist
-# or clean it
-if (! grep(/tmpdoc/, `ls`)) {
- `mkdir tmpdoc` ;
- print "Directory tmpdoc has been created." . "\n";
-} else {
- print "Cleaning tmpdoc" . "\n";
- `rm -fr tmpdoc/*`;
-}
-
-# copy everything for documentation to tmpdoc
-@FILELIST = `find . -name "*.ddl"`;
-#@FILELIST = (@FILELIST, `find . -name "*.h"`);
-@FILELIST = (@FILELIST, `find . -name "*.hh"`);
-@FILELIST = (@FILELIST, `find . -name "*.cc"`);
-@FILELIST = (@FILELIST, `find . -name "*.icc"`);
-@FILELIST = (@FILELIST, `find config -name "*.gmk"`);
-@FILELIST = (@FILELIST, `find config -name "setup*"`);
-@FILELIST = (@FILELIST, `find config -name "*boot"`);
-
-print "Copying files to tmpdoc" . "\n";
-foreach $FILE (@FILELIST) {
- chop $FILE;
- # exclude dictionary classes
- if (!grep(/Dict/,$FILE)) {
- `cp $FILE tmpdoc`;
- }
- #print "$FILE has been copied to tmpdoc" . "\n";
-}
-
-# mv *.cc to *.C
-# what is recquired by ddl2html.pl
-chdir tmpdoc;
-print "Renaming files" . "\n";
-@CXXLIST = `ls *.cc`;
-foreach $CXXFILE (@CXXLIST) {
- chop $CXXFILE;
- $CFILE = `echo $CXXFILE | sed s/.cc/.C/g`;
- `mv $CXXFILE $CFILE`;
-}
-
-# mv *.hh to *.h
-@HHLIST = `ls *.hh`;
-foreach $HHFILE (@HHLIST) {
- chop $HHFILE;
- $HFILE = `echo $HHFILE | sed s/.hh/.h/g`;
- `mv $HHFILE $HFILE`;
-}
-
-# execute the modified P.Binko's script
-system $ENV{'AG4_INSTALL'} . "/config/doc_g4ddl2html.pl GEANT4 Project";
-
-# move HTML to doc and remove tmpdoc
-$DOCDIR = $ENV{'G4INSTALL'} . "/doc";
-`mv HTML $DOCDIR`;
-print "Removing tmpdoc" . "\n";
-chdir $ENV{'G4INSTALL'};
-`rm -fr tmpdoc`;
-
-# generate the category pages
-system $ENV{'AG4_INSTALL'} . "/config/doc_g4sorthtml.pl";
-
-chdir $CURDIR;
+++ /dev/null
-#!/usr/bin/perl
-# $Id$
-# Ivana Hrivnacova 15.2.00
-#
-# This script generates the class category page
-# from all *.h files found in the category directory
-
-# no test of arguments is performed
-$DIR = $ARGV[0];
-$NAME = $ARGV[1];
-
-# open output file
-$output = $ENV{'G4INSTALL'} . "/doc/HTML/" . $NAME . "Category.html";
-open(OUTPUT, ">" . $output);
-
-print "Processing class category: " . $NAME . "\n";
-
-# print the begining of file
-print OUTPUT "<HTML>\n";
-print OUTPUT "\n";
-print OUTPUT "<HEAD>\n";
-print OUTPUT "<TITLE>Class category: ". $NAME . "</TITLE></HEAD>\n";
-print OUTPUT "\n";
-print OUTPUT "\n";
-print OUTPUT "<BODY bgcolor=#FFFFFF>\n";
-print OUTPUT "\n";
-print OUTPUT "<!-- Header material -->\n";
-print OUTPUT "<table border=0 cellpadding=5 cellspacing=0 width=\"100%\">\n";
-print OUTPUT " <tr bgcolor=#d0ffd0>\n";
-print OUTPUT " <td align=left width=30%>\n";
-print OUTPUT " <img alt=\"Alice\"\n";
-print OUTPUT " src=\"http://AliSoft.cern.ch/offline/geant4/gif/AliceLogo.gif\"\n";
-print OUTPUT " width=\"60\" height=\"60\" align=\"absmiddle\" border=1>\n";
-print OUTPUT " <td align=center width=40%>\n";
-print OUTPUT " <font size=\"+2\">\n";
-print OUTPUT " Alice Geant4 Simulation <br> \n";
-print OUTPUT " Geant4 Code </font>\n";
-print OUTPUT " <td align=right width=30% valign=bottom>\n";
-print OUTPUT " <font size=\"-1\">\n";
-print OUTPUT " <script language=\"JavaScript\">\n";
-print OUTPUT " document.write(\"Last modified \"+ document.lastModified)\n";
-print OUTPUT " // end of script -->\n";
-print OUTPUT " </script></font>\n";
-print OUTPUT " </td>\n";
-print OUTPUT " </tr>\n";
-print OUTPUT "</table>\n";
-print OUTPUT "<CENTER>\n";
-print OUTPUT "<H2>Class category: " . $NAME . "</H2>\n";
-print OUTPUT "</CENTER>\n";
-print OUTPUT "\n";
-print OUTPUT "<P><HR SIZE=5><BR>\n";
-print OUTPUT "\n";
-print OUTPUT "<UL><BR>\n";
-print OUTPUT "\n";
-print OUTPUT "<LI><STRONG>C++ header files:</STRONG>\n";
-print OUTPUT "\n";
-print OUTPUT " <UL>\n";
-
-# print the linked header files
-#chdir $ENV{'AG4_INSTALL'} . "/source/" . $DIR;
-chdir $DIR;
-@FILELIST = `find . -name "*.h"`;
-@FILELIST = (@FILELIST, `find . -name "*.hh"`);
-
-foreach $FILEPATH (@FILELIST) {
- @TEMP = split('/',$FILEPATH);
- $FILE = @TEMP[@TEMP - 1];
- chop $FILE;
- print " Linking file " . $FILE . "\n";
- $HFILE = `echo $FILE | sed s/.hh/.h/g`;
- print OUTPUT " <LI><A HREF=\"" . $HFILE . ".html\">" . $FILE . "</A>\n";
-}
-
-# print the end of file
-$today = localtime(time);
-$today =~ s/ \d\d:\d\d:\d\d / /;
-@list = getpwuid($<);
-$user = $list[6];
-print OUTPUT "</UL>\n";
-print OUTPUT "\n";
-print OUTPUT "</UL>\n";
-print OUTPUT "\n";
-print OUTPUT "<P><HR SIZE=5>\n";
-print OUTPUT "\n";
-print OUTPUT "<ADDRESS>\n";
-print OUTPUT "Created on $today by <B>$user</B> <BR>\n";
-print OUTPUT "using the HTML generator\n";
-print OUTPUT "<A HREF=\"http://home.cern.ch/~binko/Ddl2Html/Ddl2Html.html\">Ddl2Html description</A>\n";
-print OUTPUT " (the source <A HREF=\"http://home.cern.ch/~binko/Ddl2Html/Ddl2Html.code\">Perl code</A>)\n";
-print OUTPUT "</ADDRESS>\n";
-print OUTPUT "\n";
-print OUTPUT "</BODY bgcolor=#FFFFFF >\n";
-print OUTPUT "\n";
-print OUTPUT "</HTML>\n";
-
-# close output file
-close(OUTPUT);
+++ /dev/null
-#!/usr/bin/perl
-# $Id$
-################################################################################
-#
-# Automatic HTML generator for projects using Objectivity
-#
-# Author : Pavel Binko
-#
-# Last update : 09/04/96
-#
-################################################################################
-# Modified for Alice specifics by Ivana Hrivnacova: 22.5.98;
-# some more changes 12.2.99;
-#
-# ------------------------------------------------------------------------------
-# Analyse the command arguments
-#
-if( $#ARGV == -1 )
-{
- $pwd = `pwd`;
- chop($pwd);
- @help = split(/\//,$pwd);
- $help[$#help] =~ tr/a-z/A-Z/;
- $html_title = "The ".$help[$#help]." Project";
- undef $help;
-}
-elsif( $#ARGV == 0 && $ARGV[0] =~ /^-[?hH]/ )
-{
- print "\n";
- print "The Ddl2Html functionality :\n\n";
- print " Ddl2Html has to be started from the project directory you'd like\n";
- print " to document (to convert to html)\n";
- print " Ddl2Html creates (if not existing) the directory HTML in the project\n";
- print " directory and adds the afs access rights \"cern:nodes rl\"\n";
- print " to both HTML and project directories\n";
- print " Ddl2Html creates index.html file and *.ddl.html, *.h.html and\n";
- print " *.C.html files in the HTML directory\n\n";
- print " Contents of the project directory remains unchanged.\n\n\n";
- print "The Ddl2Html command syntax :\n\n";
- print " Ddl2Html [ arguments ] \n\n";
- print " No argument : The project directory name will be chosen\n";
- print " as the project name (in upper case)\n\n";
- print " One argument : a) If the argument starts with -h or -H or -?,\n";
- print " this help text will be printed\n";
- print " b) If the argument matches with a file name\n";
- print " in the project directory, the first line\n";
- print " from the file will be the project title\n";
- print " c) Othetwise the whole text from the command\n";
- print " line will be the project title\n\n";
- print " More than one argument : The whole text from the command line\n";
- print " will be the project title\n\n\n";
- print "For further details see the :\n";
- die " http://home.cern.ch/~binko/Ddl2Html/Ddl2Html.html\n\n";
-}
-elsif( $#ARGV == 0 && -e $ARGV[0] )
-{
- $first = 1;
- while( <> )
- {
- if( $first )
- {
- chop($_);
- $html_title = $_;
- $first = 0;
- }
- }
- undef $first;
-}
-else
-{
- $html_title = join( " ", @ARGV );
-}
-
-study();
-
-print "\n\n";
-print "*****************************************************************\n";
-print "*\n";
-print "* $html_title\n";
-print "*\n";
-print "*****************************************************************\n\n\n";
-
-#
-# ------------------------------------------------------------------------------
-# Get some information about the creator
-#
-# UID is in the variable $<
-@list = getpwuid($<);
-$user = $list[6];
-
-#
-# ==============================================================================
-# Get a list of all .ddl files
-#
-@ddls = <*.ddl>;
-print "List of Objectivity DDL files = @ddls\n\n";
-
-#
-# ------------------------------------------------------------------------------
-# Get a list of .h files, where no .ddl files exist (ignore _ref.h files)
-#
-while( $hdrname = <*.h> )
-{
- if( ! ( $hdrname =~ /_ref.h$/ ) )
- {
- $helpname = $hdrname;
- $helpname =~ s/.h$/.ddl/;
- if( ! -e $helpname )
- { @hdrs = (@hdrs, $hdrname);
- }
- }
-}
-print "List of C++ header files = @hdrs\n\n";
-
-#
-# ------------------------------------------------------------------------------
-# Get a list of all C++ programs
-#
-while( $cppname = <*.C> )
-{
- if( ! ( $cppname =~ /_ddl.C$/ ) )
- {
- $helpname = $cppname;
- $helpname =~ s/.C$//;
- if( -e "$helpname.ddl" )
- { @cppddls = (@cppddls, $cppname);
- }
- elsif( -e "$helpname.h" )
- { @cpphdrs = (@cpphdrs, $cppname);
- }
- else
- { @cppmain = (@cppmain, $cppname);
- }
- }
-}
-print "List of C++ programs to the *.ddl = @cppddls\n\n";
-print "List of C++ programs to the *.h = @cpphdrs\n\n";
-print "List of main programs = @cppmain\n\n";
-
-#
-# ------------------------------------------------------------------------------
-# Get a list of all Makefiles, makefiles, s.Makefiles and s.makefiles
-#
-@maks = <*.gmk>;
-print "List of Makefiles = @maks\n\n";
-
-#
-# ------------------------------------------------------------------------------
-# Get a list of all config.* files
-#
-#@cnfs = <config.*>;
-@cnfs = <setup* *boot*>;
-print "List of configuration files = @cnfs\n\n";
-
-#
-# ==============================================================================
-# Analyse the .ddl and .h files
-#
-print "Analysing the .ddl and .h files ...\n\n";
-
-foreach $file (@ddls, @hdrs)
-{
- open (HF, $file);
- $fileline = 0;
-
- while (<HF>)
- {
- $fileline += 1;
- chop;
- if ( ! (/^[ \t]*\/\//) ) # ignore C++ comment lines
- {
- s/\/\/.*//; # ignore all after C++ comment sign //
-
- if ( /\bclass\b/ && ! ( /template.*<.*class.*>/ ) )
- {
- @words = split(); # split line read in
- for( $i = 0 ; $i < $#words ; $i++ )
- {
- if( $words[$i] eq "class" )
- {
- $words[$i+1] =~ s/:.*//;
- $words[$i+1] =~ s/{.*//;
- if( !($words[$i+1] =~ /;/ ) && !($words[$i+2] =~ /^;/ )
- && ($words[$i+1] ne "") )
- {
- $fileclass{$words[$i+1]} = $file."//".$fileline;
- $i = $#words;
- }
- }
- }
- }
-
- if ( /\benum\b/ )
- {
- @words = split(); # split line read in
- for( $i = 0 ; $i < $#words ; $i++ )
- {
- if( $words[$i] eq "enum" )
- {
- $words[$i+1] =~ s/{.*//;
- if( $words[$i+1] ne "" )
- {
- $fileenum{$words[$i+1]} = $file."//".$fileline;
- $i = $#words;
- }
- }
- }
- }
-
- }
- }
- close(HF);
-}
-
-# debug
-# print "\n\n\nDEBUG INFORMATION :\n";
-# foreach $class (keys %fileclass)
-# { print "DEBUG: class $class found in $fileclass{$class}\n";
-# }
-# foreach $enum (keys %fileenum)
-# { print "DEBUG: enum $enum found in $fileenum{$enum}\n";
-# }
-# print "\n\n";
-# end debug
-
-#
-# ==============================================================================
-# Some variables needed for html files
-#
-$today = localtime(time);
-$today =~ s/ \d\d:\d\d:\d\d / /;
-
-#
-# ------------------------------------------------------------------------------
-# Create the directory html (if not existing)
-#
-if( ! -e "HTML" )
-{
- `mkdir HTML`;
-}
-if( -e "/usr/sue/bin/fs" )
-{
- `/usr/sue/bin/fs setacl . cern:nodes rl`;
- `/usr/sue/bin/fs setacl HTML cern:nodes rl`;
-}
-
-#
-# ==============================================================================
-# Create *.ddl.html and *.h.html files
-#
-foreach $file (@ddls, @hdrs)
-{
-print "Writing file $file.html ... \n";
-
-# Open the .ddl or .h file and the .html file
-open (HDRF, $file);
-open (HLPF,">HTML/$file.html");
-
-&html_header($file);
-#print HLPF "<HR SIZE=5><P>\n\n";
-#¢red_header1($html_title);
-#print HLPF "<P><HR SIZE=5><P>\n\n";
-&see_source_file;
-print HLPF "<P><HR SIZE=5><P>\n\n";
-¢red_header1($file);
-print HLPF "<P><HR><P>\n\n";
-
-print HLPF "<PRE>\n\n";
-&html_ddl_h_cpp_code;
-print HLPF "\n</PRE>\n\n";
-
-print HLPF "<P><HR SIZE=5><P>\n\n";
-&back_to_index_see_source_file;
-&create_address;
-
-close(HLPF);
-close(HDRF);
-}
-print "\nHTML for Objectivity DDL files and C++ header files created ... \n\n";
-
-#
-# ------------------------------------------------------------------------------
-# Create *.C.html files
-#
-foreach $file (@cppddls, @cpphdrs, @cppmain)
-{
-print "Writing file $file.html ... \n";
-
-# Open the C++ file and the .html file
-open (HDRF, $file);
-open (HLPF,">HTML/$file.html");
-
-&html_header($file);
-#print HLPF "<HR SIZE=5><P>\n\n";
-#¢red_header1($html_title);
-#print HLPF "<P><HR SIZE=5><P>\n\n";
-&see_ddl_h_file;
-print HLPF "<P><HR SIZE=5><P>\n\n";
-¢red_header1($file);
-print HLPF "<P><HR><P>\n\n";
-
-print HLPF "<PRE>\n\n";
-&html_ddl_h_cpp_code;
-print HLPF "\n</PRE>\n\n";
-
-print HLPF "<P><HR SIZE=5><P>\n\n";
-&back_to_index_see_ddl_h_file;
-&create_address;
-
-close(HLPF);
-close(HDRF);
-}
-print "\nHTML for C++ files created ... \n\n";
-
-#
-# ------------------------------------------------------------------------------
-# Copy Make and Config files
-#
-foreach $file (@maks, @cnfs)
-{
-print "Copying file $file ... \n";
-`cp $file HTML/$file`;
-}
-print "\nMake and Config files copied ... \n\n";
-
-#
-# ------------------------------------------------------------------------------
-# Write index.html
-#
-print "Writing index file ... \n";
-
-open (HLPF,">HTML/index.html");
-
-&html_header($html_title);
-
-#print HLPF "<H1 ALIGN=RIGHT>";
-#print HLPF "<TABLE COLSPEC=\"20\" BORDER=5 CELLPADDING=0 CELLSPACING=0>\n";
-#print HLPF "<TR><TH>";
-#print HLPF "<A HREF=\"index.html\" TARGET=_top>No Frame</A>";
-#print HLPF "</TH></TR>\n";
-#print HLPF "</TABLE></H1>\n\n";
-
-print HLPF "<!-- Header material -->\n";
-print HLPF "<table border=0 cellpadding=5 cellspacing=0 width=\"100%\">\n";
-print HLPF " <tr bgcolor=#d0ffd0>\n";
-print HLPF " <td align=left width=30%>\n";
-print HLPF " <img alt=\"Alice\"\n";
-print HLPF " src=\"http://AliSoft.cern.ch/offline/geant4/gif/AliceLogo.gif\"\n";
-print HLPF " width=\"60\" height=\"60\" align=\"absmiddle\" border=1>\n";
-print HLPF " <td align=center width=40%>\n";
-print HLPF " <font size=\"+2\">\n";
-print HLPF " Geant4 Project";
-print HLPF " </font>\n";
-print HLPF " <td align=right width=30% valign=bottom>\n";
-print HLPF " <font size=\"-1\">\n";
-print HLPF " <script language=\"JavaScript\">\n";
-print HLPF " document.write(\"Last modified \"+ document.lastModified)\n";
-print HLPF " // end of script -->\n";
-print HLPF " </script></font>\n";
-print HLPF " </td>\n";
-print HLPF " </tr>\n";
-print HLPF "</table>\n";
-
-#¢red_header1($html_title);
-#print HLPF "<P><HR SIZE=5><P>\n\n";
-
-print HLPF "<UL><BR>\n\n";
-
-if( @hdrs )
-{
-print HLPF "<LI><STRONG>C++ header files:</STRONG>\n";
- print HLPF " <UL>\n";
- foreach $file (@hdrs)
- { print HLPF " <LI><A HREF=\"$file.html\">$file</A>\n";
- }
-
-if( @cpphdrs )
-{
-# &and_cpp_code;
-# foreach $file (@cpphdrs)
-# { print HLPF " <LI><A HREF=\"$file.html\">$file</A>\n";
-# }
-}
-print HLPF " </UL>\n\n";
-
-print HLPF "<P><HR><P>\n\n";
-}
-
-if( @ddls )
-{
-print HLPF "<LI><STRONG>Objectivity DDL files:</STRONG>\n";
- print HLPF " <UL>\n";
- foreach $file (@ddls)
- { print HLPF " <LI><A HREF=\"$file.html\">$file</A>\n";
- }
-
-if( @cppddls )
-{
-# &and_cpp_code;
-# foreach $file (@cppddls)
-# { print HLPF " <LI><A HREF=\"$file.html\">$file</A>\n";
-# }
-}
-print HLPF " </UL>\n\n";
-
-print HLPF "<P><HR><P>\n\n";
-}
-
-if( @cppmain )
-{
-print HLPF "<LI><STRONG>Main programs/Extern methods:</STRONG>\n";
- print HLPF " <UL>\n";
- foreach $file (@cppmain)
- { print HLPF " <LI><A HREF=\"$file.html\">$file</A>\n";
- }
- print HLPF " </UL>\n\n";
-
-print HLPF "<P><HR><P>\n\n";
-}
-
-if( @maks || @cnfs )
-{
-print HLPF "<LI><STRONG>Makefiles and configuration files:</STRONG>\n";
- print HLPF " <UL>\n";
- foreach $file (@maks)
-# { print HLPF " <LI><A HREF=\"../$file\">$file</A>\n";
- { print HLPF " <LI><A HREF=\"$file\">$file</A>\n";
- }
- foreach $file (@cnfs)
-# { print HLPF " <LI><A HREF=\"../$file\">$file</A>\n";
- { print HLPF " <LI><A HREF=\"$file\">$file</A>\n";
- }
- print HLPF " </UL>\n\n";
-}
-
-print HLPF "</UL>\n\n";
-
-&create_address;
-
-close(HLPF);
-
-print "\n\n";
-
-######################## END OF THE PROGRAM ##################################
-
-#
-# ------------------------------------------------------------------------------
-# Subroutine create_address
-#
-sub create_address
-{
- print HLPF "<P><HR SIZE=5><BR>\n\n";
-
- print HLPF "<ADDRESS>\n";
- print HLPF "Created on $today by <B>$user</B> <BR>\n";
- print HLPF "using the HTML generator\n";
- print HLPF "<A HREF=\"http://home.cern.ch/~binko/Ddl2Html/Ddl2Html.html\">Ddl2Html description</A>\n";
- print HLPF " (the source ";
- print HLPF "<A HREF=\"http://home.cern.ch/~binko/Ddl2Html/Ddl2Html.code\">Perl code</A>)\n";
- print HLPF "</ADDRESS>\n\n";
-
- print HLPF "</BODY bgcolor=#FFFFFF >\n\n";
-
- print HLPF "</HTML>\n";
-}
-
-#
-# ------------------------------------------------------------------------------
-# Subroutine back_to_index
-#
-sub back_to_index
-{
- print HLPF "<H4>Back to: ";
- print HLPF "<A HREF=\"../G4CodePrototype.html\"> Class categories index, </A>";
- print HLPF "<A HREF=\"index.html\">Alphabetical index</A>";
- print HLPF "</H4>\n\n";
-}
-
-#
-# ------------------------------------------------------------------------------
-# Subroutine see_source_file
-#
-sub see_source_file
-{
- # The C++ file corresponding to the .ddl or .h file
- $cfile = $file;
- $cfile =~ s/.h$/.C/;
- $cfile =~ s/.ddl$/.C/;
-
- if( -e $cfile )
- {
- print HLPF "<H4>See the source file ";
- print HLPF "<A HREF=\"$cfile.html\">$cfile</A>";
- print HLPF "</H4>\n\n";
- }
- undef $cfile;
-}
-
-#
-# ------------------------------------------------------------------------------
-# Subroutine see_ddl_h_file
-#
-sub see_ddl_h_file
-{
- # The .ddl or .h file corresponding to the C++ file
- $ddlfile = $file;
- $ddlfile =~ s/.C$/.ddl/;
- if( -e $ddlfile )
- {
- print HLPF "<H4>See the Objectivity DDL file ";
- print HLPF "<A HREF=\"$ddlfile.html\">$ddlfile</A>";
- print HLPF "</H4>\n\n";
- }
- else
- {
- $hfile = $file;
- $hfile =~ s/.C$/.h/;
- if( -e $hfile )
- {
- print HLPF "<H4>See the C++ header file ";
- print HLPF "<A HREF=\"$hfile.html\">$hfile</A>";
- print HLPF "</H4>\n\n";
- }
- }
- undef $ddlfile;
- undef $hfile;
-}
-
-#
-# ------------------------------------------------------------------------------
-# Subroutine back_to_index_see_source_file
-#
-sub back_to_index_see_source_file
-{
- &back_to_index;
- &see_source_file;
-}
-
-#
-# ------------------------------------------------------------------------------
-# Subroutine back_to_index_see_ddl_h_file
-#
-sub back_to_index_see_ddl_h_file
-{
- &back_to_index;
- &see_ddl_h_file;
-}
-
-#
-# ------------------------------------------------------------------------------
-# Subroutine and_cpp_code
-#
-sub and_cpp_code
-{
- print HLPF "<P>\n";
- print HLPF "<STRONG>... and the corresponding C++ code :</STRONG>\n\n";
-}
-
-#
-# ------------------------------------------------------------------------------
-# Subroutine centred_header1
-#
-sub centred_header1
-{
- local($sometitle) = @_;
-
- print HLPF "<CENTER>\n";
- print HLPF "<H1>$sometitle</H1>\n";
- print HLPF "</CENTER>\n\n";
-}
-
-#
-# ------------------------------------------------------------------------------
-# Subroutine html_header
-#
-sub html_header
-{
- local($sometitle) = @_;
-
- print HLPF "<HTML>\n\n";
-
- print HLPF "<HEAD>\n";
- print HLPF "<TITLE>$sometitle</TITLE>";
- print HLPF "</HEAD>\n\n";
-
- print HLPF "<BODY bgcolor=#FFFFFF>\n\n";
-}
-
-#
-# ------------------------------------------------------------------------------
-# Subroutine html_ddl_h_cpp_code
-#
-sub html_ddl_h_cpp_code
-{
-$fileline = 0;
-
-while (<HDRF>)
-{
- $fileline += 1;
- chop;
-
- s/</<\;/g; # convert special characters to html
- s/>/>\;/g;
-
-# Write the HTML
- foreach $class (keys %fileclass) # add links for classes
- {
- undef $newstr;
- undef $newerstr;
-
- ( $locfileclass, $locfileline ) = split( /\/\//, $fileclass{$class} );
-
- if( ($file eq $locfileclass) && ($fileline eq $locfileline) )
- { print HLPF "<A NAME=\"$class\_classdef\">\n";
- }
-
- if ( /\b$class\b/ )
- {
- if( $file eq $locfileclass )
- { $newstr="<a href=\"\#$class\_classdef\">$class</a>";
- }
- else
- { $newstr="<a href=\"$locfileclass.html\#$class\_classdef\">$class</a>";
- }
-
-undef $hotovo;
-
-while( $_ ne "" )
-{
- if( /\b$class\b/ )
- {
- $hotovo = $hotovo.$`;
- $zbytek = $';
-
- if( !( ($hotovo =~ /<a href="$/) && ($zbytek =~ /^\./) ) )
- {
- $hotovo = $hotovo.$newstr;
- }
- else
- {
- $hotovo = $hotovo.$class
- }
-
- $_ = $zbytek;
- /\b$class\b/;
- }
- else
- {
- $hotovo = $hotovo.$_;
- $_ = "";
- }
-}
-
-$_ = $hotovo;
-
- if ( /$newstr\.h/ )
- {
- if( -e "$class.ddl" )
- { $newerstr="<a href=\"$class.ddl.html\">$class.h</a>";
- s/$newstr\.h/$newerstr/g;
- }
- else
- { $newerstr="<a href=\"$class.h.html\">$class.h</a>";
- s/$newstr\.h/$newerstr/g;
- }
- }
-
- if ( /$newstr\.C/ )
- { $newerstr="<a href=\"$class.C.html\">$class.C</a>";
- s/$newstr\.C/$newerstr/g;
- }
-
- }
- }
-
- foreach $enum (keys %fileenum) # add links for enums
- {
- undef $newstr;
- undef $newerstr;
-
- ( $locfileenum, $locfileline ) = split( /\/\//, $fileenum{$enum} );
-
- if( ($file eq $locfileenum) && ($fileline eq $locfileline) )
- { print HLPF "<A NAME=\"$enum\_enumdef\">\n";
- }
-
- if ( /\b$enum\b/ )
- {
- if( $file eq $locfileenum )
- { $newstr="<a href=\"\#$enum\_enumdef\">$enum</a>";
- s/\b$enum\b/$newstr/g;
- }
- else
- { $newstr="<a href=\"$locfileenum.html\#$enum\_enumdef\">$enum</a>";
- s/\b$enum\b/$newstr/g;
- }
-
- if ( /$newstr\.ddl/ )
- { $newerstr="<a href=\"$enum.ddl.html\">$enum.ddl</a>";
- s/$newstr\.ddl/$newerstr/g;
- }
-
- if ( /$newstr\.h/ )
- {
- if( -e "$enum.ddl" )
- { $newerstr="<a href=\"$enum.ddl.html\">$enum.h</a>";
- s/$newstr\.h/$newerstr/g;
- }
- else
- { $newerstr="<a href=\"$enum.h.html\">$enum.h</a>";
- s/$newstr\.h/$newerstr/g;
- }
- }
-
- if ( /$newstr\.C/ )
- { $newerstr="<a href=\"$enum.C.html\">$enum.C</a>";
- s/$newstr\.C/$newerstr/g;
- }
-
- }
- }
-
- print HLPF "$_\n"; # output line to html file
-}
-}
-
-# ------------------------------------------------------------------------------
-
+++ /dev/null
-#!/usr/bin/perl
-# $Id$
-# Ivana Hrivnacova 15.2.00
-#
-# This script defines the class categories
-# and calls doc_alcategory.pl to generate
-# the html category pages
-
-print "Generating html pages for class categories\n";
-
-# main categories list
-$G4SOURCE = $ENV{'G4INSTALL'} . "/source";
-chdir $G4SOURCE;
-@DIRLIST = `ls`;
-
-# categories
-foreach $DIR (@DIRLIST) {
- chop $DIR;
- # exclude unwanted subdirectories/files
- if ($DIR ne "GNUmakefile" && $DIR ne "History" && $DIR ne "nohup.out") {
- # subcategories are considered only in one level
- $DIRPATH = $G4SOURCE . "/" . $DIR;
- chdir $DIRPATH;
-
- # test if subcategories are present
- @INCLUDE = `find . -name "include"`;
- $FIRSTINCLUDE = @INCLUDE[0];
- chop $FIRSTINCLUDE;
- if ($FIRSTINCLUDE eq "./include") {
- @CATLIST = ".";
- }
- else {
- @CATLIST = `ls`;
- }
-
- # process subcategories
- foreach $CAT (@CATLIST) {
- chop $CAT;
- # exclude other subdirectories
- if ($CAT ne "GNUmakefile" && $CAT ne "History" && $CAT ne "nohup.out") {
- print "Processing category: " . $CAT . " of " . $DIR . "\n";
- if ($CAT eq ".") {
- $CATDIRPATH = $DIRPATH;
- $CATNAME = $DIR;
- }
- else {
- $CATDIRPATH = $DIRPATH . "/" . $CAT;
- $CATNAME = $DIR . "_" . $CAT;
- }
-
- # generate the category pages
- system $ENV{'AG4_INSTALL'} . "/config/doc_g4category.pl " . $CATDIRPATH . " " . $CATNAME;
- }
- }
- }
-}
+++ /dev/null
-#!/usr/bin/perl
-# $Id$
-# by I. Hrivnacova, 22.6. 2000
-#
-# This script creates source directory structured
-# according subcategories with links to the flat
-# source structure.
-
-# main categories (packages)
-@DIRLIST = "AliGeant4";
-@NAMELIST = "AliGeant4";
-
-# subcategories
-@CATLIST = "global";
-@CATLIST = (@CATLIST,"geometry");
-@CATLIST = (@CATLIST,"event");
-@CATLIST = (@CATLIST,"run");
-
-# create source dir structure
-for( $i = 0 ; $i < $#DIRLIST+1 ; $i++ ) {
- $DIR = @DIRLIST[$i];
- $DIRPATH = $ENV{'AG4_INSTALL'} . "/../" . $DIR;
- chdir $DIRPATH;
- if (! grep(/source/, `ls`)) {
- `mkdir source ` ;
- foreach $CAT (@CATLIST) {
- $CATDIRPATH = "source" . "/" . $CAT;
- $INCLUDEPATH = $CATDIRPATH . "/" . "include";
- $SRCPATH = $CATDIRPATH . "/" . "src";
- `mkdir $CATDIRPATH` ;
- `mkdir $INCLUDEPATH` ;
- `mkdir $SRCPATH` ;
- }
- print $DIR . "/source directory has been created." . "\n";
- }
-}
-
-# link main history file
-$HISTORYPATH = $ENV{'AG4_INSTALL'} . "/doc/history";
-$HISTORYBASE = $HISTORYPATH . "/History";
-chdir $ENV{'AG4_INSTALL'};
-`ln -s $HISTORYBASE "History" `;
-
-# link source files and history files
-for ( $i = 0 ; $i < $#DIRLIST+1 ; $i++ ) {
- $DIR = @DIRLIST[$i];
- $NAME = @NAMELIST[$i];
- $DIRPATH = $ENV{'AG4_INSTALL'} . "/../" . $DIR;
- $RELDIRPATH = "../../..";
-
- # History categories files
- $HISTORYBASE = $HISTORYPATH . "/" . $NAME . "_History";
- chdir $DIRPATH . "/source";
- `ln -s $HISTORYBASE "History" `;
-
- foreach $CAT (@CATLIST) {
- chdir $DIRPATH;
-
- $CATSTRING = "\"Category: " . $CAT . "\"";
- @FILELIST_H = `find . -name \"*.h\" -exec grep -l $CATSTRING {} \\;`;
- @FILELIST_ICC = `find . -name \"*.icc\" -exec grep -l $CATSTRING {} \\;`;
- @FILELIST_CXX = `find . -name \"*.cxx\" -exec grep -l $CATSTRING {} \\;`;
-
- print "Processing category: " . $CAT . "\n";
- $CATDIRPATH = "source" . "/" . $CAT;
- $INCLUDEPATH = $CATDIRPATH . "/" . "include";
- $SRCPATH = $CATDIRPATH . "/" . "src";
- $CVSBASE = $DIRPATH . "/CVS";
- $HISTORYBASE = $HISTORYPATH . "/" . $NAME . "_" . $CAT . "_History";
-
- # History subcategories files
- chdir $CATDIRPATH;
- `ln -s $HISTORYBASE "History" `;
-
- # .h files
- chdir $DIRPATH . "/" . $INCLUDEPATH;
- `ln -s $CVSBASE "CVS" `;
-
- foreach $FILEPATH (@FILELIST_H) {
- @TEMP = split('/',$FILEPATH);
- $FILE = @TEMP[@TEMP - 1];
- chop $FILE;
- print " Linking file " . $FILE . "\n";
- $FILEBASE = $RELDIRPATH . "/" . $FILE;
- `ln -s $FILEBASE $FILE`;
- }
-
- # .icc files
- foreach $FILEPATH (@FILELIST_ICC) {
- @TEMP = split('/',$FILEPATH);
- $FILE = @TEMP[@TEMP - 1];
- chop $FILE;
- print " Linking file " . $FILE . "\n";
- $FILEBASE = $RELDIRPATH . "/" . $FILE;
- `ln -s $FILEBASE $FILE`;
- }
-
- # .cxx files
- chdir $DIRPATH . "/" . $SRCPATH;
- `ln -s $CVSBASE "CVS" `;
- foreach $FILEPATH (@FILELIST_CXX) {
- @TEMP = split('/',$FILEPATH);
- $FILE = @TEMP[@TEMP - 1];
- chop $FILE;
- print " Linking file " . $FILE . "\n";
- $FILEBASE = $RELDIRPATH . "/" . $FILE;
- `ln -s $FILEBASE $FILE`;
- }
- }
-}
-
+++ /dev/null
-# $Id$
-# ----------------------------------------------------------------
-# This script sets the default environment variables for
-# Alice Geant4 based prototype
-# Options: -g verbose mode
-# local recomended local configuration
-#
-# csh version by I.Gonzalez 18.2.2000
-
-
-
-#
-# ==================================================================
-# Alice configuration options: Please define your selection with the
-# variables below.
-# ==================================================================
-#
-
-#
-# ====== AG4_VERSION
-# Geant4 version
-# If set: the provided Geant4 version and not the default one is set
-#setenv AG4_VERSION 2.0_test
-
-#
-# ====== AG4_VISUALIZE
-# Set/Unset to get/avoid Geant4 visualisation.
-setenv AG4_VISUALIZE 1
-#unsetenv AG4_VISUALIZE
-
-#
-# ====== AG4_OPACS
-# Set/Unset to get OPACS as a Geant4 visualisation driver.
-#setenv AG4_OPACS 1
-unsetenv AG4_OPACS
-
-#
-# ====== AG4_MAKESHLIB
-# If set: shared libraris are created
-setenv AG4_MAKESHLIB 1
-#unsetenv AG4_MAKESHLIB
-
-
-#
-# Resolve input parameters
-#
-set VERBOSE = "NO"
-set LOCAL = "NO"
-set SILENT = "NO"
-foreach param ( $* )
- switch ( $param )
- case -g:
- set VERBOSE="YES"; shift; breaksw;
- case local:
- set LOCAL="YES"; shift; breaksw;
- case silent:
- set SILENT="YES"; shift; breaksw;
- endsw
-end
-
-#
-# ==================================================================
-# Key path variables
-# ==================================================================
-#
-
-if ( "$LOCAL" == "NO" ) then
- #
- # AFS
- #
-
- # ====== ALICE_BASE
- # ALICE base directory
- set ALICE_BASE = /afs/cern.ch/alice/offline
-
- # ====== G4_BASE
- # Geant4 base directory
- set G4_BASE = ${ALICE_BASE}/geant4
-
- # ====== G4MC_BASE
- # Geant4_mc base directory
- set G4MC_BASE = ${ALICE_BASE}
-
- # ====== LHCXX_BASE
- # LHC++ base directory
- set LHCXX_BASE = /afs/cern.ch/sw/lhcxx/specific/@sys
-
- # ====== ROOT_BASE
- # Root base directory
- set ROOT_BASE = /afs/cern.ch/alice/library/root
- # to be removed after aCC support will be defined
- # in the offline in a standard way
- if ( "`uname`" == "HP-UX" ) then
- set ROOT_BASE = /afs/cern.ch/alice/library/.hp_ux102/root.2.23.aCC
- endif
-
- # ====== IRST_BASE
- # IRST code check tool base directory
- setenv IRST_BASE /afs/cern.ch/alice/offline/geant4/tools/IRST
-
-else
- #
- # recommended local installation
- #
-
- # ====== ALICE_BASE
- # ALICE base directory
- set ALICE_BASE = $ALICE_INSTALL/$ALICE_LEVEL
-
- # ====== G4_BASE
- # Geant4 base directory
- set G4_BASE = $ALICE_BASE
-
- # ====== G4MC_BASE
- # Geant4_mc base directory
- set G4MC_BASE = $ALICE_BASE
-
- # ====== LHCXX_BASE
- # LHC++ base directory
- set LHCXX_BASE = $ALICE_BASE
-
- # ====== ROOT_BASE
- # Root base directory
- set ROOT_BASE = $ALICE_BASE
-
- # ====== IRST_BASE
- # IRST code check tool base directory
- #setenv IRST_BASE $HOME/dev/tools/IRST
-
-endif
-
-
-#....................................... SKIP ................................
-#
-# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-# You should not need to change
-# the lines below this one
-# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-# ====== AG4_INSTALL
-# Alice Geant4 install directory
-#
-setenv AG4_INSTALL $ALICE_ROOT/AliGeant4
-
-# Set variables depending on other variables
-# if opacs is selected then select also visualize
-if ( "$?AG4_OPACS" == 1 ) then
- setenv AG4_VISUALIZE 1
-endif
-
-# Start the output
-if ( "$VERBOSE" == "YES" ) then
- echo " "
- echo " =========================================="
- echo " ALICE Geant4 environment configuration"
- echo " =========================================="
-
- #
- # Some output on the selections...
- #
-
- if ("$?AG4_VISUALIZE" == 1) then
- echo "Geant4 visualisation is selected."
- else
- echo "Geant4 visualisation is NOT selected."
- endif
- if ("$?AG4_OPACS" == 1) then
- echo "OPACS driver is selected."
- else
- echo "OPACS driver is NOT selected."
- endif
- if ("$?AG4_NOPHYSICS" == 1) then
- echo "Only geantino or charged geantino can be shooted."
- else
- echo "Full physics has been selected."
- endif
- if ("$?AG4_ODBMS" == 1) then
- echo "The environment for using Objectivity will be set."
- else
- echo "No Geant4 Persistency."
- endif
-
-endif
-
-#
-# ROOT Alice definitions & options
-# ==================================
-#
-if ( "$?ROOTSYS" == 0 ) then
- setenv ROOTSYS ${ROOT_BASE}
-endif
-if ( "$VERBOSE" == "YES" ) then
- echo " "
- echo "ROOT"
- echo "===="
- echo ROOTSYS set to $ROOTSYS
-endif
-
-#
-# Geant4
-# ==================================
-#
-if ( "$VERBOSE" == "YES" ) then
- echo " "
- echo "Geant4 env. variables..."
- echo "============================"
-endif
-
-if ("$?AG4_VERSION" == 0) then
- setenv G4INSTALL ${G4_BASE}/geant4
-else
- setenv G4INSTALL ${G4_BASE}/g4dev/geant4.${AG4_VERSION}
-endif
-
-if ("$?AG4_MAKESHLIB" == 0) then
- unsetenv G4LIB_BUILD_SHARED
-else
- setenv G4LIB_BUILD_SHARED 1
-endif
-
-# path to data files needed by hadronic processes
-setenv G4LEVELGAMMADATA ${G4INSTALL}/data/PhotonEvaporation
-
-# This is architecture dependent...
-set SYSTEM = `uname`
-if ( $SYSTEM == "HP-UX" ) then
- setenv G4SYSTEM "HP-aCC"
- #setenv G4USE_OSPACE 1 # compiling with Object Space STL
-endif
-if ( $SYSTEM == "Linux" ) then
- # check compiler version
- set COMPILER = "g++"
- set TMPFILE = `mktemp -u /tmp/g4compiler.XXXXXX`
- ${COMPILER} -v >& ${TMPFILE}
- if ( "`cat ${TMPFILE} | grep 2.96 `" != "" ) then
- echo "WARNING: Found version of 'g++' (2.96.XXX) is known to be buggy!"
- endif
- if ( "`cat ${TMPFILE} | grep egcs `" != "" ) then
- setenv G4SYSTEM "Linux-egcs"
- else
- setenv G4SYSTEM "Linux-g++"
- endif
- if ( "`cat ${TMPFILE} | grep 3.1 `" != "" ) then
- setenv GCC3 1
- endif
- rm ${TMPFILE}
-endif
-if ( $SYSTEM == "OSF1" ) then
- setenv G4SYSTEM "DEC-cxx"
- #setenv G4NO_STD_NAMESPACE 1 # compiling witn non ISO/ANSI setup
-endif
-if ( $SYSTEM == "SunOS" ) then
- setenv G4SYSTEM "SUN-CC"
- setenv G4USE_OSPACE 1 # compiling with Object Space STL
-endif
-if ( "$VERBOSE" == "YES" ) then
- echo "Architecture is $SYSTEM"
- echo "Geant4 is istalled in $G4INSTALL"
- echo "Geant4 architecture type is $G4SYSTEM"
- if ( "$?G4USE_OSPACE" == 1 ) then
- echo "ObjectSpace will be used for STL"
- endif
-endif
-
-#
-# Geant4_mc
-# ==================================
-#
-if ( "$VERBOSE" == "YES" ) then
- echo " "
- echo "Geant4_mc env. variables..."
- echo "============================"
-endif
-setenv MCINSTALL ${G4MC_BASE}/geant4_mc
-if ( "$VERBOSE" == "YES" ) then
- echo "geant4_mc base directory: $MCINSTALL"
-endif
-
-#
-# CLHEP
-# ==================================
-#
-
-if ( -d $LHCXX_BASE/CLHEP/1.8.0.0 ) then
- setenv CLHEP_BASE_DIR $LHCXX_BASE/CLHEP/1.8.0.0
-else
- echo "WARNING: CLHEP has not been found in the default path."
- if ( "$VERBOSE" == "YES" ) then
- echo " Please set the variable CLHEP_BASE_DIR to its base path"
- echo " Example: setenv CLHEP_BASE_DIR /afs/cern.ch/sw/lhcxx/specific/@sys/CLHEP/pro"
- endif
-endif
-if ( "$VERBOSE" == "YES" ) then
- echo "CLHEP base directory: $CLHEP_BASE_DIR"
-endif
-
-
-#
-# Visualization
-# ==================================
-#
-
-if ( "$?AG4_VISUALIZE" == 1 ) then
- if ( "$VERBOSE" == "YES" ) then
- echo "G4 Visualization env. variables..."
- endif
-
- #
- # tcsh UI
- #
- if ( "$VERBOSE" == "YES" ) then
- echo "* tcsh UI..."
- endif
- setenv G4UI_USE_TCSH 1
-
- #
- # Xm UI
- #
- if ( "$VERBOSE" == "YES" ) then
- echo "* X11 with Motif..."
- endif
- setenv G4UI_BUILD_XM_DRIVER 1
- setenv G4UI_BUILD_XM_SESSION 1
- setenv G4UI_USE_XM 1
-
- #
- # Fukui Renderer
- #
- if ( "$VERBOSE" == "YES" ) then
- echo "* Fukui Renderer (DAWN)..."
- endif
- setenv G4VIS_BUILD_DAWN_DRIVER 1
- setenv G4VIS_USE_DAWN 1
- #setenv G4DAWNFILE_VIEWER david
- setenv DAWN_HOME ${G4_BASE}/../tools/bin
- if ( "`echo ${PATH} | grep ${DAWN_HOME} `" == "" ) then
- setenv PATH "${PATH}:${DAWN_HOME}"
- rehash
- endif
- setenv G4DAWN_MULTI_WINDOW 1
- if ( $SYSTEM == "Linux" ) then
- setenv G4DAWN_NAMED_PIPE 1
- endif
-
- if ( "$VERBOSE" == "YES" ) then
- if ("$?G4VIS_USE_DAWN" == 1) then
- echo " Dawn driver activated"
- endif
- if ("$?G4DAWNFILE_VIEWER" == 1) then
- echo " Dawn file viewer set to ${G4DAWNFILE_VIEWER}"
- endif
- if ("$?DAWN_HOME" == 1) then
- echo " Dawn home path set to ${DAWN_HOME}"
- endif
- if ("$?G4DAWN_MULTI_WINDOW" == 1) then
- echo " Dawn multi window selected"
- endif
- if ("$?G4DAWN_NAMED_PIPE" == 1) then
- echo " Dawn named pipe selected"
- endif
- endif
-
- # David flags
- # Set colors for overlappings
- setenv DAVID_RAINBOW_FLAG 1
- #setenv DAVID_HIGHLIGHT_COLOR_R r
- #setenv DAVID_HIGHLIGHT_COLOR_G g
- #setenv DAVID_HIGHLIGHT_COLOR_B b
-
- # If set volumes names are shown
- setenv DAVID_DISPLAY_PVNAME 1
- # If set supresses the call to dawn
- #setenv DAVID_NO_VIEW 1
- setenv DAVID_EPSILON_3D 0.001
-
- if ( "$VERBOSE" == "YES" ) then
- if ("$?DAVID_RAINBOW_FLAG" == 1) then
- echo " DAVID Rainbow mode is ON"
- endif
- if ("$?DAVID_HIGHLIGHT_COLOR_R" == 1) then
- echo " DAVID Highlight color (Red) set to ${DAVID_HIGHLIGHT_COLOR_R}"
- endif
- if ("$?DAVID_HIGHLIGHT_COLOR_G" == 1) then
- echo " DAVID Highlight color (Green) set to ${DAVID_HIGHLIGHT_COLOR_G}"
- endif
- if ("$?DAVID_HIGHLIGHT_COLOR_B" == 1) then
- echo " DAVID Highlight color (Blue) set to ${DAVID_HIGHLIGHT_COLOR_B}"
- endif
- if ("$?DAVID_DISPLAY_PVNAME" == 1) then
- echo " DAVID will display intersected volumes name"
- endif
- if ("$?DAVID_DISPLAY_PVNAME" == 1) then
- echo " Dawn will not be called from DAVID"
- endif
- if ("$?DAVID_EPSILON_3D" == 1) then
- echo " DAVID tolerance set to ${DAVID_EPSILON_3D}"
- endif
- endif
-
- #
- # OpenGL
- #
- if ( "$VERBOSE" == "YES" ) then
- echo "* OpenGL..."
- endif
- setenv G4VIS_BUILD_OPENGLX_DRIVER 1
- setenv G4VIS_BUILD_OPENGLXM_DRIVER 1
- setenv G4VIS_USE_OPENGLX 1
- setenv G4VIS_USE_OPENGLXM 1
- #setenv OGLHOME /usr/local
- #setenv OGLLIBS "-L$OGLHOME/lib -lMesaGLU -lMesaGL"
- setenv OGLHOME /usr
- setenv OGLLIBS "-L$OGLHOME/lib -lGLU -lGL"
- if ( $SYSTEM == "HP-UX" ) then
- setenv OGLLIBS "-L/usr/lib ${OGLLIBS}"
- endif
- if ( $SYSTEM == "OSF1" ) then
- # temporarily excluded
- # due to problems with Root
- unsetenv G4VIS_BUILD_OPENGLX_DRIVER
- unsetenv G4VIS_BUILD_OPENGLXM_DRIVER
- unsetenv G4VIS_USE_OPENGLX
- unsetenv G4VIS_USE_OPENGLXM
- unsetenv OGLHOME
- unsetenv OGLLIBS
- endif
- if ( "$VERBOSE" == "YES" ) then
- if ("$?G4VIS_USE_OPENGLX" == 1) then
- echo " OpenGL and X11 driver activated"
- endif
- if ("$?G4VIS_USE_OPENGLXM" == 1) then
- echo " OpenGL with Motif extension driver activated"
- endif
- if ("$?OGLHOME" == 1) then
- echo " OpenGL path set to ${OGLHOME}"
- endif
- if ("$?OGLLIBS" == 1) then
- echo " OpenGL libraries set to ${OGLLIBS}"
- endif
- endif
-
- #
- # OpenInventor
- #
- if ( "$VERBOSE" == "YES" ) then
- echo "* OpenInventor..."
- endif
- #setenv G4VIS_USE_OPENINVENTOR 1
- #setenv OIHOME whatever
- #setenv HEPVISDIR something
- if ( "$VERBOSE" == "YES" ) then
- if ("$?G4VIS_USE_OPENINVENTOR" == 1) then
- echo " OpenInventor driver activated"
- echo " OpenInventor path is ${OIHOME}"
- echo " HepVis path is ${HEPVISDIR}"
- endif
- endif
-
- #
- # VRML1
- #
- if ( "$VERBOSE" == "YES" ) then
- echo "* VRML..."
- endif
- setenv G4VIS_BUILD_VRML_DRIVER 1
- setenv G4VIS_USE_VRML 1
- #Set preferred vrml viewer to be invoked in this mode
- setenv G4VRMLFILE_VIEWER vrweb
- #Set host name for VRML1 visualization.... the g4vrmlview machine!
- setenv G4VRML_HOST_NAME nohost
- #Command to run java listener for VRML driver
- #alias javavrml "java -classpath $G4_BASE/tools/bin/java g4vrmlview vrweb"
-
- if ( "$VERBOSE" == "YES" ) then
- if ("$?G4VIS_USE_VRML" == 1) then
- echo " VRML driver activated"
- echo " Host Name for remote visualization is ${G4VRML_HOST_NAME}"
- endif
- endif
-
- #
- # GAG
- #
- if ( "$VERBOSE" == "YES" ) then
- echo "* Geant Adaptative GUI (GAG)..."
- endif
- #setenv G4UI_USE_GAG 1
- #setenv MOMOPATH ${G4_BASE}/tools/GAG/tcltk
- #if ( "`echo ${PATH} | grep ${MOMOPATH} `" == "" ) then
- # setenv PATH "${PATH}:${MOMOPATH}"
- # rehash
- #endif
- #set NCLASSPATH = ".:${G4_BASE}/tools/swing-1.0.3/swingall.jar:${G4_BASE}/tools/GAG/java/GAG.jar"
- #if ("$?CLASSPATH" == 0) then
- # setenv CLASSPATH $NCLASSPATH
- #else
- # if ( "`echo ${CLASSPATH} | grep ${NCLASSPATH} `" == "" ) then
- # setenv CLASSPATH "${CLASSPATH}:${NCLASSPATH}"
- # endif
- #endif
-
- if ( "$VERBOSE" == "YES" ) then
- if ("$?G4UI_USE_GAG" == 1) then
- echo " GAG UI activated"
- echo " Momo path set to $MOMOPATH"
- echo " NOTE: Run "\'tmomo\' "to use Momo (TK/Tcl version)"
- echo " The path to the java GAG code was updated"
- echo " NOTE: Run "\'java gag\'" to use GAG (java version)"
- endif
- endif
-
-else
- if ( "$VERBOSE" == "YES" ) then
- echo Unsetting G4 Visualization env. variables...
- endif
-
- #XM
- unsetenv G4UI_BUILD_XM_DRIVER
- unsetenv G4UI_BUILD_XM_SESSION
- unsetenv G4UI_USE_XM
-
- # Dawn
- unsetenv G4VIS_BUILD_DAWN_DRIVER
- unsetenv G4VIS_USE_DAWN
- unsetenv G4DAWNFILE_VIEWER
- unsetenv DAWN_HOME
- unsetenv G4DAWN_MULTI_WINDOW
- if ( $SYSTEM == "Linux" ) then
- unsetenv G4DAWN_NAMED_PIPE
- endif
-
- # David
- unsetenv DAVID_RAINBOW_FLAG
- unsetenv DAVID_HIGHLIGHT_COLOR_R
- unsetenv DAVID_HIGHLIGHT_COLOR_G
- unsetenv DAVID_HIGHLIGHT_COLOR_B
- unsetenv DAVID_DISPLAY_PVNAME
- unsetenv DAVID_NO_VIEW
- unsetenv DAVID_EPSILON_3D
-
- # OpenGL
- unsetenv G4VIS_BUILD_OPENGLX_DRIVER
- unsetenv G4VIS_BUILD_OPENGLXM_DRIVER
- unsetenv G4VIS_USE_OPENGLX
- unsetenv G4VIS_USE_OPENGLXM
- unsetenv OGLHOME
- unsetenv OGLLIBS
-
- # OpenInventor
- unsetenv G4VIS_USE_OPENINVENTOR
-
- # VRML1
- unsetenv G4VIS_BUILD_VRML_DRIVER
- unsetenv G4VIS_USE_VRML
- unsetenv G4VRMLFILE_VIEWER
- unsetenv G4VRML_HOST_NAME
-
- # GAG
- unsetenv G4UI_USE_GAG
- unsetenv MOMOPATH
-
-endif
-
-#
-# OPACS
-#
-if ( "$?AG4_OPACS" == 1 ) then
- if ( "$VERBOSE" == "YES" ) then
- echo "* OPACS..."
- endif
- setenv AG4_VISUALIZE 1
-
- #
- # OpenGL: needed by OPACS
- #
- setenv G4VIS_BUILD_OPENGLX_DRIVER 1
- setenv G4VIS_USE_OPENGLX 1
- setenv OGLHOME /usr/local
- setenv OGLLIBS "-L$OGLHOME/lib -lMesaGLU -lMesaGL"
- if ( $SYSTEM == "HP-UX" ) then
- setenv OGLLIBS "-L/usr/lib ${OGLLIBS}"
- endif
-
- #
- # OPACS
- #
- setenv G4VIS_BUILD_OPACS_DRIVER 1
- setenv G4UI_BUILD_WO_DRIVER 1
- setenv G4UI_BUILD_WO_SESSION 1
- setenv G4VIS_USE_OPACS 1
- setenv G4UI_USE_WO 1
- setenv OPACS_HOME $G4_BASE/tools/OPACS
- #setenv OPACS_HOME /afs/cern.ch/rd44/dev/OPACS
- if ( $SYSTEM == "Linux" ) then
- setenv G4_OPACS_WIDGET_SET lesstif
- else
- setenv G4_OPACS_WIDGET_SET Xm
- endif
- source $OPACS_HOME/OPACS/v3/setup.csh
- setenv WOENVIRONMENT $AG4_INSTALL/bin/Alice.odb
- setenv OPATH "$OPATH $G4INSTALL/environments/OPACS/usr"
- if ( "$VERBOSE" == "YES" ) then
- if ("$?G4VIS_USE_OPACS" == 1) then
- echo " OPACS driver activated"
- echo " OPACS path set to $OPACS_HOME"
- endif
- endif
-else
- if ( "$VERBOSE" == "YES" ) then
- echo "* Unsetting OPACS driver env. variables ..."
- endif
- unsetenv G4VIS_BUILD_OPACS_DRIVER
- unsetenv G4UI_BUILD_WO_DRIVER
- unsetenv G4UI_BUILD_WO_SESSION
- unsetenv G4VIS_USE_OPACS
- unsetenv G4UI_USE_WO
- unsetenv OPACS_HOME
- unsetenv G4_OPACS_WIDGET_SET
- unsetenv G4OROOT
- unsetenv WOENVIRONMENT
- unsetenv OPATH
-endif
-
-#
-# path to AliGeant4 config scripts
-#
-if ( "`echo ${PATH} | grep ${AG4_INSTALL}/config `" == "" ) then
- if ( "$VERBOSE" == "YES" ) then
- echo Adding ${AG4_INSTALL}/config to the path...
- endif
- setenv PATH "${PATH}:${AG4_INSTALL}/config"
-endif
-
-#
-# path to shared libraries
-#
-if ( $SYSTEM == "HP-UX" ) then
- set SHLIBVAR = $SHLIB_PATH
- set SHLIBVARNAME = SHLIB_PATH
-endif
-if ( $SYSTEM == "Linux" ) then
- set SHLIBVAR = $LD_LIBRARY_PATH
- set SHLIBVARNAME = LD_LIBRARY_PATH
-endif
-if ( $SYSTEM == "OSF1" ) then
- set SHLIBVAR = $LD_LIBRARY_PATH
- set SHLIBVARNAME = LD_LIBRARY_PATH
-endif
-if ( $SYSTEM == "SunOS" ) then
- set SHLIBVAR = $LD_LIBRARY_PATH
- set SHLIBVARNAME = LD_LIBRARY_PATH
-endif
-
-if ( "`echo ${SHLIBVAR} | grep ${G4INSTALL}/lib/${G4SYSTEM} `" == "" ) then
- if ( "$VERBOSE" == "YES" ) then
- echo Adding ${G4INSTALL}/lib/${G4SYSTEM} to the shared libraries path...
- endif
- set SHLIBVAR="${G4INSTALL}/lib/${G4SYSTEM}:${SHLIBVAR}"
-endif
-if ( "`echo ${SHLIBVAR} | grep ${MCINSTALL}/lib/${G4SYSTEM} `" == "" ) then
- if ( "$VERBOSE" == "YES" ) then
- echo Adding ${MCINSTALL}/lib/${G4SYSTEM} to the shared libraries path...
- endif
- set SHLIBVAR="${MCINSTALL}/lib/${G4SYSTEM}:${SHLIBVAR}"
-endif
-if ( "`echo ${SHLIBVAR} | grep ${CLHEP_BASE_DIR}/lib `" == "" ) then
- if ( "$VERBOSE" == "YES" ) then
- echo Adding ${CLHEP_BASE_DIR}/lib to the shared libraries path...
- endif
- set SHLIBVAR="${CLHEP_BASE_DIR}/lib:${SHLIBVAR}"
-endif
-
-setenv $SHLIBVARNAME $SHLIBVAR
-
-
-#
-# Remove unneeded variables. If this is not done the vars. remain in the env.
-#
-
-unset ALICE_BASE
-unset G4_BASE
-unset LHCXX_BASE
-unset SYSTEM
-unset NCLASSPATH
-unset SHLIBVAR
-unset SHLIBVARNAME
-unset LOCAL
-unset VERBOSE
-
-if ( "$SILENT" == "NO" ) then
- echo "Default ALICE environment for GEANT4 has been set."
-endif
+++ /dev/null
-# $Id$
-# ----------------------------------------------------------------
-# This script sets the default environment variables for
-# Alice Geant4 based prototype
-# Options: -g verbose mode
-# local recomended local configuration
-# silent no output
-#
-# by I. Hrivnacova, 18.8.1998
-#
-# sh version modified by I. Gonzalez 2.3.2000
-
-#
-# ==================================================================
-# Alice configuration options:
-# Please define your selection with the variables below.
-# ==================================================================
-#
-
-#
-# ====== AG4_VERSION
-# Geant4 version
-# If set: the provided Geant4 version and not the default one is set
-#export AG4_VERSION=2.0_opt_global
-
-#
-# ====== AG4_VISUALIZE
-# Set/Unset to get/avoid Geant4 visualisation.
-#export AG4_VISUALIZE=1
-unset AG4_VISUALIZE
-
-#
-# ====== AG4_OPACS
-# Set/Unset to get OPACS as a Geant4 visualisation driver.
-#export AG4_OPACS=1
-unset AG4_OPACS
-
-#
-# ====== AG4_MAKESHLIB
-# If set: shared libraris are created
-export AG4_MAKESHLIB=1
-#unset AG4_MAKESHLIB
-
-
-#
-# Resolve input parameters
-#
-VERBOSE="NO"
-LOCAL="NO"
-SILENT="NO"
-for param in $*
-do
- case $param in
- -g) VERBOSE="YES"; shift 1;;
- local) LOCAL="YES"; shift 1;;
- silent) SILENT="YES"; shift 1;;
- esac
-done
-
-
-#
-# ==================================================================
-# Key path variables
-# ==================================================================
-#
-
-if [ "$LOCAL" = "NO" ]; then
- #
- # AFS
- #
-
- # ====== ALICE_BASE
- # ALICE base directory
- ALICE_BASE=/afs/cern.ch/alice/offline
-
- # ====== G4_BASE
- # Geant4 base directory
- G4_BASE=${ALICE_BASE}/geant4
-
- # ====== G4MC_BASE
- # Geant4_mc base directory
- G4MC_BASE=${ALICE_BASE}
-
- # ====== LHCXX_BASE
- # LHC++ base directory
- LHCXX_BASE=/afs/cern.ch/sw/lhcxx/specific/@sys
-
- # ====== ROOT_BASE
- # Root base directory
- ROOT_BASE=/afs/cern.ch/alice/library/root
- # to be removed after aCC support will be defined
- # in the offline in a standard way
- if [ `uname` = "HP-UX" ]; then
- ROOT_BASE=/afs/cern.ch/alice/library/.hp_ux102/root.2.23.aCC
- fi
-
- # ====== IRST_BASE
- # IRST code check tool base directory
- export IRST_BASE=/afs/cern.ch/alice/offline/geant4/tools/IRST
-
-else
- #
- # recommended local installation
- #
-
- # ====== ALICE_BASE
- # ALICE base directory
- ALICE_BASE=$ALICE_INSTALL/$ALICE_LEVEL
-
- # ====== G4_BASE
- # Geant4 base directory
- G4_BASE=$ALICE_BASE
-
- # ====== G4MC_BASE
- # Geant4_mc base directory
- G4MC_BASE=$ALICE_BASE
-
- # ====== LHCXX_BASE
- # LHC++ base directory
- LHCXX_BASE=$ALICE_BASE
-
- # ====== ROOT_BASE
- # Root base directory
- ROOT_BASE=$ALICE_BASE
-
- # ====== IRST_BASE
- # IRST code check tool base directory
- #export IRST_BASE=$HOME/dev/tools/IRST
-
-fi
-
-
-#....................................... SKIP ................................
-#
-# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-# You should not need to change
-# the lines below this one
-# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-# ====== AG4_INSTALL
-# Alice Geant4 install directory
-#
-export AG4_INSTALL=$ALICE_ROOT/AliGeant4
-
-# Set variables depending on other variables
-# if opacs is selected then select also visualize
-if [ $AG4_OPACS ]; then
- export AG4_VISUALIZE=1
-fi
-
-# Start the output
-if [ "$VERBOSE" = "YES" ]; then
- echo " "
- echo " =========================================="
- echo " ALICE Geant4 environment configuration"
- echo " =========================================="
-
- #
- # Some output on the selections...
- #
-
- if [ $AG4_VISUALIZE ]; then
- echo "Geant4 visualisation is selected."
- else
- echo "Geant4 visualisation is NOT selected."
- fi
- if [ $AG4_OPACS ]; then
- echo "OPACS driver is selected."
- else
- echo "OPACS driver is NOT selected."
- fi
- if [ $AG4_NOPHYSICS ]; then
- echo "Only geantino or charged geantino can be shooted."
- else
- echo "Full physics has been selected."
- fi
- if [ $AG4_ODBMS ]; then
- echo "The environment for using Objectivity will be set."
- else
- echo "No Geant4 Persistency."
- fi
-
-fi
-
-#
-# ROOT Alice definitions & options
-# ==================================
-#
-if [ "$ROOTSYS" = "" ]; then
- export ROOTSYS=$ROOT_BASE
-fi
-if [ "$VERBOSE" = "YES" ]; then
- echo " "
- echo "ROOT"
- echo "===="
- echo "ROOTSYS set to $ROOTSYS"
-fi
-
-#
-# Geant4
-# ==================================
-#
-if [ "$VERBOSE" = "YES" ]; then
- echo " "
- echo "Geant4 env. variables..."
- echo "============================"
-fi
-if [ "$AG4_VERSION" = "" ]; then
- export G4INSTALL=$G4_BASE/geant4
-else
- export G4INSTALL=$G4_BASE/g4dev/geant4.$AG4_VERSION
-fi
-export MCINSTALL=$ALICE_ROOT/geant4_mc
-
-if [ "$AG4_MAKESHLIB" = "" ]; then
- unset G4LIB_BUILD_SHARED
-else
- export G4LIB_BUILD_SHARED=1
-fi
-
-# path to data files needed by hadronic processes
-export G4LEVELGAMMADATA=$G4INSTALL/data/PhotonEvaporation
-
-# This is architecture dependent...
-SYSTEM=`uname`
-if [ "$SYSTEM" = "HP-UX" ]; then
- export G4SYSTEM="HP-aCC"
- #export G4USE_OSPACE=1 # compiling with Object Space STL
-fi
-if [ "$SYSTEM" = "Linux" ]; then
- # check compiler version
- COMPILER="g++"
- TMPFILE=`mktemp -u /tmp/g4compiler.XXXXXX`
- ${COMPILER} -v 2> ${TMPFILE}
- if [ "`cat ${TMPFILE} | grep 2.96 `" != "" ]; then
- echo "WARNING: Found version of 'g++' (2.96.XXX) is known to be buggy!"
- fi
- if [ "`cat ${TMPFILE} | grep egcs `" != "" ]; then
- export G4SYSTEM="Linux-egcs"
- else
- export G4SYSTEM="Linux-g++"
- fi
- if [ "`cat ${TMPFILE} | grep 3.1 `" != "" ]; then
- export GCC3=1
- fi
- rm ${TMPFILE}
-fi
-if [ "$SYSTEM" = "OSF1" ]; then
- export G4SYSTEM="DEC-cxx"
- #export G4NO_STD_NAMESPACE=1 # compiling with non ISO/ANSI setup
-fi
-if [ "$SYSTEM" = "SunOS" ]; then
- export G4SYSTEM="SUN-CC"
- export G4USE_OSPACE=1 # compiling with Object Space STL
-fi
-if [ "$VERBOSE" = "YES" ]; then
- echo "Architecture is $SYSTEM"
- echo "Geant4 is istalled in $G4INSTALL"
- echo "Geant4 architecture type is $G4SYSTEM"
- if [ $G4USE_OSPACE ]; then
- echo "ObjectSpace will be used for STL"
- fi
-fi
-
-#
-# Geant4_mc
-# ==================================
-#
-if [ "$VERBOSE" = "YES" ]; then
- echo " "
- echo "Geant4_mc env. variables..."
- echo "============================"
-fi
-export MCINSTALL=$G4MC_BASE/geant4_mc
-if [ "$VERBOSE" = "YES" ]; then
- echo "geant4_mc base directory: $MCINSTALL"
-fi
-
-#
-# CLHEP
-# ==================================
-#
-
-if [ -d $LHCXX_BASE/CLHEP/1.8.0.0 ]; then
- export CLHEP_BASE_DIR=$LHCXX_BASE/CLHEP/1.8.0.0
-else
- echo "WARNING: CLHEP has not been found in the default path."
- if [ "$VERBOSE" = "YES" ]; then
- echo " Please set the variable CLHEP_BASE_DIR to its base path"
- echo " Example: export CLHEP_BASE_DIR=/afs/cern.ch/sw/lhcxx/specific/@sys/CLHEP/pro"
- fi
-fi
-if [ "$VERBOSE" = "YES" ]; then
- echo "CLHEP base directory: $CLHEP_BASE_DIR"
-fi
-
-
-#
-# Visualization
-# ==================================
-#
-
-if [ $AG4_VISUALIZE ]; then
- if [ "$VERBOSE" = "YES" ]; then
- echo "G4 Visualization env. variables..."
- fi
-
- #
- # tcsh UI
- #
- if [ "$VERBOSE" = "YES" ]; then
- echo "* tcsh UI..."
- fi
- export G4UI_USE_TCSH=1
-
- #
- # Xm UI
- #
- if [ "$VERBOSE" = "YES" ]; then
- echo "* X11 with Motif..."
- fi
- export G4UI_BUILD_XM_DRIVER=1
- export G4UI_BUILD_XM_SESSION=1
- export G4UI_USE_XM=1
-
- #
- # Fukui Renderer
- #
- if [ "$VERBOSE" = "YES" ]; then
- echo "* Fukui Renderer (DAWN)..."
- fi
- export G4VIS_BUILD_DAWN_DRIVER=1
- export G4VIS_USE_DAWN=1
- #export G4DAWNFILE_VIEWER=david
- export DAWN_HOME=${G4_BASE}/tools/bin
- if [ "`echo ${PATH} | grep ${DAWN_HOME} `" = "" ]; then
- export PATH=$PATH:$DAWN_HOME
- fi
- export G4DAWN_MULTI_WINDOW=1
- if [ `uname` = "Linux" ]; then
- export G4DAWN_NAMED_PIPE=1
- fi
-
- if [ "$VERBOSE" = "YES" ]; then
- if [ $G4VIS_USE_DAWN ]; then
- echo " Dawn driver activated"
- fi
- if [ $G4DAWNFILE_VIEWER ]; then
- echo " Dawn file viewer set to ${G4DAWNFILE_VIEWER}"
- fi
- if [ $DAWN_HOME ]; then
- echo " Dawn home path set to ${DAWN_HOME}"
- fi
- if [ $G4DAWN_MULTI_WINDOW ]; then
- echo " Dawn multi window selected"
- fi
- if [ $G4DAWN_NAMED_PIPE ]; then
- echo " Dawn named pipe selected"
- fi
- fi
-
-
- # David flags
- # Set colors for overlappings
- export DAVID_RAINBOW_FLAG=1
- #export DAVID_HIGHLIGHT_COLOR_R=r
- #export DAVID_HIGHLIGHT_COLOR_G=g
- #export DAVID_HIGHLIGHT_COLOR_B=b
-
- # If set volumes names are shown
- export DAVID_DISPLAY_PVNAME=1
- # If set supresses the call to dawn
- #export DAVID_NO_VIEW=1
- export DAVID_EPSILON_3D=0.001
-
- if [ "$1" = "-g" ]; then
- if [ $DAVID_RAINBOW_FLAG ]; then
- echo " DAVID Rainbow mode is ON"
- fi
- if [ $DAVID_HIGHLIGHT_COLOR_R ]; then
- echo " DAVID Highlight color (Red) set to ${DAVID_HIGHLIGHT_COLOR_R}"
- fi
- if [ $DAVID_HIGHLIGHT_COLOR_G ]; then
- echo " DAVID Highlight color (Green) set to ${DAVID_HIGHLIGHT_COLOR_G}"
- fi
- if [ $DAVID_HIGHLIGHT_COLOR_B ]; then
- echo " DAVID Highlight color (Blue) set to ${DAVID_HIGHLIGHT_COLOR_B}"
- fi
- if [ $DAVID_DISPLAY_PVNAME ]; then
- echo " DAVID will display intersected volumes name"
- fi
- if [ $DAVID_DISPLAY_PVNAME ]; then
- echo " Dawn will not be called from DAVID"
- fi
- if [ $DAVID_EPSILON_3D ]; then
- echo " DAVID tolerance set to ${DAVID_EPSILON_3D}"
- fi
- fi
-
- #
- # OpenGL
- #
- if [ "$VERBOSE" = "YES" ]; then
- echo "* OpenGL..."
- fi
- export G4VIS_BUILD_OPENGLX_DRIVER=1
- export G4VIS_BUILD_OPENGLXM_DRIVER=1
- export G4VIS_USE_OPENGLX=1
- export G4VIS_USE_OPENGLXM=1
- #export OGLHOME=/usr/local
- export OGLHOME=/export/alice/tools
- #export OGLLIBS="-L$OGLHOME/lib -lMesaGLU -lMesaGL"
- export OGLLIBS="-L$OGLHOME/lib -lGLU -lGL"
- if [ "$SYSTEM" = "HP-UX" ]; then
- export OGLLIBS="-L/usr/lib $OGLLIBS"
- fi
- if [ "$SYSTEM" = "OSF1" ]; then
- # temporarily excluded
- # due to problems with Root
- unset G4VIS_BUILD_OPENGLX_DRIVER
- unset G4VIS_BUILD_OPENGLXM_DRIVER
- unset G4VIS_USE_OPENGLX
- unset G4VIS_USE_OPENGLXM
- unset OGLHOME
- unset OGLLIBS
- fi
- if [ "$VERBOSE" = "YES" ]; then
- if [ $G4VIS_USE_OPENGLX ]; then
- echo " OpenGL and X11 driver activated"
- fi
- if [ $G4VIS_USE_OPENGLXM ]; then
- echo " OpenGL with Motif extension driver activated"
- fi
- if [ $OGLHOME ]; then
- echo " OpenGL path set to ${OGLHOME}"
- fi
- if [ $OGLLIBS ]; then
- echo " OpenGL libraries set to ${OGLLIBS}"
- fi
- fi
-
- #
- # OpenInventor
- #
- if [ "$VERBOSE" = "YES" ]; then
- echo "* OpenInventor..."
- fi
- #export G4VIS_USE_OPENINVENTOR=1
- #export OIHOME=whatever
- #export HEPVISDIR=something
- if [ "$VERBOSE" = "YES" ]; then
- if [ $G4VIS_USE_OPENINVENTOR ]; then
- echo " OpenInventor driver activated"
- echo " OpenInventor path is ${OIHOME}"
- echo " HepVis path is ${HEPVISDIR}"
- fi
- fi
-
- #
- # VRML1
- #
- if [ "$VERBOSE" = "YES" ]; then
- echo "* VRML..."
- fi
- export G4VIS_BUILD_VRML_DRIVER=1
- export G4VIS_USE_VRML=1
- #Set preferred vrml viewer to be invoked in this mode
- export G4VRMLFILE_VIEWER=vrweb
- #Set host name for VRML1 visualization.... the g4vrmlview machine!
- export G4VRML_HOST_NAME=nohost
- #Command to run java listener for VRML driver
- #alias javavrml "java -classpath $G4_BASE/tools/bin/java g4vrmlview vrweb"
-
- if [ "$VERBOSE" = "YES" ]; then
- if [ $G4VIS_USE_VRML ]; then
- echo " VRML driver activated"
- echo " Host Name for remote visualization is ${G4VRML_HOST_NAME}"
- fi
- fi
-
- #
- # GAG
- #
- if [ "$VERBOSE" = "YES" ]; then
- echo "* Geant Adaptative GUI (GAG)..."
- fi
- export G4UI_USE_GAG=1
- export MOMOPATH=${G4_BASE}/tools/GAG/tcltk
- if [ "`echo ${PATH} | grep ${MOMOPATH} `" = "" ]; then
- export PATH=$PATH:$MOMOPATH
- fi
- NCLASSPATH=".:${G4_BASE}/tools/swing-1.0.3/swingall.jar:${G4_BASE}/tools/GAG/java/GAG.jar"
- if [ "$CLASSPATH" = "" ]; then
- export CLASSPATH=$NCLASSPATH
- else
- if [ "`echo ${CLASSPATH} | grep ${NCLASSPATH} `" = "" ]; then
- export CLASSPATH="${CLASSPATH}:${NCLASSPATH}"
- fi
- fi
-
- if [ "$VERBOSE" = "YES" ]; then
- if [ $G4UI_USE_GAG ]; then
- echo " GAG UI activated"
- echo " Momo path set to $MOMOPATH"
- echo " NOTE: Run "\'tmomo\' "to use Momo (TK/Tcl version)"
- echo " The path to the java GAG code was updated"
- echo " NOTE: Run "\'java gag\'" to use GAG (java version)"
- fi
- fi
-
-
-else
- if [ "$VERBOSE" = "YES" ]; then
- echo Unsetting G4 Visualization env. variables...
- fi
-
- #XM
- unset G4UI_BUILD_XM_DRIVER
- unset G4UI_BUILD_XM_SESSION
- unset G4UI_USE_XM
-
- # Dawn
- unset G4VIS_BUILD_DAWN_DRIVER
- unset G4VIS_USE_DAWN
- unset G4DAWNFILE_VIEWER
- unset DAWN_HOME
- unset G4DAWN_MULTI_WINDOW
- if [ "$SYSTEM" = "Linux" ]; then
- unset G4DAWN_NAMED_PIPE
- fi
-
- # David
- unset DAVID_RAINBOW_FLAG
- unset DAVID_HIGHLIGHT_COLOR_R
- unset DAVID_HIGHLIGHT_COLOR_G
- unset DAVID_HIGHLIGHT_COLOR_B
- unset DAVID_DISPLAY_PVNAME
- unset DAVID_NO_VIEW
- unset DAVID_EPSILON_3D
-
- # OpenGL
- unset G4VIS_BUILD_OPENGLX_DRIVER
- unset G4VIS_BUILD_OPENGLXM_DRIVER
- unset G4VIS_USE_OPENGLX
- unset G4VIS_USE_OPENGLXM
- unset OGLHOME
- unset OGLLIBS
-
- # OpenInventor
- #unset G4VIS_USE_OPENINVENTOR
-
- # VRML1
- unset G4VIS_BUILD_VRML_DRIVER
- unset G4VIS_USE_VRML
- unset G4VRMLFILE_VIEWER
- unset G4VRML_HOST_NAME
-
- # GAG
- unset G4UI_USE_GAG
- unset MOMOPATH
-
-fi
-
-#
-# OPACS
-#
-if [ $AG4_OPACS ]; then
- if [ "$VERBOSE" = "YES" ]; then
- echo "* OPACS..."
- fi
- export AG4_VISUALIZE=1
-
- #
- # OpenGL: needed by OPACS
- #
- export G4VIS_BUILD_OPENGLX_DRIVER=1
- export G4VIS_USE_OPENGLX=1
- export OGLHOME=/usr/local
- export OGLLIBS="-L$OGLHOME/lib -lMesaGLU -lMesaGL"
- if [ "$SYSTEM" = "HP-UX" ]; then
- export OGLLIBS="-L/usr/lib $OGLLIBS"
- fi
-
- #
- # OPACS
- #
- export G4VIS_BUILD_OPACS_DRIVER=1
- export G4UI_BUILD_WO_DRIVER=1
- export G4UI_BUILD_WO_SESSION=1
- export G4VIS_USE_OPACS=1
- export G4UI_USE_WO=1
- export OPACS_HOME=$G4_BASE/tools/OPACS
- #export OPACS_HOME=/afs/cern.ch/rd44/dev/OPACS
- if [ "$SYSTEM" = "Linux" ]; then
- export G4_OPACS_WIDGET_SET=lesstif
- else
- export G4_OPACS_WIDGET_SET=Xm
- fi
- . $OPACS_HOME/OPACS/v3/setup.sh
- export WOENVIRONMENT=$AG4_INSTALL/bin/Alice.odb
- export OPATH="$OPATH $G4INSTALL/environments/OPACS/usr"
- if [ "$VERBOSE" = "YES" ]; then
- if [ $G4VIS_USE_OPACS ]; then
- echo " OPACS driver activated"
- echo " OPACS path set to $OPACS_HOME"
- fi
- fi
-else
- if [ "$VERBOSE" = "YES" ]; then
- echo "* Unsetting OPACS driver env. variables ..."
- fi
- unset G4VIS_BUILD_OPACS_DRIVER
- unset G4UI_BUILD_WO_DRIVER
- unset G4UI_BUILD_WO_SESSION
- unset G4VIS_USE_OPACS
- unset G4UI_USE_WO
- unset OPACS_HOME
- unset G4_OPACS_WIDGET_SET
- unset G4OROOT
- unset WOENVIRONMENT
- unset OPATH
-fi
-
-#
-# path to AliGeant4 config scripts
-#
-if [ "`echo ${PATH} | grep ${AG4_INSTALL}/config `" = "" ]; then
- if [ "$VERBOSE" = "YES" ]; then
- echo Adding ${AG4_INSTALL}/config to the path...
- fi
- export PATH=${PATH}:${AG4_INSTALL}/config
-fi
-
-#
-# path to shared libraries
-#
-if [ "$SYSTEM" = "HP-UX" ]; then
- SHLIBVAR=$SHLIB_PATH
- SHLIBVARNAME=SHLIB_PATH
-fi
-if [ "$SYSTEM" = "Linux" ]; then
- SHLIBVAR=$LD_LIBRARY_PATH
- SHLIBVARNAME=LD_LIBRARY_PATH
-fi
-if [ "$SYSTEM" = "OSF1" ]; then
- SHLIBVAR=$LD_LIBRARY_PATH
- SHLIBVARNAME=LD_LIBRARY_PATH
-fi
-if [ "$SYSTEM" = "SunOS" ]; then
- SHLIBVAR=$LD_LIBRARY_PATH
- SHLIBVARNAME=LD_LIBRARY_PATH
-fi
-
-if [ "`echo ${SHLIBVAR} | grep ${G4INSTALL}/lib/${G4SYSTEM} `" = "" ]; then
- if [ "$VERBOSE" = "YES" ]; then
- echo Adding ${G4INSTALL}/lib/${G4SYSTEM} to the shared libraries path...
- fi
- SHLIBVAR="${G4INSTALL}/lib/${G4SYSTEM}:${SHLIBVAR}"
-fi
-if [ "`echo ${SHLIBVAR} | grep ${MCINSTALL}/lib/${G4SYSTEM} `" = "" ]; then
- if [ "$VERBOSE" = "YES" ]; then
- echo Adding ${MCINSTALL}/lib/${G4SYSTEM} to the shared libraries path...
- fi
- SHLIBVAR="${MCINSTALL}/lib/${G4SYSTEM}:${SHLIBVAR}"
-fi
-if [ "`echo ${SHLIBVAR} | grep ${CLHEP_BASE_DIR}/lib `" = "" ]; then
- if [ "$VERBOSE" = "YES" ]; then
- echo Adding ${CLHEP_BASE_DIR}/lib to the shared libraries path...
- fi
- SHLIBVAR="${CLHEP_BASE_DIR}/lib:${SHLIBVAR}"
-fi
-
-export $SHLIBVARNAME=$SHLIBVAR
-
-
-#
-# Remove unneeded variables. If this is not done the vars. remain in the env.
-#
-
-unset ALICE_BASE
-unset G4_BASE
-unset LHCXX_BASE
-unset SYSTEM
-unset NCLASSPATH
-unset SHLIBVAR
-unset SHLIBVARNAME
-unset LOCAL
-unset VERBOSE
-
-if [ "$SILENT" = "NO" ]; then
- echo "Default ALICE environment for GEANT4 has been set."
-fi
+++ /dev/null
-# ----------------------------------------------------------------
-# This script sets the default environment variables for
-# Alice Geant4 based prototype. Based on the sh version.
-# I. Gonzalez 03.09.2002
-
-setenv MCINSTALL $ALICE/geant4vmc
-setenv SYSTEM `uname`
-
-#
-# path to shared libraries
-#
-if ( "$SYSTEM" == "HP-UX" ) then
- set SHLIBVAR=$SHLIB_PATH
- set SHLIBVARNAME=SHLIB_PATH
-endif
-if ( "$SYSTEM" == "Linux" ) then
- set SHLIBVAR=$LD_LIBRARY_PATH
- set SHLIBVARNAME=LD_LIBRARY_PATH
-endif
-if ( "$SYSTEM" == "OSF1" ) then
- set SHLIBVAR=$LD_LIBRARY_PATH
- set SHLIBVARNAME=LD_LIBRARY_PATH
-endif
-if ( "$SYSTEM" == "SunOS" ) then
- set SHLIBVAR=$LD_LIBRARY_PATH
- set SHLIBVARNAME=LD_LIBRARY_PATH
-endif
-
-if ( "`echo ${SHLIBVAR} | grep ${G4INSTALL}/lib/${G4SYSTEM} `" == "" ) then
- set SHLIBVAR="${SHLIBVAR}:${G4INSTALL}/lib/${G4SYSTEM}"
-endif
-if ( "`echo ${SHLIBVAR} | grep ${MCINSTALL}/lib/tgt_${G4SYSTEM} `" == "" ) then
- set SHLIBVAR="${SHLIBVAR}:${MCINSTALL}/lib/tgt_${G4SYSTEM}"
-endif
-if ( "`echo ${SHLIBVAR} | grep ${CLHEP_BASE_DIR}/lib `" == "" ) then
- set SHLIBVAR="${SHLIBVAR}:${CLHEP_BASE_DIR}/lib"
-endif
-
-setenv $SHLIBVARNAME $SHLIBVAR
-
-#
-# Remove unneeded variables. If this is not done the vars. remain in the env.
-#
-
-unsetenv SYSTEM
-unset SHLIBVAR
-unset SHLIBVARNAME
+++ /dev/null
-# $Id$
-# ----------------------------------------------------------------
-# This script sets the default environment variables for
-# Alice Geant4 based prototype
-#
-# by I. Hrivnacova, 18.8.1998
-#
-# sh version modified by I. Gonzalez 2.3.2000
-#
-# modified by fca Sep 2002
-
-export MCINSTALL=$ALICE/geant4vmc
-
-# This is architecture dependent...
-SYSTEM=`uname`
-
-#
-# path to shared libraries
-#
-if [ "$SYSTEM" = "HP-UX" ]; then
- SHLIBVAR=$SHLIB_PATH
- SHLIBVARNAME=SHLIB_PATH
-fi
-if [ "$SYSTEM" = "Linux" ]; then
- SHLIBVAR=$LD_LIBRARY_PATH
- SHLIBVARNAME=LD_LIBRARY_PATH
-fi
-if [ "$SYSTEM" = "OSF1" ]; then
- SHLIBVAR=$LD_LIBRARY_PATH
- SHLIBVARNAME=LD_LIBRARY_PATH
-fi
-if [ "$SYSTEM" = "SunOS" ]; then
- SHLIBVAR=$LD_LIBRARY_PATH
- SHLIBVARNAME=LD_LIBRARY_PATH
-fi
-
-if [ "`echo ${SHLIBVAR} | grep ${G4INSTALL}/lib/${G4SYSTEM} `" = "" ]; then
- SHLIBVAR="${SHLIBVAR}:${G4INSTALL}/lib/${G4SYSTEM}"
-fi
-if [ "`echo ${SHLIBVAR} | grep ${MCINSTALL}/lib/tgt_${G4SYSTEM} `" = "" ]; then
- SHLIBVAR="${SHLIBVAR}:${MCINSTALL}/lib/tgt_${G4SYSTEM}"
-fi
-if [ "`echo ${SHLIBVAR} | grep ${CLHEP_BASE_DIR}/lib `" = "" ]; then
- SHLIBVAR="${SHLIBVAR}:${CLHEP_BASE_DIR}/lib"
-fi
-
-export $SHLIBVARNAME=$SHLIBVAR
-
-#
-# Remove unneeded variables. If this is not done the vars. remain in the env.
-#
-
-unset SYSTEM
-unset SHLIBVAR
-unset SHLIBVARNAME
+++ /dev/null
-#!/bin/sh
-# $Id$
-# ----------------------------------------------------------------
-# This script generates test macros for all versions of
-# one detector if it specified or for all detectors otherwise
-# with specified (or default) test event generator
-# in macro/DDD/test
-#
-# Usage: test_create.sh detName [-g genNumber] [-v visNumber]
-# for all detectors: detName = ALL
-#
-# 5.11.99 I. Hrivnacova
-
-# check input parameters
-if [ $# -lt 1 ]; then
- echo "Usage: "
- echo "test_create.sh detName [-g genNumber] [-v visNumber]"
- echo " for all detectors: detName = ALL"
- echo " all structures: detName = STRUCT"
- echo " all detectors of all versions: detName = ALL_VERSIONS"
- echo " all structures of all versions: detName = STRUCT_ALL_VERSIONS"
- exit
-fi
-
-# default parameters
-DIR=$1
-GEN="1"
-VIS="0"
-
-# get input parameters
-for param in $*
-do
- case $param in
- -g) GEN=$3; shift 2;;
- -v) VIS=$3; shift 2;;
- esac
-done
-
-CURDIR=`pwd`
-SRC=$ALICE_ROOT
-TO=$AG4_INSTALL/"test"
-MAX=10
-
-# create destination directory if it does not exist
-if [ ! -d $TO ] ; then
- mkdir $TO
- cd $TO
- mkdir CRT EMCAL FMD ITS MUON PHOS PMD RICH START STRUCT TOF TPC TRD ZDC
- cd STRUCT
- mkdir ABSO DIPO FRAME HALL MAG PIPE SHIL
-fi
-
-cd $SRC
-if [ "$DIR" = "ALL_VERSIONS" ]; then
-# loop over all detectors if det is not specified
- for DIR in `ls`; do
- if [ -d $DIR ] ; then
- cd $SRC/$DIR
- VER=0
- until [ "$VER" = "$MAX" ] ; do
- if [ -f "Ali"$DIR"v"$VER".cxx" ]; then
- #echo "test_create_in.sh $DIR v$VER test$GEN$VIS"
- test_create_in.sh $DIR -d $VER -g $GEN -v $VIS
- fi
- let VER=$VER+1
- done
- cd $SRC
- fi
- done
-else
-
-# loop over all structures
- if [ "$DIR" = "STRUCT_ALL_VERSIONS" ]; then
- cd $TO/$DIR
- for MODULE in `ls`; do
- VER=0
- until [ "$VER" = "$MAX" ] ; do
- if [ -f $SRC/$DIR/"Ali"$MODULE"v"$VER".cxx" ]; then
- #echo "test_create_struct.sh $MODULE v$VER test$GEN$VIS"
- test_create_struct.sh $MODULE -d $VER -g $GEN -v $VIS
- fi
- let VER=$VER+1
- done
- done
- else
-
-# all detectors with default versions only
- if [ "$DIR" = "ALL" ]; then
- cd $SRC
- for DIR in `ls`; do
- if [ -d $DIR ]; then
- cd $SRC/$DIR
- VER="d"
- #echo "test_create_in.sh $DIR v$VER test$GEN$VIS"
- test_create_in.sh $DIR -d $VER -g $GEN -v $VIS
- fi
- cd $SRC
- done
- else
-
-# loop over all structures with default versions only
- if [ "$DIR" = "STRUCT" ]; then
- DIR="STRUCT"
- cd $TO/$DIR
- for MODULE in `ls`; do
- VER="d"
- #echo "test_create_struct.sh $MODULE v$VER test$GEN$VIS"
- test_create_struct.sh $MODULE -d $VER -g $GEN -v $VIS
- done
- else
-
-# specified detector only
- if [ -d $SRC/$DIR ]; then
- cd $SRC/$DIR
- VER=0
- until [ "$VER" = "$MAX" ] ; do
- if [ -f "Ali"$DIR"v"$VER".cxx" ]; then
- #echo "test_create_in.sh $DIR v$VER test$GEN$VIS"
- test_create_in.sh $DIR -d $VER -g $GEN -v $VIS
- fi
- let VER=$VER+1
- done
- cd $TO
- fi
- fi
- fi
- fi
-fi
-cd $CURDIR
+++ /dev/null
-#!/bin/sh
-# $Id$
-# ----------------------------------------------------------------
-# This script generates test macro for a specified
-# detector and its version number with specified
-# (or default) test event generator in macro/DDD/test
-#
-# In order to prevent from unwanted rewriting of the generator
-# it is created only in case it does not yet exist.
-#
-# Usage:
-# create_test_in.sh detName [-d detVersionNumber] [-g genNumber] [-v visNumber]
-#
-# 5.11.99, I.Hrivnacova
-
-# check input parameters
-if [ $# -lt 1 ]; then
- echo "Usage: "
- echo "create_test_in.sh detName [-d detVersionNumber] [-g genNumber] [-v visNumber]"
- exit
-fi
-
-# default parameters
-DIR=$1
-VER="0"
-GEN="1"
-VIS="0"
-
-# get input parameters
-for param in $*
-do
- case $param in
- -d) VER=$3; shift 2;;
- -g) GEN=$3; shift 2;;
- -v) VIS=$3; shift 2;;
- esac
-done
-
-CURDIR=`pwd`
-
-SRC=$ALICE_ROOT
-TO=$AG4_INSTALL/"test"
-if [ "$VER" = "d" ]; then
- VER_REPLACE=""
-else
- VER_REPLACE="$VER"
-fi
-
-# test if corresponding version order number
-# is defined
-cd $SRC/$DIR
-IS_VERSION="NO"
-if [ -f "Ali"$DIR"v"$VER".cxx" ]; then
- IS_VERSION="YES"
-else
- if [ -f "Ali"$DIR".cxx" -a "$VER" = "0" ]; then
- IS_VERSION="YES"
- else
- if [ "$VER" = "d" -a -d "$TO/$DIR" -a "$DIR" != "STRUCT" ]; then
- IS_VERSION="YES"
- fi
- fi
-fi
-if [ "$IS_VERSION" = "NO" ]; then
- cd $CURDIR
- exit;
-fi
-
-# create target directory if it does not exist
-if [ ! -d $TO ]; then
- mkdir $TO
-fi
-if [ ! -d $TO/$DIR ]; then
- mkdir $TO/$DIR
-fi
-
-cd $TO
-
-# create basic test macro
-if [ "$VIS" = "0" ]; then
- cat $AG4_INSTALL/config/test_default_det_novis.in | sed s/NNN/$VER_REPLACE/g | sed s/WWW/$VER_REPLACE/g | sed s/GGG/$GEN/g | sed s/VVV/$VIS/g | sed s/XXX/$DIR/g > $TO/$DIR"/v"$VER"_test"$GEN""$VIS".in"
-else
- cat $AG4_INSTALL/config/test_default_det_vis.in | sed s/NNN/$VER_REPLACE/g | sed s/WWW/$VER_REPLACE/g | sed s/GGG/$GEN/g | sed s/VVV/$VIS/g | sed s/XXX/$DIR/g > $TO/$DIR"/v"$VER"_test"$GEN""$VIS".in"
-# create visualisation macro (if it does not yet exist)
- if [ ! -f $TO/$DIR/vis_test$VIS".in" ]; then
- cp $AG4_INSTALL/config/test_default_vis$VIS.in $TO/$DIR/vis_test$VIS.in
- fi
-fi
-
-# create generator macro (if it does not yet exist)
-if [ ! -f $TO/$DIR/gen_test$GEN".in" ]; then
- cp $AG4_INSTALL/config/test_default_gen$GEN.in $TO/$DIR/gen_test$GEN.in
-fi
-
-echo "test_create_in.sh $DIR v$VER test$GEN$VIS"
-cd $CURDIR
+++ /dev/null
-#!/bin/sh
-# $Id$
-# ----------------------------------------------------------------
-# This script generates test macro for a specified
-# module and its version number with specified
-# (or default) test event generator in macro/STRUCT/test/MODULE
-#
-# In order to prevent from unwanted rewriting of the generator
-# it is created only in case it does not yet exist.
-#
-# Usage:
-# test_create_struct.sh modName [-d modVersionNumber] [-g genNumber] [-v visNumber]
-#
-# 5.11.99, I.Hrivnacova
-
-# check input parameters
-if [ $# -lt 1 ]; then
- echo "Usage: "
- echo "test_create_struct.sh modName [-d modVersionNumber] [-g genNumber] [-v visNumber]"
- exit
-fi
-
-# default parameters
-MOD=$1
-VER="0"
-GEN="1"
-VIS="0"
-
-# get input parameters
-for param in $*
-do
- case $param in
- -d) VER=$3; shift 2;;
- -g) GEN=$3; shift 2;;
- -v) VIS=$3; shift 2;;
- esac
-done
-
-CURDIR=`pwd`
-
-SRC=$ALICE_ROOT/STRUCT
-TO=$AG4_INSTALL/"test"/STRUCT
-if [ "$VER" = "d" ]; then
- VER_REPLACE=""
-else
- VER_REPLACE="$VER"
-fi
-
-
-# test if corresponding version order number
-# is defined
-cd $SRC
-IS_VERSION="NO"
-if [ -f "Ali"$MOD"v"$VER".cxx" ]; then
- IS_VERSION="YES"
-else
- if [ -f "Ali"$MOD".cxx" -a "$VER" = "0" ]; then
- IS_VERSION="YES"
- else
- if [ "$VER" = "d" -a -d "$TO/$DIR" ]; then
- IS_VERSION="YES"
- fi
- fi
-fi
-if [ "$IS_VERSION" = "NO" ]; then
- cd $CURDIR
- exit;
-fi
-
-# create target directory if it does not exist
-if [ ! -d $TO ]; then
- mkdir $TO
-fi
-if [ ! -d $TO/$MOD ]; then
- mkdir $TO/$MOD
-fi
-
-cd $TO
-
-# create basic test macro
-if [ "$VIS" = "0" ]; then
- cat $AG4_INSTALL/config/test_default_det_novis.in | sed s/NNN/$VER_REPLACE/g | sed s/WWW/$VER_REPLACE/g | sed s/GGG/$GEN/g | sed s/VVV/$VIS/g | sed s/XXX/$MOD/g > $TO/$MOD"/v"$VER"_test"$GEN""$VIS".in"
-else
- cat $AG4_INSTALL/config/test_default_det_vis.in | sed s/NNN/$VER_REPLACE/g | sed s/WWW/$VER_REPLACE/g | sed s/GGG/$GEN/g | sed s/VVV/$VIS/g | sed s/XXX/$MOD/g > $TO/$MOD"/v"$VER"_test"$GEN""$VIS".in"
-# create visualisation macro (if it does not yet exist)
- if [ ! -f $TO/$MOD/vis_test$VIS".in" ]; then
- cp $AG4_INSTALL/config/test_default_vis$VIS.in $TO/$MOD/vis_test$VIS.in
- fi
-fi
-
-# create generator macro (if it does not yet exist)
-if [ ! -f $TO/$MOD/gen_test$GEN".in" ]; then
- cp $AG4_INSTALL/config/test_default_gen$GEN.in $TO/$MOD/gen_test$GEN.in
-fi
-
-echo "test_create_struct.sh $MOD v$VER test$GEN$VIS"
-cd $CURDIR
+++ /dev/null
-# $Id$
-#
-# XXXvWWW
-#
-# basic one module test
-# with specified test event generator
-# without visualization
-
-/aliDet/switchOn XXXNNN
-
-/mcPhysics/setHadron true
-/mcPhysics/setSpecialCuts true
-
-/aliRun/initialize
-/aliDet/generateXML
-
-/control/execute gen_testGGG.in
-
-/process/eLoss/subsec true
-/process/eLoss/minsubsec 2 cm
-
-/mcControl/rootCmd TStopwatch timer;
-/mcControl/rootCmd timer.Start();
-
-#/tracking/verbose 1
-/aliRun/beamOn 1
-
-/mcControl/rootCmd timer.Stop();
-/mcControl/rootCmd timer.Print();
-
-exit
+++ /dev/null
-# $Id$
-#
-# XXXvWWW
-#
-# basic one module test
-# with specified test event generator
-# without visualization
-
-/aliDet/switchOn XXXNNN
-
-/mcPhysics/setEM false
-/mcPhysics/setMUON false
-/mcPhysics/setHadron false
-/mcPhysics/setSpecialCuts false
-
-/aliRun/initialize
-
-/control/execute gen_testGGG.in
-
-#/process/eLoss/subsec true
-#/process/eLoss/minsubsec 2 cm
-
-#/tracking/verbose 1
-#/aliRun/beamOn 1
-
-exit
+++ /dev/null
-# $Id$
-#
-# XXXvWWW
-#
-# basic one module test with visualization
-# physics processes are switched of;
-# specified test event generator is built
-
-/aliDet/switchOn XXXNNN
-/aliRun/initialize
-
-/mcPhysics/setEM false
-/mcPhysics/setMuon false
-/mcPhysics/setHadron false
-/mcPhysics/setSpecialCuts true
-
-/mcTree/setVolume ALIC
-/mcTree/listLong
-
-# generator
-/control/execute gen_testGGG.in
-
-#/vis/open OGLSXm
-/vis/open DAWNFILE
-/vis/drawVolume
-/vis/viewer/refresh
-/vis/viewer/update
-
-# module visualization
-/control/execute vis_testVVV.in
-
-# uncomment following lines to draw event
-#
-#/tracking/storeTrajectory 1
-#/aliEvent/drawTracks ALL
-#aliRun/beamOn 1
-
-/control/exit
-exit
+++ /dev/null
-# $Id$
-# aliroot generator (test1)
-
-/aliGenerator/set AliGenerator
-#
+++ /dev/null
-# $Id$
-# empty generator - no particles are shooted (test2)
-
-/aliGenerator/set Gun
-/aliGun/reset
-#
+++ /dev/null
-# $Id$
-# basic random geantino generator (test3)
-
-/aliGenerator/set Geantino
-/aliGenerator/nofParticles 10
-/aliGun/list
-
-/tracking/verbose 1
-#
+++ /dev/null
-# $Id$
-#
-# special lego run
-
-/mcVerbose/eventAction 0
-/mcVerbose/runAction 0
-/aliRun/lego
-
-/mcControl/rootMacro legoSave
-
-exit
+++ /dev/null
-# $Id$
-#
-# default visualization macro
-# for module specific options
+++ /dev/null
-#!/bin/sh
-# $Id$
-# ----------------------------------------------------------------
-# This script runs specified (or default) test macros
-# for all versions of one detector if it specified
-# or for all detectors otherwise
-#
-# Usage: test_run.sh detName [-g genNumber] [-v visNumber]
-# for all detectors: detName = ALL
-#
-# 5.11.99 I. Hrivnacova
-
-# check input parameters
-if [ $# -lt 1 ]; then
- echo "Usage: "
- echo "test_run.sh detName [-g genNumber] [-v visNumber]"
- echo " for all detectors: detName = ALL"
- exit
-fi
-
-# default parameters
-DIR=$1
-GEN="1"
-VIS="0"
-
-# get input parameters
-for param in $*
-do
- case $param in
- -g) GEN=$3; shift 2;;
- -v) VIS=$3; shift 2;;
- esac
-done
-
-CURDIR=`pwd`
-SRC=$ALICE_ROOT
-TO=$AG4_INSTALL/"test"
-MAX=10
-
-cd $TO
-if [ "$DIR" = "ALL" ]; then
-# loop over all detectors if det is not specified
- for DIR in `ls`; do
- if [ -d $DIR ] ; then
- cd $TO/$DIR
- VER="d"
- until [ "$VER" = "$MAX" ] ; do
- if [ -f "v"$VER"_test"$GEN""$VIS".in" ] ; then
- echo "test_run_in.sh $DIR v$VER test$GEN$VIS"
- test_run_in.sh $DIR -d $VER -g $GEN -v $VIS
- fi
- if [ "$VER" = "d" ]; then
- VER=0
- else
- let VER=$VER+1
- fi
- done
- cd $TO
- fi
- done
-else
-
-# loop over all structures
- if [ "$DIR" = "STRUCT" ]; then
- cd $TO/$DIR
- for MODULE in `ls`; do
- VER="d"
- until [ "$VER" = "$MAX" ] ; do
- if [ -f $MODULE/"v"$VER"_test"$GEN""$VIS".in" ]; then
- echo "test_run_struct.sh $MODULE v$VER test$GEN$VIS"
- test_run_struct.sh $MODULE -d $VER -g $GEN -v $VIS
- fi
- if [ "$VER" = "d" ]; then
- VER=0
- else
- let VER=$VER+1
- fi
- done
- done
- else
-
-# run for specified detector only
- if [ -d $DIR ] ; then
- cd $TO/$DIR
- VER=0
- until [ "$VER" = "$MAX" ] ; do
- if [ -f "v"$VER"_test"$GEN""$VIS".in" ] ; then
- echo "test_run_in.sh $DIR v$VER test$GEN$VIS"
- test_run_in.sh $DIR -d $VER -g $GEN -v $VIS
- fi
- let VER=$VER+1
- done
- cd $TO
- fi
- fi
-fi
-
-cd $CURDIR
+++ /dev/null
-#!/bin/sh
-# $Id$
-# ----------------------------------------------------------------
-# This script runs the specified (or default) test macro
-# for a specified detector and its version number
-# in macro/DDD/test
-#
-# Usage:
-# test_run_in.sh detName [-d detVersionNumber] [-g genNumber] [-v visNumber]
-#
-# 5.11.99, I.Hrivnacova
-
-# check input parameters
-if [ $# -lt 1 ]; then
- echo "Usage: "
- echo "test_run_in.sh detName [-d detVersionNumber] [-g genNumber] [-v visNumber]"
- exit
-fi
-
-# default parameters
-DIR=$1
-VER="0"
-GEN="1"
-VIS="0"
-
-# get input parameters
-for param in $*
-do
- case $param in
- -d) VER=$3; shift 2;;
- -g) GEN=$3; shift 2;;
- -v) VIS=$3; shift 2;;
- esac
-done
-
-CURDIR=`pwd`
-TO=$AG4_INSTALL/"test"
-
-# go to detector test directory
-cd $TO/$DIR
-
-# remove old output files if exist
-if [ -f "v"$VER"_test"$GEN""$VIS".out" ]; then
- rm "v"$VER"_test"$GEN""$VIS".out"
-fi
-if [ -f "v"$VER"_test"$GEN""$VIS".err" ]; then
- rm "v"$VER"_test"$GEN""$VIS".err"
-fi
-
-# run aligeant4
-aligeant4 "v"$VER"_test"$GEN""$VIS".in" > "v"$VER"_test"$GEN""$VIS".out" 2> "v"$VER"_test"$GEN""$VIS".err"
-
-# check if aligeant4 ran successfully
-if [ $? -ne 0 ]; then
- echo " !!! ERROR: Test v"$VER"_test"$GEN""$VIS" in "$DIR
-fi
-# rename galice.root
-if [ -f galice.root ]; then
- mv galice.root "v"$VER"_test"$GEN""$VIS".root"
-fi
-# rename gif lego plots if they were created
-if [ -f gcm2.gif ]; then
- mv gcm2.gif "v"$VER"_gcm2.gif"
-fi
-if [ -f etar.gif ]; then
- mv etar.gif "v"$VER"_etar.gif"
-fi
-if [ -f radl.gif ]; then
- mv radl.gif "v"$VER"_radl.gif"
-fi
-if [ -f abso.gif ]; then
- mv abso.gif "v"$VER"_abso.gif"
-fi
-# rename g4.prim if it was created
-if [ -f g4.prim ]; then
- mv g4.prim "v"$VER"_test"$GEN""$VIS".prim"
-fi
-
-cd $CURDIR
+++ /dev/null
-#!/bin/sh
-# $Id$
-# ----------------------------------------------------------------
-# This script runs the specified (or default) test macro
-# for a specified STRUCT module and its version number
-# in aliroot/STRUCT/test/MODULE
-#
-# Usage:
-# test_run_struct.sh modName [-d detVersionNumber] [-g genNumber] [-v visNumber]
-#
-# 5.11.99, I.Hrivnacova
-
-# check input parameters
-if [ $# -lt 1 ]; then
- echo "Usage: "
- echo "test_run_struct.sh modName [-d detVersionNumber] [-g genNumber] [-v visNumber]"
- exit
-fi
-
-# default parameters
-MOD=$1
-VER="0"
-GEN="1"
-VIS="0"
-
-# get input parameters
-for param in $*
-do
- case $param in
- -d) VER=$3; shift 2;;
- -g) GEN=$3; shift 2;;
- -v) VIS=$3; shift 2;;
- esac
-done
-
-CURDIR=`pwd`
-TO=$AG4_INSTALL/"test"
-
-# go to detector test directory
-cd $TO/STRUCT/$MOD
-
-# remove old output files if exist
-if [ -f "v"$VER"_test"$GEN""$VIS".out" ]; then
- rm "v"$VER"_test"$GEN""$VIS".out"
-fi
-if [ -f "v"$VER"_test"$GEN""$VIS".err" ]; then
- rm "v"$VER"_test"$GEN""$VIS".err"
-fi
-
-# run aligeant4
-aligeant4 "v"$VER"_test"$GEN""$VIS".in" > "v"$VER"_test"$GEN""$VIS".out" 2> "v"$VER"_test"$GEN""$VIS".err"
-
-# check if aligeant4 ran successfully
-if [ $? -ne 0 ]; then
- echo " !!! ERROR: Test v"$VER"_test"$GEN""$VIS" in "$MOD
-fi
-# rename g4.prim if it was created
-if [ -f g4.prim ]; then
- mv g4.prim "v"$VER"_test"$GEN""$VIS".prim"
-fi
-# rename gif lego plots if they were created
-if [ -f gcm2.gif ]; then
- mv gcm2.gif "v"$VER"_gcm2.gif"
-fi
-if [ -f etar.gif ]; then
- mv etar.gif "v"$VER"_etar.gif"
-fi
-if [ -f radl.gif ]; then
- mv radl.gif "v"$VER"_radl.gif"
-fi
-if [ -f abso.gif ]; then
- mv abso.gif "v"$VER"_abso.gif"
-fi
-# rename g4.prim if it was created
-if [ -f g4.prim ]; then
- mv g4.prim "v"$VER"_test"$GEN""$VIS".prim"
-fi
-
-cd $CURDIR
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!ENTITY % DTD_constraint 'DTD_version ( v6 ) #REQUIRED'>
-
-<!-- +++++++++++++++++++++++++++++++++++++++++++++++++
-
- Variable management
-
- +++++++++++++++++++++++++++++++++++++++++++++++++ -->
-
-<!ENTITY % vars '( var* | array* | table* )'>
-
-<!ELEMENT var EMPTY>
-<!ATTLIST var
- name CDATA #REQUIRED
- value CDATA #REQUIRED>
-
-<!ELEMENT array EMPTY>
-<!ATTLIST array
- name CDATA #REQUIRED
- values CDATA #REQUIRED>
-
-<!ELEMENT table ( row )* >
-<!ATTLIST table
- name CDATA #REQUIRED>
-
-<!ELEMENT row EMPTY>
-<!ATTLIST row
- values CDATA #REQUIRED>
-
-
-<!-- +++++++++++++++++++++++++++++++++++++++++++++++++
-
- Units
-
- +++++++++++++++++++++++++++++++++++++++++++++++++ -->
-
-
-
-<!ENTITY % units 'unit_length ( mm | cm | m ) "mm"
- unit_angle ( deg | degree | radian | mrad ) "deg"'>
-
-
-
-<!-- +++++++++++++++++++++++++++++++++++++++++++++++++
-
- Parameter management
-
- +++++++++++++++++++++++++++++++++++++++++++++++++ -->
-
-<!ENTITY % single_parameters '( real* | string* | reference* )'>
-<!ENTITY % multiple_parameters '( real_array* | string_vector* | reference_vector* )'>
-
-<!ENTITY % parameter_properties 'name CDATA #IMPLIED
- comment CDATA #IMPLIED'>
-
-<!ELEMENT real EMPTY>
-<!ATTLIST real
- %parameter_properties;
- value CDATA #REQUIRED
- unit ( m | cm | mm |
- degree | radian | mrad |
- percent | none ) #REQUIRED>
-
-<!ELEMENT string EMPTY>
-<!ATTLIST string
- %parameter_properties;
- value CDATA #REQUIRED>
-
-<!ELEMENT reference EMPTY>
-<!ATTLIST reference
- %parameter_properties;
- value IDREF #REQUIRED>
-
-
-<!ELEMENT real_array EMPTY >
-<!ATTLIST real_array
- %parameter_properties;
- values CDATA #REQUIRED
- unit ( m | cm | mm |
- degree | radian | mrad |
- percent | none ) #REQUIRED>
-
-<!ELEMENT string_data EMPTY>
-<!ATTLIST string_data
- value CDATA #REQUIRED>
-
-<!ELEMENT string_vector ( string_data )+ >
-<!ATTLIST string_vector
- %parameter_properties;>
-
-<!ELEMENT reference_data EMPTY>
-<!ATTLIST reference_data
- value IDREF #REQUIRED>
-
-<!ELEMENT reference_vector ( reference_data )+ >
-<!ATTLIST reference_vector
- %parameter_properties;>
-
-<!-- Xerces
--->
-<!ENTITY % single_parameter 'real | string | reference'>
-<!ENTITY % multiple_parameter 'real_array | string_vector | reference_vector'>
-<!ENTITY % parameters_contents '(%single_parameter; | %multiple_parameter;)*' >
-
-<!-- Together
-<!ENTITY % parameters_contents '%single_parameters; | %multiple_parameters;' >
--->
-
-<!ELEMENT parameters ( %parameters_contents; ) >
-
-<!ATTLIST parameters
- name ID #REQUIRED
- type CDATA #REQUIRED>
-
-
-
-
-<!-- +++++++++++++++++++++++++++++++++++++++++++++++++
-
- Identifiers
-
- +++++++++++++++++++++++++++++++++++++++++++++++++ -->
-
-
-
-
-<!ELEMENT identifier EMPTY>
-
-<!ATTLIST identifier field CDATA #REQUIRED
- value CDATA "0"
- step CDATA "0">
-
-
-<!-- +++++++++++++++++++++++++++++++++++++++++++++++++
-
- Positioners
-
- Single
- Multiple
- Relative
-
- +++++++++++++++++++++++++++++++++++++++++++++++++ -->
-
-<!-- AliDD: rot, transform -->
-<!ENTITY % single_positions '( posXYZ* | posRPhiZ* | rot* | transform* )'>
-<!ENTITY % multiple_positions '( mposR* | mposPhi* | mposWedge* | mposX* | mposY* | mposZ* )'>
-<!ENTITY % relative_positions '( axisPos* | axisMPos* )'>
-<!ENTITY % positions '( %single_positions; | %multiple_positions; )'>
-
-
-<!ELEMENT volume EMPTY>
-<!ATTLIST volume name IDREF #REQUIRED>
-
-<!-- Xerces
--->
-<!ENTITY % any_var 'var | array | table'>
-<!ENTITY % position_items '(volume | identifier | %any_var;)*'>
-
-<!-- Together
-<!ENTITY % position_items '( volume* | identifier* | %vars; )'>
--->
-
-<!ENTITY % position_contents '%position_items;'>
-<!ENTITY % position_properties 'rot CDATA "0; 0; 0"
- S CDATA "0"
- %units; '>
-<!--
- Single positioners
--->
-<!ENTITY % single_position_contents '%position_contents;' >
-
-<!ELEMENT posXYZ ( %single_position_contents; ) >
-<!ATTLIST posXYZ
- X_Y_Z CDATA "0; 0; 0"
- %position_properties;>
-
-<!ELEMENT posRPhiZ ( %single_position_contents; ) >
-<!ATTLIST posRPhiZ
- R_Phi_Z CDATA "0; 0; 0"
- impliedRot (true | false) "true"
- %position_properties;>
-
-<!-- AliDD -->
-<!ELEMENT rot (%single_position_contents; ) >
-<!ATTLIST rot
- matrix CDATA "1; 0; 0; 0; 1; 0; 0; 0; 1"
- impliedRot (true | false) "true"
- %position_properties; >
-
-<!-- AliDD -->
-<!ELEMENT transform ( %single_position_contents; ) >
-<!ATTLIST transform
- matrix CDATA "1; 0; 0; 0; 1; 0; 0; 0; 1"
- pos CDATA "0; 0; 0"
- impliedRot (true | false) "true"
- %position_properties; >
-
-<!--
- Multiple positioners
--->
-
-<!ENTITY % multiple_position_properties '%position_properties;'>
-
-<!ENTITY % multiple_position_contents '%position_contents;' >
-
-
-<!ELEMENT mposR ( %multiple_position_contents; ) >
-<!ATTLIST mposR
- ncopy CDATA #REQUIRED
- R0 CDATA "0"
- dR CDATA #REQUIRED
- Z_Phi CDATA "0; 0"
- %multiple_position_properties;>
-
-<!ELEMENT mposPhi ( %multiple_position_contents; ) >
-<!ATTLIST mposPhi
- ncopy CDATA #REQUIRED
- Phi0 CDATA "0"
- dPhi CDATA #IMPLIED
- R_Z CDATA "0; 0"
- impliedRot (true | false) "true"
- %multiple_position_properties;>
-
-<!ELEMENT mposWedge ( %multiple_position_contents; ) >
-<!ATTLIST mposWedge
- wedge_number CDATA #REQUIRED
- R_Z CDATA "0; 0"
- Phi0 CDATA "0"
- sectors CDATA #REQUIRED
- impliedRot (true | false) "true"
- %multiple_position_properties;> <!ELEMENT mposX ( %multiple_position_contents; ) >
-<!ATTLIST mposX
- ncopy CDATA #REQUIRED
- X0 CDATA "0"
- dX CDATA #REQUIRED
- Y_Z CDATA "0; 0"
- %multiple_position_properties;>
-
-<!ELEMENT mposY ( %multiple_position_contents; ) >
-<!ATTLIST mposY
- ncopy CDATA #REQUIRED
- Y0 CDATA "0"
- dY CDATA #REQUIRED
- Z_X CDATA "0; 0"
- %multiple_position_properties;>
-
-<!ELEMENT mposZ ( %multiple_position_contents; ) >
-<!ATTLIST mposZ
- ncopy CDATA #REQUIRED
- Z0 CDATA "0"
- dZ CDATA #REQUIRED
- R_Phi CDATA "0; 0"
- X_Y CDATA "0; 0"
- %multiple_position_properties;>
-
-
-
-<!--
- Relative positioners
--->
-
-
-<!ENTITY % relative_position_properties 'dX CDATA "0"
- dY CDATA "0"
- dZ CDATA "0"
- rotation CDATA "0"
- %units; '>
-
-<!ENTITY % relative_position_contents '%position_contents;' >
-
-<!ELEMENT axisPos ( %relative_position_contents; ) >
-<!ATTLIST axisPos
- shift CDATA "0"
- %relative_position_properties;>
-<!ELEMENT axisMPos ( %relative_position_contents; ) >
-<!ATTLIST axisMPos
- ncopy CDATA #REQUIRED
- shift0 CDATA "0"
- shift CDATA "0"
- %relative_position_properties;>
-<!-- +++++++++++++++++++++++++++++++++++++++++++++++++
-
- Volumes
-
- Solids
- Composition
- Stacks
- Boolean volumes
-
- +++++++++++++++++++++++++++++++++++++++++++++++++ -->
-
-<!-- AliDD: para, trap, phedra -->
-<!ENTITY % solids '( box* | para* | trap* | phedra* | trd* | tubs* | cons* | pcon* )'>
-<!ENTITY % stacks '( stackX* | stackY* | stackZ* )'>
-<!ENTITY % booleans '( union* | intersection* | subtraction* )'>
-
-<!ENTITY % volume_properties 'name ID #REQUIRED
- parameters IDREF #IMPLIED'>
-
-<!ENTITY % solid_properties '%volume_properties;
- material CDATA #REQUIRED
- sensitive ( true | false ) "false"'>
-
-<!ELEMENT box EMPTY >
-<!ATTLIST box
- X_Y_Z CDATA #REQUIRED
- %solid_properties;
- %units;>
-
-<!-- AliDD -->
-<!ELEMENT para EMPTY >
-<!ATTLIST para
- X_Y_Z CDATA #REQUIRED
- alpha CDATA "0"
- theta CDATA "0"
- phi CDATA "0"
- %solid_properties;
- %units;>
-
-<!-- AliDD -->
-<!ELEMENT trap EMPTY >
-<!ATTLIST trap
- Xmumdpupd_Ymp_Z CDATA #REQUIRED
- inclination CDATA "0; 0"
- declination CDATA "0; 0"
- %solid_properties;
- %units;>
-
-<!-- AliDD -->
-<!ELEMENT phedra EMPTY>
-<!ATTLIST phedra
- sides CDATA #REQUIRED
- Ris CDATA #REQUIRED
- Ros CDATA #REQUIRED
- Zs CDATA #REQUIRED
- profile CDATA "0; 360"
- %solid_properties;
- %units;>
-
-<!ELEMENT trd EMPTY >
-<!ATTLIST trd
- Xmp_Ymp_Z CDATA #REQUIRED
- inclination CDATA "0; 0"
- %solid_properties;
- %units;>
-
-<!ELEMENT tubs EMPTY >
-<!ATTLIST tubs
- Rio_Z CDATA #REQUIRED
- profile CDATA "0; 360"
- %solid_properties;
- %units;>
-
-<!ELEMENT cons EMPTY >
-<!ATTLIST cons
- Rio1_Rio2_Z CDATA #REQUIRED
- profile CDATA "0; 360"
- %solid_properties;
- %units;>
-
-<!ELEMENT pcon (polyplane+)>
-<!ATTLIST pcon
- profile CDATA "0; 360"
- %solid_properties;
- %units;>
-
-<!ELEMENT polyplane EMPTY >
-<!ATTLIST polyplane
- Rio_Z CDATA #REQUIRED>
-
-
-<!-- Xerces
--->
-<!-- AliDD: rot, transform -->
-<!ENTITY % any_single_position 'posXYZ | posRPhiZ | rot | transform'>
-<!ENTITY % any_multiple_position 'mposR | mposPhi | mposWedge | mposX | mposY | mposZ'>
-<!ENTITY % any_relative_position 'axisPos | axisMPos'>
-<!ENTITY % any_position '%any_single_position; | %any_multiple_position;'>
-<!ENTITY % foreach_items '(%any_var; | foreach | %any_position;)+'>
-
-<!-- Together
-<!ENTITY % foreaches '( foreach* )'>
-<!ENTITY % foreach_items '( %vars; | %foreaches; | %positions; )'>
--->
-
-<!ENTITY % foreach_contents '( %foreach_items; )'>
-
-<!ELEMENT foreach ( %foreach_contents; ) >
-<!ATTLIST foreach
- index CDATA #REQUIRED
- loops CDATA #REQUIRED
- begin CDATA "0"
- step CDATA "1"
- when CDATA "1">
-
-
-<!-- Xerces
--->
-<!ENTITY % composition_contents '(%any_var; | foreach | %any_position;)+'>
-
-<!-- Together
-<!ENTITY % composition_contents '( %vars; | %foreaches; | %positions; )'>
--->
-
-<!ELEMENT composition ( %composition_contents; ) >
-<!ATTLIST composition
- envelope IDREF #IMPLIED
- %volume_properties;>
-
-
-<!-- Xerces
--->
-<!ENTITY % stack_contents '(axisPos | axisMPos)+ '>
-
-<!-- Together
-<!ENTITY % stack_contents '%relative_positions;'>
--->
-
-<!ELEMENT stackX ( %stack_contents; ) >
-<!ATTLIST stackX
- origin (atStart) "atStart"
- %volume_properties;>
-
-<!ELEMENT stackY ( %stack_contents; ) >
-<!ATTLIST stackY
- origin (atStart) "atStart"
- %volume_properties;>
-
-<!ELEMENT stackZ ( %stack_contents; ) >
-<!ATTLIST stackZ
- origin (atStart) "atStart"
- %volume_properties;>
-
-<!-- Xerces
--->
-<!ENTITY % boolean_contents '( %any_single_position; )+'>
-
-<!-- Together
-<!ENTITY % boolean_contents '%single_positions;'>
--->
-
-<!ELEMENT union ( %boolean_contents; ) >
-<!ATTLIST union
- %volume_properties;>
-
-<!ELEMENT intersection ( %boolean_contents; ) >
-<!ATTLIST intersection
- %volume_properties;>
-
-<!ELEMENT subtraction ( %boolean_contents; ) >
-<!ATTLIST subtraction
- %volume_properties;>
-
-
-
-<!-- +++++++++++++++++++++++++++++++++++++++++++++++++
-
- Compact
-
- +++++++++++++++++++++++++++++++++++++++++++++++++
-
-<!ENTITY % indet_elements 'dummy_indet'>
-<!ENTITY % larg_elements 'dummy_larg'>
-<!ENTITY % tile_elements 'dummy_tile'>
-<!ENTITY % muon_elements 'dummy_muon'>
-
-<!ELEMENT compact ( %indet_elements; |
- %larg_elements; |
- %tile_elements; |
- %muon_elements; ) >
-
-<!ATTLIST compact
- %volume_properties;
- envelope IDREF #IMPLIED>
--->
-
-<!-- +++++++++++++++++++++++++++++++++++++++++++++++++
-
- Section
-
- +++++++++++++++++++++++++++++++++++++++++++++++++ -->
-
-<!-- Xerces
--->
-
-<!-- AliDD: para, trap, phedra -->
-<!ENTITY % any_solid 'box | para | trap | phedra | trd | tubs | cons | pcon'>
-<!ENTITY % any_stack 'stackX | stackY | stackZ'>
-<!ENTITY % any_boolean 'union | intersection | subtraction'>
-<!ENTITY % any_volume '%any_solid; | %any_stack; | %any_boolean; | composition'>
-<!ENTITY % section_contents '(%any_volume; | parameters | %any_var;)*'>
-
-<!-- Together
-<!ENTITY % parameters_s '( parameters* )'>
-<!ENTITY % compositions '( composition* )'>
-
-<!ENTITY % volumes '( %solids; | %stacks; | %booleans; | composition* )'>
-<!ENTITY % section_contents '( %volumes; | parameters* | %vars; )'>
--->
-
-<!ELEMENT section ( %section_contents; ) >
-<!ATTLIST section
- name CDATA #REQUIRED
- version CDATA #REQUIRED
- date CDATA #REQUIRED
- author CDATA #REQUIRED
- top_volume IDREF #REQUIRED
- %DTD_constraint;>
-
-
-
-<!-- +++++++++++++++++++++++++++++++++++++++++++++++++
-
- AGDD
-
- +++++++++++++++++++++++++++++++++++++++++++++++++ -->
-
-
-
-
-<!--
-<!ENTITY % AGDD_item 'section'>
-<!ENTITY % AGDD_contents '%AGDD_item;*'>
--->
-
-<!ENTITY % AGDD_contents 'section*'>
-
-<!ELEMENT AGDD ( %AGDD_contents; ) >
-<!ATTLIST AGDD
- %DTD_constraint;>
-
-
-
-
-
-
+++ /dev/null
-<?xml version="1.0"?>
-<!DOCTYPE AGDD SYSTEM "AGDD.dtd" [
-
-<!-- Include files
- *************************************************
--->
- <!-- +++ Define the XML include files +++ -->
- <!-- uncomment a line with the detector that shall be included;
- !! in case more than one module are included
- the top volumes in modules files has to be renamed
- manually !! -->
-
- <!-- structures -->
- <!-- ENTITY Module SYSTEM "ABSOv0.xml" -->
- <!-- ENTITY Module SYSTEM "DIPOv1.xml" -->
- <!-- ENTITY Module SYSTEM "DIPOv2.xml" -->
- <!-- ENTITY Module SYSTEM "FRAMEv0.xml" -->
- <!-- ENTITY Module SYSTEM "FRAMEv1.xml" -->
- <!ENTITY Module SYSTEM "HALLv0.xml" >
- <!-- ENTITY Module SYSTEM "PIPEv0.xml" -->
- <!-- ENTITY Module SYSTEM "PIPEv1.xml" -->
- <!-- ENTITY Module SYSTEM "PIPEv3.xml" -->
- <!-- ENTITY Module SYSTEM "SHILv0.xml" -->
-
- <!-- detectors -->
- <!-- ENTITY Module SYSTEM "FMDv0.xml" -->
- <!-- ENTITY Module SYSTEM "FMDv1.xml" -->
- <!-- ENTITY Module SYSTEM "PHOSv0.xml" -->
- <!-- ENTITY Module SYSTEM "PHOSv1.xml" -->
- <!-- ENTITY Module SYSTEM "PHOSv2.xml" -->
- <!-- ENTITY Module SYSTEM "PHOSv3.xml" -->
- <!-- ENTITY Module SYSTEM "PHOSv4.xml" -->
- <!-- ENTITY Module SYSTEM "PMDv0.xml" -->
- <!-- ENTITY Module SYSTEM "PMDv1.xml" -->
- <!-- ENTITY Module SYSTEM "PMDv2.xml" -->
- <!-- ENTITY Module SYSTEM "RICHv0.xml" -->
- <!-- ENTITY Module SYSTEM "RICHv1.xml" -->
- <!-- ENTITY Module SYSTEM "RICHv2.xml" -->
- <!-- ENTITY Module SYSTEM "STARTv0.xml" -->
- <!-- ENTITY Module SYSTEM "TOFv0.xml" -->
- <!-- ENTITY Module SYSTEM "TOFv1.xml" -->
- <!-- ENTITY Module SYSTEM "TOFv2.xml" -->
- <!-- ENTITY Module SYSTEM "TOFv3.xml" -->
- <!-- ENTITY Module SYSTEM "TOFv4.xml" -->
- <!-- ENTITY Module SYSTEM "TPCv0.xml" -->
- <!-- ENTITY Module SYSTEM "TPCv1.xml" -->
- <!-- ENTITY Module SYSTEM "TPCv2.xml" -->
- <!-- ENTITY Module SYSTEM "TPCv3.xml" -->
- <!-- ENTITY Module SYSTEM "TRDv0.xml" -->
- <!-- ENTITY Module SYSTEM "TRDv1.xml" -->
- <!-- ENTITY Module SYSTEM "ZDCv1.xml" -->
-
-]>
-
-<AGDD>
-
-<!-- Include files -->
- &Module;
-<!-- End of include -->
-
-<section DTD_version = "v6"
- name = "ALICE"
- version = "1.1"
- date = "5 September 2000"
- author = "Julius Hrivnac"
- top_volume = "ALICE">
-
-<composition name="ALICE">
- <posXYZ volume="ALIC_comp" X_Y_Z=" 0; 0; 0" />
-</composition>
-
-</section>
-
-</AGDD>
+++ /dev/null
-<HTML>
-
-<HEAD>
-<TITLE>ALICE G4 Simulation - Code </TITLE></HEAD>
-
-<BODY bgcolor=#FFFFFF>
-
-<!-- Header material -->
-<hr>
-<table border=0 cellpadding=5 cellspacing=0 width="100%">
- <tr bgcolor=#d0ffd0>
- <td align=left width=30%>
- <img alt="Alice"
- src="http://AliSoft.cern.ch/offline/geant4/gif/AliceLogo.gif"
- width="60" height="60" align="absmiddle" border=1>
- <td align=center width=40%>
- ALICE Geant4 Simulation <br>
- <font size="+2">
- Code
- </font>
- <td align=right width=30% valign=bottom>
- <font size="-1">
- <script language="JavaScript">
- document.write("Last modified "+ document.lastModified)
- // end of script -->
- </script></font>
- </TD>
- </TR>
-</TABLE>
-<HR>
-
-<UL>
-
-<LI><STRONG>ALICE Geant4 specific classes (AliGeant4):</STRONG>
- <UL>
- <LI><A HREF="CodePrototype/AliGeant4_globalCategory.html">global</A>
- <LI><A HREF="CodePrototype/AliGeant4_geometryCategory.html">geometry</A>
- <LI><A HREF="CodePrototype/AliGeant4_digitss+hitsCategory.html">digits+hits</A>
- <LI><A HREF="CodePrototype/AliGeant4_eventCategory.html">event</A>
- <LI><A HREF="CodePrototype/AliGeant4_runCategory.html">run</A>
- <LI><A HREF="CodePrototype/AliGeant4_visualizationCategory.html">visualization</A>
- </UL>
- <br>
-
-<LI><STRONG>Geant4 Monte Carlo interface implementation (TGeant4):</STRONG>
- <UL>
- <LI><A HREF="CodePrototype/TGeant4_globalCategory.html">global</A>
- <LI><A HREF="CodePrototype/TGeant4_geometryCategory.html">geometry</A>
- <LI><A HREF="CodePrototype/TGeant4_digits+hitsCategory.html">digits+hits</A>
- <LI><A HREF="CodePrototype/TGeant4_physicsCategory.html">physics</A>
- <LI><A HREF="CodePrototype/TGeant4_eventCategory.html">event</A>
- <LI><A HREF="CodePrototype/TGeant4_runCategory.html">run</A>
- <LI><A HREF="CodePrototype/TGeant4_visualizationCategory.html">visualization</A>
- <LI><A HREF="CodePrototype/TGeant4_interfacesCategory.html">interfaces</A>
- </UL>
- <br>
-
-<LI><STRONG>Other AliRoot categories:</STRONG><br>
- <UL>
- <LI><A HREF="CodePrototype/STEERCategory.html"> STEER </A>
- <LI><A HREF="CodePrototype/CONTAINERSCategory.html"> CONTAINERS </A>
- <LI><A HREF="CodePrototype/EVGENCategory.html"> EVGEN </A>
- <LI><A HREF="CodePrototype/THijingCategory.html"> THijing </A>
- <LI><A HREF="CodePrototype/TGeant3Category.html"> TGeant3 </A>
- <LI><A HREF="CodePrototype/ALIFASTCategory.html"> ALIFAST </A>
- <LI><A HREF="CodePrototype/CASTORCategory.html"> CASTOR </A>
- <LI><A HREF="CodePrototype/FMDCategory.html"> FMD </A>
- <LI><A HREF="CodePrototype/ITSCategory.html"> ITS </A>
- <LI><A HREF="CodePrototype/MUONCategory.html"> MUON </A>
- <LI><A HREF="CodePrototype/PHOSCategory.html"> PHOS </A>
- <LI><A HREF="CodePrototype/PMDCategory.html"> PMD </A>
- <LI><A HREF="CodePrototype/RICHCategory.html"> RICH </A>
- <LI><A HREF="CodePrototype/STARTCategory.html"> START </A>
- <LI><A HREF="CodePrototype/STRUCTCategory.html"> STRUCT </A>
- <LI><A HREF="CodePrototype/TOFCategory.html"> TOF </A>
- <LI><A HREF="CodePrototype/TPCCategory.html"> TPC </A>
- <LI><A HREF="CodePrototype/TRDCategory.html"> TRD </A>
- <LI><A HREF="CodePrototype/ZDCCategory.html"> ZDC </A>
- </UL>
- <br>
-<P><P>
-
-<LI><STRONG>All classes:</STRONG>
- <UL>
- <LI><A HREF="CodePrototype/index.html">alphabetical index</A>
- </UL>
-
-<P><HR><P>
-
-<LI><STRONG>Main programs:</STRONG>
- <UL>
- <LI><A HREF="CodePrototype/aliroot.C.html">aliroot</A>
- <LI><A HREF="CodePrototype/aligeant4.C.html">aligeant4</A>
- </UL>
-
-<P><HR><P>
-
-<LI><STRONG>Configuration files:</STRONG>
- <UL>
- <LI><A HREF="CodePrototype/setup.sh">setup.sh</A>
- <LI><A HREF="CodePrototype/setup.csh">setup.csh</A>
- </UL>
-
-</UL>
-
-<P><HR SIZE=5><P>
-
-<ADDRESS>
-Created on
- <script language="JavaScript">
- document.write(document.lastModified)
- // end of script -->
- </script>
-by <B>Ivana Hrivnacova</B> <BR>
-using the HTML generator
-<A HREF="http://wwwcn1.cern.ch/~binko/Ddl2Html/Ddl2Html.html">Ddl2Html description</A>
- (the source <A HREF="http://wwwcn1.cern.ch/~binko/Ddl2Html/Ddl2Html.code">Perl5 code</A>)
-</ADDRESS>
-
-<br>
-Back to:
-<A HREF="Main.html">
-ALICE G4 Simulation home, </A>
-</BODY bgcolor=#FFFFFF >
-
-</HTML>
+++ /dev/null
-<HTML>
-
-<HEAD>
-<TITLE>ALICE G4 Simulation - Geant4 Code</TITLE></HEAD>
-
-<BODY bgcolor=#FFFFFF>
-
-<!-- Header material -->
-<hr>
-<table border=0 cellpadding=5 cellspacing=0 width="100%">
- <tr bgcolor=#d0ffd0>
- <td align=left width=30%>
- <img alt="Alice"
- src="http://AliSoft.cern.ch/offline/geant4/gif/AliceLogo.gif"
- width="60" height="60" align="absmiddle" border=1>
- <td align=center width=40%>
- ALICE Geant4 Simulation <br>
- <font size="+2">
- Geant4 Code
- </font>
- <td align=right width=30% valign=bottom>
- <font size="-1">
- <script language="JavaScript">
- document.write("Last modified "+ document.lastModified)
- // end of script -->
- </script></font>
- </TD>
- </TR>
-</TABLE>
-<HR>
-
-<P>
-Geant4 categories and sub-categories (in one level only):
-</p>
-
-<UL>
-<LI><STRONG>digits+hits</STRONG>
- <UL>
- <LI><A HREF="G4CodePrototype/digits+hits_detectorCategory.html">detector</A>
- <LI><A HREF="G4CodePrototype/digits+hits_digitsCategory.html">digits</A>
- <LI><A HREF="G4CodePrototype/digits+hits_hitsCategory.html">hits</A>
- </UL>
- <br>
-<LI><STRONG>event</STRONG>
- <UL>
- <LI><A HREF="G4CodePrototype/event_Category.html">event</A>
- </UL>
- <br>
-<LI><STRONG>geometry</STRONG>
- <UL>
- <LI><A HREF="G4CodePrototype/geometry_benchmarksCategory.html">benchmarks</A>
- <LI><A HREF="G4CodePrototype/geometry_magneticfieldCategory.html">magneticfield</A>
- <LI><A HREF="G4CodePrototype/geometry_managementCategory.html">management</A>
- <LI><A HREF="G4CodePrototype/geometry_solidsCategory.html">solids</A>
- <LI><A HREF="G4CodePrototype/geometry_volumesCategory.html">volumes</A>
- </UL>
- <br>
-<LI><STRONG>global</STRONG>
- <UL>
- <LI><A HREF="G4CodePrototype/global_HEPGeometryCategory.html">HEPGeometry</A>
- <LI><A HREF="G4CodePrototype/global_HEPNumericsCategory.html">HEPNumerics</A>
- <LI><A HREF="G4CodePrototype/global_HEPRandomCategory.html">HEPRandom</A>
- <LI><A HREF="G4CodePrototype/global_STLInterfaceCategory.html">STLInterface</A>
- <LI><A HREF="G4CodePrototype/global_managementCategory.html">management</A>
- </UL>
- <br>
-<LI><STRONG>graphics_reps</STRONG>
- <UL>
- <LI><A HREF="G4CodePrototype/graphics_reps_Category.html">graphics_reps</A>
- </UL>
- <br>
-<LI><STRONG>intercoms</STRONG>
- <UL>
- <LI><A HREF="G4CodePrototype/intercoms_Category.html">intercoms</A>
- </UL>
- <br>
-<LI><STRONG>interfaces</STRONG>
- <UL>
- <LI><A HREF="G4CodePrototype/interfaces_GAGCategory.html">GAG</A>
- <LI><A HREF="G4CodePrototype/interfaces_OPACSCategory.html">OPACS</A>
- <LI><A HREF="G4CodePrototype/interfaces_XVTCategory.html">XVTCategory</A>
- <LI><A HREF="G4CodePrototype/interfaces_basicCategory.html">basic</A>
- <LI><A HREF="G4CodePrototype/interfaces_commonCategory.html">common</A>
- </UL>
- <br>
-<LI><STRONG>materials</STRONG>
- <UL>
- <LI><A HREF="G4CodePrototype/materials_Category.html">materials</A>
- </UL>
- <br>
-<LI><STRONG>messengers</STRONG>
- <UL>
- <LI><A HREF="G4CodePrototype/intercoms_Category.html">intercoms</A>
- </UL>
- <br>
-<LI><STRONG>particles</STRONG>
- <UL>
- <LI><A HREF="G4CodePrototype/particles_bosonsCategory.html">bosons</A>
- <LI><A HREF="G4CodePrototype/particles_hadronsCategory.html">hadrons</A>
- <LI><A HREF="G4CodePrototype/particles_leptonsCategory.html">leptons</A>
- <LI><A HREF="G4CodePrototype/particles_managementCategory.html">management</A>
- <LI><A HREF="G4CodePrototype/particles_shortlivedCategory.html">shortlived</A>
- </UL>
- <br>
-<LI><STRONG>processes</STRONG>
- <UL>
- <LI><A HREF="G4CodePrototype/processes_decayCategory.html">processes_decay</A>
- <LI><A HREF="G4CodePrototype/processes_electromagneticCategory.html">processes_electromagnetic</A>
- <LI><A HREF="G4CodePrototype/processes_hadronicCategory.html">processes_hadronic</A>
- <LI><A HREF="G4CodePrototype/processes_managementCategory.html">processes_management</A>
- <LI><A HREF="G4CodePrototype/processes_opticalCategory.html">processes_optical</A>
- <LI><A HREF="G4CodePrototype/processes_parameterisationCategory.html">processes_parameterisation</A>
- <LI><A HREF="G4CodePrototype/processes_photolepton_hadronCategory.html">processes_photolepton_hadron</A>
- <LI><A HREF="G4CodePrototype/processes_transportationCategory.html">processes_transportation</A>
- </UL>
- <br>
-<LI><STRONG>readout</STRONG>
- <UL>
- <LI><A HREF="G4CodePrototype/readout_Category.html">readout</A>
- </UL>
- <br>
-<LI><STRONG>run</STRONG>
- <UL>
- <LI><A HREF="G4CodePrototype/run_Category.html">run</A>
- </UL>
- <br>
-<LI><STRONG>track</STRONG>
- <UL>
- <LI><A HREF="G4CodePrototype/track_Category.html">track</A>
- </UL>
- <br>
-<LI><STRONG>tracking</STRONG>
- <UL>
- <LI><A HREF="G4CodePrototype/tracking_Category.html">tracking</A>
- </UL>
- <br>
-<LI><STRONG>visualization</STRONG>
- <UL>
- <LI><A HREF="G4CodePrototype/visualization_FukuiRendererCategory.html">FukuiRenderer</A>
- <LI><A HREF="G4CodePrototype/visualization_OpenGLCategory.html">OpenGL</A>
- <LI><A HREF="G4CodePrototype/visualization_OpenInventor.html">OpenInventor</A>
- <LI><A HREF="G4CodePrototype/visualization_OPACSCategory.html">OPACS</A>
- <LI><A HREF="G4CodePrototype/visualization_VRMLCategory.html">VRML</A>
- <LI><A HREF="G4CodePrototype/visualization_managementCategory.html">management</A>
- <LI><A HREF="G4CodePrototype/visualization_modelingCategory.html">modeling</A>
- </UL>
- <br>
-<LI><STRONG>g3tog4</STRONG>
- <UL>
- <LI><A HREF="G4CodePrototype/g3tog4_Category.html">g3tog4</A>
- </UL>
- <br>
-<LI><STRONG>persistency</STRONG>
- <UL>
- <LI><A HREF="G4CodePrototype/persistency_digits+hitsCategory.html">digits+hits</A>
- <LI><A HREF="G4CodePrototype/persistency_eventsCategory.html">events</A>
- <LI><A HREF="G4CodePrototype/persistency_geometryCategory.html">geometry</A>
- <LI><A HREF="G4CodePrototype/persistency_globalCategory.html">global</A>
- <LI><A HREF="G4CodePrototype/persistency_managementCategory.html">management</A>
- <LI><A HREF="G4CodePrototype/persistency_runCategory.html">run</A>
- </UL>
- <br>
-</UL>
-
-<P><P>
-
-<STRONG>All classes:</STRONG>
- <UL>
- <LI><A HREF="G4CodePrototype/index.html">alphabetical index</A>
- </UL>
-
-<P><HR><P>
-
-<STRONG>Makefiles and configuration files:</STRONG>
- <UL>
- <LI><A HREF="G4CodePrototype/G4ODBMS_BUILD.gmk">G4ODBMS_BUILD.gmk</A>
- <LI><A HREF="G4CodePrototype/G4UI_BUILD.gmk">G4UI_BUILD.gmk</A>
- <LI><A HREF="G4CodePrototype/G4UI_USE.gmk">G4UI_USE.gmk</A>
- <LI><A HREF="G4CodePrototype/G4VIS_BUILD.gmk">G4VIS_BUILD.gmk</A>
- <LI><A HREF="G4CodePrototype/G4VIS_USE.gmk">G4VIS_USE.gmk</A>
- <LI><A HREF="G4CodePrototype/architecture.gmk">architecture.gmk</A>
- <LI><A HREF="G4CodePrototype/AIX-xlC.gmk">AIX-xlC.gmk</A>
- <LI><A HREF="G4CodePrototype/HP-aCC.gmk">HP-aCC.gmk</A>
- <LI><A HREF="G4CodePrototype/Linux-g++.gmk">Linux-g++.gmk</A>
- <LI><A HREF="G4CodePrototype/SGI-CC.gmk">SGI-CC.gmk</A>
- <LI><A HREF="G4CodePrototype/SUN-CC.gmk">SUN-CC.gmk</A>
- <LI><A HREF="G4CodePrototype/SUN-CC5.gmk">SUN-CC5.gmk</A>
- <LI><A HREF="G4CodePrototype/WIN32-VC.gmk">WIN32-VC.gmk</A>
- <LI><A HREF="G4CodePrototype/binmake.gmk">binmake.gmk</A>
- <LI><A HREF="G4CodePrototype/common.gmk">common.gmk</A>
- <LI><A HREF="G4CodePrototype/globlib.gmk">globlib.gmk</A>
- <LI><A HREF="G4CodePrototype/interactivity.gmk">interactivity.gmk</A>
- </UL>
-
-<P><HR SIZE=5><P>
-
-<ADDRESS>
-Created on Wed Jan 13 1999 by <B>Ivana Hrivnacova</B> <BR>
-using the HTML generator
-<A HREF="http://wwwcn1.cern.ch/~binko/Ddl2Html/Ddl2Html.html">Ddl2Html description</A>
- (the source <A HREF="http://wwwcn1.cern.ch/~binko/Ddl2Html/Ddl2Html.code">Perl5 code</A>)
-</ADDRESS>
-
-<br>
-Back to:
-<A HREF="Main.html">
-ALICE G4 Simulation home, </A>
-</BODY bgcolor=#FFFFFF >
-
-</HTML>
+++ /dev/null
-$Id$
------------------------------------------------------------------
-
-Introduction:
-=============
- In order to run AliRoot with Geant4,
- it is sufficient to install Geant4 VMC and then use macros
- g4Config.C and eventually g4menu.C.
-
- AliGeant4 modude, in addition to that, enables to run AliRoot
- fully from Geant4 UI; it also defines interactive commands
- for selecting detector setup from G4 and interactive particle gun
- for simple tests
- A set of test macros/examples is provided with AliGeant4 package.
-
-
-How to set environment:
-=======================
- See Geant4 VMC README how to set G4 environment
- for both Geant4 and Geant4 VMC.
- AliGeant4 requires to have the path to AliGeant4
- package set in the AG4_INSTALL variable:
-
- export AG4_INSTALL=$ALICE_ROOT/AliGeant4
- setenv AG4_INSTALL ${ALICE_ROOT}/AliGeant4
-
- Default Geant4 setting for AliRoot can be set
- running the old setup.(c)sh script:
-
- . $ALICE_ROOT/AliGeant4/config/oldsetup.sh for zsh users
- source $ALICE_ROOT/AliGeant4/config/oldsetup.csh for tcsh users
-
- The setup script can be added into a user login script.
-
- !!! Always be careful to have the same environment set when building
- all dependent libraries:
- CLHEP, Geant4, Geant4 VirtualMC, AliGeant4
-
-
-How to compile:
-===============
- cd $ALICE_ROOT
- gmake -f Makefile.old geant4
-
- Optionally, using Makefile.flugg instead of standard Makefiles,
- two libraries in each package can be created:
- libXXX_1 - low level library (subcategories global, geometry, visualization);
- libXXX_2 - high level library (subcategories digits+hits, event, run)
- NEED TO BE REVISED WITH MOVE TO VIRTUAL MC
-
-
-How to run:
-===========
- - Add $ALICE_ROOT/AliGeant4/macro path to your Root macro path
- or go to this directory
-
- To run AliRoot with Geant4 VMC:
-
- - Run aliroot with g4Config.C
- - gAlice->Init("g4Config.C");
- gAlice->Run();
-
- - You can also start from a mini GUI - g4menu.C
- - aliroot
- - .x g4menu.C
- --> Select "Init" and then "Run" button
-
- From the menu you can start Geant4 interactive session,
- by button "Geant4UI" and use Geant4 interactive commands;
- in case TGeant4 has not yet been created you have first
- select button "Geant4".
-
- To run AliRoot with Geant4 VMC + AliGeant4:
-
- AliGeant4 enables to run aliroot fully from Geant4 UI;
- it also defines interactive commands for selecting detector
- setup from G4 and interactive particle gun for simple tests
-
- - Run aligeant4 interactively or with Geant4 macros alirunN.in:
- - aligeant4 [alirunN.in]
-
- - You can still stay fully in Root UI and run aliroot with ag4Config.C:
- - gAlice->Init("ag4Config.C");
- gAlice->Run();
-
-Tests:
-======
- Several tests are defined with use of Geant4 macros;
- the following macros are available:
-
- alirun0.in - standard AliRoot run with all detectors and
- AliRoot event generator defined in g4Config.C
- alirun1.in - example of interactive particle gun usage with
- visualization of geometry and trajectories;
- alirun2.in - example of special lego run with calling
- Root macro lego.C from g4 and switching to root UI
- alirun3.in - Geant4 geometry test (all detectors with excluded thos
- using MANY)
- alirun4.in - example for geometry browser usage
-
- To run the tests from aliroot, do:
- aliroot
- .x ag4test.C("alirun0.in");
-
-
-How to go to Geant4 interactive session:
-========================================
- When a user runs aligeant4, he starts immediately
- in Geant4 interactive session.
-
- When a user runs aliroot, the AliRun global object (gAlice)
- is created and then Root interactive session is invoked.
- In order to go to interactive Geant4 a user has to first
- Geant4 VirtualMC and then use its function to invoke interactive
- Geant4.
-
- To do this, do:
- aliroot
- .x g4menu.C -> opens a GUI window
- click on Geant4 -> creates Geant4 VirtualMC
- click on Geant4UI -> switches to interactive Geant4
-
- To go back to Root UI, type exit.
-
- To switch to interactive Geant4 "without clicking", do:
- aliroot
- .x g4libs.C
- .L g4menu.C
- CreateGeant4();
- StartGeant4UI();
-
- To go back to Root UI, type exit.
-
- See also related paragraph in Geant4 VMC/README:
- Root and Geant4 UI
-
-
-Alice Geant4 Commands:
-=======================
- Both Geant4 VMC and AliGeant4 define several commands
- that can be invoked in Geant4 interactive session.
- The documentation for all available commands
- can be generated from Geant4 using G4 command:
- /control/createHTML [dir]
-
- This will generate a set of HTML files in the current
- [or specified] directory. The top file has name .html.
-
- All Geant4 VMC commands start with prefix "mc",
- all AliGeant4 commands start with prefix "ali".
-
-
-Code documentation:
-===================
- doc_alc++2html.pl
- - perl script using Pavel Binko's ddl2html perl script
- (http://wwwinfo.cern.ch/~binko/Ddl2Html/Ddl2Html.code)
- for automatic generating of code documentation in html;
- creates doc/HTML directory containing *.html files for all
- *.hh, *.ddl, *.cc, alice.mk, GNUmakefile*, alice_*.(c)sh
- and *.html index pages according to class categories
- - calls: doc_alddl2html.pl: modified ddl2html
- doc_alsorthtml.pl: generates html pages for class
- categories
- - the main page AG4CodePrototype.html with links to category index
- pages and the alphabetical index page was created manually
- NEED TO BE REVISED WITH MOVE TO VIRTUAL MC
-
-
-Geant4 related files in AliRoot:
-================================
- AliRoot/AliGeant4 - source of AliGeant4 category
-
- AliRoot/AliGeant4/config:
- configuration scripts:
- setup.sh, setup.csh
- script for generating HTML documentation:
- doc_XXc++2html.pl, doc_XXddl2html.pl, doc_XXsorthtml.pl,
- doc_XXcategory.pl where XX = al, g4
- scripts and template files for automatic generation of G4 test
- macros:
- test_create.sh, test_create_in.sh, test_create_struct.sh,
- test_run.sh, test_run_in.sh, test_run_struct.sh,
- test_default_det_novis.in, test_default_det_vis.in
- test_default_genN.in; N = 0,1,2,3
- test_default_visN.in; N = 1
- script for generation source directories with files
- sorted in subdirectories corresponding to subcategories:
- make_source.pl
-
- AliRoot/AliGeant4/doc:
- README - this file
- README.CodingConvention;
- CodePrototype.html, G4CodePrototype.html - main code html pages
- (they are not produced automatically)
- HTML directory is created here by doc_alc++2html.sh script;
- HTML documentation of Geant4 can be created by doc_g4c++2html.pl
-
- AliRoot/AliGeant4/macro:
- G4 macros examples/tests:
- alirunN.in
- Root macros:
- g4libs.C - Root macro for loading G4 libraries
- g4menu.C - primitive GUI for instantiating TGeant4 and
- switching to G4 UI
- g4test.C - root macro for running the alirunN.in
- from aliroot
- g4Config.C - Configuration macro Config.C for G4
- Detector specific root and G4 macros (in detector subdirectories);
-
-
-
+++ /dev/null
-$ Id:$
---------------------------------------------------------------
- Coding Standards
- ================
-
- additional to the ALICE C++ Coding Conventions
-
- 1. Ordering of headers:
- 1. Ali*
- 2. G4*
- 3. other packages (CLHEP, ODBMS, ROOT, ...)
- 4. system (eg. <iostrem.h>)
-
- 2. Use G4 basic type instead of "raw" types:
- G4int, G4double, G4bool, G4String, ...
-
- 3. Inline fuctions:
- When implementation of inline methods is within two lines,
- put it in the header file after the class
- declaration in the header file (*.hh);
- otherwise put it in a separated *.cc file.
-
- 4. Re-declare virtual member functions in a derived class
- with a keyword virtual.
-
- 6. Header file:
- Place each section in the class declarations
- (public, protected, private) in this order:
- // constructors
- // destructor
- // operators
- // static methods
- // methods
- // set methods
- // get methods
- // static data members
- // data members
- Use comment line for all sections except for
- constructors and destructors.
-
- 7. Implementation file:
- declare class definitions in this order:
- // static data members
-&n