/*
$Log$
+Revision 1.1 2000/06/09 20:22:58 morsch
+Same class as previously in AliSimpleGen.cxx
+All coding rule violations except RS3 corrected (AM)
+
*/
/*
Float_t random[6];
//
for (j=0;j<3;j++) origin[j]=fOrigin[j];
- if(fVertexSmear==perEvent) {
+ if(fVertexSmear==kPerEvent) {
gMC->Rndm(random,6);
for (j=0;j<3;j++) {
origin[j]+=fOsigma[j]*TMath::Cos(2*random[2*j]*TMath::Pi())*
p[1] = pt*TMath::Sin(phi);
p[2] = pmom*TMath::Cos(theta);
- if(fVertexSmear==perTrack) {
+ if(fVertexSmear==kPerTrack) {
gMC->Rndm(random,6);
for (j=0;j<3;j++) {
origin[j]=fOrigin[j]+fOsigma[j]*TMath::Cos(2*random[2*j]*TMath::Pi())*
/*
$Log$
+Revision 1.9 2000/06/14 15:20:09 morsch
+Include clean-up (IH)
+
Revision 1.8 2000/06/09 20:36:44 morsch
All coding rule violations except RS3 corrected
Int_t i6=fIhead[5];
for (j=0;j<3;j++) origin[j]=fOrigin[j];
- if(fVertexSmear==perEvent) {
+ if(fVertexSmear==kPerTrack) {
gMC->Rndm(random,6);
for (j=0;j<3;j++) {
origin[j]+=fOsigma[j]*TMath::Cos(2*random[2*j]*TMath::Pi())*
p[1]=prwn*TMath::Sin(fTheta)*TMath::Sin(fPhi);
p[2]=prwn*TMath::Cos(fTheta);
- if(fVertexSmear==perTrack) {
+ if(fVertexSmear==kPerTrack) {
gMC->Rndm(random,6);
for (j=0;j<3;j++) {
origin[j]=fOrigin[j]
/*
$Log$
+Revision 1.1 2000/06/09 20:20:30 morsch
+Same class as previously in AliSimpleGen.cxx
+All coding rule violations except RS3 corrected (AM)
+
*/
///////////////////////////////////////////////////////////////////
// //
Float_t random[6];
//
for (j=0;j<3;j++) origin[j]=fOrigin[j];
- if(fVertexSmear==perEvent) {
+ if(fVertexSmear==kPerEvent) {
gMC->Rndm(random,6);
for (j=0;j<3;j++) {
origin[j]+=fOsigma[j]*TMath::Cos(2*random[2*j]*TMath::Pi())*
p[0]=pt*TMath::Cos(phi);
p[1]=pt*TMath::Sin(phi);
p[2]=pl;
- if(fVertexSmear==perTrack) {
+ if(fVertexSmear==kPerTrack) {
gMC->Rndm(random,6);
for (j=0;j<3;j++) {
origin[j]=fOrigin[j]+fOsigma[j]*TMath::Cos(2*random[2*j]*TMath::Pi())*
/*
$Log$
+Revision 1.3 2000/06/30 12:08:36 morsch
+In member data: char* replaced by TString, Init takes care of resizing the strings to
+8 characters required by Hijing.
+
Revision 1.2 2000/06/15 14:15:05 morsch
Add possibility for heavy flavor selection: charm and beauty.
fTrials=0;
for (j=0;j<3;j++) origin0[j]=fOrigin[j];
- if(fVertexSmear==perEvent) {
+ if(fVertexSmear==kPerEvent) {
gMC->Rndm(random,6);
for (j=0;j<3;j++) {
origin0[j]+=fOsigma[j]*TMath::Cos(2*random[2*j]*TMath::Pi())*
TMath::Sqrt(-2*TMath::Log(random[2*j+1]));
// fHijing->SetMSTP(151,0);
}
- } else if (fVertexSmear==perTrack) {
+ } else if (fVertexSmear==kPerTrack) {
// fHijing->SetMSTP(151,0);
for (j=0;j<3;j++) {
// fHijing->SetPARP(151+j, fOsigma[j]*10.);
/*
$Log$
+Revision 1.18 2000/06/29 21:08:27 morsch
+All paramatrisation libraries derive from the pure virtual base class AliGenLib.
+This allows to pass a pointer to a library directly to AliGenParam and avoids the
+use of function pointers in Config.C.
+
Revision 1.17 2000/06/09 20:33:30 morsch
All coding rule violations except RS3 corrected
// Calculating vertex position per event
for (j=0;j<3;j++) origin0[j]=fOrigin[j];
- if(fVertexSmear==perEvent) {
+ if(fVertexSmear==kPerEvent) {
gMC->Rndm(random,6);
for (j=0;j<3;j++) {
origin0[j]+=fOsigma[j]*TMath::Cos(2*random[2*j]*TMath::Pi())*
p[0]=pt*TMath::Cos(phi);
p[1]=pt*TMath::Sin(phi);
p[2]=pl;
- if(fVertexSmear==perTrack) {
+ if(fVertexSmear==kPerTrack) {
gMC->Rndm(random,6);
for (j=0;j<3;j++) {
origin0[j]=
/*
$Log$
+Revision 1.18 2000/06/30 12:40:34 morsch
+Pythia takes care of vertex smearing. Correct conversion from Pythia units (mm) to
+Geant units (cm).
+
Revision 1.17 2000/06/09 20:34:07 morsch
All coding rule violations except RS3 corrected
fTrials=0;
for (j=0;j<3;j++) origin0[j]=fOrigin[j];
- if(fVertexSmear==perEvent) {
+ if(fVertexSmear==kPerEvent) {
fPythia->SetMSTP(151,1);
for (j=0;j<3;j++) {
fPythia->SetPARP(151+j, fOsigma[j]/10.);
}
- } else if (fVertexSmear==perTrack) {
+ } else if (fVertexSmear==kPerTrack) {
fPythia->SetMSTP(151,0);
}
* $Id$
*
* $Log$
+* Revision 1.2 1999/07/01 14:45:34 fca
+* Modifications to allow Cherenkov transport
+*
* Revision 1.1 1999/06/03 16:38:16 fca
* First version of gtreve_root, special version of gtreve for AliRoot to be
* called from gutrev.
#include "geant321/pilot.h"
*CMZ : 3.21/03 07/10/94 18.07.13 by S.Giani
*-- Author :
- SUBROUTINE GTREVE_ROOT
+ SUBROUTINE GTREVEROOT
C.
C. ******************************************************************
C. * *
gener->SetPhiRange(-360,360);
gener->SetThetaRange(2., 10.);
gener->SetOrigin(25,25,510.5);
- gener->SetVertexSmear(perTrack);
+ gener->SetVertexSmear(kPerTrack);
//vertex position
gener->SetSigma(1.8, 1.8,0); //Sigma in (X,Y,Z) (cm) on IP position
gener->SetPart(kProton); //GEANT particle type
gener->SetYRange(-10,10);
gener->SetPtRange(0,100);
gener->SetOrigin(0,0,0); // vertex position
- gener->SetVertexSmear(perEvent);
+ gener->SetVertexSmear(kPerEvent);
gener->SetSigma(0,0,5.6); // Sigma in (X,Y,Z) (cm) on IP position
// gener->SetStrucFunc(DO_Set_1);
gener->SetProcess(mb);
gener->SetThetaRange(0.104,33.52);
gener->SetOrigin(0,0,0); //vertex position
gener->SetSigma(0,0,5.6); //Sigma in (X,Y,Z) (cm) on IP position
- gener->SetVertexSmear(perTrack);
+ gener->SetVertexSmear(kPerTrack);
gener->SetTrackingFlag(1);
break;
gener->SetPhiRange(85,85);
gener->SetThetaRange(85,85);
gener->SetOrigin(0,0,0);
- gener->SetVertexSmear(perTrack);
+ gener->SetVertexSmear(kPerTrack);
//vertex position
gener->SetSigma(1.8, 1.8,0); //Sigma in (X,Y,Z) (cm) on IP position
gener->SetPart(kPiPlus); //GEANT particle type
gener->SetYRange(-10,10);
gener->SetPtRange(0,100);
gener->SetOrigin(0,0,0); // vertex position
- gener->SetVertexSmear(perEvent);
+ gener->SetVertexSmear(kPerEvent);
gener->SetSigma(0,0,5.6); // Sigma in (X,Y,Z) (cm) on IP position
// gener->SetStrucFunc(DO_Set_1);
gener->SetProcess(mb);
//*******************************************************
AliGenExtFile *gener = new AliGenExtFile(-1);
gener->SetFileName("$(ALICE_ROOT)/data/dtujet93.root");
- gener->SetVertexSmear(perEvent);
+ gener->SetVertexSmear(kPerEvent);
gener->SetTrackingFlag(1);
break;
// Activate this line if you want the vertex smearing to happen
// track by track
//
-gener->SetVertexSmear(perTrack);
+gener->SetVertexSmear(kPerTrack);
gener->Init();
gAlice->SetField(0,2); //Specify maximum magnetic field in Tesla (neg. ==> default field)
/*
$Log$
+Revision 1.7 1999/11/10 07:37:06 fca
+Pads do not inherit editability from canvas any more
+
Revision 1.6 1999/11/09 07:38:52 fca
Changes for compatibility with version 2.23 of ROOT
#include "AliPoints.h"
#include "TParticle.h"
-const Float_t ptcutmax = 2;
-const Float_t etacutmax = 1.5;
+static const Float_t kptcutmax = 2;
+static const Float_t ketacutmax = 1.5;
ClassImp(AliDisplay)
//_____________________________________________________________________________
AliDisplay::AliDisplay()
{
- fCanvas = 0;
+ //
+ // Default constructor
+ //
+ fCanvas = 0;
}
//_____________________________________________________________________________
fCutPad->SetFillColor(22);
fCutPad->SetBorderSize(2);
fCutSlider = new TSlider("pcut","Momentum cut",0,0,1,1);
- fCutSlider->SetRange(fPTcut/ptcutmax,1);
+ fCutSlider->SetRange(fPTcut/kptcutmax,1);
fCutSlider->SetObject(this);
fCutSlider->SetFillColor(45);
TSliderBox *sbox = (TSliderBox*)fCutSlider->GetListOfPrimitives()->First();
sbox->SetFillColor(46);
fCutSlider->cd();
- TGaxis *cutaxis = new TGaxis(0.02,0.8,0.98,0.8,0,ptcutmax,510,"");
+ TGaxis *cutaxis = new TGaxis(0.02,0.8,0.98,0.8,0,kptcutmax,510,"");
cutaxis->SetLabelSize(0.5);
cutaxis->SetTitleSize(0.6);
cutaxis->SetTitleOffset(0.5);
TSliderBox *sbox2 = (TSliderBox*)fEtaSlider->GetListOfPrimitives()->First();
sbox2->SetFillColor(46);
fEtaSlider->cd();
- TGaxis *etaaxis = new TGaxis(0.9,0.02,0.9,0.98,-etacutmax,etacutmax,510,"");
+ TGaxis *etaaxis = new TGaxis(0.9,0.02,0.9,0.98,-ketacutmax,ketacutmax,510,"");
etaaxis->SetLabelSize(0.5);
etaaxis->SetTitleSize(0.6);
etaaxis->SetTitleOffset(0.2);
}
+//_____________________________________________________________________________
+AliDisplay::AliDisplay(const AliDisplay &disp)
+{
+ //
+ // Copy constructor
+ //
+ disp.Copy(*this);
+}
+
//_____________________________________________________________________________
AliDisplay::~AliDisplay()
{
+ //
+ // Destructor
+ //
}
//_____________________________________________________________________________
// Delete graphics temporary objects
}
+//_____________________________________________________________________________
+void AliDisplay::Copy(AliDisplay &disp) const
+{
+ //
+ // Copy *this onto disp -- not implemented
+ //
+ Fatal("Copy","Not implemented~\n");
+}
+
//----------------------------------------------------------------------------
void AliDisplay::ShowTrack(Int_t idx) {
- AliDetector *TPC=(AliDetector*)gAlice->GetModule("TPC");
- TObjArray *points=TPC->Points();
+ AliDetector *mTPC=(AliDetector*)gAlice->GetModule("TPC");
+ TObjArray *points=mTPC->Points();
int ntracks=points->GetEntriesFast();
for (int track=0;track<ntracks;track++) {
AliPoints *pm = (AliPoints*)points->UncheckedAt(track);
//----------------------------------------------------------------------------
void AliDisplay::HideTrack(Int_t idx) {
- AliDetector *TPC=(AliDetector*)gAlice->GetModule("TPC");
- TObjArray *points=TPC->Points();
+ AliDetector *mTPC=(AliDetector*)gAlice->GetModule("TPC");
+ TObjArray *points=mTPC->Points();
int ntracks=points->GetEntriesFast();
for (int track=0;track<ntracks;track++) {
AliPoints *pm = (AliPoints*)points->UncheckedAt(track);
if (gPad == fCutPad) return 9999;
if (gPad == fEtaPad) return 9999;
- const Int_t big = 9999;
- Int_t dist = big;
+ const Int_t kbig = 9999;
+ Int_t dist = kbig;
Float_t xmin = gPad->GetX1();
Float_t xmax = gPad->GetX2();
Float_t dx = 0.02*(xmax - xmin);
//Get cut slider
smax = fCutSlider->GetMaximum();
smin = fCutSlider->GetMinimum();
- cutmin = ptcutmax*smin;
- if (smax < 0.98) cutmax = ptcutmax*smax;
+ cutmin = kptcutmax*smin;
+ if (smax < 0.98) cutmax = kptcutmax*smax;
else cutmax = 100000;
//Get eta slider
smax = fEtaSlider->GetMaximum();
smin = fEtaSlider->GetMinimum();
- etamin = etacutmax*(2*smin-1);
- etamax = etacutmax*(2*smax-1);
+ etamin = ketacutmax*(2*smin-1);
+ etamax = ketacutmax*(2*smax-1);
if (smin < 0.02) etamin = -1000;
if (smax > 0.98) etamax = 1000;
if (delta) {
gAlice->Clear();
- Int_t current_event = gAlice->GetHeader()->GetEvent();
- Int_t new_event = current_event + delta;
- gAlice->GetEvent(new_event);
+ Int_t currentEvent = gAlice->GetHeader()->GetEvent();
+ Int_t newEvent = currentEvent + delta;
+ gAlice->GetEvent(newEvent);
if (!gAlice->TreeH()) return;
}
LoadPoints();
//______________________________________________________________________________
void AliDisplay::UnZoom()
{
- if (fZooms <= 0) return;
- fZooms--;
- TPad *pad = (TPad*)gPad->GetPadSave();
- pad->Range(fZoomX0[fZooms],fZoomY0[fZooms], fZoomX1[fZooms],fZoomY1[fZooms]);
- pad->Modified();
+ //
+ // Resets ZOOM
+ //
+ if (fZooms <= 0) return;
+ fZooms--;
+ TPad *pad = (TPad*)gPad->GetPadSave();
+ pad->Range(fZoomX0[fZooms],fZoomY0[fZooms], fZoomX1[fZooms],fZoomY1[fZooms]);
+ pad->Modified();
+}
+
+//_____________________________________________________________________________
+AliDisplay & AliDisplay::operator=(const AliDisplay &disp)
+{
+ //
+ // Assignment operator
+ //
+ disp.Copy(*this);
+ return (*this);
}
-#ifndef AliDisplay_H
-#define AliDisplay_H
+#ifndef ALIDISPLAY_H
+#define ALIDISPLAY_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
class TButton;
class TArc;
-const Int_t kMAXZOOMS = 20;
+static const Int_t kMAXZOOMS = 20;
class AliDisplay : public TObject {
-
-protected:
- Int_t fZoomMode; //=1 if in zoom mode
- Bool_t fDrawAllViews; //Flag True if AllViews selected
- Bool_t fDrawParticles; //Flag True if particles to be drawn
- Bool_t fDrawHits; //Flag True if Hits to be drawn
- Float_t fPTcut; //PT cut to display objects
- Float_t fTheta; //Viewing angle theta
- Float_t fPhi; //Viewing angle phi
- Float_t fPsi; //Viewving angle psi (rotation on display)
- Float_t fRrange; //Size of view in R
- Float_t fZrange; //Size of view along Z
- Float_t fZoomX0[20]; //Low x range of zoom number i
- Float_t fZoomY0[20]; //Low y range of zoom number i
- Float_t fZoomX1[20]; //High x range of zoom number i
- Float_t fZoomY1[20]; //High y range of zoom number i
- Int_t fZooms; //Number of zooms
- Int_t fHitsCuts; //Number of hits surviving cuts
- TCanvas *fCanvas; //Pointer to the display canvas
- TPad *fTrigPad; //Pointer to the trigger pad
- TPad *fCutPad; //Pointer to the momentum cut slider pad
- TPad *fEtaPad; //Pointer to the rapidity cut slider pad
- TPad *fButtons; //Pointer to the buttons pad
- TPad *fPad; //Pointer to the event display main pad
- TSlider *fCutSlider; //Momentum cut slider
- TSlider *fEtaSlider; //Rapidity slider
- TSlider *fRangeSlider; //Range slider
- TButton *fPickButton; //Button to activate Pick mode
- TButton *fZoomButton; //Button to activate Zoom mode
- TArc *fArcButton; //Gren/Red button to show Pick/Zoom mode
- TList *fFruits; //List for fruits
public:
AliDisplay();
AliDisplay(Int_t size);
+ AliDisplay(const AliDisplay &disp);
virtual ~AliDisplay();
virtual Bool_t AllViews() {return fDrawAllViews;}
virtual void Clear(Option_t *option="");
TSlider *CutSlider() {return fCutSlider;}
- virtual void ShowTrack(Int_t track_number); // *MENU*
- virtual void HideTrack(Int_t track_number); // *MENU*
+ virtual void ShowTrack(Int_t trackNumber); // *MENU*
+ virtual void HideTrack(Int_t trackNumber); // *MENU*
+ virtual void Copy(AliDisplay &disp) const;
virtual void DisableDetector(const char *name); // *MENU*
virtual void DisplayButtons();
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
virtual void SetZoomMode();
virtual void ShowNextEvent(Int_t delta=1);
virtual void UnZoom(); // *MENU*
+ virtual AliDisplay& operator= (const AliDisplay &disp);
+protected:
+ Int_t fZoomMode; //=1 if in zoom mode
+ Bool_t fDrawAllViews; //Flag True if AllViews selected
+ Bool_t fDrawParticles; //Flag True if particles to be drawn
+ Bool_t fDrawHits; //Flag True if Hits to be drawn
+ Float_t fPTcut; //PT cut to display objects
+ Float_t fTheta; //Viewing angle theta
+ Float_t fPhi; //Viewing angle phi
+ Float_t fPsi; //Viewving angle psi (rotation on display)
+ Float_t fRrange; //Size of view in R
+ Float_t fZrange; //Size of view along Z
+ Float_t fZoomX0[20]; //Low x range of zoom number i
+ Float_t fZoomY0[20]; //Low y range of zoom number i
+ Float_t fZoomX1[20]; //High x range of zoom number i
+ Float_t fZoomY1[20]; //High y range of zoom number i
+ Int_t fZooms; //Number of zooms
+ Int_t fHitsCuts; //Number of hits surviving cuts
+ TCanvas *fCanvas; //Pointer to the display canvas
+ TPad *fTrigPad; //Pointer to the trigger pad
+ TPad *fCutPad; //Pointer to the momentum cut slider pad
+ TPad *fEtaPad; //Pointer to the rapidity cut slider pad
+ TPad *fButtons; //Pointer to the buttons pad
+ TPad *fPad; //Pointer to the event display main pad
+ TSlider *fCutSlider; //Momentum cut slider
+ TSlider *fEtaSlider; //Rapidity slider
+ TSlider *fRangeSlider; //Range slider
+ TButton *fPickButton; //Button to activate Pick mode
+ TButton *fZoomButton; //Button to activate Zoom mode
+ TArc *fArcButton; //Gren/Red button to show Pick/Zoom mode
+ TList *fFruits; //List for fruits
+
ClassDef(AliDisplay, 0) //Utility class to display ALICE outline, tracks, hits,..
};
/*
$Log$
+Revision 1.5 2000/06/08 13:34:50 fca
+Better control of momentum range in GenBox
+
Revision 1.4 1999/09/29 09:24:29 fca
Introduction of the Copyright and cvs Log
//____________________________________________________________
AliGenerator::AliGenerator()
{
+ //
+ // Default constructor
+ //
printf("\n AliGenerator Default Constructor\n\n");
gAlice->SetGenerator(this);
AliGenerator::AliGenerator(Int_t npart)
: TNamed(" "," ")
{
+ //
+ // Standard constructor
+ //
printf("\n AliGenerator Constructor initializing number of particles \n\n");
gAlice->SetGenerator(this);
SetThetaRange(); ResetBit(kThetaRange);
SetNumberParticles(npart);
}
+//____________________________________________________________
+AliGenerator::AliGenerator(const AliGenerator &gen) : TNamed(" "," ")
+{
+ //
+ // Copy constructor
+ //
+ gen.Copy(*this);
+}
+
+//____________________________________________________________
+AliGenerator & AliGenerator::operator=(const AliGenerator &gen)
+{
+ //
+ // Assignment operator
+ //
+ gen.Copy(*this);
+ return (*this);
+}
+
+//____________________________________________________________
+void AliGenerator::Copy(AliGenerator &gen) const
+{
+ //
+ // Copy *this onto gen
+ //
+ Fatal("Copy","Not implemented!\n");
+}
+
//____________________________________________________________
AliGenerator::~AliGenerator()
{
+ //
+ // Destructor
+ //
fOrigin.Set(0);
fOsigma.Set(0);
delete fgMCEvGen;
void AliGenerator::Init()
{
+ //
+ // Dummy initialisation
+ //
}
#include "TArrayF.h"
#include "TGenerator.h"
-typedef enum { none, perEvent, perTrack } VertexSmear_t;
+typedef enum { kNoSmear, kPerEvent, kPerTrack } VertexSmear_t;
class AliGenerator : public TNamed
{
-protected:
- static TGenerator* fgMCEvGen;
- Float_t fThetaMin; //Minimum theta of generation in radians
- Float_t fThetaMax; //Maximum theta of generation in radians
- Float_t fPhiMin; //Minimum phi of generation in radians
- Float_t fPhiMax; //Maximum phi of generation in radians
- Float_t fPMin; //Minimum momentum of generation in GeV/c
- Float_t fPMax; //Minimum momentum of generation in GeV/c
- Float_t fPtMin; //Minimum transverse momentum
- Float_t fPtMax; //Maximum transverse momentum
- Float_t fYMin; //Minimum rapidity
- Float_t fYMax; //Maximum rapidity
- TArrayF fVMin; //Minimum Decaylength
- TArrayF fVMax; //Minimum Decaylength
- Int_t fNpart; //Maximum number of particles per event
- Float_t fParentWeight; //Parent Weight
- Float_t fChildWeight; //ChildWeight
- Int_t fTrackit; // Track the generated final state particle if 1
- Int_t fAnalog; //Flaf for anolog or pt-weighted generation
- //
- VertexSmear_t fVertexSmear; //Vertex Smearing mode
- Int_t fTrackIt; // if 1 Track final state particles
- TArrayF fOrigin; //Origin of event
- TArrayF fOsigma; //Sigma of the Origin of event
-
- enum {kThetaRange=1, kVertexRange=2, kPhiRange=4, kPtRange=8,
- kYRange=32, kMomentumRange=16};
-
public:
AliGenerator();
AliGenerator(Int_t npart);
+ AliGenerator(const AliGenerator &gen);
virtual ~AliGenerator();
virtual void Init();
+ virtual void Copy(AliGenerator &gen) const;
virtual void SetOrigin(Float_t ox, Float_t oy, Float_t oz)
{fOrigin[0]=ox;fOrigin[1]=oy;fOrigin[2]=oz;}
virtual void SetOrigin(const TLorentzVector &o)
virtual void SetMC(TGenerator *theMC)
{if (!fgMCEvGen) fgMCEvGen =theMC;}
+ virtual AliGenerator & operator=(const AliGenerator &gen);
+
// Getters
virtual void GetOrigin(Float_t &ox, Float_t &oy, Float_t &oz)
virtual void GetOrigin(TLorentzVector &o)
{o[0]=fOrigin[0];o[1]=fOrigin[1];o[2]=fOrigin[2];o[3]=0;}
+protected:
+ static TGenerator* fgMCEvGen; // Pointer to the generator
+ Float_t fThetaMin; //Minimum theta of generation in radians
+ Float_t fThetaMax; //Maximum theta of generation in radians
+ Float_t fPhiMin; //Minimum phi of generation in radians
+ Float_t fPhiMax; //Maximum phi of generation in radians
+ Float_t fPMin; //Minimum momentum of generation in GeV/c
+ Float_t fPMax; //Minimum momentum of generation in GeV/c
+ Float_t fPtMin; //Minimum transverse momentum
+ Float_t fPtMax; //Maximum transverse momentum
+ Float_t fYMin; //Minimum rapidity
+ Float_t fYMax; //Maximum rapidity
+ TArrayF fVMin; //Minimum Decaylength
+ TArrayF fVMax; //Minimum Decaylength
+ Int_t fNpart; //Maximum number of particles per event
+ Float_t fParentWeight; //Parent Weight
+ Float_t fChildWeight; //ChildWeight
+ Int_t fTrackit; // Track the generated final state particle if 1
+ Int_t fAnalog; //Flaf for anolog or pt-weighted generation
+ //
+ VertexSmear_t fVertexSmear; //Vertex Smearing mode
+ Int_t fTrackIt; // if 1 Track final state particles
+ TArrayF fOrigin; //Origin of event
+ TArrayF fOsigma; //Sigma of the Origin of event
+
+ enum {kThetaRange=1, kVertexRange=2, kPhiRange=4, kPtRange=8,
+ kYRange=32, kMomentumRange=16};
+
ClassDef(AliGenerator,1)
};
/*
$Log$
+Revision 1.3 1999/09/29 09:24:29 fca
+Introduction of the Copyright and cvs Log
+
*/
#include "AliHit.h"
TClonesArray &particles = *(gAlice->Particles());
if(shunt) {
int primary = gAlice->GetPrimary(track);
- ((TParticle *)particles[primary])->SetBit(Keep_Bit);
+ ((TParticle *)particles[primary])->SetBit(kKeepBit);
fTrack=primary;
} else {
fTrack=track;
-#ifndef ALILego_H
-#define ALILego_H
+#ifndef ALILEGO_H
+#define ALILEGO_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
/*
$Log$
+Revision 1.3 2000/03/22 18:08:07 fca
+Rationalisation of the virtual MC interfaces
+
Revision 1.2 1999/09/29 09:24:29 fca
Introduction of the Copyright and cvs Log
AliMC::AliMC(const char *name, const char *title) : TNamed(name,title)
{
+ //
+ // Standard constructor
+ //
if(fgMC) {
printf("Cannot initialise twice MonteCarlo class\n");
exit(1);
-#ifndef ALI_MC_H
-#define ALI_MC_H
+#ifndef ALIMC_H
+#define ALIMC_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
virtual void Gdman(Float_t, Float_t, const char*) = 0;
virtual void SetColors() = 0;
virtual void Gtreve() = 0;
- virtual void Gtreve_root() = 0;
+ virtual void GtreveRoot() = 0;
virtual void Gckmat(Int_t, char*) = 0;
virtual void InitLego() = 0;
virtual void Gfpart(Int_t, char*, Int_t&, Float_t&, Float_t&, Float_t&) = 0;
virtual void ProcessRun(Int_t nevent) = 0;
private:
- static AliMC* fgMC;
+ static AliMC* fgMC; // Pointer to the virtual MonteCarlo object
ClassDef(AliMC,1) //Geometry Interface Class
};
-#endif // ALI_MC_H
+#endif
/*
$Log$
+Revision 1.5 2000/06/09 19:55:18 morsch
+Introduce new class AliMagFDM - Galina Chabratova
+
Revision 1.4 2000/03/28 12:40:24 fca
Introduce factor for magnetic field
#include <stdlib.h>
#include <stdio.h>
-//ZDC part -------------------------------------------------------------------
-
- static const Float_t G1=20.03;
- static const Float_t FDIP=-37.34;
- static const Float_t FDIMU=6.;
- static const Float_t FCORN=11.72;
-//
-// ZBEG Beginning of the inner triplet
-// D1BEG Beginning of separator dipole 1
-// D2BEG Beginning of separator dipole 2
-// CORBEG Corrector dipole beginning (because of dimuon arm)
-//
- static const Float_t CORBEG=1920,COREND=CORBEG+190, CORRA2=4.5*4.5;
-//
- static const Float_t ZBEG=2300;
- static const Float_t Z1BEG=ZBEG+ 0,Z1END=Z1BEG+630,Z1RA2=3.5*3.5;
- static const Float_t Z2BEG=ZBEG+ 880,Z2END=Z2BEG+550,Z2RA2=3.5*3.5;
- static const Float_t Z3BEG=ZBEG+1530,Z3END=Z3BEG+550,Z3RA2=3.5*3.5;
- static const Float_t Z4BEG=ZBEG+2430,Z4END=Z4BEG+630,Z4RA2=3.5*3.5;
- static const Float_t D1BEG=5843.5 ,D1END=D1BEG+945,D1RA2=4.5*4.5;
- static const Float_t D2BEG=12113.2 ,D2END=D2BEG+945,D2RA2=4.5*.5;
-
-//ZDC part -------------------------------------------------------------------
ClassImp(AliMagF)
//________________________________________
-AliMagF::AliMagF(const char *name, const char *title, const Int_t integ, const Int_t map,
- const Float_t factor, const Float_t fmax)
+AliMagF::AliMagF(const char *name, const char *title, const Int_t integ,
+ const Int_t map, const Float_t factor, const Float_t fmax)
: TNamed(name,title)
{
+ //
+ // Standard constructor
+ //
fMap = map;
- fType = Undef;
+ fType = kUndef;
fInteg = integ;
fFactor = factor;
fMax = fmax;
//________________________________________
void AliMagF::Field(Float_t*, Float_t *b)
{
+ //
+ // Method to return the field in one point -- dummy in this case
+ //
printf("Undefined MagF Field called, returning 0\n");
b[0]=b[1]=b[2]=0;
}
-ClassImp(AliMagFC)
-
-//________________________________________
-AliMagFC::AliMagFC(const char *name, const char *title, const Int_t integ, const Int_t map,
- const Float_t factor, const Float_t fmax)
- : AliMagF(name,title,integ,map,factor,fmax)
-{
- printf("Constant Field %s created: map= %d, factor= %f\n",fName.Data(),map,factor);
- fType = Const;
-}
-
-//________________________________________
-void AliMagFC::Field(Float_t *x, Float_t *b)
-{
- b[0]=b[1]=b[2]=0;
- if(fMap==1) {
- if(TMath::Abs(x[2])<700 && x[0]*x[0]+(x[1]+30)*(x[1]+30) < 560*560) {
- b[2]=2;
- } else {
- if ( 725 <= x[2] && x[2] <= 1225 ) {
- Float_t dz = TMath::Abs(975-x[2])*0.01;
- b[0]=(1-0.1*dz*dz)*7;
- }
- else {
-//This is the ZDC part
- Float_t rad2=x[0]*x[0]+x[1]*x[1];
- if(rad2<D2RA2) {
- if(x[2]>D2BEG) {
-
-// Separator Dipole D2
- if(x[2]<D2END) b[1]=FDIP;
- } else if(x[2]>D1BEG) {
-
-// Separator Dipole D1
- if(x[2]<D1END) b[1]=-FDIP;
- }
- if(rad2<CORRA2) {
-
-// First quadrupole of inner triplet de-focussing in x-direction
-// Inner triplet
- if(x[2]>Z4BEG) {
- if(x[2]<Z4END) {
-
-// 2430 <-> 3060
- b[0]=-G1*x[1];
- b[1]=-G1*x[0];
- }
- } else if(x[2]>Z3BEG) {
- if(x[2]<Z3END) {
-
-// 1530 <-> 2080
- b[0]=G1*x[1];
- b[1]=G1*x[0];
- }
- } else if(x[2]>Z2BEG) {
- if(x[2]<Z2END) {
-
-// 890 <-> 1430
- b[0]=G1*x[1];
- b[1]=G1*x[0];
- }
- } else if(x[2]>Z1BEG) {
- if(x[2]<Z1END) {
-
-// 0 <-> 630
- b[0]=-G1*x[1];
- b[1]=-G1*x[0];
- }
- } else if(x[2]>CORBEG) {
- if(x[2]<COREND) {
-// Corrector dipole (because of dimuon arm)
- b[0]=FCORN;
- }
- }
- }
- }
- }
- }
- if(fFactor!=1) {
- b[0]*=fFactor;
- b[1]*=fFactor;
- b[2]*=fFactor;
- }
- } else {
- printf("Invalid field map for constant field %d\n",fMap);
- exit(1);
- }
-}
-
-ClassImp(AliMagFCM)
-
-//________________________________________
-AliMagFCM::AliMagFCM(const char *name, const char *title, const Int_t integ, const Int_t map,
- const Float_t factor, const Float_t fmax)
- : AliMagF(name,title,integ,map,factor,fmax)
-{
- fType = ConMesh;
- printf("Constant Mesh Field %s created: map= %d, factor= %f, file= %s\n",fName.Data(),map,factor,fTitle.Data());
-}
-
-//________________________________________
-void AliMagFCM::Field(Float_t *x, Float_t *b)
-{
- Double_t ratx, raty, ratz, hix, hiy, hiz, ratx1, raty1, ratz1,
- bhyhz, bhylz, blyhz, blylz, bhz, blz, xl[3];
- const Double_t one=1;
- Int_t ix, iy, iz;
-
- // --- find the position in the grid ---
-
- b[0]=b[1]=b[2]=0;
- if(-700<x[2] && x[2]<fZbeg && x[0]*x[0]+(x[1]+30)*(x[1]+30) < 560*560) {
- b[2]=2;
- } else {
- Bool_t infield=(fZbeg<=x[2] && x[2]<fZbeg+fZdel*(fZn-1)
- && ( fXbeg <= TMath::Abs(x[0]) && TMath::Abs(x[0]) < fXbeg+fXdel*(fXn-1) )
- && ( fYbeg <= TMath::Abs(x[1]) && TMath::Abs(x[1]) < fYbeg+fYdel*(fYn-1) ));
- if(infield) {
- xl[0]=TMath::Abs(x[0])-fXbeg;
- xl[1]=TMath::Abs(x[1])-fYbeg;
- xl[2]=x[2]-fZbeg;
-
- // --- start with x
-
- hix=xl[0]*fXdeli;
- ratx=hix-int(hix);
- ix=int(hix);
-
- hiy=xl[1]*fYdeli;
- raty=hiy-int(hiy);
- iy=int(hiy);
-
- hiz=xl[2]*fZdeli;
- ratz=hiz-int(hiz);
- iz=int(hiz);
-
- if(fMap==2) {
- // ... simple interpolation
- ratx1=one-ratx;
- raty1=one-raty;
- ratz1=one-ratz;
- bhyhz = Bx(ix ,iy+1,iz+1)*ratx1+Bx(ix+1,iy+1,iz+1)*ratx;
- bhylz = Bx(ix ,iy+1,iz )*ratx1+Bx(ix+1,iy+1,iz )*ratx;
- blyhz = Bx(ix ,iy ,iz+1)*ratx1+Bx(ix+1,iy ,iz+1)*ratx;
- blylz = Bx(ix ,iy ,iz )*ratx1+Bx(ix+1,iy ,iz )*ratx;
- bhz = blyhz *raty1+bhyhz *raty;
- blz = blylz *raty1+bhylz *raty;
- b[0] = blz *ratz1+bhz *ratz;
- //
- bhyhz = By(ix ,iy+1,iz+1)*ratx1+By(ix+1,iy+1,iz+1)*ratx;
- bhylz = By(ix ,iy+1,iz )*ratx1+By(ix+1,iy+1,iz )*ratx;
- blyhz = By(ix ,iy ,iz+1)*ratx1+By(ix+1,iy ,iz+1)*ratx;
- blylz = By(ix ,iy ,iz )*ratx1+By(ix+1,iy ,iz )*ratx;
- bhz = blyhz *raty1+bhyhz *raty;
- blz = blylz *raty1+bhylz *raty;
- b[1] = blz *ratz1+bhz *ratz;
- //
- bhyhz = Bz(ix ,iy+1,iz+1)*ratx1+Bz(ix+1,iy+1,iz+1)*ratx;
- bhylz = Bz(ix ,iy+1,iz )*ratx1+Bz(ix+1,iy+1,iz )*ratx;
- blyhz = Bz(ix ,iy ,iz+1)*ratx1+Bz(ix+1,iy ,iz+1)*ratx;
- blylz = Bz(ix ,iy ,iz )*ratx1+Bz(ix+1,iy ,iz )*ratx;
- bhz = blyhz *raty1+bhyhz *raty;
- blz = blylz *raty1+bhylz *raty;
- b[2] = blz *ratz1+bhz *ratz;
- //printf("ratx,raty,ratz,b[0],b[1],b[2] %f %f %f %f %f %f\n",
- //ratx,raty,ratz,b[0],b[1],b[2]);
- //
- // ... use the dipole symmetry
- if (x[0]*x[1] < 0) b[1]=-b[1];
- if (x[0]<0) b[2]=-b[2];
- } else {
- printf("Invalid field map for constant mesh %d\n",fMap);
- }
- } else {
-//This is the ZDC part
- Float_t rad2=x[0]*x[0]+x[1]*x[1];
- if(rad2<D2RA2) {
- if(x[2]>D2BEG) {
-
-// Separator Dipole D2
- if(x[2]<D2END) b[1]=FDIP;
- } else if(x[2]>D1BEG) {
-
-// Separator Dipole D1
- if(x[2]<D1END) b[1]=-FDIP;
- }
- if(rad2<CORRA2) {
-
-// First quadrupole of inner triplet de-focussing in x-direction
-// Inner triplet
- if(x[2]>Z4BEG) {
- if(x[2]<Z4END) {
-
-// 2430 <-> 3060
- b[0]=-G1*x[1];
- b[1]=-G1*x[0];
- }
- } else if(x[2]>Z3BEG) {
- if(x[2]<Z3END) {
-
-// 1530 <-> 2080
- b[0]=G1*x[1];
- b[1]=G1*x[0];
- }
- } else if(x[2]>Z2BEG) {
- if(x[2]<Z2END) {
-
-// 890 <-> 1430
- b[0]=G1*x[1];
- b[1]=G1*x[0];
- }
- } else if(x[2]>Z1BEG) {
- if(x[2]<Z1END) {
-
-// 0 <-> 630
- b[0]=-G1*x[1];
- b[1]=-G1*x[0];
- }
- } else if(x[2]>CORBEG) {
- if(x[2]<COREND) {
-// Corrector dipole (because of dimuon arm)
- b[0]=FCORN;
- }
- }
- }
- }
- }
- }
- if(fFactor!=1) {
- b[0]*=fFactor;
- b[1]*=fFactor;
- b[2]*=fFactor;
- }
-}
-
-//________________________________________
-void AliMagFCM::ReadField()
-{
- FILE *magfile;
- Int_t ix, iy, iz, ipx, ipy, ipz;
- Float_t bx, by, bz;
- char *fname;
- printf("Reading Magnetic Field %s from file %s\n",fName.Data(),fTitle.Data());
- fname = gSystem->ExpandPathName(fTitle.Data());
- magfile=fopen(fname,"r");
- delete [] fname;
- if (magfile) {
- fscanf(magfile,"%d %d %d %f %f %f %f %f %f",
- &fXn, &fYn, &fZn, &fXdel, &fYdel, &fZdel, &fXbeg, &fYbeg, &fZbeg);
- printf("fXn %d, fYn %d, fZn %d, fXdel %f, fYdel %f, fZdel %f, fXbeg %f, fYbeg %f, fZbeg %f\n",
- fXn, fYn, fZn, fXdel, fYdel, fZdel, fXbeg, fYbeg, fZbeg);
- fXdeli=1./fXdel;
- fYdeli=1./fYdel;
- fZdeli=1./fZdel;
- fB = new TVector(3*fXn*fYn*fZn);
- for (iz=0; iz<fZn; iz++) {
- ipz=iz*3*(fXn*fYn);
- for (iy=0; iy<fYn; iy++) {
- ipy=ipz+iy*3*fXn;
- for (ix=0; ix<fXn; ix++) {
- ipx=ipy+ix*3;
- fscanf(magfile,"%f %f %f",&bz,&by,&bx);
- (*fB)(ipx+2)=bz;
- (*fB)(ipx+1)=by;
- (*fB)(ipx )=bx;
- }
- }
- }
- } else {
- printf("File %s not found !\n",fTitle.Data());
- exit(1);
- }
-}
-// -------------------------------------------------------
-
-ClassImp(AliMagFDM)
-
-//________________________________________
-AliMagFDM::AliMagFDM(const char *name, const char *title, const Int_t integ,
-const Int_t map, const Float_t factor, const Float_t fmax)
- : AliMagF(name,title,integ,map,factor,fmax)
-
-{
- fType = DipoMap;
-
- printf("Field Map for Muon Arm from IP till muon filter %s created: map= %d, factor= %f, file=%s\n",fName.Data(),map,factor,fTitle.Data());
-
-}
-
-//________________________________________
-
-void AliMagFDM::Field(Float_t *xfi, Float_t *b)
-{
- static const Double_t eps=0.1E-06;
- static const Double_t pi2=.6283185E+01;
- static const Double_t one=1;
- static const Double_t fdYaxi = 0.3;
-
- static const Int_t kiip=33;
- static const Int_t miip=0;
- static const Int_t liip=0;
-
- static const Int_t kiic=0;
- static const Int_t miic=0;
- static const Int_t liic=0;
-
- static const Double_t fdZbg=502.92; // Start of Map using in z
- static const Double_t fdZL3=600; // Beginning of L3 door in z
-
- Double_t x[3];
- Double_t xL3[3];
- Double_t bint[3];
-
- Double_t r0;
-
- Double_t bbj;
- Int_t Kvar,jb;
-
- Double_t Zp1, Zp2,Xp1,Xp2,Yp1,Yp2;
- Double_t Zz1, Zz2,Yy1,Yy2,X2,X1;
-
-// --- start the map fiel from z = 502.92 cm ---
-
- x[0] = xfi[0];
- x[1] = xfi[1];
- x[2] = xfi[2];
- b[0]=b[1]=b[2]=0;
- // printf("x[0] %f,x[1] %f,x[2] %f\n",x[0],x[1],x[2]);
-
- Double_t rr=TMath::Sqrt(x[0]*x[0]+x[1]*x[1]);
- r0=rr/100;
- Double_t Rpmax;
- Rpmax=fdRmax;
- if ( (-700<x[2] && x[2]<=fdZbg &&
- (x[0]*x[0]+(x[1]+30)*(x[1]+30))< 560*560)
- || (fdZbg<x[2] && x[2]<=fdZL3 && rr>=Rpmax*100) )
- {
- b[2]=2;
- }
-
- xL3[0]=x[0]/100;
- xL3[1]=(x[1]+30)/100;
- xL3[2]=x[2]/100;
-
- Double_t xminn=xL3[2]*fdAx1+fdCx1;
- Double_t xmaxx=xL3[2]*fdAx2+fdCx2;
- Double_t Zcmin,Zcmax,Ycmin,Ycmax;
-
- Zcmin=fdZmin;
- Zcmax=fdZmax;
- Ycmin=fdYmin;
- Ycmax=fdYmax;
-
-if ((fdZbg/100<xL3[2] && xL3[2]<Zcmin && r0<Rpmax) || ((Zcmin<=xL3[2] && xL3[2] <= Zcmax ) && (Ycmin<=xL3[1] && xL3[1]<= Ycmax) && (xminn <= xL3[0] && xL3[0] <= xmaxx)))
- {
- if(fMap==3)
- {
- if (xL3[2]<Zcmin && r0<Rpmax)
- {
- //--------------------- Polar part ----------------------
-
- Double_t yyp,ph0;
- Int_t kp0, lp0, mp0;
- Int_t kpi,lpi,mpi;
- Double_t alp1,alp2,alp3;
- Double_t zpz,rp,fip,cphi;
-
- kpi=kiip;
- lpi=liip;
- mpi=miip;
-
- zpz=xL3[2];
-
- FZ(&zpz, fdZp ,&fdZpdl,&kpi,&kp0,&Zp1 ,&Zp2,&fdZpl) ;
-
- yyp=xL3[1]- 0.3;
- cphi=yyp/r0;
- ph0=TMath::ACos(cphi);
- if (xL3[0]< 0) {ph0=pi2 - ph0;}
-
- fip=ph0;
- FZ(&fip,fdPhi,&fdPhid ,&mpi,&mp0, &Xp1,&Xp2,&fdPhin);
-
- Double_t Rdel;
- Rdel=fdRdel;
-
- if (r0<= fdRdel)
- {
-
- if(r0< eps)
- {
-
- bint[0]=(Zp1*fdBpx[kp0][0][0] + Zp2*fdBpx[kp0+1][0][0])*10;
- bint[1]=(Zp1*fdBpy[kp0][0][0] + Zp2*fdBpy[kp0+1][0][0])*10;
- bint[2]=(Zp1*fdBpz[kp0][0][0] + Zp2*fdBpz[kp0+1][0][0])*10;
-
- }
-
- alp2= fdB[0][0][mp0]*yyp + fdB[0][1][mp0]*xL3[0];
- alp3= fdB[1][0][mp0]*yyp + fdB[1][1][mp0]*xL3[0];
- alp1= one - alp2 - alp3;
-
- for (jb=0; jb<3 ; jb++)
- {
- Kvar=jb;
- FRfuncBi(&Kvar,&Zp1,&Zp2,&alp1,&alp2,&alp3, &kp0,&mp0, &bbj);
- bint[jb] = bbj*10 ;
- }
- }
- else
- {
- rp=r0;
-
- FZ(&rp,fdR ,&fdRdel,&lpi,&lp0,&Yp1,&Yp2,&fdRn);
-
- for (jb=0; jb<3 ; jb++)
- {
- Kvar=jb;
- FGfuncBi(&Zp1,&Zp2,&Yp1,&Yp2,&Xp1,&Xp2,&Kvar,&kp0,&lp0,&mp0,&bbj);
-
- bint[jb] = bbj*10 ;
- }
- }
-
- b[0]=bint[0];
- b[1]=bint[1];
- b[2]=bint[2];
-
-// fprintf(fitest,"------------- Freg2 run -------------\n");
-
- }
- else
- {
- //-------------- Cartensian part ------------------
-
- Double_t zzc,yyc;
- Int_t k0, l0,m0;
- Double_t xx1, xx2,dx, xxx ,xXl;
- Int_t kci,mci,lci;
-
- kci=kiic;
- lci=liic;
- mci=miic;
-
- xx1 = fdAx1*xL3[2] + fdCx1;
- xx2 = fdAx2*xL3[2] + fdCx2;
-
- zzc=xL3[2];
- FZ(&zzc, fdZc ,&fdZdel, &kci,&k0, &Zz1, &Zz2, &fdZl);
-
- yyc=xL3[1];
- FZ(&yyc, fdY , &fdYdel,&lci, &l0, &Yy1, &Yy2,&fdYl);
-
- xXl = fdXl-one;
- dx = (xx2-xx1)/xXl;
- xxx= xL3[0]-xx1;
- // xm = xxx/dx;
- m0 = int(xxx/dx);
-
- if(xL3[0]<(xx1+m0*dx) || xL3[0] >(xx1+(m0+1)*dx))
- {
- m0=m0+1;
- printf(" m0 %d, m0+1 %d\n",m0,m0+1);
- }
-
- X2=(xL3[0]-( xx1+m0*dx))/dx;
- X1=one-X2;
- m0=m0-1;
- for (jb=3; jb<6; jb++)
- {
- Kvar=jb;
- FGfuncBi(&Zz1,&Zz2,&Yy1,&Yy2,&X1,&X2,&Kvar,&k0, &l0, &m0, &bbj);
- bint[jb-3] = bbj*10 ;
- }
-
- b[0]=bint[0];
- b[1]=bint[1];
- b[2]=bint[2];
-
-// fprintf(fitest,"------------ Freg1 run -----------------\n");
- }
-
- } else {
- printf("Unknown map of Dipole region %d\n",fMap);
- }
-
-} else {
-
-//This is the ZDC part
- Float_t rad2=x[0]*x[0]+x[1]*x[1];
- if(rad2<D2RA2) {
- if(x[2]>D2BEG) {
-
-// Separator Dipole D2
- if(x[2]<D2END) b[1]=FDIP;
- } else if(x[2]>D1BEG) {
-
-// Separator Dipole D1
- if(x[2]<D1END) b[1]=-FDIP;
- }
- if(rad2<CORRA2) {
-
-// First quadrupole of inner triplet de-focussing in x-direction
-// Inner triplet
- if(x[2]>Z4BEG) {
- if(x[2]<Z4END) {
-
-// 2430 <-> 3060
- b[0]=-G1*x[1];
- b[1]=-G1*x[0];
- }
- } else if(x[2]>Z3BEG) {
- if(x[2]<Z3END) {
-
-// 1530 <-> 2080
- b[0]=G1*x[1];
- b[1]=G1*x[0];
- }
- } else if(x[2]>Z2BEG) {
- if(x[2]<Z2END) {
-
-// 890 <-> 1430
- b[0]=G1*x[1];
- b[1]=G1*x[0];
- }
- } else if(x[2]>Z1BEG) {
- if(x[2]<Z1END) {
-
-// 0 <-> 630
- b[0]=-G1*x[1];
- b[1]=-G1*x[0];
- }
- } else if(x[2]>CORBEG) {
- if(x[2]<COREND) {
-// Corrector dipole (because of dimuon arm)
-// b[0]=FCORN;
- b[0]=-FCORN;
- }
- }
- }
- }
- }
-
- if(fFactor!=1) {
- b[0]*=fFactor;
- b[1]*=fFactor;
- b[2]*=fFactor;
- }
-}
-
-//_________________________________________
-
-void AliMagFDM::FZ(Double_t *u, Float_t *Ar, Float_t *du,Int_t *ki,Int_t *kf,Double_t *a1,Double_t *a2 ,Int_t *nu)
-
- {
- static const Double_t one=1;
- Int_t l,ik,ikj;
- Double_t temp;
- Double_t ddu,delu,ar;
-
- Int_t nk,ku;
- temp=*u;
- nk=*nu;
- ik=*ki;
- delu=*du;
-
- ar=Ar[ik];
- ddu=temp-ar;
-
- ku=int(ddu/delu);
- ikj=ik+ku;
- if (ddu<=0) ikj=0;
-
- for(l=ikj; l<nk; l++)
- {
-
- if(temp < Ar[l])
- {
- *kf=l;
- *a2=(temp-Ar[l])/(Ar[l+1]-Ar[l]);
- *a1= one - *a2;
- break;
- }
- }
- }
-
-/*-------------FRfuncBi----------------*/
-
-void AliMagFDM::FRfuncBi(Int_t *kai,Double_t *za1, Double_t *za2, Double_t *al1, Double_t *al2, Double_t *al3, Int_t *ka, Int_t *ma, Double_t *ba)
-
-{
-Double_t fa11,fa12,fa13;
-Double_t fa21,fa22,fa23;
-Double_t faY1,faY2;
-Double_t bba;
-
-Double_t zaa1,zaa2,alf1,alf2,alf3;
-Int_t kaai,kaa,maa;
-kaai=*kai;
-kaa=*ka;
-maa=*ma;
-zaa1=*za1;
-zaa2=*za2;
-alf1=*al1;
-alf2=*al2;
-alf3=*al3;
-
- if (kaai==0 ) {
- fa11 = fdBpx[kaa][0][0];
- fa12 = fdBpx[kaa][0][maa];
- fa13 = fdBpx[kaa][0][maa+1];
- fa21 = fdBpx[kaa+1][0][0];
- fa22 = fdBpx[kaa+1][0][maa];
- fa23 = fdBpx[kaa+1][0][maa+1];
- }
- if (kaai==1 ) {
- fa11 = fdBpy[kaa][0][0];
- fa12 = fdBpy[kaa][0][maa];
- fa13 = fdBpy[kaa][0][maa+1];
- fa21 = fdBpy[kaa+1][0][0];
- fa22 = fdBpy[kaa+1][0][maa];
- fa23 = fdBpy[kaa+1][0][maa+1];
- }
- if (kaai==2 ) {
- fa11 = fdBpz[kaa][0][0];
- fa12 = fdBpz[kaa][0][maa];
- fa13 = fdBpz[kaa][0][maa+1];
- fa21 = fdBpz[kaa+1][0][0];
- fa22 = fdBpz[kaa+1][0][maa];
- fa23 = fdBpz[kaa+1][0][maa+1];
- }
- faY1=alf1*fa11+alf2*fa12+alf3*fa13;
- faY2=alf1*fa21+alf2*fa22+alf3*fa23;
- bba = zaa1*faY1+zaa2*faY2;
- *ba=bba;
-
-}
-
-
-/*----------- FGfuncBi------------*/
-
-void AliMagFDM::FGfuncBi(Double_t *zz1,Double_t *zz2, Double_t *yy1,Double_t *yy2, Double_t *xx1,Double_t *xx2, Int_t *kvr, Int_t *kk, Int_t *ll, Int_t *mm, Double_t *bb)
-
-{
-Double_t fy1, fy2, ffy;
-Double_t gy1,gy2,ggy;
-Double_t z1,z2,y1,y2,x1,x2;
-
-Int_t k,l,m,kv;
-Double_t bbi;
-
-Double_t bf11,bf12,bf21,bf22;
-Double_t bg11,bg12,bg21,bg22;
-k=*kk;
-l=*ll;
-m=*mm;
-
-kv=*kvr;
-
-z1=*zz1;
-z2=*zz2;
-y1=*yy1;
-y2=*yy2;
-x1=*xx1;
-x2=*xx2;
-
-/*-----------------Polar part ------------------*/
-
-if(kv==0) {
- bf11=fdBpx[k][l][m];
- bf12=fdBpx[k+1][l][m];
- bf21=fdBpx[k+1][l+1][m];
- bf22=fdBpx[k][l+1][m];
-
- bg11=fdBpx[k][l][m+1];
- bg12=fdBpx[k+1][l][m+1];
- bg21=fdBpx[k+1][l+1][m+1];
- bg22=fdBpx[k][l+1][m+1];
- }
- if(kv==1) {
- bf11=fdBpy[k][l][m];
- bf12=fdBpy[k+1][l][m];
- bf21=fdBpy[k+1][l+1][m];
- bf22=fdBpy[k][l+1][m];
-
- bg11=fdBpy[k][l][m+1];
- bg12=fdBpy[k+1][l][m+1];
- bg21=fdBpy[k+1][l+1][m+1];
- bg22=fdBpy[k][l+1][m+1];
- }
-
- if(kv==2) {
- bf11=fdBpz[k][l][m];
- bf12=fdBpz[k+1][l][m];
- bf21=fdBpz[k+1][l+1][m];
- bf22=fdBpz[k][l+1][m];
-
- bg11=fdBpz[k][l][m+1];
- bg12=fdBpz[k+1][l][m+1];
- bg21=fdBpz[k+1][l+1][m+1];
- bg22=fdBpz[k][l+1][m+1];
- }
-/*-----------------Cartensian part ---------------*/
-
- if(kv==3) {
- bf11=fdBcx[k][l][m];
- bf12=fdBcx[k+1][l][m];
- bf21=fdBcx[k+1][l+1][m];
- bf22=fdBcx[k][l+1][m];
-
- bg11=fdBcx[k][l][m+1];
- bg12=fdBcx[k+1][l][m+1];
- bg21=fdBcx[k+1][l+1][m+1];
- bg22=fdBcx[k][l+1][m+1];
- }
-
- if(kv==4) {
- bf11=fdBcy[k][l][m];
- bf12=fdBcy[k+1][l][m];
- bf21=fdBcy[k+1][l+1][m];
- bf22=fdBcy[k][l+1][m];
-
- bg11=fdBcy[k][l][m+1];
- bg12=fdBcy[k+1][l][m+1];
- bg21=fdBcy[k+1][l+1][m+1];
- bg22=fdBcy[k][l+1][m+1];
- }
- if(kv==5) {
- bf11=fdBcz[k][l][m];
- bf12=fdBcz[k+1][l][m];
- bf21=fdBcz[k+1][l+1][m];
- bf22=fdBcz[k][l+1][m];
-
- bg11=fdBcz[k][l][m+1];
- bg12=fdBcz[k+1][l][m+1];
- bg21=fdBcz[k+1][l+1][m+1];
- bg22=fdBcz[k][l+1][m+1];
- }
-
-
-
- fy1=z1*bf11+z2*bf12;
- fy2=z2*bf21+z1* bf22;
- ffy=y1*fy1+ y2*fy2;
-
-
- gy1 = z1*bg11+z2*bg12;
- gy2 = z2*bg21+z1*bg22;
- ggy= y1*gy1 + y2*gy2;
-
- bbi = x1*ffy+x2*ggy;
-
- *bb=bbi;
-
-}
-//____________________________________________
-
-void AliMagFDM::ReadField()
-{
- FILE *magfile;
-
- Int_t ik, il, im;
- Float_t zzp, rr,phii;
- Float_t zz, yy, bx,by,bz,bb;
-
- char *fname;
- printf("Reading Magnetic Field %s from file %s\n",fName.Data(),fTitle.Data());
- fname = gSystem->ExpandPathName(fTitle.Data());
- magfile=fopen(fname,"r");
- delete [] fname;
-
- printf("Cartensian part\n");
-
- if (magfile) {
-
-// Cartensian part
-
- fscanf(magfile,"%d %d %d ",&fdYl, &fdXl, &fdZl);
-
- printf("fdYl %d, fdXl %d, fdZl %d\n",fdYl, fdXl, fdZl);
-
- for (ik=0; ik<fdZl; ik++)
- {
-
- fscanf(magfile, " %e ", &zz);
- fdZc[ik]=zz;
-
- }
-
- for (ik=0; ik<fdYl; ik++)
- {
- fscanf(magfile, " %e ", &yy);
- fdY[ik]=yy;
-
- }
- for (ik=0; ik<81; ik++)
- {
- printf("fdZc %e,fdY %e\n", fdZc[ik],fdY[ik]);
- }
-
- fscanf(magfile," %e %e %e %e %e %e %e %e %e %e %e ", &fdYdel,&fdXdel,&fdZdel,&fdZmax,&fdZmin,&fdYmax,&fdYmin,&fdAx1,&fdCx1,&fdAx2,&fdCx2);
-
-printf("fdYdel %e, fdXdel %e, fdZdel %e\n",fdYdel,fdXdel,fdZdel);
-printf("fdZmax %e, fdZmin %e, fdYmax %e,fdYmin %e\n",fdZmax,fdZmin,fdYmax,fdYmin);
-printf("fdAx1 %e, fdCx1 %e, fdAx2 %e, fdCx %e\n",fdAx1,fdCx1,fdAx2,fdCx2);
-
- for (il=0; il<44; il++) {
- for (im=0; im<81; im++) {
- for (ik=0; ik<81; ik++) {
-
- fscanf(magfile, " %e ", &by);
- fdBcy[ik][im][il]=by;
- }
- }
- }
-
- for (il=0; il<44; il++) {
- for (im=0; im<81; im++) {
- for (ik=0; ik<81; ik++) {
-
- fscanf(magfile, " %e ", &bx);
- fdBcx[ik][im][il]=bx;
- }
- }
- }
-
- for (il=0; il<44; il++) {
- for (im=0; im<81; im++) {
- for (ik=0; ik<81; ik++) {
-
- fscanf(magfile, " %e ", &bz);
- fdBcz[ik][im][il]=bz;
- }
- }
- }
-//---------------------- Polar part ---------------------------------
-
- printf("Polar part\n");
- fscanf(magfile,"%d %d %d ", &fdZpl, &fdRn, &fdPhin);
- printf("fdZpl %d, fdRn %d, fdPhin %d\n",fdZpl,fdRn,fdPhin);
-
- printf(" fdZp array\n");
-
- for (ik=0; ik<51; ik++)
- {
- fscanf(magfile, " %e ", &zzp);
- fdZp[ik]=zzp;
- printf(" %e\n",fdZp[ik]);
- }
-
- printf(" fdR array\n");
-
- for (ik=0; ik<10; ik++)
- {
- fscanf(magfile, " %e ", &rr);
- fdR[ik]=rr;
- printf(" %e\n",fdR[ik]);
- }
-
-// printf("fdPhi array\n");
-
- for (il=0; il<33; il++)
- {
- fscanf(magfile, " %e ", &phii);
- fdPhi[il]=phii;
-// printf(" %e\n",fdPhi[il]);
- }
-
- fscanf(magfile," %e %e %e %e %e %e %e ",&fdZpdl,&fdPhid,&fdRdel,&fdZpmx,&fdZpmn,&fdRmax, &fdRmin);
-
-printf("fdZpdl %e, fdPhid %e, fdRdel %e, fdZpmx %e, fdZpmn %e,fdRmax %e,fdRmin %e \n", fdZpdl,fdPhid, fdRdel,fdZpmx, fdZpmn,fdRmax, fdRmin);
-
-
- for (il=0; il<33; il++) {
- for (im=0; im<10; im++) {
- for (ik=0; ik<51; ik++) {
- fscanf(magfile, " %e ", &by);
- fdBpy[ik][im][il]=by;
- }
- }
- }
-
- for (il=0; il<33; il++) {
- for (im=0; im<10; im++) {
- for (ik=0; ik<51; ik++) {
- fscanf(magfile, " %e ", &bx);
- fdBpx[ik][im][il]=bx;
- }
- }
- }
-
-
- for (il=0; il<33; il++) {
- for (im=0; im<10; im++) {
- for (ik=0; ik<51; ik++) {
- fscanf(magfile, " %e ", &bz);
- fdBpz[ik][im][il]=bz;
- }
- }
- }
-
-
- for (il=0; il<32; il++) {
- for (im=0; im<2; im++) {
- for (ik=0; ik<2; ik++) {
- fscanf(magfile, " %e ", &bb);
- fdB[ik][im][il]=bb;
- }
- }
- }
-//
- } else {
- printf("File %s not found !\n",fTitle.Data());
- exit(1);
- }
-}
-//________________________________
-#ifndef AliMagF_H
-#define AliMagF_H
+#ifndef ALIMAGF_H
+#define ALIMAGF_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
#include "TNamed.h"
#include "TVector.h"
-enum Field_t {Undef=1, Const=1, ConMesh=2, DipoMap=3};
+enum Field_t {kUndef=1, kConst=1, kConMesh=2, kDipoMap=3};
class AliMagF : public TNamed {
-protected:
- Int_t fMap; // Field Map identifier
- Int_t fType; // Mag Field type
- Int_t fInteg; // Integration method as indicated in Geant
- Float_t fFactor; // Multiplicative factor
- Float_t fMax; // Max Field as indicated in Geant
-
public:
AliMagF(){}
AliMagF(const char *name, const char *title, const Int_t integ, const Int_t map,
virtual Float_t Factor() const {return fFactor;}
virtual void ReadField() {}
- ClassDef(AliMagF,1) //Base class for all Alice MagField
-};
-
-class AliMagFC : public AliMagF
-{
- //Alice Constant Magnetic Field
-private:
-
-public:
- AliMagFC(){}
- AliMagFC(const char *name, const char *title, const Int_t integ, const Int_t map,
- const Float_t factor, const Float_t fmax);
- virtual ~AliMagFC() {}
- virtual void Field(Float_t *x, Float_t *b);
- virtual void ReadField() {}
-
- ClassDef(AliMagFC,1) //Class for all Alice Constant MagField
-};
-
-class AliMagFCM : public AliMagF
-{
- //Alice Magnetic Field with constan mesh
protected:
+ Int_t fMap; // Field Map identifier
+ Int_t fType; // Mag Field type
+ Int_t fInteg; // Integration method as indicated in Geant
+ Float_t fFactor; // Multiplicative factor
+ Float_t fMax; // Max Field as indicated in Geant
- Float_t fXbeg; // Start of mesh in x
- Float_t fYbeg; // Start of mesh in y
- Float_t fZbeg; // Start of mesh in z
- Float_t fXdel; // Mesh step in x
- Float_t fYdel; // Mesh step in y
- Float_t fZdel; // Mesh step in z
- Double_t fXdeli; // Inverse of Mesh step in x
- Double_t fYdeli; // Inverse of Mesh step in y
- Double_t fZdeli; // Inverse of Mesh step in z
- Int_t fXn; // Number of mesh points in x
- Int_t fYn; // Number of mesh points in y
- Int_t fZn; // Number of mesh points in z
- TVector *fB; // Field map
-public:
- AliMagFCM(){}
- AliMagFCM(const char *name, const char *title, const Int_t integ, const Int_t map,
- const Float_t factor, const Float_t fmax);
- virtual ~AliMagFCM() {delete fB;}
- virtual void Field(Float_t *x, Float_t *b);
- virtual void ReadField();
-
- inline Float_t Bx(const Int_t ix, const Int_t iy, const Int_t iz) {
- return (*fB)(3*(iz*(fXn*fYn)+iy*fXn+ix));
- }
- inline Float_t By(const Int_t ix, const Int_t iy, const Int_t iz) {
- return (*fB)(3*(iz*(fXn*fYn)+iy*fXn+ix)+1);
- }
- inline Float_t Bz(const Int_t ix, const Int_t iy, const Int_t iz) {
- return (*fB)(3*(iz*(fXn*fYn)+iy*fXn+ix)+2);
- }
-
- ClassDef(AliMagFCM,1) //Class for all Alice MagField with Constant Mesh
+ ClassDef(AliMagF,1) //Base class for all Alice MagField
};
-//************************************
-//
-class AliMagFDM : public AliMagF
-{
-//Alice Magnetic Field:Magnetic field map from IP to muon filter for Muon arm
-protected:
+//ZDC part -------------------------------------------------------------------
+ static const Float_t kG1=20.03;
+ static const Float_t kFDIP=-37.34;
+ static const Float_t kFDIMU=6.;
+ static const Float_t kFCORN=11.72;
//
-
- Int_t fdInd; // Character number of validity Map region
-
- Float_t fdZmin; // Start of the cartesian part of MAP in z
- Float_t fdZmax; // End of Map in z
- Float_t fdYmax; // Start of the cartesian part of MAP in y
- Float_t fdYmin; // End of the cartesian part of MAP in y
- Float_t fdZpmx; // End of the polar part of MAP in z
- Float_t fdZpmn; // Start of the polar part of MAP in z
- Float_t fdRmax; // Maximal radius of the polar part of MAP
- Float_t fdRmin; // Minimal radius of the polar part of MAP
-
-
- Float_t fdXdel; // step in x - cartesian part of MAP
- Float_t fdYdel; // step in y - cartesian part of MAP
- Float_t fdZdel; // step in z - cartesian part of MAP
-
- Float_t fdRdel; // step in r - polar part of MAP
- Float_t fdPhid; // step in Phi - polar part of MAP
- Float_t fdZpdl; // step in z - polar part of MAP
-
- Float_t fdCx1, fdCx2;
- Float_t fdAx1, fdAx2;
-
- Float_t fdZc[81]; // z coordinates in cartesian part
- Float_t fdY[81]; // y coordinates in cartesian part
- Float_t fdBcx[81][81][44]; // Bx array for cartesian part
- Float_t fdBcy[81][81][44]; // By array for cartesian part
- Float_t fdBcz[81][81][44]; // Bz array for cartesian part
-
- Float_t fdZp[51]; // z coordinates in polar part
- Float_t fdR[10]; // r coordinates in polar part
- Float_t fdPhi[33]; // Phi coordinates in polar part
-
- Float_t fdBpx[51][10][33]; // Bx array for polar part
- Float_t fdBpy[51][10][33]; // By array for polar part
- Float_t fdBpz[51][10][33]; // Bx array for polar part
- Float_t fdB[2][2][32];
-
- Int_t fdXl; // Number steps in x for cartesian part
- Int_t fdYl; // Number steps in y for cartesian par
- Int_t fdZl; // Number steps in z for cartesian part
-
- Int_t fdRn; // Number steps in r for polar part
- Int_t fdPhin; // Number steps in Phi for polar part
- Int_t fdZpl; // Number steps in z for polar part
-
- Float_t rrtes;
-
-public:
- AliMagFDM(){}
- AliMagFDM(const char *name, const char *title, const Int_t integ, const Int_t
- map, const Float_t factor, const Float_t fmax);
- virtual ~AliMagFDM(){}
- virtual void Field(Float_t *x, Float_t *b);
- virtual void ReadField();
-
-
- void FZ(Double_t *u, Float_t *Ar, Float_t *du, Int_t *ki, Int_t *kf, Double_t *a1, Double_t *a2 , Int_t *nu);
- void FRfuncBi(Int_t *kai, Double_t *za1, Double_t *za2, Double_t *al1, Double_t *al2, Double_t *al3, Int_t *ka, Int_t *ma,Double_t *ba);
- void FGfuncBi(Double_t *z1, Double_t *z2, Double_t *y1, Double_t *y2, Double_t *x1, Double_t *x2, Int_t *kvr, Int_t *k, Int_t *l, Int_t *m, Double_t *bb);
-//_________________________________________
-
- ClassDef(AliMagFDM,1) //Class Magnetic field map from IP till muon filter
-};
-
+// ZBEG Beginning of the inner triplet
+// D1BEG Beginning of separator dipole 1
+// D2BEG Beginning of separator dipole 2
+// CORBEG Corrector dipole beginning (because of dimuon arm)
+//
+ static const Float_t kCORBEG=1920,kCOREND=kCORBEG+190, kCORRA2=4.5*4.5;
+//
+ static const Float_t kZBEG=2300;
+ static const Float_t kZ1BEG=kZBEG+ 0,kZ1END=kZ1BEG+630,kZ1RA2=3.5*3.5;
+ static const Float_t kZ2BEG=kZBEG+ 880,kZ2END=kZ2BEG+550,kZ2RA2=3.5*3.5;
+ static const Float_t kZ3BEG=kZBEG+1530,kZ3END=kZ3BEG+550,kZ3RA2=3.5*3.5;
+ static const Float_t kZ4BEG=kZBEG+2430,kZ4END=kZ4BEG+630,kZ4RA2=3.5*3.5;
+ static const Float_t kD1BEG=5843.5 ,kD1END=kD1BEG+945,kD1RA2=4.5*4.5;
+ static const Float_t kD2BEG=12113.2 ,kD2END=kD2BEG+945,kD2RA2=4.5*.5;
+
+//ZDC part -------------------------------------------------------------------
#endif
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/*
+$Log$
+*/
+
+#include "AliMagFC.h"
+
+ClassImp(AliMagFC)
+
+//________________________________________
+AliMagFC::AliMagFC(const char *name, const char *title, const Int_t integ,
+ const Int_t map, const Float_t factor, const Float_t fmax)
+ : AliMagF(name,title,integ,map,factor,fmax)
+{
+ //
+ // Standard constructor
+ //
+ printf("Constant Field %s created: map= %d, factor= %f\n",fName.Data(),map,
+ factor);
+ fType = kConst;
+}
+
+//________________________________________
+void AliMagFC::Field(Float_t *x, Float_t *b)
+{
+ //
+ // Method to return the field in a point
+ //
+ b[0]=b[1]=b[2]=0;
+ if(fMap==1) {
+ if(TMath::Abs(x[2])<700 && x[0]*x[0]+(x[1]+30)*(x[1]+30) < 560*560) {
+ b[2]=2;
+ } else {
+ if ( 725 <= x[2] && x[2] <= 1225 ) {
+ Float_t dz = TMath::Abs(975-x[2])*0.01;
+ b[0]=(1-0.1*dz*dz)*7;
+ }
+ else {
+//This is the ZDC part
+ Float_t rad2=x[0]*x[0]+x[1]*x[1];
+ if(rad2<kD2RA2) {
+ if(x[2]>kD2BEG) {
+
+// Separator Dipole D2
+ if(x[2]<kD2END) b[1]=kFDIP;
+ } else if(x[2]>kD1BEG) {
+
+// Separator Dipole D1
+ if(x[2]<kD1END) b[1]=-kFDIP;
+ }
+ if(rad2<kCORRA2) {
+
+// First quadrupole of inner triplet de-focussing in x-direction
+// Inner triplet
+ if(x[2]>kZ4BEG) {
+ if(x[2]<kZ4END) {
+
+// 2430 <-> 3060
+ b[0]=-kG1*x[1];
+ b[1]=-kG1*x[0];
+ }
+ } else if(x[2]>kZ3BEG) {
+ if(x[2]<kZ3END) {
+
+// 1530 <-> 2080
+ b[0]=kG1*x[1];
+ b[1]=kG1*x[0];
+ }
+ } else if(x[2]>kZ2BEG) {
+ if(x[2]<kZ2END) {
+
+// 890 <-> 1430
+ b[0]=kG1*x[1];
+ b[1]=kG1*x[0];
+ }
+ } else if(x[2]>kZ1BEG) {
+ if(x[2]<kZ1END) {
+
+// 0 <-> 630
+ b[0]=-kG1*x[1];
+ b[1]=-kG1*x[0];
+ }
+ } else if(x[2]>kCORBEG) {
+ if(x[2]<kCOREND) {
+// Corrector dipole (because of dimuon arm)
+ b[0]=kFCORN;
+ }
+ }
+ }
+ }
+ }
+ }
+ if(fFactor!=1) {
+ b[0]*=fFactor;
+ b[1]*=fFactor;
+ b[2]*=fFactor;
+ }
+ } else {
+ printf("Invalid field map for constant field %d\n",fMap);
+ exit(1);
+ }
+}
+
--- /dev/null
+#ifndef ALIMAGFC_H
+#define ALIMAGFC_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id$ */
+
+#include "AliMagF.h"
+
+class AliMagFC : public AliMagF
+{
+ //Alice Constant Magnetic Field
+
+public:
+ AliMagFC(){}
+ AliMagFC(const char *name, const char *title, const Int_t integ,
+ const Int_t map, const Float_t factor, const Float_t fmax);
+ virtual ~AliMagFC() {}
+ virtual void Field(Float_t *x, Float_t *b);
+ virtual void ReadField() {}
+
+ ClassDef(AliMagFC,1) //Class for all Alice Constant MagField
+};
+
+#endif
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/*
+$Log$
+*/
+
+#include "AliMagFCM.h"
+#include "TSystem.h"
+
+ClassImp(AliMagFCM)
+
+//________________________________________
+AliMagFCM::AliMagFCM(const char *name, const char *title, const Int_t integ,
+ const Int_t map, const Float_t factor, const Float_t fmax)
+ : AliMagF(name,title,integ,map,factor,fmax)
+{
+ //
+ // Standard constructor
+ //
+ fType = kConMesh;
+ printf("Constant Mesh Field %s created: map= %d, factor= %f, file= %s\n",
+ fName.Data(),map,factor,fTitle.Data());
+}
+
+//________________________________________
+AliMagFCM::AliMagFCM(const AliMagFCM &magf)
+{
+ //
+ // Copy constructor
+ //
+ magf.Copy(*this);
+}
+
+//________________________________________
+void AliMagFCM::Field(Float_t *x, Float_t *b)
+{
+ //
+ // Method to calculate the magnetic field
+ //
+ Double_t ratx, raty, ratz, hix, hiy, hiz, ratx1, raty1, ratz1,
+ bhyhz, bhylz, blyhz, blylz, bhz, blz, xl[3];
+ const Double_t kone=1;
+ Int_t ix, iy, iz;
+
+ // --- find the position in the grid ---
+
+ b[0]=b[1]=b[2]=0;
+ if(-700<x[2] && x[2]<fZbeg && x[0]*x[0]+(x[1]+30)*(x[1]+30) < 560*560) {
+ b[2]=2;
+ } else {
+ Bool_t infield=(fZbeg<=x[2] && x[2]<fZbeg+fZdel*(fZn-1)
+ && ( fXbeg <= TMath::Abs(x[0]) && TMath::Abs(x[0]) < fXbeg+fXdel*(fXn-1) )
+ && ( fYbeg <= TMath::Abs(x[1]) && TMath::Abs(x[1]) < fYbeg+fYdel*(fYn-1) ));
+ if(infield) {
+ xl[0]=TMath::Abs(x[0])-fXbeg;
+ xl[1]=TMath::Abs(x[1])-fYbeg;
+ xl[2]=x[2]-fZbeg;
+
+ // --- start with x
+
+ hix=xl[0]*fXdeli;
+ ratx=hix-int(hix);
+ ix=int(hix);
+
+ hiy=xl[1]*fYdeli;
+ raty=hiy-int(hiy);
+ iy=int(hiy);
+
+ hiz=xl[2]*fZdeli;
+ ratz=hiz-int(hiz);
+ iz=int(hiz);
+
+ if(fMap==2) {
+ // ... simple interpolation
+ ratx1=kone-ratx;
+ raty1=kone-raty;
+ ratz1=kone-ratz;
+ bhyhz = Bx(ix ,iy+1,iz+1)*ratx1+Bx(ix+1,iy+1,iz+1)*ratx;
+ bhylz = Bx(ix ,iy+1,iz )*ratx1+Bx(ix+1,iy+1,iz )*ratx;
+ blyhz = Bx(ix ,iy ,iz+1)*ratx1+Bx(ix+1,iy ,iz+1)*ratx;
+ blylz = Bx(ix ,iy ,iz )*ratx1+Bx(ix+1,iy ,iz )*ratx;
+ bhz = blyhz *raty1+bhyhz *raty;
+ blz = blylz *raty1+bhylz *raty;
+ b[0] = blz *ratz1+bhz *ratz;
+ //
+ bhyhz = By(ix ,iy+1,iz+1)*ratx1+By(ix+1,iy+1,iz+1)*ratx;
+ bhylz = By(ix ,iy+1,iz )*ratx1+By(ix+1,iy+1,iz )*ratx;
+ blyhz = By(ix ,iy ,iz+1)*ratx1+By(ix+1,iy ,iz+1)*ratx;
+ blylz = By(ix ,iy ,iz )*ratx1+By(ix+1,iy ,iz )*ratx;
+ bhz = blyhz *raty1+bhyhz *raty;
+ blz = blylz *raty1+bhylz *raty;
+ b[1] = blz *ratz1+bhz *ratz;
+ //
+ bhyhz = Bz(ix ,iy+1,iz+1)*ratx1+Bz(ix+1,iy+1,iz+1)*ratx;
+ bhylz = Bz(ix ,iy+1,iz )*ratx1+Bz(ix+1,iy+1,iz )*ratx;
+ blyhz = Bz(ix ,iy ,iz+1)*ratx1+Bz(ix+1,iy ,iz+1)*ratx;
+ blylz = Bz(ix ,iy ,iz )*ratx1+Bz(ix+1,iy ,iz )*ratx;
+ bhz = blyhz *raty1+bhyhz *raty;
+ blz = blylz *raty1+bhylz *raty;
+ b[2] = blz *ratz1+bhz *ratz;
+ //printf("ratx,raty,ratz,b[0],b[1],b[2] %f %f %f %f %f %f\n",
+ //ratx,raty,ratz,b[0],b[1],b[2]);
+ //
+ // ... use the dipole symmetry
+ if (x[0]*x[1] < 0) b[1]=-b[1];
+ if (x[0]<0) b[2]=-b[2];
+ } else {
+ printf("Invalid field map for constant mesh %d\n",fMap);
+ }
+ } else {
+ //This is the ZDC part
+ Float_t rad2=x[0]*x[0]+x[1]*x[1];
+ if(rad2<kD2RA2) {
+ if(x[2]>kD2BEG) {
+
+ // Separator Dipole D2
+ if(x[2]<kD2END) b[1]=kFDIP;
+ } else if(x[2]>kD1BEG) {
+
+ // Separator Dipole D1
+ if(x[2]<kD1END) b[1]=-kFDIP;
+ }
+ if(rad2<kCORRA2) {
+
+ // First quadrupole of inner triplet de-focussing in x-direction
+ // Inner triplet
+ if(x[2]>kZ4BEG) {
+ if(x[2]<kZ4END) {
+
+ // 2430 <-> 3060
+ b[0]=-kG1*x[1];
+ b[1]=-kG1*x[0];
+ }
+ } else if(x[2]>kZ3BEG) {
+ if(x[2]<kZ3END) {
+
+ // 1530 <-> 2080
+ b[0]=kG1*x[1];
+ b[1]=kG1*x[0];
+ }
+ } else if(x[2]>kZ2BEG) {
+ if(x[2]<kZ2END) {
+
+ // 890 <-> 1430
+ b[0]=kG1*x[1];
+ b[1]=kG1*x[0];
+ }
+ } else if(x[2]>kZ1BEG) {
+ if(x[2]<kZ1END) {
+
+ // 0 <-> 630
+ b[0]=-kG1*x[1];
+ b[1]=-kG1*x[0];
+ }
+ } else if(x[2]>kCORBEG) {
+ if(x[2]<kCOREND) {
+ // Corrector dipole (because of dimuon arm)
+ b[0]=kFCORN;
+ }
+ }
+ }
+ }
+ }
+ }
+ if(fFactor!=1) {
+ b[0]*=fFactor;
+ b[1]*=fFactor;
+ b[2]*=fFactor;
+ }
+}
+
+//________________________________________
+void AliMagFCM::ReadField()
+{
+ //
+ // Method to read the magnetic field map from file
+ //
+ FILE *magfile;
+ Int_t ix, iy, iz, ipx, ipy, ipz;
+ Float_t bx, by, bz;
+ char *fname;
+ printf("Reading Magnetic Field %s from file %s\n",fName.Data(),fTitle.Data());
+ fname = gSystem->ExpandPathName(fTitle.Data());
+ magfile=fopen(fname,"r");
+ delete [] fname;
+ if (magfile) {
+ fscanf(magfile,"%d %d %d %f %f %f %f %f %f",
+ &fXn, &fYn, &fZn, &fXdel, &fYdel, &fZdel, &fXbeg, &fYbeg, &fZbeg);
+ printf("fXn %d, fYn %d, fZn %d, fXdel %f, fYdel %f, fZdel %f, fXbeg %f, fYbeg %f, fZbeg %f\n",
+ fXn, fYn, fZn, fXdel, fYdel, fZdel, fXbeg, fYbeg, fZbeg);
+ fXdeli=1./fXdel;
+ fYdeli=1./fYdel;
+ fZdeli=1./fZdel;
+ fB = new TVector(3*fXn*fYn*fZn);
+ for (iz=0; iz<fZn; iz++) {
+ ipz=iz*3*(fXn*fYn);
+ for (iy=0; iy<fYn; iy++) {
+ ipy=ipz+iy*3*fXn;
+ for (ix=0; ix<fXn; ix++) {
+ ipx=ipy+ix*3;
+ fscanf(magfile,"%f %f %f",&bz,&by,&bx);
+ (*fB)(ipx+2)=bz;
+ (*fB)(ipx+1)=by;
+ (*fB)(ipx )=bx;
+ }
+ }
+ }
+ } else {
+ printf("File %s not found !\n",fTitle.Data());
+ exit(1);
+ }
+}
+
+//________________________________________
+void AliMagFCM::Copy(AliMagFCM &magf) const
+{
+ //
+ // Copy *this onto magf
+ //
+ Fatal("Copy","Not implemented!\n");
+}
+
+//________________________________________
+AliMagFCM & AliMagFCM::operator =(const AliMagFCM &magf)
+{
+ magf.Copy(*this);
+ return *this;
+}
--- /dev/null
+#ifndef ALIMAGFCM_H
+#define ALIMAGFCM_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id$ */
+
+#include "AliMagF.h"
+
+class AliMagFCM : public AliMagF
+{
+ //Alice Magnetic Field with constan mesh
+
+public:
+ AliMagFCM(){}
+ AliMagFCM(const char *name, const char *title, const Int_t integ, const Int_t map,
+ const Float_t factor, const Float_t fmax);
+ AliMagFCM(const AliMagFCM &mag);
+ virtual ~AliMagFCM() {delete fB;}
+ virtual void Field(Float_t *x, Float_t *b);
+ virtual void ReadField();
+ virtual void Copy(AliMagFCM &magf) const;
+ virtual AliMagFCM & operator=(const AliMagFCM &magf);
+
+ Float_t Bx(const Int_t ix, const Int_t iy, const Int_t iz) {
+ return (*fB)(3*(iz*(fXn*fYn)+iy*fXn+ix));
+ }
+ Float_t By(const Int_t ix, const Int_t iy, const Int_t iz) {
+ return (*fB)(3*(iz*(fXn*fYn)+iy*fXn+ix)+1);
+ }
+ Float_t Bz(const Int_t ix, const Int_t iy, const Int_t iz) {
+ return (*fB)(3*(iz*(fXn*fYn)+iy*fXn+ix)+2);
+ }
+
+protected:
+
+ Float_t fXbeg; // Start of mesh in x
+ Float_t fYbeg; // Start of mesh in y
+ Float_t fZbeg; // Start of mesh in z
+ Float_t fXdel; // Mesh step in x
+ Float_t fYdel; // Mesh step in y
+ Float_t fZdel; // Mesh step in z
+ Double_t fXdeli; // Inverse of Mesh step in x
+ Double_t fYdeli; // Inverse of Mesh step in y
+ Double_t fZdeli; // Inverse of Mesh step in z
+ Int_t fXn; // Number of mesh points in x
+ Int_t fYn; // Number of mesh points in y
+ Int_t fZn; // Number of mesh points in z
+ TVector *fB; // Field map
+
+ ClassDef(AliMagFCM,1) //Class for all Alice MagField with Constant Mesh
+};
+
+#endif
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/*
+$Log$
+*/
+
+#include "AliMagFDM.h"
+#include "TSystem.h"
+
+
+ClassImp(AliMagFDM)
+
+//________________________________________
+AliMagFDM::AliMagFDM(const char *name, const char *title, const Int_t integ,
+const Int_t map, const Float_t factor, const Float_t fmax)
+ : AliMagF(name,title,integ,map,factor,fmax)
+
+{
+ fType = kDipoMap;
+
+ printf("Field Map for Muon Arm from IP till muon filter %s created: map= %d, factor= %f, file=%s\n",fName.Data(),map,factor,fTitle.Data());
+
+}
+
+//________________________________________
+
+void AliMagFDM::Field(Float_t *xfi, Float_t *b)
+{
+ //
+ // Main routine to compute the field in a point
+ //
+ static const Double_t keps=0.1E-06;
+ static const Double_t kpi2=.6283185E+01;
+ static const Double_t kone=1;
+
+ static const Int_t kiip=33;
+ static const Int_t kmiip=0;
+ static const Int_t kliip=0;
+
+ static const Int_t kiic=0;
+ static const Int_t kmiic=0;
+ static const Int_t kliic=0;
+
+ static const Double_t kfdZbg=502.92; // Start of Map using in z
+ static const Double_t kfdZL3=600; // Beginning of L3 door in z
+
+ Double_t x[3];
+ Double_t xL3[3];
+ Double_t bint[3];
+
+ Double_t r0;
+
+ Double_t bbj;
+ Int_t iKvar,jb;
+
+ Double_t zp1, zp2,xp1,xp2,yp1,yp2;
+ Double_t zz1, zz2,yy1,yy2,x2,x1;
+
+// --- start the map fiel from z = 502.92 cm ---
+
+ x[0] = xfi[0];
+ x[1] = xfi[1];
+ x[2] = xfi[2];
+ b[0]=b[1]=b[2]=0;
+ // printf("x[0] %f,x[1] %f,x[2] %f\n",x[0],x[1],x[2]);
+
+ Double_t rr=TMath::Sqrt(x[0]*x[0]+x[1]*x[1]);
+ r0=rr/100;
+ Double_t rPmax;
+ rPmax=fdRmax;
+ if ( (-700<x[2] && x[2]<=kfdZbg &&
+ (x[0]*x[0]+(x[1]+30)*(x[1]+30))< 560*560)
+ || (kfdZbg<x[2] && x[2]<=kfdZL3 && rr>=rPmax*100) )
+ {
+ b[2]=2;
+ }
+
+ xL3[0]=x[0]/100;
+ xL3[1]=(x[1]+30)/100;
+ xL3[2]=x[2]/100;
+
+ Double_t xminn=xL3[2]*fdAx1+fdCx1;
+ Double_t xmaxx=xL3[2]*fdAx2+fdCx2;
+ Double_t zCmin,zCmax,yCmin,yCmax;
+
+ zCmin=fdZmin;
+ zCmax=fdZmax;
+ yCmin=fdYmin;
+ yCmax=fdYmax;
+
+if ((kfdZbg/100<xL3[2] && xL3[2]<zCmin && r0<rPmax) || ((zCmin<=xL3[2] && xL3[2] <= zCmax ) && (yCmin<=xL3[1] && xL3[1]<= yCmax) && (xminn <= xL3[0] && xL3[0] <= xmaxx)))
+ {
+ if(fMap==3)
+ {
+ if (xL3[2]<zCmin && r0<rPmax)
+ {
+ //--------------------- Polar part ----------------------
+
+ Double_t yyp,ph0;
+ Int_t kp0, lp0, mp0;
+ Int_t kpi,lpi,mpi;
+ Double_t alp1,alp2,alp3;
+ Double_t zpz,rp,fip,cphi;
+
+ kpi=kiip;
+ lpi=kliip;
+ mpi=kmiip;
+
+ zpz=xL3[2];
+
+ FZ(&zpz, fdZp ,&fdZpdl,&kpi,&kp0,&zp1 ,&zp2,&fdZpl) ;
+
+ yyp=xL3[1]- 0.3;
+ cphi=yyp/r0;
+ ph0=TMath::ACos(cphi);
+ if (xL3[0]< 0) {ph0=kpi2 - ph0;}
+
+ fip=ph0;
+ FZ(&fip,fdPhi,&fdPhid ,&mpi,&mp0, &xp1,&xp2,&fdPhin);
+
+ Double_t rDel;
+ rDel=fdRdel;
+
+ if (r0<= fdRdel)
+ {
+
+ if(r0< keps)
+ {
+
+ bint[0]=(zp1*fdBpx[kp0][0][0] + zp2*fdBpx[kp0+1][0][0])*10;
+ bint[1]=(zp1*fdBpy[kp0][0][0] + zp2*fdBpy[kp0+1][0][0])*10;
+ bint[2]=(zp1*fdBpz[kp0][0][0] + zp2*fdBpz[kp0+1][0][0])*10;
+
+ }
+
+ alp2= fdB[0][0][mp0]*yyp + fdB[0][1][mp0]*xL3[0];
+ alp3= fdB[1][0][mp0]*yyp + fdB[1][1][mp0]*xL3[0];
+ alp1= kone - alp2 - alp3;
+
+ for (jb=0; jb<3 ; jb++)
+ {
+ iKvar=jb;
+ FRfuncBi(&iKvar,&zp1,&zp2,&alp1,&alp2,&alp3, &kp0,&mp0, &bbj);
+ bint[jb] = bbj*10 ;
+ }
+ }
+ else
+ {
+ rp=r0;
+
+ FZ(&rp,fdR ,&fdRdel,&lpi,&lp0,&yp1,&yp2,&fdRn);
+
+ for (jb=0; jb<3 ; jb++)
+ {
+ iKvar=jb;
+ FGfuncBi(&zp1,&zp2,&yp1,&yp2,&xp1,&xp2,&iKvar,&kp0,&lp0,&mp0,&bbj);
+
+ bint[jb] = bbj*10 ;
+ }
+ }
+
+ b[0]=bint[0];
+ b[1]=bint[1];
+ b[2]=bint[2];
+
+// fprintf(fitest,"------------- Freg2 run -------------\n");
+
+ }
+ else
+ {
+ //-------------- Cartensian part ------------------
+
+ Double_t zzc,yyc;
+ Int_t k0, l0,m0;
+ Double_t xx1, xx2,dx, xxx ,xXl;
+ Int_t kci,mci,lci;
+
+ kci=kiic;
+ lci=kliic;
+ mci=kmiic;
+
+ xx1 = fdAx1*xL3[2] + fdCx1;
+ xx2 = fdAx2*xL3[2] + fdCx2;
+
+ zzc=xL3[2];
+ FZ(&zzc, fdZc ,&fdZdel, &kci,&k0, &zz1, &zz2, &fdZl);
+
+ yyc=xL3[1];
+ FZ(&yyc, fdY , &fdYdel,&lci, &l0, &yy1, &yy2,&fdYl);
+
+ xXl = fdXl-kone;
+ dx = (xx2-xx1)/xXl;
+ xxx= xL3[0]-xx1;
+ // xm = xxx/dx;
+ m0 = int(xxx/dx);
+
+ if(xL3[0]<(xx1+m0*dx) || xL3[0] >(xx1+(m0+1)*dx))
+ {
+ m0=m0+1;
+ printf(" m0 %d, m0+1 %d\n",m0,m0+1);
+ }
+
+ x2=(xL3[0]-( xx1+m0*dx))/dx;
+ x1=kone-x2;
+ m0=m0-1;
+ for (jb=3; jb<6; jb++)
+ {
+ iKvar=jb;
+ FGfuncBi(&zz1,&zz2,&yy1,&yy2,&x1,&x2,&iKvar,&k0, &l0, &m0, &bbj);
+ bint[jb-3] = bbj*10 ;
+ }
+
+ b[0]=bint[0];
+ b[1]=bint[1];
+ b[2]=bint[2];
+
+// fprintf(fitest,"------------ Freg1 run -----------------\n");
+ }
+
+ } else {
+ printf("Unknown map of Dipole region %d\n",fMap);
+ }
+
+} else {
+
+//This is the ZDC part
+ Float_t rad2=x[0]*x[0]+x[1]*x[1];
+ if(rad2<kD2RA2) {
+ if(x[2]>kD2BEG) {
+
+// Separator Dipole D2
+ if(x[2]<kD2END) b[1]=kFDIP;
+ } else if(x[2]>kD1BEG) {
+
+// Separator Dipole D1
+ if(x[2]<kD1END) b[1]=-kFDIP;
+ }
+ if(rad2<kCORRA2) {
+
+// First quadrupole of inner triplet de-focussing in x-direction
+// Inner triplet
+ if(x[2]>kZ4BEG) {
+ if(x[2]<kZ4END) {
+
+// 2430 <-> 3060
+ b[0]=-kG1*x[1];
+ b[1]=-kG1*x[0];
+ }
+ } else if(x[2]>kZ3BEG) {
+ if(x[2]<kZ3END) {
+
+// 1530 <-> 2080
+ b[0]=kG1*x[1];
+ b[1]=kG1*x[0];
+ }
+ } else if(x[2]>kZ2BEG) {
+ if(x[2]<kZ2END) {
+
+// 890 <-> 1430
+ b[0]=kG1*x[1];
+ b[1]=kG1*x[0];
+ }
+ } else if(x[2]>kZ1BEG) {
+ if(x[2]<kZ1END) {
+
+// 0 <-> 630
+ b[0]=-kG1*x[1];
+ b[1]=-kG1*x[0];
+ }
+ } else if(x[2]>kCORBEG) {
+ if(x[2]<kCOREND) {
+// Corrector dipole (because of dimuon arm)
+// b[0]=kFCORN;
+ b[0]=-kFCORN;
+ }
+ }
+ }
+ }
+ }
+
+ if(fFactor!=1) {
+ b[0]*=fFactor;
+ b[1]*=fFactor;
+ b[2]*=fFactor;
+ }
+}
+
+//_________________________________________
+
+void AliMagFDM::FZ(Double_t *u, Float_t *Ar, Float_t *du,Int_t *ki,Int_t *kf,Double_t *a1,Double_t *a2 ,Int_t *nu)
+
+{
+ //
+ // Z component of the field
+ //
+ static const Double_t kone=1;
+ Int_t l,ik,ikj;
+ Double_t temp;
+ Double_t ddu,delu,ar;
+
+ Int_t nk,ku;
+ temp=*u;
+ nk=*nu;
+ ik=*ki;
+ delu=*du;
+
+ ar=Ar[ik];
+ ddu=temp-ar;
+
+ ku=int(ddu/delu);
+ ikj=ik+ku;
+ if (ddu<=0) ikj=0;
+
+ for(l=ikj; l<nk; l++)
+ {
+
+ if(temp < Ar[l])
+ {
+ *kf=l;
+ *a2=(temp-Ar[l])/(Ar[l+1]-Ar[l]);
+ *a1= kone - *a2;
+ break;
+ }
+ }
+ }
+
+/*-------------FRfuncBi----------------*/
+
+void AliMagFDM::FRfuncBi(Int_t *kai,Double_t *za1, Double_t *za2, Double_t *al1, Double_t *al2, Double_t *al3, Int_t *ka, Int_t *ma, Double_t *ba)
+{
+ //
+ // This method needs to be commented
+ //
+ Double_t fa11,fa12,fa13;
+ Double_t fa21,fa22,fa23;
+ Double_t faY1,faY2;
+ Double_t bba;
+
+ Double_t zaa1,zaa2,alf1,alf2,alf3;
+ Int_t kaai,kaa,maa;
+ kaai=*kai;
+ kaa=*ka;
+ maa=*ma;
+ zaa1=*za1;
+ zaa2=*za2;
+ alf1=*al1;
+ alf2=*al2;
+ alf3=*al3;
+
+ if (kaai==0 ) {
+ fa11 = fdBpx[kaa][0][0];
+ fa12 = fdBpx[kaa][0][maa];
+ fa13 = fdBpx[kaa][0][maa+1];
+ fa21 = fdBpx[kaa+1][0][0];
+ fa22 = fdBpx[kaa+1][0][maa];
+ fa23 = fdBpx[kaa+1][0][maa+1];
+ }
+ if (kaai==1 ) {
+ fa11 = fdBpy[kaa][0][0];
+ fa12 = fdBpy[kaa][0][maa];
+ fa13 = fdBpy[kaa][0][maa+1];
+ fa21 = fdBpy[kaa+1][0][0];
+ fa22 = fdBpy[kaa+1][0][maa];
+ fa23 = fdBpy[kaa+1][0][maa+1];
+ }
+ if (kaai==2 ) {
+ fa11 = fdBpz[kaa][0][0];
+ fa12 = fdBpz[kaa][0][maa];
+ fa13 = fdBpz[kaa][0][maa+1];
+ fa21 = fdBpz[kaa+1][0][0];
+ fa22 = fdBpz[kaa+1][0][maa];
+ fa23 = fdBpz[kaa+1][0][maa+1];
+ }
+ faY1=alf1*fa11+alf2*fa12+alf3*fa13;
+ faY2=alf1*fa21+alf2*fa22+alf3*fa23;
+ bba = zaa1*faY1+zaa2*faY2;
+ *ba=bba;
+
+}
+
+
+/*----------- FGfuncBi------------*/
+
+void AliMagFDM::FGfuncBi(Double_t *zz1,Double_t *zz2, Double_t *yy1,Double_t *yy2, Double_t *xx1,Double_t *xx2, Int_t *kvr, Int_t *kk, Int_t *ll, Int_t *mm, Double_t *bb)
+{
+ //
+ // This method needs to be commented
+ //
+ Double_t fy1, fy2, ffy;
+ Double_t gy1,gy2,ggy;
+ Double_t z1,z2,y1,y2,x1,x2;
+
+ Int_t k,l,m,kv;
+ Double_t bbi;
+
+ Double_t bf11,bf12,bf21,bf22;
+ Double_t bg11,bg12,bg21,bg22;
+ k=*kk;
+ l=*ll;
+ m=*mm;
+
+ kv=*kvr;
+
+ z1=*zz1;
+ z2=*zz2;
+ y1=*yy1;
+ y2=*yy2;
+ x1=*xx1;
+ x2=*xx2;
+
+ /*-----------------Polar part ------------------*/
+
+ if(kv==0) {
+ bf11=fdBpx[k][l][m];
+ bf12=fdBpx[k+1][l][m];
+ bf21=fdBpx[k+1][l+1][m];
+ bf22=fdBpx[k][l+1][m];
+
+ bg11=fdBpx[k][l][m+1];
+ bg12=fdBpx[k+1][l][m+1];
+ bg21=fdBpx[k+1][l+1][m+1];
+ bg22=fdBpx[k][l+1][m+1];
+ }
+ if(kv==1) {
+ bf11=fdBpy[k][l][m];
+ bf12=fdBpy[k+1][l][m];
+ bf21=fdBpy[k+1][l+1][m];
+ bf22=fdBpy[k][l+1][m];
+
+ bg11=fdBpy[k][l][m+1];
+ bg12=fdBpy[k+1][l][m+1];
+ bg21=fdBpy[k+1][l+1][m+1];
+ bg22=fdBpy[k][l+1][m+1];
+ }
+
+ if(kv==2) {
+ bf11=fdBpz[k][l][m];
+ bf12=fdBpz[k+1][l][m];
+ bf21=fdBpz[k+1][l+1][m];
+ bf22=fdBpz[k][l+1][m];
+
+ bg11=fdBpz[k][l][m+1];
+ bg12=fdBpz[k+1][l][m+1];
+ bg21=fdBpz[k+1][l+1][m+1];
+ bg22=fdBpz[k][l+1][m+1];
+ }
+ /*-----------------Cartensian part ---------------*/
+
+ if(kv==3) {
+ bf11=fdBcx[k][l][m];
+ bf12=fdBcx[k+1][l][m];
+ bf21=fdBcx[k+1][l+1][m];
+ bf22=fdBcx[k][l+1][m];
+
+ bg11=fdBcx[k][l][m+1];
+ bg12=fdBcx[k+1][l][m+1];
+ bg21=fdBcx[k+1][l+1][m+1];
+ bg22=fdBcx[k][l+1][m+1];
+ }
+
+ if(kv==4) {
+ bf11=fdBcy[k][l][m];
+ bf12=fdBcy[k+1][l][m];
+ bf21=fdBcy[k+1][l+1][m];
+ bf22=fdBcy[k][l+1][m];
+
+ bg11=fdBcy[k][l][m+1];
+ bg12=fdBcy[k+1][l][m+1];
+ bg21=fdBcy[k+1][l+1][m+1];
+ bg22=fdBcy[k][l+1][m+1];
+ }
+ if(kv==5) {
+ bf11=fdBcz[k][l][m];
+ bf12=fdBcz[k+1][l][m];
+ bf21=fdBcz[k+1][l+1][m];
+ bf22=fdBcz[k][l+1][m];
+
+ bg11=fdBcz[k][l][m+1];
+ bg12=fdBcz[k+1][l][m+1];
+ bg21=fdBcz[k+1][l+1][m+1];
+ bg22=fdBcz[k][l+1][m+1];
+ }
+
+
+
+ fy1=z1*bf11+z2*bf12;
+ fy2=z2*bf21+z1* bf22;
+ ffy=y1*fy1+ y2*fy2;
+
+
+ gy1 = z1*bg11+z2*bg12;
+ gy2 = z2*bg21+z1*bg22;
+ ggy= y1*gy1 + y2*gy2;
+
+ bbi = x1*ffy+x2*ggy;
+
+ *bb=bbi;
+
+}
+//____________________________________________
+
+void AliMagFDM::ReadField()
+{
+ //
+ // Method to read the magnetic field from file
+ //
+ FILE *magfile;
+
+ Int_t ik, il, im;
+ Float_t zzp, rr,phii;
+ Float_t zz, yy, bx,by,bz,bb;
+
+ char *fname;
+ printf("Reading Magnetic Field %s from file %s\n",fName.Data(),fTitle.Data());
+ fname = gSystem->ExpandPathName(fTitle.Data());
+ magfile=fopen(fname,"r");
+ delete [] fname;
+
+ printf("Cartensian part\n");
+
+ if (magfile) {
+
+// Cartensian part
+
+ fscanf(magfile,"%d %d %d ",&fdYl, &fdXl, &fdZl);
+
+ printf("fdYl %d, fdXl %d, fdZl %d\n",fdYl, fdXl, fdZl);
+
+ for (ik=0; ik<fdZl; ik++)
+ {
+
+ fscanf(magfile, " %e ", &zz);
+ fdZc[ik]=zz;
+
+ }
+
+ for (ik=0; ik<fdYl; ik++)
+ {
+ fscanf(magfile, " %e ", &yy);
+ fdY[ik]=yy;
+
+ }
+ for (ik=0; ik<81; ik++)
+ {
+ printf("fdZc %e,fdY %e\n", fdZc[ik],fdY[ik]);
+ }
+
+ fscanf(magfile," %e %e %e %e %e %e %e %e %e %e %e ", &fdYdel,&fdXdel,&fdZdel,&fdZmax,&fdZmin,&fdYmax,&fdYmin,&fdAx1,&fdCx1,&fdAx2,&fdCx2);
+
+printf("fdYdel %e, fdXdel %e, fdZdel %e\n",fdYdel,fdXdel,fdZdel);
+printf("fdZmax %e, fdZmin %e, fdYmax %e,fdYmin %e\n",fdZmax,fdZmin,fdYmax,fdYmin);
+printf("fdAx1 %e, fdCx1 %e, fdAx2 %e, fdCx %e\n",fdAx1,fdCx1,fdAx2,fdCx2);
+
+ for (il=0; il<44; il++) {
+ for (im=0; im<81; im++) {
+ for (ik=0; ik<81; ik++) {
+
+ fscanf(magfile, " %e ", &by);
+ fdBcy[ik][im][il]=by;
+ }
+ }
+ }
+
+ for (il=0; il<44; il++) {
+ for (im=0; im<81; im++) {
+ for (ik=0; ik<81; ik++) {
+
+ fscanf(magfile, " %e ", &bx);
+ fdBcx[ik][im][il]=bx;
+ }
+ }
+ }
+
+ for (il=0; il<44; il++) {
+ for (im=0; im<81; im++) {
+ for (ik=0; ik<81; ik++) {
+
+ fscanf(magfile, " %e ", &bz);
+ fdBcz[ik][im][il]=bz;
+ }
+ }
+ }
+//---------------------- Polar part ---------------------------------
+
+ printf("Polar part\n");
+ fscanf(magfile,"%d %d %d ", &fdZpl, &fdRn, &fdPhin);
+ printf("fdZpl %d, fdRn %d, fdPhin %d\n",fdZpl,fdRn,fdPhin);
+
+ printf(" fdZp array\n");
+
+ for (ik=0; ik<51; ik++)
+ {
+ fscanf(magfile, " %e ", &zzp);
+ fdZp[ik]=zzp;
+ printf(" %e\n",fdZp[ik]);
+ }
+
+ printf(" fdR array\n");
+
+ for (ik=0; ik<10; ik++)
+ {
+ fscanf(magfile, " %e ", &rr);
+ fdR[ik]=rr;
+ printf(" %e\n",fdR[ik]);
+ }
+
+// printf("fdPhi array\n");
+
+ for (il=0; il<33; il++)
+ {
+ fscanf(magfile, " %e ", &phii);
+ fdPhi[il]=phii;
+// printf(" %e\n",fdPhi[il]);
+ }
+
+ fscanf(magfile," %e %e %e %e %e %e %e ",&fdZpdl,&fdPhid,&fdRdel,&fdZpmx,&fdZpmn,&fdRmax, &fdRmin);
+
+printf("fdZpdl %e, fdPhid %e, fdRdel %e, fdZpmx %e, fdZpmn %e,fdRmax %e,fdRmin %e \n", fdZpdl,fdPhid, fdRdel,fdZpmx, fdZpmn,fdRmax, fdRmin);
+
+
+ for (il=0; il<33; il++) {
+ for (im=0; im<10; im++) {
+ for (ik=0; ik<51; ik++) {
+ fscanf(magfile, " %e ", &by);
+ fdBpy[ik][im][il]=by;
+ }
+ }
+ }
+
+ for (il=0; il<33; il++) {
+ for (im=0; im<10; im++) {
+ for (ik=0; ik<51; ik++) {
+ fscanf(magfile, " %e ", &bx);
+ fdBpx[ik][im][il]=bx;
+ }
+ }
+ }
+
+
+ for (il=0; il<33; il++) {
+ for (im=0; im<10; im++) {
+ for (ik=0; ik<51; ik++) {
+ fscanf(magfile, " %e ", &bz);
+ fdBpz[ik][im][il]=bz;
+ }
+ }
+ }
+
+
+ for (il=0; il<32; il++) {
+ for (im=0; im<2; im++) {
+ for (ik=0; ik<2; ik++) {
+ fscanf(magfile, " %e ", &bb);
+ fdB[ik][im][il]=bb;
+ }
+ }
+ }
+//
+ } else {
+ printf("File %s not found !\n",fTitle.Data());
+ exit(1);
+ }
+}
+//________________________________
--- /dev/null
+#ifndef ALIMAGFDM_H
+#define ALIMAGFDM_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id$ */
+
+#include "AliMagF.h"
+//
+class AliMagFDM : public AliMagF
+{
+//Alice Magnetic Field:Magnetic field map from IP to muon filter for Muon arm
+
+public:
+ AliMagFDM(){}
+ AliMagFDM(const char *name, const char *title, const Int_t integ, const Int_t
+ map, const Float_t factor, const Float_t fmax);
+ virtual ~AliMagFDM(){}
+ virtual void Field(Float_t *x, Float_t *b);
+ virtual void ReadField();
+
+
+ void FZ(Double_t *u, Float_t *Ar, Float_t *du, Int_t *ki, Int_t *kf, Double_t *a1, Double_t *a2 , Int_t *nu);
+ void FRfuncBi(Int_t *kai, Double_t *za1, Double_t *za2, Double_t *al1, Double_t *al2, Double_t *al3, Int_t *ka, Int_t *ma,Double_t *ba);
+ void FGfuncBi(Double_t *z1, Double_t *z2, Double_t *y1, Double_t *y2, Double_t *x1, Double_t *x2, Int_t *kvr, Int_t *k, Int_t *l, Int_t *m, Double_t *bb);
+
+
+protected:
+
+//
+
+ Int_t fdInd; // Character number of validity Map region
+
+ Float_t fdZmin; // Start of the cartesian part of MAP in z
+ Float_t fdZmax; // End of Map in z
+ Float_t fdYmax; // Start of the cartesian part of MAP in y
+ Float_t fdYmin; // End of the cartesian part of MAP in y
+ Float_t fdZpmx; // End of the polar part of MAP in z
+ Float_t fdZpmn; // Start of the polar part of MAP in z
+ Float_t fdRmax; // Maximal radius of the polar part of MAP
+ Float_t fdRmin; // Minimal radius of the polar part of MAP
+
+
+ Float_t fdXdel; // step in x - cartesian part of MAP
+ Float_t fdYdel; // step in y - cartesian part of MAP
+ Float_t fdZdel; // step in z - cartesian part of MAP
+
+ Float_t fdRdel; // step in r - polar part of MAP
+ Float_t fdPhid; // step in Phi - polar part of MAP
+ Float_t fdZpdl; // step in z - polar part of MAP
+
+ Float_t fdCx1; // Field constant
+ Float_t fdCx2; // Field constant
+ Float_t fdAx1; // Field constant
+ Float_t fdAx2; // Field constant
+
+ Float_t fdZc[81]; // z coordinates in cartesian part
+ Float_t fdY[81]; // y coordinates in cartesian part
+ Float_t fdBcx[81][81][44]; // Bx array for cartesian part
+ Float_t fdBcy[81][81][44]; // By array for cartesian part
+ Float_t fdBcz[81][81][44]; // Bz array for cartesian part
+
+ Float_t fdZp[51]; // z coordinates in polar part
+ Float_t fdR[10]; // r coordinates in polar part
+ Float_t fdPhi[33]; // Phi coordinates in polar part
+
+ Float_t fdBpx[51][10][33]; // Bx array for polar part
+ Float_t fdBpy[51][10][33]; // By array for polar part
+ Float_t fdBpz[51][10][33]; // Bx array for polar part
+ Float_t fdB[2][2][32]; // Limits of field
+
+ Int_t fdXl; // Number steps in x for cartesian part
+ Int_t fdYl; // Number steps in y for cartesian par
+ Int_t fdZl; // Number steps in z for cartesian part
+
+ Int_t fdRn; // Number steps in r for polar part
+ Int_t fdPhin; // Number steps in Phi for polar part
+ Int_t fdZpl; // Number steps in z for polar part
+
+
+ ClassDef(AliMagFDM,1) //Class Magnetic field map from IP till muon filter
+};
+
+#endif
/*
$Log$
+Revision 1.9 2000/05/16 08:45:08 fca
+Correct dtor, thanks to J.Belikov
+
Revision 1.8 2000/02/23 16:25:22 fca
AliVMC and AliGeant3 classes introduced
ReadEuclid moved from AliRun to AliModule
//
fHistograms = 0;
fNodes = 0;
+ fIdtmed = 0;
+ fIdmate = 0;
}
//_____________________________________________________________________________
fHiMedium = 0;
}
+//_____________________________________________________________________________
+AliModule::AliModule(const AliModule &mod)
+{
+ //
+ // Copy constructor
+ //
+ Copy(*this);
+}
+
//_____________________________________________________________________________
AliModule::~AliModule()
{
delete fIdmate;
}
+//_____________________________________________________________________________
+void AliModule::Copy(AliModule &mod) const
+{
+ //
+ // Copy *this onto mod, not implemented for AliModule
+ //
+ Fatal("Copy","Not implemented!\n");
+}
+
//_____________________________________________________________________________
void AliModule::Disable()
{
gMC->Matrix(nmat, theta1, phi1, theta2, phi2, theta3, phi3);
}
+//_____________________________________________________________________________
+AliModule& AliModule::operator=(const AliModule &mod)
+{
+ mod.Copy(*this);
+ return (*this);
+}
+
//_____________________________________________________________________________
void AliModule::SetEuclidFile(char* material, char* geometry)
{
Float_t par[50];
Float_t teta1, phi1, teta2, phi2, teta3, phi3, orig, step;
Float_t xo, yo, zo;
- const Int_t maxrot=5000;
- Int_t idrot[maxrot],istop[7000];
+ const Int_t kMaxRot=5000;
+ Int_t idrot[kMaxRot],istop[7000];
FILE *lun;
//
// *** The input filnam name will be with extension '.euc'
}
//* --- definition of rotation matrix 0 ---
TArrayI &idtmed = *fIdtmed;
- for(i=1; i<maxrot; ++i) idrot[i]=-99;
+ for(i=1; i<kMaxRot; ++i) idrot[i]=-99;
idrot[0]=0;
nvol=0;
L10:
//*
} else if (!strcmp(key,"ROTM")) {
sscanf(&card[4],"%d %f %f %f %f %f %f",&irot,&teta1,&phi1,&teta2,&phi2,&teta3,&phi3);
- if( irot<=0 || irot>=maxrot ) {
+ if( irot<=0 || irot>=kMaxRot ) {
Error("ReadEuclid","ROTM rotation matrix number %d illegal\n",irot);
exit(1);
}
//*
} else if (!strcmp(key,"POSI")) {
sscanf(&card[5],"'%[^']' %d '%[^']' %f %f %f %d '%[^']'", name, &nr, mother, &xo, &yo, &zo, &irot, konly);
- if( irot<0 || irot>=maxrot ) {
+ if( irot<0 || irot>=kMaxRot ) {
Error("ReadEuclid","POSI %s#%d rotation matrix number %d illegal\n",name,nr,irot);
exit(1);
}
//*
} else if (!strcmp(key,"POSP")) {
sscanf(&card[5],"'%[^']' %d '%[^']' %f %f %f %d '%[^']' %d", name, &nr, mother, &xo, &yo, &zo, &irot, konly, &npar);
- if( irot<0 || irot>=maxrot ) {
+ if( irot<0 || irot>=kMaxRot ) {
Error("ReadEuclid","POSP %s#%d rotation matrix number %d illegal\n",name,nr,irot);
exit(1);
}
}
//
// Retrieve Mag Field parameters
- Int_t ISXFLD=gAlice->Field()->Integ();
- Float_t SXMGMX=gAlice->Field()->Max();
+ Int_t globField=gAlice->Field()->Integ();
+ Float_t globMaxField=gAlice->Field()->Max();
// TArrayI &idtmed = *fIdtmed;
//
L10:
while(i<20) natmed[i++]=' ';
natmed[i]='\0';
//
- AliMedium(itmed,natmed,nmat,isvol,ISXFLD,SXMGMX,tmaxfd,
+ AliMedium(itmed,natmed,nmat,isvol,globField,globMaxField,tmaxfd,
stemax,deemax,epsil,stmin,ubuf,nwbuf);
// (*fImedia)[idtmed[itmed]-1]=id_det;
//*
-#ifndef AliModule_H
-#define AliModule_H
+#ifndef ALIMODULE_H
+#define ALIMODULE_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
#include <AliHit.h>
class AliModule : public TNamed , public TAttLine, public TAttMarker {
-
- // Data members
-protected:
-
- TString fEuclidMaterial; //Name of the Euclid file for materials (if any)
- TString fEuclidGeometry; //Name of the Euclid file for geometry (if any)
-
- TArrayI *fIdtmed; //List of tracking medium numbers
- TArrayI *fIdmate; //List of material numbers
- Int_t fLoMedium; //Minimum tracking medium ID for this Module
- Int_t fHiMedium; //Maximum tracking medium ID for this Module
-
- Bool_t fActive; //Detector activity flag
- TList *fHistograms; //List of histograms
- TList *fNodes; //List of geometry nodes
-
public:
// Creators - distructors
AliModule(const char* name, const char *title);
AliModule();
+ AliModule(const AliModule &mod);
virtual ~AliModule();
// Inline functions
virtual Int_t& HiMedium() {return fHiMedium;}
// Module composition
- virtual void AliMaterial(Int_t, const char*, Float_t, Float_t, Float_t, Float_t,
- Float_t, Float_t* buf=0, Int_t nwbuf=0) const;
- virtual void AliGetMaterial(Int_t, char*, Float_t&, Float_t&, Float_t&,
- Float_t&, Float_t&);
- virtual void AliMixture(Int_t, const char*, Float_t*, Float_t*, Float_t, Int_t, Float_t*) const;
- virtual void AliMedium(Int_t, const char*, Int_t, Int_t, Int_t, Float_t, Float_t,
- Float_t, Float_t, Float_t, Float_t, Float_t* ubuf=0, Int_t nbuf=0) const;
- virtual void AliMatrix(Int_t&, Float_t, Float_t, Float_t, Float_t, Float_t, Float_t) const;
+ virtual void AliMaterial(Int_t imat, const char* name, Float_t a,
+ Float_t z, Float_t dens, Float_t radl,
+ Float_t absl, Float_t *buf=0, Int_t nwbuf=0) const;
+ virtual void AliGetMaterial(Int_t imat, char* name, Float_t &a,
+ Float_t &z, Float_t &dens, Float_t &radl,
+ Float_t &absl);
+ virtual void AliMixture(Int_t imat, const char *name, Float_t *a,
+ Float_t *z, Float_t dens, Int_t nlmat,
+ Float_t *wmat) const;
+ virtual void AliMedium(Int_t numed, const char *name, Int_t nmat,
+ Int_t isvol, Int_t ifield, Float_t fieldm,
+ Float_t tmaxfd, Float_t stemax, Float_t deemax,
+ Float_t epsil, Float_t stmin, Float_t *ubuf=0,
+ Int_t nbuf=0) const;
+ virtual void AliMatrix(Int_t &nmat, Float_t theta1, Float_t phi1,
+ Float_t theta2, Float_t phi2, Float_t theta3,
+ Float_t phi3) const;
// Virtual methods
virtual void BuildGeometry() {};
virtual void StepManager() {}
//virtual AliHit* FirstHit(Int_t) {return 0;}
//virtual AliHit* NextHit() {return 0;}
- virtual void SetBufferSize(Int_t) {}
- virtual void SetEuclidFile(char*,char*geometry=0);
- virtual void ReadEuclid(const char*, char*);
- virtual void ReadEuclidMedia(const char*);
+ virtual void SetBufferSize(Int_t bufsiz) {}
+ virtual void SetEuclidFile(char *material,char *geometry=0);
+ virtual void ReadEuclid(const char *filnam, char *topvol);
+ virtual void ReadEuclidMedia(const char *filnam);
+ virtual AliModule& operator=(const AliModule &mod);
+ virtual void Copy(AliModule &mod) const;
+protected:
+ // Data members
+
+ TString fEuclidMaterial; //Name of the Euclid file for materials (if any)
+ TString fEuclidGeometry; //Name of the Euclid file for geometry (if any)
+
+ TArrayI *fIdtmed; //List of tracking medium numbers
+ TArrayI *fIdmate; //List of material numbers
+ Int_t fLoMedium; //Minimum tracking medium ID for this Module
+ Int_t fHiMedium; //Maximum tracking medium ID for this Module
+
+ Bool_t fActive; //Detector activity flag
+ TList *fHistograms; //List of histograms
+ TList *fNodes; //List of geometry nodes
+
ClassDef(AliModule,1) //Base class for ALICE Modules
};
#endif
/*
$Log$
+Revision 1.4 1999/09/29 09:24:29 fca
+Introduction of the Copyright and cvs Log
+
*/
///////////////////////////////////////////////////////////////////////////////
fIndex = 0;
}
+//_____________________________________________________________________________
+AliPoints::AliPoints(const AliPoints &pts)
+{
+ //
+ // Copy constructor
+ //
+ pts.Copy(*this);
+}
+
//_____________________________________________________________________________
AliPoints::AliPoints(Int_t nhits)
:TPolyMarker3D(nhits)
fIndex = 0;
}
+//_____________________________________________________________________________
+void AliPoints::Copy(AliPoints &pts) const
+{
+ //
+ // Copy *this onto pts
+ //
+ if(this != &pts) {
+ ((TPolyMarker3D*)this)->Copy((TPolyMarker3D&)pts);
+ pts.fGLList = fGLList;
+ pts.fLastPoint = fLastPoint;
+ pts.fDetector = fDetector;
+ pts.fIndex = fIndex;
+ }
+}
+
+
//_____________________________________________________________________________
Int_t AliPoints::DistancetoPrimitive(Int_t px, Int_t py)
{
if (particle) particle->Inspect();
}
+//_____________________________________________________________________________
+AliPoints & AliPoints::operator=(const AliPoints &pts)
+{
+ //
+ // Assignment operator
+ //
+ pts.Copy(*this);
+ return (*this);
+}
+
//_____________________________________________________________________________
void AliPoints::Propagate()
{
-#ifndef AliPoints_H
-#define AliPoints_H
+#ifndef ALIPOINTS_H
+#define ALIPOINTS_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
#include "TParticle.h"
class AliPoints : public TPolyMarker3D {
-protected:
- AliDetector *fDetector; //Pointer to AliDetector object
- Int_t fIndex; //Particle number in AliRun::fParticles
-
public:
AliPoints();
+ AliPoints(const AliPoints& pts);
AliPoints(Int_t nhits);
virtual ~AliPoints();
+ virtual void Copy(AliPoints &pts) const;
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
AliDetector *GetDetector() {return fDetector;}
virtual void InspectParticle(); // *MENU*
virtual void DumpParticle(); // *MENU*
virtual Text_t *GetObjectInfo(Int_t px, Int_t py);
+ virtual AliPoints & operator=(const AliPoints &pts);
virtual void Propagate(); // *MENU*
virtual void SetDetector(AliDetector *det) {fDetector = det;}
virtual void SetParticle(Int_t index) {fIndex = index;}
+protected:
+ AliDetector *fDetector; //Pointer to AliDetector object
+ Int_t fIndex; //Particle number in AliRun::fParticles
+
ClassDef(AliPoints,1) //Class to draw detector hits (is PolyMarker3D)
};
#endif
/*
$Log$
+Revision 1.4 2000/05/16 08:30:02 fca
+Using automatic streamer for c arrays
+
Revision 1.3 2000/03/20 14:22:25 fca
New version to support new PHOS code
fIndexInList = -1 ; // to be set when the point is already stored
}
+//____________________________________________________________________________
+AliRecPoint::AliRecPoint(const AliRecPoint& recp)
+{
+ //
+ // Copy constructor
+ //
+ recp.Copy(*this);
+}
+
//____________________________________________________________________________
AliRecPoint::~AliRecPoint()
{
// fTracksList[fMulTrack++]= (int) &Track ;
// }
+//____________________________________________________________________________
+void AliRecPoint::Copy(AliRecPoint& recp) const
+{
+ //
+ // Copy *this onto pts
+ //
+ // Copy all first
+ if(this != &recp) {
+ ((TObject*) this)->Copy((TObject&)recp);
+ recp.fAmp = fAmp;
+ recp.fGeom = fGeom;
+ recp.fIndexInList = fIndexInList;
+ recp.fLocPos = fLocPos;
+ recp.fLocPosM = new TMatrix(*fLocPosM);
+ recp.fMaxDigit = fMaxDigit;
+ recp.fMulDigit = fMulDigit;
+ recp.fMaxTrack = fMaxTrack;
+ recp.fMulTrack = fMulTrack;
+
+ // Duplicate pointed objects
+ recp.fDigitsList = new Int_t[fMulDigit];
+ memcpy(recp.fDigitsList,fDigitsList,fMulDigit*sizeof(Int_t));
+ recp.fTracksList = new Int_t[fMulTrack];
+ memcpy(recp.fTracksList,fTracksList,fMulTrack*sizeof(Int_t));
+ }
+}
+
//____________________________________________________________________________
void AliRecPoint::GetCovarianceMatrix(TMatrix & mat)
{
}
+//____________________________________________________________________________
+AliRecPoint & AliRecPoint::operator= (const AliRecPoint &recp)
+{
+ recp.Copy(*this);
+ return (*this);
+}
+
+
//____________________________________________________________________________
void AliRecPoint::GetGlobalPosition(TVector3 & gpos, TMatrix & gmat)
{
public:
AliRecPoint() ; // ctor
+ AliRecPoint(const AliRecPoint &recp); // copy ctor
virtual ~AliRecPoint() ; // dtor
virtual void AddDigit(AliDigitNew & digit) ; // add a digit to the digit's indexes list
// virtual void AddTrack(AliTrack & track) ; // add a track to the tracks list
+ virtual void Copy(AliRecPoint &recp) const;
virtual void GetCovarianceMatrix(TMatrix & mat) ;
virtual AliGeometry * GetGeom() const { return fGeom; }
virtual void GetGlobalPosition(TVector3 & gpos, TMatrix & gmat) ; // return the global position in ALICE
virtual Int_t GetMaximumTrackMultiplicity() const { return fMaxTrack; }
virtual Int_t GetTracksMultiplicity(void) const { return fMulTrack ; }
virtual void Print(Option_t * opt = "void") = 0 ;
+ virtual AliRecPoint & operator= (const AliRecPoint &recp);
void SetIndexInList(Int_t val) { fIndexInList = val ; }
Int_t * fDigitsList ; //[fMulDigit] list of digit's indexes from which the point was reconstructed
Int_t * fTracksList ; //[fMulTrack] list of tracks to which the point was assigned
-public:
-
-
ClassDef(AliRecPoint,1)
};
/*
$Log$
+Revision 1.38 2000/06/20 13:05:45 fca
+Writing down the TREE headers before job starts
+
Revision 1.37 2000/06/09 20:05:11 morsch
Introduce possibility to chose magnetic field version 3: AliMagFDM + field02.dat
#include "AliDisplay.h"
#include "AliMC.h"
#include "AliLego.h"
+#include "AliMagFC.h"
+#include "AliMagFCM.h"
+#include "AliMagFDM.h"
#include <stdlib.h>
#include <stdio.h>
AliRun *gAlice;
-static AliHeader *header;
+static AliHeader *gAliHeader;
ClassImp(AliRun)
//
// Default constructor for AliRun
//
- header=&fHeader;
+ gAliHeader=&fHeader;
fRun = 0;
fEvent = 0;
fCurrent = -1;
fNtrack=0;
fHgwmk=0;
fCurrent=-1;
- header=&fHeader;
+ gAliHeader=&fHeader;
fRun = 0;
fEvent = 0;
//
fHitLists = new TList();
}
+//_____________________________________________________________________________
+AliRun::AliRun(const AliRun &run)
+{
+ //
+ // Copy constructor
+ //
+ run.Copy(*this);
+}
+
+
//_____________________________________________________________________________
AliRun::~AliRun()
{
int i;
for(i=0; i<fNtrack; i++) {
part = (TParticle *)particles.UncheckedAt(i);
- if(!part->TestBit(Daughters_Bit)) {
+ if(!part->TestBit(kDaughtersBit)) {
part->SetFirstDaughter(-1);
part->SetLastDaughter(-1);
}
EnergySummary();
// file is retrieved from whatever tree
- TFile *File = 0;
- if (fTreeK) File = fTreeK->GetCurrentFile();
- if ((!File) && (fTreeH)) File = fTreeH->GetCurrentFile();
- if ((!File) && (fTreeD)) File = fTreeD->GetCurrentFile();
- if ((!File) && (fTreeE)) File = fTreeE->GetCurrentFile();
- if( NULL==File ) {
+ TFile *file = 0;
+ if (fTreeK) file = fTreeK->GetCurrentFile();
+ if ((!file) && (fTreeH)) file = fTreeH->GetCurrentFile();
+ if ((!file) && (fTreeD)) file = fTreeD->GetCurrentFile();
+ if ((!file) && (fTreeE)) file = fTreeE->GetCurrentFile();
+ if( NULL==file ) {
Error("FinishRun","There isn't root file!");
exit(1);
}
- File->cd();
+ file->cd();
fTreeE->Write(0,TObject::kOverwrite);
// Clean tree information
Write();
// Close output file
- File->Write();
+ file->Write();
}
//_____________________________________________________________________________
particle=(TParticle*)fParticles->UncheckedAt(curr);
// If the particle is flagged the three from here upward is saved already
- if(particle->TestBit(Keep_Bit)) return;
+ if(particle->TestBit(kKeepBit)) return;
// Save this particle
- particle->SetBit(Keep_Bit);
+ particle->SetBit(kKeepBit);
// Move to father if any
if((curr=particle->GetFirstMother())==-1) return;
Float_t edtot=0;
Float_t ed, ed2;
Int_t kn, i, left, j, id;
- const Float_t zero=0;
+ const Float_t kzero=0;
Int_t ievent=fHeader.GetEvent()+1;
//
// Energy loss information
ed=ed/ievent;
ed2=fSum2Energy[kn];
ed2=ed2/ievent;
- ed2=100*TMath::Sqrt(TMath::Max(ed2-ed*ed,zero))/ed;
+ ed2=100*TMath::Sqrt(TMath::Max(ed2-ed*ed,kzero))/ed;
} else
ed2=99;
fSummEnergy[ndep]=ed;
- fSum2Energy[ndep]=TMath::Min((Float_t) 99.,TMath::Max(ed2,zero));
+ fSum2Energy[ndep]=TMath::Min((Float_t) 99.,TMath::Max(ed2,kzero));
edtot+=ed;
ndep++;
}
TParticle *track;
for(Int_t i=fNtrack-1; i>=0; i--) {
track=(TParticle*) fParticles->UncheckedAt(i);
- if(!track->TestBit(Done_Bit)) {
+ if(!track->TestBit(kDoneBit)) {
//
// The track has not yet been processed
fCurrent=i;
polar[1]=pol.Y();
polar[2]=pol.Z();
tof=track->T();
- track->SetBit(Done_Bit);
+ track->SetBit(kDoneBit);
break;
}
}
//
- const Int_t ncuts=10;
- const Int_t nflags=11;
- const Int_t npars=ncuts+nflags;
- const char pars[npars][7] = {"CUTGAM" ,"CUTELE","CUTNEU","CUTHAD","CUTMUO",
+ const Int_t kncuts=10;
+ const Int_t knflags=11;
+ const Int_t knpars=kncuts+knflags;
+ const char kpars[knpars][7] = {"CUTGAM" ,"CUTELE","CUTNEU","CUTHAD","CUTMUO",
"BCUTE","BCUTM","DCUTE","DCUTM","PPCUTM","ANNI",
"BREM","COMP","DCAY","DRAY","HADR","LOSS",
"MULS","PAIR","PHOT","RAYL"};
char line[256];
char detName[7];
char* filtmp;
- Float_t cut[ncuts];
- Int_t flag[nflags];
+ Float_t cut[kncuts];
+ Int_t flag[knflags];
Int_t i, itmed, iret, ktmed, kz;
FILE *lun;
//
//
while(1) {
// Initialise cuts and flags
- for(i=0;i<ncuts;i++) cut[i]=-99;
- for(i=0;i<nflags;i++) flag[i]=-99;
+ for(i=0;i<kncuts;i++) cut[i]=-99;
+ for(i=0;i<knflags;i++) flag[i]=-99;
itmed=0;
for(i=0;i<256;i++) line[i]='\0';
// Read up to the end of line excluded
continue;
}
// Set energy thresholds
- for(kz=0;kz<ncuts;kz++) {
+ for(kz=0;kz<kncuts;kz++) {
if(cut[kz]>=0) {
printf(" * %-6s set to %10.3E for tracking medium code %4d for %s\n",
- pars[kz],cut[kz],itmed,mod->GetName());
- gMC->Gstpar(ktmed,pars[kz],cut[kz]);
+ kpars[kz],cut[kz],itmed,mod->GetName());
+ gMC->Gstpar(ktmed,kpars[kz],cut[kz]);
}
}
// Set transport mechanisms
- for(kz=0;kz<nflags;kz++) {
+ for(kz=0;kz<knflags;kz++) {
if(flag[kz]>=0) {
printf(" * %-6s set to %10d for tracking medium code %4d for %s\n",
- pars[ncuts+kz],flag[kz],itmed,mod->GetName());
- gMC->Gstpar(ktmed,pars[ncuts+kz],Float_t(flag[kz]));
+ kpars[kncuts+kz],flag[kz],itmed,mod->GetName());
+ gMC->Gstpar(ktmed,kpars[kncuts+kz],Float_t(flag[kz]));
}
}
} else {
char hname[30];
//
// Analyse options
- char *K = strstr(option,"K");
- char *H = strstr(option,"H");
- char *E = strstr(option,"E");
- char *D = strstr(option,"D");
- char *R = strstr(option,"R");
+ char *oK = strstr(option,"K");
+ char *oH = strstr(option,"H");
+ char *oE = strstr(option,"E");
+ char *oD = strstr(option,"D");
+ char *oR = strstr(option,"R");
//
- if (K && !fTreeK) {
+ if (oK && !fTreeK) {
sprintf(hname,"TreeK%d",fEvent);
fTreeK = new TTree(hname,"Kinematics");
// Create a branch for particles
fTreeK->Branch("Particles",&fParticles,4000);
fTreeK->Write();
}
- if (H && !fTreeH) {
+ if (oH && !fTreeH) {
sprintf(hname,"TreeH%d",fEvent);
fTreeH = new TTree(hname,"Hits");
fTreeH->SetAutoSave(1000000000); //no autosave
fTreeH->Write();
}
- if (D && !fTreeD) {
+ if (oD && !fTreeD) {
sprintf(hname,"TreeD%d",fEvent);
fTreeD = new TTree(hname,"Digits");
fTreeD->Write();
}
- if (R && !fTreeR) {
+ if (oR && !fTreeR) {
sprintf(hname,"TreeR%d",fEvent);
fTreeR = new TTree(hname,"Reconstruction");
fTreeR->Write();
}
- if (E && !fTreeE) {
+ if (oE && !fTreeE) {
fTreeE = new TTree("TE","Header");
// Create a branch for Header
- fTreeE->Branch("Header","AliHeader",&header,4000);
+ fTreeE->Branch("Header","AliHeader",&gAliHeader,4000);
fTreeE->Write();
}
//
TIter next(fModules);
AliModule *detector;
while((detector = (AliModule*)next())) {
- if (H || D || R) detector->MakeBranch(option);
+ if (oH || oD || oR) detector->MakeBranch(option);
}
}
for(i=0; i<fNtrack; i++) {
// Preset map, to be removed later
if(i<=fHgwmk) map[i]=i ; else map[i] = -99;
- ((TParticle *)particles.UncheckedAt(i))->ResetBit(Daughters_Bit);
+ ((TParticle *)particles.UncheckedAt(i))->ResetBit(kDaughtersBit);
}
// Second pass, build map between old and new numbering
for(i=fHgwmk+1; i<fNtrack; i++) {
part = (TParticle *)particles.UncheckedAt(i);
- if(part->TestBit(Keep_Bit)) {
+ if(part->TestBit(kKeepBit)) {
// This particle has to be kept
map[i]=nkeep;
parent = part->GetFirstMother();
if(parent>=0) {
father = (TParticle *)particles.UncheckedAt(parent);
- if(father->TestBit(Daughters_Bit)) {
+ if(father->TestBit(kDaughtersBit)) {
if(i<father->GetFirstDaughter()) father->SetFirstDaughter(i);
if(i>father->GetLastDaughter()) father->SetLastDaughter(i);
// Iitialise daughters info for first pass
father->SetFirstDaughter(i);
father->SetLastDaughter(i);
- father->SetBit(Daughters_Bit);
+ father->SetBit(kDaughtersBit);
}
}
}
TClonesArray &particles = *fParticles;
TParticle *particle;
Float_t mass;
- const Int_t firstdaughter=-1;
- const Int_t lastdaughter=-1;
- const Int_t KS=0;
+ const Int_t kfirstdaughter=-1;
+ const Int_t klastdaughter=-1;
+ const Int_t kS=0;
// const Float_t tlife=0;
//
Float_t e=TMath::Sqrt(mass*mass+pmom[0]*pmom[0]+
pmom[1]*pmom[1]+pmom[2]*pmom[2]);
- //printf("Loading particle %s mass %f ene %f No %d ip %d pos %f %f %f mom %f %f %f KS %d m %s\n",
- //pname,mass,e,fNtrack,pdg,vpos[0],vpos[1],vpos[2],pmom[0],pmom[1],pmom[2],KS,mecha);
+ //printf("Loading particle %s mass %f ene %f No %d ip %d pos %f %f %f mom %f %f %f kS %d m %s\n",
+ //pname,mass,e,fNtrack,pdg,vpos[0],vpos[1],vpos[2],pmom[0],pmom[1],pmom[2],kS,mecha);
- particle=new(particles[fNtrack]) TParticle(pdg,KS,parent,-1,firstdaughter,
- lastdaughter,pmom[0],pmom[1],pmom[2],
+ particle=new(particles[fNtrack]) TParticle(pdg,kS,parent,-1,kfirstdaughter,
+ klastdaughter,pmom[0],pmom[1],pmom[2],
e,vpos[0],vpos[1],vpos[2],tof);
// polar[0],polar[1],polar[2],tof,
// mecha,weight);
((TParticle*)particles[fNtrack])->SetPolarisation(TVector3(polar[0],polar[1],polar[2]));
((TParticle*)particles[fNtrack])->SetWeight(weight);
- if(!done) particle->SetBit(Done_Bit);
+ if(!done) particle->SetBit(kDoneBit);
//Declare that the daughter information is valid
- ((TParticle*)particles[fNtrack])->SetBit(Daughters_Bit);
+ ((TParticle*)particles[fNtrack])->SetBit(kDaughtersBit);
if(parent>=0) {
particle=(TParticle*) fParticles->UncheckedAt(parent);
// flags a track to be kept
//
TClonesArray &particles = *fParticles;
- ((TParticle*)particles[track])->SetBit(Keep_Bit);
+ ((TParticle*)particles[track])->SetBit(kKeepBit);
}
//_____________________________________________________________________________
}
}
+//_____________________________________________________________________________
+AliRun& AliRun::operator = (const AliRun &run)
+{
+ //
+ // Assignment operator
+ //
+ if(this != &run) run.Copy(*this);
+ return (*this);
+}
+
+
+//_____________________________________________________________________________
+void AliRun::Copy(AliRun &run) const
+{
+ //
+ // Copy *this onto run, not implemented for AliRun
+ //
+ Fatal("operator =","Assignment operator not implemented!\n");
+}
+
//_____________________________________________________________________________
void AliRun::Streamer(TBuffer &R__b)
{
if (!gAlice) gAlice = this;
gROOT->GetListOfBrowsables()->Add(this,"Run");
fTreeE = (TTree*)gDirectory->Get("TE");
- if (fTreeE) fTreeE->SetBranchAddress("Header", &header);
+ if (fTreeE) fTreeE->SetBranchAddress("Header", &gAliHeader);
else Error("Streamer","cannot find Header Tree\n");
R__b >> fNtrack;
R__b >> fHgwmk;
-#ifndef AliRun_H
-#define AliRun_H
+#ifndef ALIRUN_H
+#define ALIRUN_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
#include "AliMC.h"
#include "AliGenerator.h"
class AliLego;
-//#include "AliLego.h"
-enum {Keep_Bit=1, Daughters_Bit=2, Done_Bit=4};
+enum {kKeepBit=1, kDaughtersBit=2, kDoneBit=4};
class AliDisplay;
class AliRun : public TNamed {
-
-protected:
- Int_t fRun; //Current run number
- Int_t fEvent; //Current event number (from 1)
- Int_t fNtrack; //Number of tracks
- Int_t fHgwmk; //Last track purified
- Int_t fCurrent; //Last track returned from the stack
- Int_t fDebug; //Debug flag
- AliHeader fHeader; //Header information
- TTree *fTreeD; //Pointer to Tree for Digits
- TTree *fTreeK; //Pointer to Tree for Kinematics
- TTree *fTreeH; //Pointer to Tree for Hits
- TTree *fTreeE; //Pointer to Tree for Header
- TTree *fTreeR; //Pointer to Tree for Reconstructed Objects
- TObjArray *fModules; //List of Detectors
- TClonesArray *fParticles; //Pointer to list of particles
- TGeometry *fGeometry; //Pointer to geometry
- AliDisplay *fDisplay; //Pointer to event display
- TStopwatch fTimer; //Timer object
- AliMagF *fField; //Magnetic Field Map
- AliMC *fMC; //pointer to MonteCarlo object
- TArrayI *fImedia; //Array of correspondence between media and detectors
- Int_t fNdets; //Number of detectors
- Float_t fTrRmax; //Maximum radius for tracking
- Float_t fTrZmax; //Maximu z for tracking
- AliGenerator *fGenerator; //Generator used in the MC
- Bool_t fInitDone; //true when initialisation done
- AliLego *fLego; //pointer to aliLego object if it exists
- TDatabasePDG *fPDGDB; //Particle factory object!
- TList *fHitLists; //Lists of hits to be remapped by PurifyKine
- TArrayF fEventEnergy; //Energy deposit for current event
- TArrayF fSummEnergy; //Energy per event in each volume
- TArrayF fSum2Energy; //Energy squared per event in each volume
- TString fConfigFunction; //Configuration file to be executed
-
-
public:
// Creators - distructors
AliRun();
AliRun(const char *name, const char *title);
+ AliRun(const AliRun &run);
virtual ~AliRun();
virtual void AddHit(Int_t id, Int_t track, Int_t *vol, Float_t *hits) const;
Float_t *pmom, Float_t *vpos, Float_t *polar,
Float_t tof, const char *mecha, Int_t &ntr,
Float_t weight=1);
- virtual void KeepTrack(const Int_t);
+ virtual void KeepTrack(const Int_t itra);
virtual void MediaTable();
virtual Float_t TrackingZmax() const {return fTrZmax;}
virtual Float_t TrackingRmax() const {return fTrRmax;}
virtual void ResetGenerator(AliGenerator *generator);
virtual void EnergySummary();
virtual const TDatabasePDG* PDGDB() const {return fPDGDB;}
+ virtual AliRun& operator = (const AliRun &run);
+ virtual void Copy(AliRun &run) const;
TTree *TreeD() {return fTreeD;}
TTree *TreeK() {return fTreeK;}
TTree *TreeR() {return fTreeR;}
- // --------------------------- commons -------------------------------------
+protected:
+ Int_t fRun; //Current run number
+ Int_t fEvent; //Current event number (from 1)
+ Int_t fNtrack; //Number of tracks
+ Int_t fHgwmk; //Last track purified
+ Int_t fCurrent; //Last track returned from the stack
+ Int_t fDebug; //Debug flag
+ AliHeader fHeader; //Header information
+ TTree *fTreeD; //Pointer to Tree for Digits
+ TTree *fTreeK; //Pointer to Tree for Kinematics
+ TTree *fTreeH; //Pointer to Tree for Hits
+ TTree *fTreeE; //Pointer to Tree for Header
+ TTree *fTreeR; //Pointer to Tree for Reconstructed Objects
+ TObjArray *fModules; //List of Detectors
+ TClonesArray *fParticles; //Pointer to list of particles
+ TGeometry *fGeometry; //Pointer to geometry
+ AliDisplay *fDisplay; //Pointer to event display
+ TStopwatch fTimer; //Timer object
+ AliMagF *fField; //Magnetic Field Map
+ AliMC *fMC; //pointer to MonteCarlo object
+ TArrayI *fImedia; //Array of correspondence between media and detectors
+ Int_t fNdets; //Number of detectors
+ Float_t fTrRmax; //Maximum radius for tracking
+ Float_t fTrZmax; //Maximu z for tracking
+ AliGenerator *fGenerator; //Generator used in the MC
+ Bool_t fInitDone; //true when initialisation done
+ AliLego *fLego; //pointer to aliLego object if it exists
+ TDatabasePDG *fPDGDB; //Particle factory object!
+ TList *fHitLists; //Lists of hits to be remapped by PurifyKine
+ TArrayF fEventEnergy; //Energy deposit for current event
+ TArrayF fSummEnergy; //Energy per event in each volume
+ TArrayF fSum2Energy; //Energy squared per event in each volume
+ TString fConfigFunction; //Configuration file to be executed
ClassDef(AliRun,3) //Supervisor class for all Alice detectors
};
public:
// Set Chamber Segmentation Parameters
//
+ virtual ~AliSegmentation() {}
// Pad size Dx*Dy
virtual void SetPadSize(Float_t p1, Float_t p2) = 0;
// Anod Pitch
AliDisplay.cxx AliMC.cxx AliRun.cxx AliGenerator.cxx \
AliLego.cxx AliModule.cxx AliDigitNew.cxx \
AliGeometry.cxx AliRecPoint.cxx AliSegmentation.cxx \
- AliHitMap.cxx
+ AliHitMap.cxx AliMagFC.cxx AliMagFCM.cxx \
+ AliMagFDM.cxx
# C++ Headers
/*
$Log$
+Revision 1.5 2000/05/20 14:49:48 fca
+Call gdebug at the end of gustep
+
Revision 1.4 2000/04/26 10:17:32 fca
Changes in Lego for G4 compatibility
exit(1);
}
- ((TParticle*)(gAlice->Particles()->UncheckedAt(n-1)))->SetBit(Keep_Bit);
+ ((TParticle*)(gAlice->Particles()->UncheckedAt(n-1)))->SetBit(kKeepBit);
}
//_____________________________________________________________________________
# define ghelix ghelix_
# define grkuta grkuta_
# define gtrack gtrack_
-# define gtreve_root gtreve_root_
+# define gtreveroot gtreveroot_
# define glast glast_
#else
# define ghelix GHELIX
# define grkuta GRKUTA
# define gtrack GTRACK
-# define gtreve_root GTREVE_ROOT
+# define gtreveroot GTREVEROOT
# define glast GLAST
#endif
extern "C" type_of_call void ghelix(Float_t&, Float_t&, Float_t*, Float_t*);
extern "C" type_of_call void grkuta(Float_t&, Float_t&, Float_t*, Float_t*);
extern "C" type_of_call void gtrack();
-extern "C" type_of_call void gtreve_root();
+extern "C" type_of_call void gtreveroot();
extern "C" type_of_call void glast();
extern "C" type_of_call {
//
// ------------------------------------------------------------------
//
- gtreve_root();
+ gtreveroot();
}
/*
$Log$
+Revision 1.28 2000/06/29 10:51:55 morsch
+Add some charmed and bottom baryons to the particle list (TDatabasePDG). This
+is needed by Hijing. Should be part of a future review of TDatabasePDG.
+
Revision 1.27 2000/06/21 17:40:15 fca
Adding possibility to set ISTRA, PAI model
# define gsxyz gsxyz_
# define gtrack gtrack_
# define gtreve gtreve_
-# define gtreve_root gtreve_root_
+# define gtreveroot gtreveroot_
# define grndm grndm_
# define grndmq grndmq_
# define gdtom gdtom_
# define gsxyz GSXYZ
# define gtrack GTRACK
# define gtreve GTREVE
-# define gtreve_root GTREVE_ROOT
+# define gtreveroot GTREVEROOT
# define grndm GRNDM
# define grndmq GRNDMQ
# define gdtom GDTOM
void type_of_call gtreve();
- void type_of_call gtreve_root();
+ void type_of_call gtreveroot();
void type_of_call grndm(Float_t *, const Int_t &);
}
//_____________________________________________________________________________
-void TGeant3::Gtreve_root()
+void TGeant3::GtreveRoot()
{
//
// Controls tracking of all particles belonging to the current event
//
- gtreve_root();
+ gtreveroot();
}
//_____________________________________________________________________________
Int_t kcase;
Int_t ngkine;
Float_t gkin[MXGKIN][5];
- Int_t tofd[MXGKIN];
+ Float_t tofd[MXGKIN];
Int_t iflgk[MXGKIN];
} Gcking_t;
virtual void Gsxyz();
virtual void Gtrack();
virtual void Gtreve();
- virtual void Gtreve_root();
+ virtual void GtreveRoot();
virtual void Grndm(Float_t *rvec, const Int_t len) const;
virtual void Grndmq(Int_t &is1, Int_t &is2, const Int_t iseq, const Text_t *chopt);
/*
$Log$
+Revision 1.21 2000/06/27 09:26:18 fca
+Adding dummy SetSTRA
+
Revision 1.20 2000/05/16 13:10:41 fca
New method IsNewTrack and fix for a problem in Father-Daughter relations
void TGeant3::Gsxyz() {}
void TGeant3::Gtrack() {}
void TGeant3::Gtreve() {}
-void TGeant3::Gtreve_root() {}
+void TGeant3::GtreveRoot() {}
void TGeant3::Grndm(Float_t*, const Int_t) const {}
void TGeant3::Grndmq(Int_t&, Int_t&, const Int_t, const Text_t*) {}
TG4Globals:: Warning("TGeant4::Gtreve() is not implemented.");
}
-void TGeant4::Gtreve_root() {
+void TGeant4::GtreveRoot() {
//
- TG4Globals:: Warning("TGeant4::Gtreve_root() is not implemented.");
+ TG4Globals:: Warning("TGeant4::GtreveRoot() is not implemented.");
}
void TGeant4::Gckmat(Int_t itmed, char* natmed) {
virtual void Gdman(Float_t u, Float_t v, const char* type);
virtual void SetColors();
virtual void Gtreve();
- virtual void Gtreve_root();
+ virtual void GtreveRoot();
virtual void Gckmat(Int_t itmed, char* natmed);
virtual void InitLego();
virtual void Gfpart(Int_t ipart, char *name, Int_t& itrtyp,
//
gener->SetOrigin(0., 0.0 ,0);
gener->SetSigma(0,0,5.3);
- gener->SetVertexSmear(perEvent);
+ gener->SetVertexSmear(kPerEvent);
// no tracking
gener->SetTrackingFlag(0);
case pythia:
gener->SetYRange(-10,10);
gener->SetPtRange(0,100);
gener->SetOrigin(0,0,0); // vertex position
- gener->SetVertexSmear(perEvent);
+ gener->SetVertexSmear(kPerEvent);
gener->SetSigma(0,0,5.6); // Sigma in (X,Y,Z) (cm) on IP position
// gener->SetStrucFunc(DO_Set_1);
gener->SetProcess(mb);
//*******************************************************
AliGenExtFile *gener = new AliGenExtFile(-1);
gener->SetFileName("$(ALICE_ROOT)/data/dtujet93.root");
- gener->SetVertexSmear(perEvent);
+ gener->SetVertexSmear(kPerEvent);
gener->SetTrackingFlag(1);
break;
// Activate this line if you want the vertex smearing to happen
// track by track
//
-// gener->SetVertexSmear(perTrack);
+// gener->SetVertexSmear(kPerTrack);
gener->Init();