]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Coding convention correction and warning removal
authorfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 12 Jul 2000 08:56:32 +0000 (08:56 +0000)
committerfca <fca@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 12 Jul 2000 08:56:32 +0000 (08:56 +0000)
30 files changed:
STEER/AliDetector.cxx
STEER/AliDetector.h
STEER/AliDigit.cxx
STEER/AliDigit.h
STEER/AliGenerator.cxx
STEER/AliGeometry.cxx
STEER/AliGeometry.h
STEER/AliHeader.cxx
STEER/AliHeader.h
STEER/AliHit.cxx
STEER/AliHit.h
STEER/AliHitMap.h
STEER/AliLego.cxx
STEER/AliLego.h
STEER/AliLegoGenerator.cxx [new file with mode: 0644]
STEER/AliLegoGenerator.h [new file with mode: 0644]
STEER/AliMC.cxx
STEER/AliMC.h
STEER/AliMagFC.cxx
STEER/AliMagFCM.cxx
STEER/AliMagFDM.cxx
STEER/AliModule.cxx
STEER/AliModule.h
STEER/AliRun.cxx
STEER/Makefile
TGeant3/TGeant3.cxx
TGeant3/TGeant3Dummy.cxx
TGeant3/TGeant3GUI.cxx
TGeant3/THIGZ.cxx
TGeant3/THIGZ.h

index 08355af3b8d9804cca9fa1e36a2caf3a8bd782f8..1af996719c0a75f5fd1d54e4cf66c346d008e153 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.5  1999/09/29 09:24:29  fca
+Introduction of the Copyright and cvs Log
+
 */
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -116,6 +119,15 @@ void AliDetector::Browse(TBrowser *b)
   }
 }
 
+//_____________________________________________________________________________
+void AliDetector::Copy(AliDetector &det) const
+{
+  //
+  // Copy *this onto det -- not implemented
+  //
+  Fatal("Copy","Not implemented~\n");
+}
+
 //_____________________________________________________________________________
 void AliDetector::FinishRun()
 {
@@ -242,9 +254,9 @@ void AliDetector::MakeBranch(Option_t *option)
   sprintf(branchname,"%s",GetName());
   //
   // Get the pointer to the header
-  char *H = strstr(option,"H");
+  char *cH = strstr(option,"H");
   //
-  if (fHits   && gAlice->TreeH() && H) {
+  if (fHits   && gAlice->TreeH() && cH) {
     gAlice->TreeH()->Branch(branchname,&fHits, fBufferSize);
     printf("* AliDetector::MakeBranch * Making Branch %s for hits\n",branchname);
   }    
index 127203155006c483777226fea1e673dd2a360053..f8246ffadc9c2fb147ae0782d39abf78b4bfb872 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef AliDetector_H
-#define AliDetector_H
+#ifndef ALIDETECTOR_H
+#define ALIDETECTOR_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
 
 class AliDetector : public AliModule {
 
-  // Data members
-protected:      
-  
-  Float_t       fTimeGate;    //Time gate in seconds
-
-  Int_t         fIshunt;      //1 if the hit is attached to the primary
-  Int_t         fNhits;       //Number of hits
-  Int_t         fNdigits;     //Number of digits
-  Int_t         fBufferSize;  //buffer size for Tree detector branches
-  TClonesArray *fHits;        //List of hits for one track only
-  TClonesArray *fDigits;      //List of digits for this detector
-  TObjArray    *fPoints;      //Array of points for each track (all tracks in memory)
-
 public:
 
   // Creators - distructors
   AliDetector(const char* name, const char *title);
   AliDetector();
+  AliDetector(const AliDetector &det) {det.Copy(*this);}
   virtual ~AliDetector();
 
   // Inline functions
-  inline virtual int   GetNdigits() {return fNdigits;}
-  inline virtual int   GetNhits()   {return fNhits;}
-  inline TClonesArray *Digits() {return fDigits;}
-  inline TClonesArray *Hits()   {return fHits;}
-  inline TObjArray    *Points() {return fPoints;}
-  inline Int_t         GetIshunt() {return fIshunt;}
-  inline void          SetIshunt(Int_t ishunt) {fIshunt=ishunt;}
+  virtual void  Copy(AliDetector &det) const;
+  virtual int   GetNdigits() {return fNdigits;}
+  virtual int   GetNhits()   {return fNhits;}
+  TClonesArray *Digits() {return fDigits;}
+  TClonesArray *Hits()   {return fHits;}
+  TObjArray    *Points() {return fPoints;}
+  Int_t         GetIshunt() {return fIshunt;}
+  void          SetIshunt(Int_t ishunt) {fIshunt=ishunt;}
+  virtual AliDetector &operator=(const AliDetector &det) 
+  {det.Copy(*this); return (*this);}
   
   // Other methods
   virtual void        Browse(TBrowser *b);
@@ -52,10 +43,23 @@ public:
   virtual Float_t     GetTimeGate() {return fTimeGate;}
   virtual void        StepManager() {}
   virtual void        DrawModule() {}
-  virtual AliHit*     FirstHit(Int_t);
+  virtual AliHit*     FirstHit(Int_t track);
   virtual AliHit*     NextHit();
   virtual void        SetBufferSize(Int_t bufsize=8000) {fBufferSize = bufsize;}  
  
+  // Data members
+protected:      
+  
+  Float_t       fTimeGate;    //Time gate in seconds
+
+  Int_t         fIshunt;      //1 if the hit is attached to the primary
+  Int_t         fNhits;       //Number of hits
+  Int_t         fNdigits;     //Number of digits
+  Int_t         fBufferSize;  //buffer size for Tree detector branches
+  TClonesArray *fHits;        //List of hits for one track only
+  TClonesArray *fDigits;      //List of digits for this detector
+  TObjArray    *fPoints;      //Array of points for each track (all tracks in memory)
+
   ClassDef(AliDetector,1)  //Base class for ALICE detectors
 };
 #endif
index aef21fc7292168ba3bf8f51b5519aa625f51b465..f22c1d0740fed5635998e399284495ded93f0ff8 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.3  1999/09/29 09:24:29  fca
+Introduction of the Copyright and cvs Log
+
 */
 
 #include "AliDigit.h"
@@ -23,10 +26,16 @@ ClassImp(AliDigit)
 
 AliDigit::AliDigit()
 {
+  //
+  // Default constructor
+  //
 }
 
 AliDigit::AliDigit(Int_t *tracks)
 {
+  //
+  // Standard constructor
+  //
   fTracks[0] = tracks[0];
   fTracks[1] = tracks[1];
   fTracks[2] = tracks[2];
index ff4bf5661f5099c5f2f4983d6721743fa653e399..3365e30de673c8711b65fe942398bb22cc0fa085 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef AliDigit_H
-#define AliDigit_H
+#ifndef ALIDIGIT_H
+#define ALIDIGIT_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
@@ -9,6 +9,7 @@
 //  Base class for Alice Digits               //
 ////////////////////////////////////////////////
 
+#include <assert.h>
 #include "TObject.h"
 
 class AliDigit : public TObject {
@@ -18,8 +19,10 @@ public:
 public:
   AliDigit();
   AliDigit(Int_t *track);
-  ~AliDigit() {;}
-  inline virtual int *GetTracks() {return &fTracks[0];}
+  virtual ~AliDigit() {}
+  virtual Int_t *GetTracks() {return &fTracks[0];}
+  virtual Int_t GetTrack(Int_t i) const 
+  {assert(0<=i&&i<=2); return fTracks[i];}
   
   ClassDef(AliDigit,1)  //Base class for all Alice digits
 };
index 1c39842d22c66ee852912b15010cab077d604e08..981e5583185754bad4a176edecf69bab89ae7542 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.6  2000/07/11 18:24:59  fca
+Coding convention corrections + few minor bug fixes
+
 Revision 1.5  2000/06/08 13:34:50  fca
 Better control of momentum range in GenBox
 
@@ -125,7 +128,7 @@ AliGenerator & AliGenerator::operator=(const AliGenerator &gen)
 }
 
 //____________________________________________________________
-void AliGenerator::Copy(AliGenerator &gen) const
+void AliGenerator::Copy(AliGenerator &/* gen */) const
 {
   //
   // Copy *this onto gen
index 0aa25bd7a7ee4b4a59a9bd6abb1c5a41f663d8d2..8dcf38fb498ea034beace5b6f7d17ca5e3bd3877 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.1  1999/12/17 09:01:14  fca
+Y.Schutz new classes for reconstruction
+
 */
 
 //-*-C++-*-
@@ -36,7 +39,9 @@ ClassImp(AliGeometry)
 //____________________________________________________________________________
 AliGeometry::AliGeometry()
 {
+  //
   // ctor
+  //
 }
 
 //____________________________________________________________________________
index 8ffcc3b1f312baaa04596a4f588f9ecc6c11a9d9..943f53a414d712304e02bf7e8b66431e87a28afd 100644 (file)
@@ -40,8 +40,6 @@ protected:
 
   AliGeometry(const Text_t* name, const Text_t* title) : TNamed (name,title) {}                                   
 
-public:
-
   ClassDef(AliGeometry,1)  // description , version 1
 
 };
index 861231b38dcbd4c531e7db43cb4a3a2725f92c1b..7119f6194d78ae634b7582481e74c5909c79dc14 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.2  1999/09/29 09:24:29  fca
+Introduction of the Copyright and cvs Log
+
 */
 
 #include "AliHeader.h"
@@ -24,6 +27,9 @@ ClassImp(AliHeader)
 
 AliHeader::AliHeader()
 {
+  //
+  // Default constructor
+  //
   fRun=0;      
   fNvertex=0;
   fNprimary=0;
@@ -33,6 +39,9 @@ AliHeader::AliHeader()
 
 AliHeader::AliHeader(Int_t run, Int_t event)
 {
+  //
+  // Standard constructor
+  //
   fRun=run;    
   fNvertex=0;
   fNprimary=0;
@@ -42,6 +51,9 @@ AliHeader::AliHeader(Int_t run, Int_t event)
 
 void AliHeader::Reset(Int_t run, Int_t event)
 {
+  //
+  // Resets the header with new run and event number
+  //
   fRun=run;    
   fNvertex=0;
   fNprimary=0;
@@ -51,6 +63,9 @@ void AliHeader::Reset(Int_t run, Int_t event)
 
 void AliHeader::Dump()
 {
+  //
+  // Dumps header content
+  //
   printf(
 "\n=========== Header for run %d Event %d = beginning ======================================\n",
   fRun,fEvent);
index 67a04cf7b2e7a27c8d753ad04c23ba3fdae049be..69ce3af32d003d1aff6a580cfe6ba01907dd264e 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef AliHeader_H
-#define AliHeader_H
+#ifndef ALIHEADER_H
+#define ALIHEADER_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
@@ -8,17 +8,10 @@
 #include "TObject.h"
  
 class AliHeader : public TObject {
-protected:
-  Int_t         fRun;         //Run number
-  Int_t         fNvertex;     //Number of vertices
-  Int_t         fNprimary;    //Number of primary tracks
-  Int_t         fNtrack;      //Number of tracks
-  Int_t         fEvent;       //Event number
-
 public:
   AliHeader();
   AliHeader(Int_t run, Int_t event);
-  ~AliHeader() {;}
+  virtual ~AliHeader() {}
 
   virtual void Reset(Int_t run, Int_t event);
 
@@ -39,6 +32,13 @@ public:
 
   virtual void Dump();
   
+protected:
+  Int_t         fRun;         //Run number
+  Int_t         fNvertex;     //Number of vertices
+  Int_t         fNprimary;    //Number of primary tracks
+  Int_t         fNtrack;      //Number of tracks
+  Int_t         fEvent;       //Event number
+
   ClassDef(AliHeader,1) //Alice event header
     
 };
index 93ad6b504971ccca16ca478f31943fbc3eb2e1a1..d3db3b9cb6392f34d682801ef2c839c0770ee20f 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.4  2000/07/11 18:24:59  fca
+Coding convention corrections + few minor bug fixes
+
 Revision 1.3  1999/09/29 09:24:29  fca
 Introduction of the Copyright and cvs Log
 
@@ -28,11 +31,17 @@ ClassImp(AliHit)
 
 AliHit::AliHit()
 {
-       fTrack=0;       
+  //
+  // Default constructor
+  //
+  fTrack=0;    
 }
 
 AliHit::AliHit(Int_t shunt, Int_t track)
 {
+  //
+  // Standard constructor
+  //
   TClonesArray &particles = *(gAlice->Particles());
   if(shunt) {
     int primary = gAlice->GetPrimary(track);
index da6babdc98e259b4a91546778dbe5cbd7339bfd7..9413cea319fc87cbd0fdb97565d5d3fb8e969c83 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef AliHit_H
-#define AliHit_H
+#ifndef ALIHIT_H
+#define ALIHIT_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
@@ -9,18 +9,21 @@
 
 class AliHit : public TObject {
 public:
-  Int_t     fTrack;      //track number
-  //Position of the hit
-  Float_t fX;
-  Float_t fY;
-  Float_t fZ;
+  Int_t     fTrack;  // Track number
+  Float_t   fX;      // X position of the hit
+  Float_t   fY;      // Y position of the hit
+  Float_t   fZ;      // Z position of the hit
 
 public:
   AliHit();
   AliHit(Int_t shunt, Int_t track);
   virtual ~AliHit() {}
-  virtual int GetTrack() const {return fTrack;}
-  inline virtual void SetTrack(int track) {fTrack=track;}
+  virtual Int_t GetTrack() const {return fTrack;}
+  virtual void SetTrack(Int_t track) {fTrack=track;}
+  virtual Float_t X() const {return fX;}
+  virtual Float_t Y() const {return fY;}
+  virtual Float_t Z() const {return fZ;}
+  virtual Float_t Track() const {return fTrack;}
   
   ClassDef(AliHit,1)  //Base class for all Alice hits
 };
index 3ed331763d69eb8ab44e4368f5fa5bb094025e65..74f777af4b331fb5bb58fc3a0ee5333f997917eb 100644 (file)
@@ -13,6 +13,8 @@ typedef enum {kEmpty, kUsed, kUnused} FlagType;
 class AliHitMap :
 public TObject {
  public:
+    // Virtual destructor -- it is necessary
+    virtual ~AliHitMap() {}
     // Fill hits from list of digits into hit map
     virtual  void  FillHits()                                      =0;
     // Clear the hit map
index b0f76b3bca44b3f9756cc81cdf6cb22d08f7e48f..254a74c2a1322d95fc3b68d84e9ba82d2c56a2d4 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.16  2000/05/26 08:35:03  fca
+Move the check on z after z has been retrieved
+
 Revision 1.15  2000/05/16 13:10:40  fca
 New method IsNewTrack and fix for a problem in Father-Daughter relations
 
@@ -77,6 +80,7 @@ Introduction of the Copyright and cvs Log
 
 #include "TMath.h"
 #include "AliLego.h"
+#include "AliLegoGenerator.h"
 #include "AliRun.h"
 #include "AliConst.h"
 #include "AliMC.h"
@@ -87,20 +91,24 @@ ClassImp(AliLego)
 //___________________________________________
 AliLego::AliLego()
 {
-   fHistRadl = 0;
-   fHistAbso = 0;
-   fHistGcm2 = 0;
-   fHistReta = 0;
+  //
+  // Default constructor
+  //
+  fHistRadl = 0;
+  fHistAbso = 0;
+  fHistGcm2 = 0;
+  fHistReta = 0;
 }
 
 //___________________________________________
-AliLego::AliLego(const char *title, Int_t ntheta, Float_t themin, Float_t themax,
-                Int_t nphi, Float_t phimin, Float_t phimax,
+AliLego::AliLego(const char *title, Int_t ntheta, Float_t themin, 
+                Float_t themax, Int_t nphi, Float_t phimin, Float_t phimax,
                 Float_t rmin, Float_t rmax, Float_t zmax)
   : TNamed("Lego Generator",title)
 {
-// specify the angular limits and the size of the rectangular box
-   
+  //
+  // specify the angular limits and the size of the rectangular box
+  //
    fGener = new AliLegoGenerator(ntheta, themin, themax,
                       nphi, phimin, phimax, rmin, rmax, zmax);
    
@@ -123,18 +131,23 @@ AliLego::AliLego(const char *title, Int_t ntheta, Float_t themin, Float_t themax
 //___________________________________________
 AliLego::~AliLego()
 {
-   delete fHistRadl;
-   delete fHistAbso;
-   delete fHistGcm2;
-   delete fHistReta;
-   gAlice->ResetGenerator(0);
-   delete fGener;
+  //
+  // Destructor
+  //
+  delete fHistRadl;
+  delete fHistAbso;
+  delete fHistGcm2;
+  delete fHistReta;
+  gAlice->ResetGenerator(0);
+  delete fGener;
 }
 
 //___________________________________________
 void AliLego::BeginEvent()
 {
-// --- Set to 0 radiation length, absorption length and g/cm2 ---
+  //
+  // --- Set to 0 radiation length, absorption length and g/cm2 ---
+  //
   fTotRadl = 0;
   fTotAbso = 0;
   fTotGcm2 = 0;
@@ -143,6 +156,9 @@ void AliLego::BeginEvent()
 //___________________________________________
 void AliLego::FinishEvent()
 {
+  //
+  // Finish the event and update the histos
+  //
   Double_t thed, phid, eta;
   thed = fGener->CurTheta()*kRaddeg;
   phid = fGener->CurPhi()*kRaddeg;
@@ -159,7 +175,9 @@ void AliLego::FinishEvent()
 //___________________________________________
 void AliLego::FinishRun()
 {
-   // Store histograms in current Root file
+  //
+  // Store histograms in current Root file
+  //
   fHistRadl->Write();
   fHistAbso->Write();
   fHistGcm2->Write();
@@ -173,6 +191,14 @@ void AliLego::FinishRun()
 
 }
 
+//___________________________________________
+void AliLego::Copy(AliLego &lego) const
+{
+  //
+  // Copy *this onto lego -- not implemented
+  //
+  Fatal("Copy","Not implemented!\n");
+}
 
 //___________________________________________
 void AliLego::StepManager()
@@ -223,118 +249,3 @@ void AliLego::StepManager()
    }
 }
 
-ClassImp(AliLegoGenerator)
-
-//___________________________________________
-AliLegoGenerator::AliLegoGenerator(Int_t ntheta, Float_t themin,
-                                  Float_t themax, Int_t nphi, 
-                                  Float_t phimin, Float_t phimax,
-                                  Float_t rmin, Float_t rmax, Float_t zmax) :
-  AliGenerator(0), fRadMin(rmin), fRadMax(rmax), fZMax(zmax), fNtheta(ntheta),
-  fNphi(nphi), fThetaBin(ntheta), fPhiBin(-1), fCurTheta(0), fCurPhi(0)
-  
-{
-  SetPhiRange(phimin,phimax);
-  SetThetaRange(themin,themax);
-  SetName("Lego");
-}
-
-
-//___________________________________________
-void AliLegoGenerator::Generate()
-{
-// Create a geantino with kinematics corresponding to the current
-// bins in theta and phi.
-   
-  //
-  // Rootinos are 0
-   const Int_t mpart = 0;
-   Float_t orig[3], pmom[3];
-   Float_t t, cost, sint, cosp, sinp;
-   
-   // Prepare for next step
-   if(fThetaBin>=fNtheta-1)
-     if(fPhiBin>=fNphi-1) {
-       Warning("Generate","End of Lego Generation");
-       return;
-     } else { 
-       fPhiBin++;
-       printf("Generating rays in phi bin:%d\n",fPhiBin);
-       fThetaBin=0;
-     } else fThetaBin++;
-
-   fCurTheta = (fThetaMin+(fThetaBin+0.5)*(fThetaMax-fThetaMin)/fNtheta);
-   fCurPhi   = (fPhiMin+(fPhiBin+0.5)*(fPhiMax-fPhiMin)/fNphi);
-   cost      = TMath::Cos(fCurTheta);
-   sint      = TMath::Sin(fCurTheta);
-   cosp      = TMath::Cos(fCurPhi);
-   sinp      = TMath::Sin(fCurPhi);
-   
-   pmom[0] = cosp*sint;
-   pmom[1] = sinp*sint;
-   pmom[2] = cost;
-   
-   // --- Where to start
-   orig[0] = orig[1] = orig[2] = 0;
-   Float_t dalicz = 3000;
-   if (fRadMin > 0) {
-     t = PropagateCylinder(orig,pmom,fRadMin,dalicz);
-     orig[0] = pmom[0]*t;
-     orig[1] = pmom[1]*t;
-     orig[2] = pmom[2]*t;
-     if (TMath::Abs(orig[2]) > fZMax) return;
-   }
-   
-   Float_t polar[3]={0.,0.,0.};
-   Int_t ntr;
-   gAlice->SetTrack(1, 0, mpart, pmom, orig, polar, 0, "LEGO ray", ntr);
-
-}
-
-//___________________________________________
-Float_t AliLegoGenerator::PropagateCylinder(Float_t *x, Float_t *v, Float_t r, Float_t z)
-{
-// Propagate to cylinder from inside
-
-   Double_t hnorm, sz, t, t1, t2, t3, sr;
-   Double_t d[3];
-   const Float_t kSmall  = 1e-8;
-   const Float_t kSmall2 = kSmall*kSmall;
-
-// ---> Find intesection with Z planes
-   d[0]  = v[0];
-   d[1]  = v[1];
-   d[2]  = v[2];
-   hnorm = TMath::Sqrt(1/(d[0]*d[0]+d[1]*d[1]+d[2]*d[2]));
-   d[0] *= hnorm;
-   d[1] *= hnorm;
-   d[2] *= hnorm;
-   if (d[2] > kSmall)       sz = (z-x[2])/d[2];
-   else if (d[2] < -kSmall) sz = -(z+x[2])/d[2];
-   else                     sz = 1.e10;  // ---> Direction parallel to X-Y, no intersection
-
-// ---> Intersection with cylinders
-//      Intersection point (x,y,z)
-//      (x,y,z) is on track :    x=X(1)+t*D(1)
-//                               y=X(2)+t*D(2)
-//                               z=X(3)+t*D(3)
-//      (x,y,z) is on cylinder : x**2 + y**2 = R**2
-//
-//      (D(1)**2+D(2)**2)*t**2
-//      +2.*(X(1)*D(1)+X(2)*D(2))*t
-//      +X(1)**2+X(2)**2-R**2=0
-// ---> Solve second degree equation
-   t1 = d[0]*d[0] + d[1]*d[1];
-   if (t1 <= kSmall2) {
-      t = sz;  // ---> Track parallel to the z-axis, take distance to planes
-   } else {
-      t2 = x[0]*d[0] + x[1]*d[1];
-      t3 = x[0]*x[0] + x[1]*x[1];
-      // ---> It should be positive, but there may be numerical problems
-      sr = (t2 +TMath::Sqrt(TMath::Max(t2*t2-(t3-r*r)*t1,0.)))/t1;
-      // ---> Find minimum distance between planes and cylinder
-      t  = TMath::Min(sz,sr);
-   }
-   return t;
-}
-
index 4fc7c6399d34773e86eb5e2d4cf296cc024d031b..e2ed9ed02f03afbcb727944a0f212c4cb42547ad 100644 (file)
 
 #include <TH2.h>
 
-#include "AliGenerator.h"
-
 class AliLegoGenerator;
 
 class AliLego : public TNamed  {
 
-private:
-  AliLegoGenerator *fGener;     //Lego generator
-   Float_t    fTotRadl;         //Total Radiation length
-   Float_t    fTotAbso;         //Total absorption length
-   Float_t    fTotGcm2;         //Total G/CM2 traversed
-   TH2F      *fHistRadl;        //Radiation length map 
-   TH2F      *fHistAbso;        //Interaction length map
-   TH2F      *fHistGcm2;        //g/cm2 length map
-   TH2F      *fHistReta;        //Radiation length map as a function of eta
-   
 public:
   AliLego();
   AliLego(const char *title, Int_t ntheta,Float_t themin,
          Float_t themax, Int_t nphi, Float_t phimin,
          Float_t phimax,Float_t rmin,Float_t rmax,Float_t zmax);
+  AliLego(const AliLego &lego) {lego.Copy(*this);}
   virtual ~AliLego();
+  virtual void  Copy(AliLego &lego) const;
   virtual void  StepManager();
   virtual void  BeginEvent();
   virtual void  FinishEvent();
   virtual void  FinishRun();
+  virtual AliLego &operator=(const AliLego &lego) 
+  {lego.Copy(*this);return(*this);}
   
+private:
+  AliLegoGenerator *fGener;     //Lego generator
+   Float_t    fTotRadl;         //Total Radiation length
+   Float_t    fTotAbso;         //Total absorption length
+   Float_t    fTotGcm2;         //Total G/CM2 traversed
+   TH2F      *fHistRadl;        //Radiation length map 
+   TH2F      *fHistAbso;        //Interaction length map
+   TH2F      *fHistGcm2;        //g/cm2 length map
+   TH2F      *fHistReta;        //Radiation length map as a function of eta
+   
   ClassDef(AliLego,1) //Utility class to compute and draw Radiation Length Map
 
 };
 
-class AliLegoGenerator : public AliGenerator
-{
-public:
-  AliLegoGenerator() {}
-  AliLegoGenerator(Int_t ntheta, Float_t themin, Float_t themax,
-                  Int_t nphi, Float_t phimin, Float_t phimax,
-                  Float_t rmin, Float_t rmax, Float_t zmax);
-  void    Generate();
-  Float_t CurTheta() const {return fCurTheta;}
-  Int_t   ThetaBin() const {return fThetaBin;}
-  Float_t CurPhi() const {return fCurPhi;}
-  Float_t ZMax() const {return fZMax;}
-  Float_t RadMax() const {return fRadMax;}
-  Int_t   PhiBin() const {return fPhiBin;}
-  Int_t   Nphi() const {return fNphi;}
-  Int_t   Ntheta() const {return fNtheta;}
-  Float_t       PropagateCylinder(Float_t *x, Float_t *v, Float_t r, Float_t z);
-private:
-   Float_t    fRadMin;          //Generation radius
-   Float_t    fRadMax;          //Maximum tracking radius
-   Float_t    fZMax;            //Maximum tracking Z
-   Int_t      fNtheta;          //Number of bins in Theta
-   Int_t      fNphi;            //Number of bins in Phi
-   Int_t      fThetaBin;        //Current theta bin
-   Int_t      fPhiBin;          //Current phi bin
-   Float_t    fCurTheta;        //Current theta of track
-   Float_t    fCurPhi;          //Current phi of track
-
-  ClassDef(AliLegoGenerator,1) //Lego generator
-};
 
 #endif
-
diff --git a/STEER/AliLegoGenerator.cxx b/STEER/AliLegoGenerator.cxx
new file mode 100644 (file)
index 0000000..b4c9d2f
--- /dev/null
@@ -0,0 +1,168 @@
+/**************************************************************************
+ * 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$
+Revision 1.16  2000/05/26 08:35:03  fca
+Move the check on z after z has been retrieved
+
+Revision 1.15  2000/05/16 13:10:40  fca
+New method IsNewTrack and fix for a problem in Father-Daughter relations
+
+Revision 1.14  2000/04/27 10:38:21  fca
+Correct termination of Lego Run and introduce Lego getter in AliRun
+
+Revision 1.13  2000/04/26 10:17:31  fca
+Changes in Lego for G4 compatibility
+
+Revision 1.12  2000/04/07 11:12:33  fca
+G4 compatibility changes
+
+Revision 1.11  2000/03/22 13:42:26  fca
+SetGenerator does not replace an existing generator, ResetGenerator does
+
+Revision 1.10  2000/02/23 16:25:22  fca
+AliVMC and AliGeant3 classes introduced
+ReadEuclid moved from AliRun to AliModule
+
+Revision 1.9  1999/12/03 10:54:01  fca
+Fix lego summary
+
+Revision 1.8  1999/10/01 09:54:33  fca
+Correct logics for Lego StepManager
+
+Revision 1.7  1999/09/29 09:24:29  fca
+Introduction of the Copyright and cvs Log
+
+*/
+
+#include "AliLegoGenerator.h"
+#include "AliRun.h"
+
+ClassImp(AliLegoGenerator)
+
+//___________________________________________
+AliLegoGenerator::AliLegoGenerator(Int_t ntheta, Float_t themin,
+                                  Float_t themax, Int_t nphi, 
+                                  Float_t phimin, Float_t phimax,
+                                  Float_t rmin, Float_t rmax, Float_t zmax) :
+  AliGenerator(0), fRadMin(rmin), fRadMax(rmax), fZMax(zmax), fNtheta(ntheta),
+  fNphi(nphi), fThetaBin(ntheta), fPhiBin(-1), fCurTheta(0), fCurPhi(0)
+  
+{
+  SetPhiRange(phimin,phimax);
+  SetThetaRange(themin,themax);
+  SetName("Lego");
+}
+
+
+//___________________________________________
+void AliLegoGenerator::Generate()
+{
+// Create a geantino with kinematics corresponding to the current
+// bins in theta and phi.
+   
+  //
+  // Rootinos are 0
+   const Int_t kMpart = 0;
+   Float_t orig[3], pmom[3];
+   Float_t t, cost, sint, cosp, sinp;
+   
+   // Prepare for next step
+   if(fThetaBin>=fNtheta-1)
+     if(fPhiBin>=fNphi-1) {
+       Warning("Generate","End of Lego Generation");
+       return;
+     } else { 
+       fPhiBin++;
+       printf("Generating rays in phi bin:%d\n",fPhiBin);
+       fThetaBin=0;
+     } else fThetaBin++;
+
+   fCurTheta = (fThetaMin+(fThetaBin+0.5)*(fThetaMax-fThetaMin)/fNtheta);
+   fCurPhi   = (fPhiMin+(fPhiBin+0.5)*(fPhiMax-fPhiMin)/fNphi);
+   cost      = TMath::Cos(fCurTheta);
+   sint      = TMath::Sin(fCurTheta);
+   cosp      = TMath::Cos(fCurPhi);
+   sinp      = TMath::Sin(fCurPhi);
+   
+   pmom[0] = cosp*sint;
+   pmom[1] = sinp*sint;
+   pmom[2] = cost;
+   
+   // --- Where to start
+   orig[0] = orig[1] = orig[2] = 0;
+   Float_t dalicz = 3000;
+   if (fRadMin > 0) {
+     t = PropagateCylinder(orig,pmom,fRadMin,dalicz);
+     orig[0] = pmom[0]*t;
+     orig[1] = pmom[1]*t;
+     orig[2] = pmom[2]*t;
+     if (TMath::Abs(orig[2]) > fZMax) return;
+   }
+   
+   Float_t polar[3]={0.,0.,0.};
+   Int_t ntr;
+   gAlice->SetTrack(1, 0, kMpart, pmom, orig, polar, 0, "LEGO ray", ntr);
+
+}
+
+//___________________________________________
+Float_t AliLegoGenerator::PropagateCylinder(Float_t *x, Float_t *v, Float_t r, Float_t z)
+{
+// Propagate to cylinder from inside
+
+   Double_t hnorm, sz, t, t1, t2, t3, sr;
+   Double_t d[3];
+   const Float_t kSmall  = 1e-8;
+   const Float_t kSmall2 = kSmall*kSmall;
+
+// ---> Find intesection with Z planes
+   d[0]  = v[0];
+   d[1]  = v[1];
+   d[2]  = v[2];
+   hnorm = TMath::Sqrt(1/(d[0]*d[0]+d[1]*d[1]+d[2]*d[2]));
+   d[0] *= hnorm;
+   d[1] *= hnorm;
+   d[2] *= hnorm;
+   if (d[2] > kSmall)       sz = (z-x[2])/d[2];
+   else if (d[2] < -kSmall) sz = -(z+x[2])/d[2];
+   else                     sz = 1.e10;  // ---> Direction parallel to X-Y, no intersection
+
+// ---> Intersection with cylinders
+//      Intersection point (x,y,z)
+//      (x,y,z) is on track :    x=X(1)+t*D(1)
+//                               y=X(2)+t*D(2)
+//                               z=X(3)+t*D(3)
+//      (x,y,z) is on cylinder : x**2 + y**2 = R**2
+//
+//      (D(1)**2+D(2)**2)*t**2
+//      +2.*(X(1)*D(1)+X(2)*D(2))*t
+//      +X(1)**2+X(2)**2-R**2=0
+// ---> Solve second degree equation
+   t1 = d[0]*d[0] + d[1]*d[1];
+   if (t1 <= kSmall2) {
+      t = sz;  // ---> Track parallel to the z-axis, take distance to planes
+   } else {
+      t2 = x[0]*d[0] + x[1]*d[1];
+      t3 = x[0]*x[0] + x[1]*x[1];
+      // ---> It should be positive, but there may be numerical problems
+      sr = (t2 +TMath::Sqrt(TMath::Max(t2*t2-(t3-r*r)*t1,0.)))/t1;
+      // ---> Find minimum distance between planes and cylinder
+      t  = TMath::Min(sz,sr);
+   }
+   return t;
+}
+
diff --git a/STEER/AliLegoGenerator.h b/STEER/AliLegoGenerator.h
new file mode 100644 (file)
index 0000000..76fa714
--- /dev/null
@@ -0,0 +1,51 @@
+#ifndef ALILEGOGENERATOR_H
+#define ALILEGOGENERATOR_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
+///////////////////////////////////////////////////////////////////////////////
+//                                                                           //
+//                                                                           //
+//    Utility class to compute and draw Radiation Length Map                 //
+//                                                                           //
+//                                                                           //
+///////////////////////////////////////////////////////////////////////////////
+
+#include "AliGenerator.h"
+
+class AliLegoGenerator : public AliGenerator
+{
+
+public:
+  AliLegoGenerator() {}
+  AliLegoGenerator(Int_t ntheta, Float_t themin, Float_t themax,
+                  Int_t nphi, Float_t phimin, Float_t phimax,
+                  Float_t rmin, Float_t rmax, Float_t zmax);
+  void    Generate();
+  Float_t CurTheta() const {return fCurTheta;}
+  Int_t   ThetaBin() const {return fThetaBin;}
+  Float_t CurPhi() const {return fCurPhi;}
+  Float_t ZMax() const {return fZMax;}
+  Float_t RadMax() const {return fRadMax;}
+  Int_t   PhiBin() const {return fPhiBin;}
+  Int_t   Nphi() const {return fNphi;}
+  Int_t   Ntheta() const {return fNtheta;}
+  Float_t       PropagateCylinder(Float_t *x, Float_t *v, Float_t r, Float_t z);
+private:
+   Float_t    fRadMin;          //Generation radius
+   Float_t    fRadMax;          //Maximum tracking radius
+   Float_t    fZMax;            //Maximum tracking Z
+   Int_t      fNtheta;          //Number of bins in Theta
+   Int_t      fNphi;            //Number of bins in Phi
+   Int_t      fThetaBin;        //Current theta bin
+   Int_t      fPhiBin;          //Current phi bin
+   Float_t    fCurTheta;        //Current theta of track
+   Float_t    fCurPhi;          //Current phi of track
+
+  ClassDef(AliLegoGenerator,1) //Lego generator
+};
+
+#endif
+
index dd5fa9ac7d997207826761b3331370d205f02264..203c367106d75fd8c6bf1368f12f0f97010e4ff6 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.4  2000/07/11 18:24:59  fca
+Coding convention corrections + few minor bug fixes
+
 Revision 1.3  2000/03/22 18:08:07  fca
 Rationalisation of the virtual MC interfaces
 
@@ -46,3 +49,11 @@ AliMC::AliMC(const char *name, const char *title) : TNamed(name,title)
   }
 }
 
+void AliMC::Copy(AliMC &mc) const
+{
+  //
+  // Copy *this onto mc -- not implemented
+  //
+  Fatal("Copy","Not implemented~\n");
+}
+
index 261e9afb10c183d7f6d42355c449dc4da95ae83f..2ee132c00bacb0defee292ba0b0eb5761f9550e3 100644 (file)
@@ -25,6 +25,9 @@ class AliMC : public TNamed
   public:
     AliMC(const char *name, const char *title);
     AliMC() {}
+    AliMC(const AliMC &mc) {mc.Copy(*this);}
+    virtual void Copy(AliMC &mc) const;
+    virtual AliMC & operator=(const AliMC &mc) {mc.Copy(*this);return (*this);}
     virtual ~AliMC() {fgMC=gMC=0;}
   
     // static access method
index 802977010cffcd446b90ef04be327489d00c3bbf..215bd671eee238ad5f3f6691cd72c61a1c9a8c51 100644 (file)
 
 /*
 $Log$
+Revision 1.1  2000/07/11 18:24:59  fca
+Coding convention corrections + few minor bug fixes
+
 */
 
 #include "AliMagFC.h"
+#include <stdlib.h>
 
 ClassImp(AliMagFC)
 
index 2de1a2d1661004a3c1ca2cddaf34dd540f04de48..26af5e449c562d3e06c9449e120721f97ead7153 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.1  2000/07/11 18:24:59  fca
+Coding convention corrections + few minor bug fixes
+
 */
 
 #include "AliMagFCM.h"
@@ -225,10 +228,10 @@ void AliMagFCM::ReadField()
 }
 
 //________________________________________
-void AliMagFCM::Copy(AliMagFCM &magf) const
+void AliMagFCM::Copy(AliMagFCM & /* magf */) const
 {
   //
-  // Copy *this onto magf
+  // Copy *this onto magf -- Not implemented
   //
   Fatal("Copy","Not implemented!\n");
 }
index 42e50002eab653eaecf451fa10b8a4b44b393cbb..af924b0023d37562b08705464f9b67c499e582fb 100644 (file)
 
 /*
 $Log$
+Revision 1.1  2000/07/11 18:24:59  fca
+Coding convention corrections + few minor bug fixes
+
 */
 
+#include <stdlib.h>
+
 #include "AliMagFDM.h"
 #include "TSystem.h"
     
@@ -360,29 +365,34 @@ void AliMagFDM::FRfuncBi(Int_t *kai,Double_t *za1, Double_t *za2, Double_t *al1,
   alf2=*al2;
   alf3=*al3; 
   
-  if (kaai==0 ) {
+  switch (kaai) {
+  case 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 ) {
+    break;
+  case 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 ) {
+    break;
+  case 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]; 
+    break;
+  default:
+    Fatal("FRfuncBi","Invalid value of kaai %d\n",kaai);
+    exit(1);
   }                            
   faY1=alf1*fa11+alf2*fa12+alf3*fa13;
   faY2=alf1*fa21+alf2*fa22+alf3*fa23;
@@ -423,7 +433,8 @@ void AliMagFDM::FGfuncBi(Double_t *zz1,Double_t *zz2, Double_t *yy1,Double_t *yy
   
   /*-----------------Polar part ------------------*/
   
-  if(kv==0) {
+  switch (kv) {
+  case 0:
     bf11=fdBpx[k][l][m];
     bf12=fdBpx[k+1][l][m];
     bf21=fdBpx[k+1][l+1][m];
@@ -433,8 +444,9 @@ void AliMagFDM::FGfuncBi(Double_t *zz1,Double_t *zz2, Double_t *yy1,Double_t *yy
     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) {
+    break;
+
+  case 1:
     bf11=fdBpy[k][l][m];
     bf12=fdBpy[k+1][l][m];
     bf21=fdBpy[k+1][l+1][m];
@@ -444,9 +456,9 @@ void AliMagFDM::FGfuncBi(Double_t *zz1,Double_t *zz2, Double_t *yy1,Double_t *yy
     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) {
+    break;
+
+  case 2:
     bf11=fdBpz[k][l][m];
     bf12=fdBpz[k+1][l][m];
     bf21=fdBpz[k+1][l+1][m];
@@ -455,11 +467,11 @@ void AliMagFDM::FGfuncBi(Double_t *zz1,Double_t *zz2, Double_t *yy1,Double_t *yy
     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];           
-  } 
+    bg22=fdBpz[k][l+1][m+1]; 
+    break;
   /*-----------------Cartensian part ---------------*/ 
   
-  if(kv==3) {
+  case 3:
     bf11=fdBcx[k][l][m];
     bf12=fdBcx[k+1][l][m];
     bf21=fdBcx[k+1][l+1][m];
@@ -469,9 +481,9 @@ void AliMagFDM::FGfuncBi(Double_t *zz1,Double_t *zz2, Double_t *yy1,Double_t *yy
     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) {
+    break;
+
+  case 4:
     bf11=fdBcy[k][l][m];
     bf12=fdBcy[k+1][l][m];
     bf21=fdBcy[k+1][l+1][m];
@@ -481,8 +493,9 @@ void AliMagFDM::FGfuncBi(Double_t *zz1,Double_t *zz2, Double_t *yy1,Double_t *yy
     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) {
+    break;
+
+  case 5:
     bf11=fdBcz[k][l][m];
     bf12=fdBcz[k+1][l][m];
     bf21=fdBcz[k+1][l+1][m];
@@ -492,6 +505,11 @@ void AliMagFDM::FGfuncBi(Double_t *zz1,Double_t *zz2, Double_t *yy1,Double_t *yy
     bg12=fdBcz[k+1][l][m+1];
     bg21=fdBcz[k+1][l+1][m+1];
     bg22=fdBcz[k][l+1][m+1];
+    break;
+
+  default:
+    Fatal("FGfuncBi","Invalid value of kv %d\n",kv);
+    exit(1);
   }  
   
   
index 8028594ea1e5179e86fb1913e5b6632394da1e01..8ab0ff42c69c7efd72339a59a736026c25112531 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.10  2000/07/11 18:24:59  fca
+Coding convention corrections + few minor bug fixes
+
 Revision 1.9  2000/05/16 08:45:08  fca
 Correct dtor, thanks to J.Belikov
 
@@ -111,7 +114,7 @@ AliModule::AliModule(const AliModule &mod)
   //
   // Copy constructor
   //
-  Copy(*this);
+  mod.Copy(*this);
 }
 
 //_____________________________________________________________________________
@@ -134,7 +137,7 @@ AliModule::~AliModule()
 }
  
 //_____________________________________________________________________________
-void AliModule::Copy(AliModule &mod) const
+void AliModule::Copy(AliModule & /* mod */) const
 {
   //
   // Copy *this onto mod, not implemented for AliModule
index 03d4ac1f19d6b2965295299bf8bb84f4cc998245..0797945f410ce11edb1156cd478acd6aa3df246e 100644 (file)
@@ -91,7 +91,7 @@ public:
   virtual void        StepManager() {}
   //virtual AliHit*     FirstHit(Int_t) {return 0;}
   //virtual AliHit*     NextHit() {return 0;}
-  virtual void        SetBufferSize(Int_t bufsiz) {}  
+  virtual void        SetBufferSize(Int_t) {}  
   virtual void        SetEuclidFile(char *material,char *geometry=0);
   virtual void ReadEuclid(const char *filnam, char *topvol);
   virtual void ReadEuclidMedia(const char *filnam);
index 07b95fb1f0957c97c8e8b2109be13e2c46f4c3d3..0e14eb7bc39a20b7185c6e3a64904890a4419999 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.39  2000/07/11 18:24:59  fca
+Coding convention corrections + few minor bug fixes
+
 Revision 1.38  2000/06/20 13:05:45  fca
 Writing down the TREE headers before job starts
 
@@ -1473,7 +1476,7 @@ void AliRun::SetCurrentTrack(Int_t track)
 //_____________________________________________________________________________
 void AliRun::SetTrack(Int_t done, Int_t parent, Int_t pdg, Float_t *pmom,
                      Float_t *vpos, Float_t *polar, Float_t tof,
-                     const char *mecha, Int_t &ntr, Float_t weight)
+                     const char* /* mecha */, Int_t &ntr, Float_t weight)
 { 
   //
   // Load a track on the stack
@@ -1582,7 +1585,7 @@ AliRun& AliRun::operator = (const AliRun &run)
 
 
 //_____________________________________________________________________________
-void AliRun::Copy(AliRun &run) const
+void AliRun::Copy(AliRun &/* run */) const
 {
   //
   // Copy *this onto run, not implemented for AliRun
index c2ba22d9d0049c0d314445d9ddb534deffb76dcf..5188e92d5936d4b12ef701490c845fb4afce8342 100644 (file)
@@ -15,7 +15,7 @@ SRCS          = AliDetector.cxx       AliHeader.cxx   AliMagF.cxx \
                AliLego.cxx     AliModule.cxx   AliDigitNew.cxx \
                AliGeometry.cxx AliRecPoint.cxx AliSegmentation.cxx \
                AliHitMap.cxx   AliMagFC.cxx    AliMagFCM.cxx \
-               AliMagFDM.cxx
+               AliMagFDM.cxx   AliLegoGenerator.cxx
 
 # C++ Headers
 
index 43a75efd89110e0ceb5875f77123c6e632370e6b..502dd5c796abf7293103cf2aeb0d888a447ea57e 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.29  2000/07/11 18:24:59  fca
+Coding convention corrections + few minor bug fixes
+
 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.
@@ -563,11 +566,11 @@ void TGeant3::DefaultRange()
   //
   // Set range of current drawing pad to 20x20 cm
   //
-  if (!higz) {
+  if (!gHigz) {
     new THIGZ(defSize); 
     gdinit();
   }
-  higz->Range(0,0,20,20);
+  gHigz->Range(0,0,20,20);
 }
 
 //____________________________________________________________________________ 
@@ -576,7 +579,7 @@ void TGeant3::InitHIGZ()
   //
   // Initialise HIGZ
   //
-  if (!higz) {
+  if (!gHigz) {
     new THIGZ(defSize); 
     gdinit();
   }
@@ -1124,9 +1127,8 @@ const char* TGeant3::VolName(Int_t id) const
   //
   // Return the volume name given the volume identifier
   //
-  const char name[5]="NULL";
   if(id<1 || id > fGcnum->nvolum || fGclink->jvolum<=0) 
-    return name;
+    return fVolNames[fGcnum->nvolum];
   else
     return fVolNames[id-1];
 }
@@ -1196,9 +1198,9 @@ void    TGeant3::SetProcess(const char* flagName, Int_t flagValue)
 }
 
 //_____________________________________________________________________________
-Float_t TGeant3::Xsec(char* reac, Float_t energy, Int_t part, Int_t mate)
+Float_t TGeant3::Xsec(char* reac, Float_t /* energy */, 
+                     Int_t part, Int_t /* mate */)
 {
-  Int_t gpart = IdFromPDG(part);
   if(!strcmp(reac,"PHOT"))
   {
     if(part!=22) {
@@ -1746,12 +1748,13 @@ void  TGeant3::Ggclos()
   //
   ggclos(); 
   // Create internal list of volumes
-  fVolNames = new char[fGcnum->nvolum][5];
+  fVolNames = new char[fGcnum->nvolum+1][5];
   Int_t i;
   for(i=0; i<fGcnum->nvolum; ++i) {
     strncpy(fVolNames[i], (char *) &fZiq[fGclink->jvolum+i+1], 4);
     fVolNames[i][4]='\0';
   }
+  strcpy(fVolNames[fGcnum->nvolum],"NULL");
 } 
  
 //_____________________________________________________________________________
@@ -2830,7 +2833,7 @@ void TGeant3::Gdopen(Int_t iview)
   //  with solid colours can now be stored in a view bank or in 'PICTURE FILES'
   //
   InitHIGZ();
-  higz->Clear();
+  gHigz->Clear();
   gdopen(iview);
 }
  
@@ -2935,7 +2938,7 @@ void TGeant3::Gdraw(const char *name,Float_t theta, Float_t phi, Float_t psi,
   //  string for the NAME of the volume can be found using the command DTREE).
   //
   InitHIGZ();
-  higz->Clear();
+  gHigz->Clear();
   char vname[5];
   Vname(name,vname);
   if (fGcvdma->raytra != 1) {
@@ -2966,7 +2969,7 @@ void TGeant3::Gdrawc(const char *name,Int_t axis, Float_t cut,Float_t u0,
   //  the CVOL/BOX function.
   //  
   InitHIGZ();
-  higz->Clear();
+  gHigz->Clear();
   char vname[5];
   Vname(name,vname);
   gdrawc(PASSCHARD(vname), axis,cut,u0,v0,ul,vl PASSCHARL(vname)); 
@@ -2995,7 +2998,7 @@ void TGeant3::Gdrawx(const char *name,Float_t cutthe, Float_t cutphi,
   //  The resulting picture is seen from the viewing angles theta,phi.
   //
   InitHIGZ();
-  higz->Clear();
+  gHigz->Clear();
   char vname[5];
   Vname(name,vname);
   gdrawx(PASSCHARD(vname), cutthe,cutphi,cutval,theta,phi,u0,v0,ul,vl
@@ -3066,7 +3069,7 @@ void TGeant3::Gdspec(const char *name)
   //  volume.
   //  
   InitHIGZ();
-  higz->Clear();
+  gHigz->Clear();
   char vname[5];
   Vname(name,vname);
   gdspec(PASSCHARD(vname) PASSCHARL(vname)); 
@@ -3079,11 +3082,11 @@ void TGeant3::DrawOneSpec(const char *name)
   //  Function called when one double-clicks on a volume name
   //  in a TPavelabel drawn by Gdtree.
   //
-  THIGZ *higzSave = higz;
+  THIGZ *higzSave = gHigz;
   higzSave->SetName("higzSave");
   THIGZ *higzSpec = (THIGZ*)gROOT->FindObject("higzSpec");
-  //printf("DrawOneSpec, higz=%x, higzSpec=%x\n",higz,higzSpec);
-  if (higzSpec) higz     = higzSpec;
+  //printf("DrawOneSpec, gHigz=%x, higzSpec=%x\n",gHigz,higzSpec);
+  if (higzSpec) gHigz     = higzSpec;
   else          higzSpec = new THIGZ(defSize);
   higzSpec->SetName("higzSpec");
   higzSpec->cd();
@@ -3094,7 +3097,7 @@ void TGeant3::DrawOneSpec(const char *name)
   higzSpec->Update();
   higzSave->cd();
   higzSave->SetName("higz");
-  higz = higzSave;
+  gHigz = higzSave;
 } 
 
 //_____________________________________________________________________________
@@ -3114,11 +3117,11 @@ void TGeant3::Gdtree(const char *name,Int_t levmax, Int_t isel)
   //    - drawing tree of parent
   //  
   InitHIGZ();
-  higz->Clear();
+  gHigz->Clear();
   char vname[5];
   Vname(name,vname);
   gdtree(PASSCHARD(vname), levmax, isel PASSCHARL(vname)); 
-  higz->fPname = "";
+  gHigz->fPname = "";
 } 
 
 //_____________________________________________________________________________
@@ -3132,7 +3135,7 @@ void TGeant3::GdtreeParent(const char *name,Int_t levmax, Int_t isel)
   //  This function draws the logical tree of the parent of name.
   //  
   InitHIGZ();
-  higz->Clear();
+  gHigz->Clear();
   // Scan list of volumes in JVOLUM
   char vname[5];
   Int_t gname, i, jvo, in, nin, jin, num;
@@ -3148,7 +3151,7 @@ void TGeant3::GdtreeParent(const char *name,Int_t levmax, Int_t isel)
        strncpy(vname,(char*)&fZiq[fGclink->jvolum+i],4);
        vname[4] = 0;           
        gdtree(PASSCHARD(vname), levmax, isel PASSCHARL(vname)); 
-       higz->fPname = "";
+       gHigz->fPname = "";
        return;
       }
     }
index 7a47bbe6bb6ad304728f0ff3402e84e91cdb54c2..b20350e2c465a4ccf2d4ccafd9a2aac0da678b93 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.22  2000/07/11 18:25:00  fca
+Coding convention corrections + few minor bug fixes
+
 Revision 1.21  2000/06/27 09:26:18  fca
 Adding dummy SetSTRA
 
@@ -158,10 +161,10 @@ void  TGeant3::Gfpart(Int_t, char*, Int_t&, Float_t&, Float_t&, Float_t&){}
 //___________________________________________
 void  TGeant3::Gftmed(Int_t, char*, Int_t&, Int_t&, Int_t&, Float_t&, Float_t&,
                     Float_t&, Float_t&, Float_t&, Float_t&, Float_t*, Int_t*){}
-void  TGeant3::Gftmat(Int_t imate, Int_t ipart, char *chmeca, Int_t kdim,
-                        Float_t* tkin, Float_t* value, Float_t* pcut, Int_t &ixst){}
-Float_t TGeant3::Gbrelm(Float_t z, Float_t t, Float_t cut){return (Float_t) 0;}
-Float_t TGeant3::Gprelm(Float_t z, Float_t t, Float_t cut){return (Float_t) 0;}
+void  TGeant3::Gftmat(Int_t, Int_t, char*, Int_t, Float_t*, Float_t*, 
+                     Float_t*, Int_t&){}
+Float_t TGeant3::Gbrelm(Float_t, Float_t, Float_t){return (Float_t) 0;}
+Float_t TGeant3::Gprelm(Float_t, Float_t, Float_t){return (Float_t) 0;}
 
 
 //___________________________________________
index f71e56de24e4b2deb2cc1d5fb7f87e64196508d3..12f7d9af1f221df58d7c6d0d09b6af4fa00b4d47 100644 (file)
 
 /*
 $Log$
+Revision 1.7  2000/06/28 21:27:45  morsch
+Most coding rule violations corrected.
+Still to do: Split the file (on file per class) ? Avoid the global variables.
+Copy constructors and assignment operators (dummy ?)
+
 Revision 1.6  2000/04/14 11:07:46  morsch
 Correct volume to medium assignment in case several media are asigned to the
 same material.
@@ -807,9 +812,9 @@ AliGuiGeomMain::AliGuiGeomMain(const TGWindow *p, UInt_t w, UInt_t h)
 //
    fTab = new TGTab(this, 400, 400);
    TGCompositeFrame *tf = fTab->AddTab("Volumes");
-   TGLayoutHints *fLTab = new TGLayoutHints(kLHintsBottom | kLHintsExpandX |
+   TGLayoutHints *lTab = new TGLayoutHints(kLHintsBottom | kLHintsExpandX |
                                           kLHintsExpandY, 2, 2, 5, 1);
-   AddFrame(fTab, fLTab);
+   AddFrame(fTab, lTab);
 
 // Create TGCanvas and a canvas container which uses a tile layout manager
    fCanvasWindow = new TGCanvas(tf, 400, 240);
@@ -848,7 +853,8 @@ AliGuiGeomMain::AliGuiGeomMain(const TGWindow *p, UInt_t w, UInt_t h)
        new TGLayoutHints(kLHintsLeft | kLHintsExpandX );
    fF21 = new TGCompositeFrame(fF2, 60, 20, kVerticalFrame);
    fF2->AddFrame(fF21,fL2);
-   for (Int_t i=0; i<6; i++) {
+   { //Begin local scope for i
+     for (Int_t i=0; i<6; i++) {
        Int_t idT=i+1;       
        fHframe[i] = new TGHorizontalFrame(fF21, 400, 100, kFixedWidth);
        fF21->AddFrame(fHframe[i], bly);
@@ -858,11 +864,12 @@ AliGuiGeomMain::AliGuiGeomMain(const TGWindow *p, UInt_t w, UInt_t h)
        fLabel[i] = new TGLabel(fHframe[i], labelText[i]);
        fHframe[i]->AddFrame(fLabel[i], bFly1);
        fHframe[i]->AddFrame(fTeh[i], bFly1);
-   }
-  tf->AddFrame(fF2, fL2);
-  fMaterialCombo->Resize(200, 20);
-  fMaterialCombo->Associate(this);
-
+     }
+   } //End local scope for i
+   tf->AddFrame(fF2, fL2);
+   fMaterialCombo->Resize(200, 20);
+   fMaterialCombo->Associate(this);
+   
 
 // Media Combo
 //   
@@ -899,9 +906,9 @@ AliGuiGeomMain::AliGuiGeomMain(const TGWindow *p, UInt_t w, UInt_t h)
        fHframeM[i]->AddFrame(fTehM[i], bFly1);
      }
    } //End local scope for i
-  tf->AddFrame(fF3, fL2);
-  fMediaCombo->Resize(200, 20);
-  fMediaCombo->Associate(this);
+   tf->AddFrame(fF3, fL2);
+   fMediaCombo->Resize(200, 20);
+   fMediaCombo->Associate(this);
 //
 // Processes
    tf = fTab->AddTab("Processes");
@@ -1046,10 +1053,12 @@ void AliGuiGeomMain::Plot()
     tmp[4]='\0';
     Int_t kdim=fNbins;
     Float_t de=(fEmax-fEmin)/fNbins;
-    for (Int_t i=0; i<kdim; i++) {
+    { //Begin local scope for i
+      for (Int_t i=0; i<kdim; i++) {
        tkin[i]=fEmin+Float_t(i)*de;
        value[i]=0.;
-    }
+      }
+    } //End local scope for i
     if (kChMeca!="MUON") {
        ((TGeant3*) gMC)->Gftmat(imate, ipart, tmp, kdim, tkin, value, pcut, ixst);
     } else {
@@ -1276,14 +1285,14 @@ Bool_t AliGuiGeomMain::ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
 //
 // Handle mouse click 
        case kCT_ITEMCLICK:
-           TGListTreeItem *item;
 //
 // Button 1: Select volume
            if (parm1 == kButton1) {
-               if ((item = fLt->GetSelected())) 
+             TGListTreeItem *item;
+             if ((item = fLt->GetSelected())) 
                {
-                   gCurrentVolume=((AliDrawVolume *) item->GetUserData());
-                   Update();
+                 gCurrentVolume=((AliDrawVolume *) item->GetUserData());
+                 Update();
                }
            }
 //
index 669c4d6db68390e255b400706af54ab77ad16f34..199262c4979e2e67b37e7185cfc853d46d6dfd2d 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.4  1999/09/29 09:24:31  fca
+Introduction of the Copyright and cvs Log
+
 */
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -123,7 +126,7 @@ static Int_t npid = 0;
 static char cpar[1200];
 static TGeant3 *geant3=(TGeant3*)gMC;
 
-THIGZ *higz = 0;
+THIGZ *gHigz = 0;
 
 ClassImp(THIGZ)
    
@@ -137,7 +140,7 @@ THIGZ::THIGZ()
 THIGZ::THIGZ(Int_t size)
       :TCanvas("higz","higz",size,size)
 {
-   higz = this;
+   gHigz = this;
    Reset();
    SetFillColor(10);
 }
@@ -369,7 +372,7 @@ extern "C" void type_of_call iacwk(Int_t &)
 extern "C" void type_of_call iclrwk(Int_t &,Int_t &)
 {
 //   printf("iclrwk called\n");
-   higz->Clear();
+   gHigz->Clear();
 }
 
 //_______________________________________________________________
@@ -388,9 +391,9 @@ extern "C" void type_of_call idawk(Int_t &)
 //_______________________________________________________________
 extern "C" void type_of_call ifa(Int_t &n,Float_t *x, Float_t *y)
 {
-//   printf("ifa called, n=%d, pname=%s, pid=%d, x1=%f, y1=%f,x2=%f, y2=%f, x3=%f, y3=%f\n",n,higz->fPname.Data(),higz->fPID,x[0],y[0],x[1],y[1],x[2],y[2]);
+//   printf("ifa called, n=%d, pname=%s, pid=%d, x1=%f, y1=%f,x2=%f, y2=%f, x3=%f, y3=%f\n",n,gHigz->fPname.Data(),gHigz->fPID,x[0],y[0],x[1],y[1],x[2],y[2]);
    TGraph *gr = new TGraph(n,x,y);
-   gr->SetFillColor(higz->fFACI);
+   gr->SetFillColor(gHigz->fFACI);
    gr->Draw("f");
 }
 
@@ -399,9 +402,9 @@ extern "C" void type_of_call igbox(Float_t &x1,Float_t &x2,Float_t &y1,Float_t &
 {
    printf("igbox called, x1=%f, y1=%f, x2=%f, y2=%f\n",x1,y1,x2,y2);
    TBox *box = new TBox(x1,y1,x2,y2);
-   box->SetLineColor(higz->fPLCI);
-   box->SetFillColor(higz->fFACI);
-   box->SetFillStyle(higz->fFASI);
+   box->SetLineColor(gHigz->fPLCI);
+   box->SetFillColor(gHigz->fFACI);
+   box->SetFillStyle(gHigz->fFASI);
    box->Draw();
 }
 
@@ -417,14 +420,14 @@ extern "C" void type_of_call ightor(Float_t &h,Float_t &l,Float_t &s,Float_t &r,
 extern "C" void type_of_call igpave(Float_t &x1,Float_t &x2,Float_t &yy1,Float_t &yy2,Float_t &,Int_t &isbox,Int_t &isfram,const char *, const Int_t)
 {
    char text[5];
-   strncpy(text,(char*)&higz->fPID,4);
+   strncpy(text,(char*)&gHigz->fPID,4);
    text[4] = 0;
    Float_t y1 = yy1;
    Float_t y2 = yy2;
    if (y1 > y2) { y1 = yy2; y2 = yy1;}
    Float_t y = 0.5*(y1+y2);
-   Float_t dymax = 0.06*(higz->GetY2()-higz->GetY1());
-   Float_t dymin = -higz->PixeltoY(12);
+   Float_t dymax = 0.06*(gHigz->GetY2()-gHigz->GetY1());
+   Float_t dymin = -gHigz->PixeltoY(12);
    if (y2-y1 > dymax) {
       y1 = y - 0.5*dymax;
       y2 = y + 0.5*dymax;
@@ -438,7 +441,7 @@ extern "C" void type_of_call igpave(Float_t &x1,Float_t &x2,Float_t &yy1,Float_t
    pt->SetFillColor(isbox%1000);
    pt->SetLineColor(isfram%1000);
    pt->Draw();
-//   printf("igpave called, text=%s, Pname=%s, x1=%f, y1=%f, x2=%f, y2=%f, isbox=%d, isfram=%d\n",text,higz->fPname.Data(),x1,y1,x2,y2,isbox,isfram);
+//   printf("igpave called, text=%s, Pname=%s, x1=%f, y1=%f, x2=%f, y2=%f, isbox=%d, isfram=%d\n",text,gHigz->fPname.Data(),x1,y1,x2,y2,isbox,isfram);
 }
 
 //_______________________________________________________________
@@ -451,11 +454,11 @@ extern "C" void type_of_call igpid(Int_t &,const char *name,const Int_t l1, Int_
    npid++;
 //   if(npid&100 == 0) printf("igpid called, npid=%d\n",npid);
    strncpy(cpar,name,l1); cpar[l1] = 0;
-   higz->fPname = cpar;
-   higz->fPID = pid;
+   gHigz->fPname = cpar;
+   gHigz->fPID = pid;
       
 //   char text[5];
-//   strncpy(text,(char*)&higz->fPID,4);
+//   strncpy(text,(char*)&gHigz->fPID,4);
 //   text[4] = 0;
 //   printf("igpid called, level=%d, name=%s, pid=%d, cpid=%s\n",level,cpar,pid,text);
 }
@@ -469,14 +472,14 @@ extern "C" void type_of_call igq(const char *name,const Int_t l1, Float_t &rval)
 {
    strncpy(cpar,name,l1); cpar[l1] = 0;
 //   printf("igq called, name=%s\n",cpar);
-   rval = higz->Get(cpar);
+   rval = gHigz->Get(cpar);
 }
 
 //_______________________________________________________________
 extern "C" void type_of_call igrng(Float_t &xsize,Float_t &ysize)
 {
 //   printf("igrng called, xsize=%f, ysize=%f\n",xsize,ysize);
-   higz->Range(0,0,xsize,ysize);
+   gHigz->Range(0,0,xsize,ysize);
 }
 
 //_______________________________________________________________
@@ -494,7 +497,7 @@ extern "C" void type_of_call igset(const char *name, const Int_t l1,Float_t &rva
 {
    strncpy(cpar,name,l1); cpar[l1] = 0;
 //   printf("igset called, name=%s, rval=%f\n",cpar,rval);
-   higz->Set(cpar,rval);
+   gHigz->Set(cpar,rval);
 }
 
 //_______________________________________________________________
@@ -515,15 +518,15 @@ extern "C" void type_of_call ipl(Int_t &n,Float_t *x,Float_t *y)
 //   printf("ipl called, n=%d, x[0]=%f,y[0]=%f, x[1]=%f, y[1]=%f\n",n,x[0],y[0],x[1],y[1]);
    if (n <= 2) {
       TLine *l = new TLine(x[0],y[0],x[1],y[1]);
-      l->SetLineColor(higz->fPLCI);
-      l->SetLineStyle(higz->fLTYP);
-      l->SetLineWidth(Short_t(higz->fLWID));
+      l->SetLineColor(gHigz->fPLCI);
+      l->SetLineStyle(gHigz->fLTYP);
+      l->SetLineWidth(Short_t(gHigz->fLWID));
       l->Draw();
    } else {
       TPolyLine *pl = new TPolyLine(n,x,y);
-      pl->SetLineColor(higz->fPLCI);
-      pl->SetLineStyle(higz->fLTYP);
-      pl->SetLineWidth(Short_t(higz->fLWID));
+      pl->SetLineColor(gHigz->fPLCI);
+      pl->SetLineStyle(gHigz->fLTYP);
+      pl->SetLineWidth(Short_t(gHigz->fLWID));
       pl->Draw();
    }
 }
@@ -533,9 +536,9 @@ extern "C" void type_of_call ipm(Int_t &n,Float_t *x,Float_t *y)
 {
    printf("ipm called, n=%d\n",n);
    TPolyMarker *pm = new TPolyMarker(n,x,y);
-   pm->SetMarkerColor(higz->fPMCI);
-   pm->SetMarkerStyle(higz->fMTYP);
-   pm->SetMarkerSize(higz->fMSCF);
+   pm->SetMarkerColor(gHigz->fPMCI);
+   pm->SetMarkerStyle(gHigz->fMTYP);
+   pm->SetMarkerSize(gHigz->fMSCF);
    pm->Draw();
 }
 
@@ -567,35 +570,35 @@ extern "C" void type_of_call isfaci(Int_t &col)
 //   printf("isfaci called, col=%d\n",col);
    Int_t color = col%1000;
 //   if (color > 10) color += 35;
-   higz->fFACI = color;
+   gHigz->fFACI = color;
 }
 
 //_______________________________________________________________
 extern "C" void type_of_call isfais(Int_t &is)
 {
 //   printf("isfais called, is=%d\n",is);
-   higz->fFAIS = is;
+   gHigz->fFAIS = is;
 }
 
 //_______________________________________________________________
 extern "C" void type_of_call isln(Int_t &ln)
 {
 //   printf("isln called, ln=%d\n",ln);
-   higz->fLTYP = ln;
+   gHigz->fLTYP = ln;
 }
 
 //_______________________________________________________________
 extern "C" void type_of_call ismk(Int_t &mk)
 {
 //   printf("ismk called, mk=%d\n",mk);
-   higz->fMTYP = mk;
+   gHigz->fMTYP = mk;
 }
 
 //_______________________________________________________________
 extern "C" void type_of_call islwsc(Float_t &wl)
 {
 //   printf("islwsc called, wl=%f\n",wl);
-   higz->fLWID = wl;
+   gHigz->fLWID = wl;
 }
 
 //_______________________________________________________________
@@ -604,7 +607,7 @@ extern "C" void type_of_call isplci(Int_t &col)
 //   printf("isplci called, col=%d\n",col);
    Int_t color = col%1000;
 //   if (color > 10) color += 35;
-   higz->fPLCI = color;
+   gHigz->fPLCI = color;
 }
 
 //_______________________________________________________________
@@ -613,7 +616,7 @@ extern "C" void type_of_call ispmci(Int_t &col)
 //   printf("ispmci called, col=%d\n",col);
    Int_t color = col%1000;
 //   if (color > 10) color += 35;
-   higz->fPMCI = color;
+   gHigz->fPMCI = color;
 }
 
 //_______________________________________________________________
@@ -622,7 +625,7 @@ extern "C" void type_of_call istxci(Int_t &col)
 //   printf("istxci called, col=%d\n",col);
    Int_t color = col%1000;
 //   if (color > 10) color += 35;
-   higz->fTXCI = color;
+   gHigz->fTXCI = color;
 }
 
 //_______________________________________________________________
@@ -636,13 +639,13 @@ extern "C" void type_of_call iswn(Int_t &,Float_t &x1,Float_t &x2,Float_t &y1,Fl
 
 {
 //   printf("iswn called, nt=%d, x1=%f, y1=%f, x2=%f, y2=%f\n",nt,x1,y1,x2,y2);
-   higz->Range(x1,y1,x2,y2);
+   gHigz->Range(x1,y1,x2,y2);
 }
 
 //_______________________________________________________________
 extern "C" void type_of_call itx(Float_t &x,Float_t &y,const char *ptext, const Int_t l1p)
 {
-   if (higz->fPname == "Tree") return;
+   if (gHigz->fPname == "Tree") return;
    Int_t l1=l1p;
    strncpy(cpar,ptext,l1); cpar[l1] = 0;
 //printf("itx called, x=%f, y=%f, text=%s, l1=%d\n",x,y,cpar,l1);
@@ -657,11 +660,11 @@ extern "C" void type_of_call itx(Float_t &x,Float_t &y,const char *ptext, const
       small++;
    }
    TText *text = new TText(x,y,cpar);
-   text->SetTextColor(higz->fTXCI);
-   text->SetTextSize(higz->fCHHE);
-   text->SetTextFont(higz->fTXFP);
-   text->SetTextAlign(higz->fTXAL);
-   text->SetTextAngle(higz->fTANG);
+   text->SetTextColor(gHigz->fTXCI);
+   text->SetTextSize(gHigz->fCHHE);
+   text->SetTextFont(gHigz->fTXFP);
+   text->SetTextAlign(gHigz->fTXAL);
+   text->SetTextAngle(gHigz->fTANG);
    text->Draw();   
 }
 
@@ -682,8 +685,8 @@ extern "C" void type_of_call hplend()
 extern "C" void type_of_call hplfra(Float_t &x1,Float_t &x2,Float_t &y1, Float_t &y2,const char *, const Int_t)
 {
 //   printf("hplfra called, x1=%f, y1=%f, x2=%f, y2=%f\n",x1,y1,x2,y2);
-   higz->Clear();
-   higz->Range(x1,y1,x2,y2);
+   gHigz->Clear();
+   gHigz->Range(x1,y1,x2,y2);
 }
 
 //_______________________________________________________________
@@ -710,6 +713,6 @@ extern "C" void type_of_call igqwk(Int_t &, const char *name, Float_t &rval, con
 {
    strncpy(cpar,name,l1); cpar[l1] = 0;
 //   printf("igqwk called, wid=%d, pname=%s\n",wid,cpar);
-   rval = higz->Get(cpar);
+   rval = gHigz->Get(cpar);
 }
  
index 87e579d4971d858f633365d528438e6111ebbd0b..cb709d36da20a6bf8921ee2436d75c3b65ec789a 100644 (file)
@@ -69,7 +69,7 @@ public:
    ClassDef(THIGZ,1)  //Emulation of HIGZ for Root
 }; 
 
-   R__EXTERN THIGZ *higz;
+   R__EXTERN THIGZ *gHigz;
 
 inline void THIGZ::Divide(Int_t, Int_t, Float_t, Float_t, Int_t) { }
 inline void THIGZ::SetGrid(Int_t, Int_t) { }