#include <TROOT.h>
#include <TRandom3.h>
#include <TSystem.h>
-#include <TVector.h>
#include <TVirtualMC.h>
//
#include "AliDetector.h"
fGeometry(0),
fMCApp(0),
fDisplay(0),
- fTimer(),
fField(0),
fMC(0),
fNdets(0),
fGeometry(0),
fMCApp(0),
fDisplay(0),
- fTimer(),
fField(0),
fMC(0),
fNdets(0),
fGeometry(0),
fMCApp(0),
fDisplay(0),
- fTimer(),
fField(0),
fMC(gMC),
fNdets(0),
//_______________________________________________________________________
void AliRun::SetField(AliMagF* magField)
{
- // Set Magnetic Field Map
- fField = magField;
- fField->ReadField();
+ //
+ // Set Magnetic Field Map
+ //
+ fField = magField;
+ fField->ReadField();
}
//_______________________________________________________________________
AliModule *mod;
while((mod = (AliModule*)next()))
{
+ mod->SetRunLoader(fRunLoader);
AliDetector *det = dynamic_cast<AliDetector*>(mod);
if (det)
{
//_______________________________________________________________________
void AliRun::Field(const Double_t* x, Double_t *b) const
{
- Float_t xfloat[3];
- for (Int_t i=0; i<3; i++) xfloat[i] = x[i];
-
- if (Field()) {
- Float_t bfloat[3];
- Field()->Field(xfloat,bfloat);
- for (Int_t j=0; j<3; j++) b[j] = bfloat[j];
- }
- else {
- printf("No mag field defined!\n");
- b[0]=b[1]=b[2]=0.;
- }
-
+ //
+ // Return the value of the magnetic field
+ //
+ Float_t xfloat[3];
+ for (Int_t i=0; i<3; i++) xfloat[i] = x[i];
+
+ if (Field()) {
+ Float_t bfloat[3];
+ Field()->Field(xfloat,bfloat);
+ for (Int_t j=0; j<3; j++) b[j] = bfloat[j];
+ }
+ else {
+ printf("No mag field defined!\n");
+ b[0]=b[1]=b[2]=0.;
+ }
}
//
void AliRun::SetRunLoader(AliRunLoader* rloader)
{
+ //
+ // Set the loader of the run
+ //
fRunLoader = rloader;
if (fRunLoader == 0x0) return;
while((module = (AliModule*)next()))
{
if (evfold) AliConfig::Instance()->Add(module,evfoldname);
+ module->SetRunLoader(fRunLoader);
AliDetector* detector = dynamic_cast<AliDetector*>(module);
if (detector)
{
void AliRun::AddModule(AliModule* mod)
{
+ //
+ // Add a module to the module list
+ //
if (mod == 0x0) return;
if (strlen(mod->GetName()) == 0) return;
if (GetModuleID(mod->GetName()) >= 0) return;