/*
$Log$
+Revision 1.5 1999/09/29 09:24:29 fca
+Introduction of the Copyright and cvs Log
+
*/
///////////////////////////////////////////////////////////////////////////////
}
}
+//_____________________________________________________________________________
+void AliDetector::Copy(AliDetector &det) const
+{
+ //
+ // Copy *this onto det -- not implemented
+ //
+ Fatal("Copy","Not implemented~\n");
+}
+
//_____________________________________________________________________________
void AliDetector::FinishRun()
{
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);
}
-#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);
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
/*
$Log$
+Revision 1.3 1999/09/29 09:24:29 fca
+Introduction of the Copyright and cvs Log
+
*/
#include "AliDigit.h"
AliDigit::AliDigit()
{
+ //
+ // Default constructor
+ //
}
AliDigit::AliDigit(Int_t *tracks)
{
+ //
+ // Standard constructor
+ //
fTracks[0] = tracks[0];
fTracks[1] = tracks[1];
fTracks[2] = tracks[2];
-#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 */
// Base class for Alice Digits //
////////////////////////////////////////////////
+#include <assert.h>
#include "TObject.h"
class AliDigit : public TObject {
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
};
/*
$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
}
//____________________________________________________________
-void AliGenerator::Copy(AliGenerator &gen) const
+void AliGenerator::Copy(AliGenerator &/* gen */) const
{
//
// Copy *this onto gen
/*
$Log$
+Revision 1.1 1999/12/17 09:01:14 fca
+Y.Schutz new classes for reconstruction
+
*/
//-*-C++-*-
//____________________________________________________________________________
AliGeometry::AliGeometry()
{
+ //
// ctor
+ //
}
//____________________________________________________________________________
AliGeometry(const Text_t* name, const Text_t* title) : TNamed (name,title) {}
-public:
-
ClassDef(AliGeometry,1) // description , version 1
};
/*
$Log$
+Revision 1.2 1999/09/29 09:24:29 fca
+Introduction of the Copyright and cvs Log
+
*/
#include "AliHeader.h"
AliHeader::AliHeader()
{
+ //
+ // Default constructor
+ //
fRun=0;
fNvertex=0;
fNprimary=0;
AliHeader::AliHeader(Int_t run, Int_t event)
{
+ //
+ // Standard constructor
+ //
fRun=run;
fNvertex=0;
fNprimary=0;
void AliHeader::Reset(Int_t run, Int_t event)
{
+ //
+ // Resets the header with new run and event number
+ //
fRun=run;
fNvertex=0;
fNprimary=0;
void AliHeader::Dump()
{
+ //
+ // Dumps header content
+ //
printf(
"\n=========== Header for run %d Event %d = beginning ======================================\n",
fRun,fEvent);
-#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 */
#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);
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
};
/*
$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
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);
-#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 */
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
};
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
/*
$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
#include "TMath.h"
#include "AliLego.h"
+#include "AliLegoGenerator.h"
#include "AliRun.h"
#include "AliConst.h"
#include "AliMC.h"
//___________________________________________
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);
//___________________________________________
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;
//___________________________________________
void AliLego::FinishEvent()
{
+ //
+ // Finish the event and update the histos
+ //
Double_t thed, phid, eta;
thed = fGener->CurTheta()*kRaddeg;
phid = fGener->CurPhi()*kRaddeg;
//___________________________________________
void AliLego::FinishRun()
{
- // Store histograms in current Root file
+ //
+ // Store histograms in current Root file
+ //
fHistRadl->Write();
fHistAbso->Write();
fHistGcm2->Write();
}
+//___________________________________________
+void AliLego::Copy(AliLego &lego) const
+{
+ //
+ // Copy *this onto lego -- not implemented
+ //
+ Fatal("Copy","Not implemented!\n");
+}
//___________________________________________
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;
-}
-
#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
-
--- /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$
+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;
+}
+
--- /dev/null
+#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
+
/*
$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
}
}
+void AliMC::Copy(AliMC &mc) const
+{
+ //
+ // Copy *this onto mc -- not implemented
+ //
+ Fatal("Copy","Not implemented~\n");
+}
+
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
/*
$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)
/*
$Log$
+Revision 1.1 2000/07/11 18:24:59 fca
+Coding convention corrections + few minor bug fixes
+
*/
#include "AliMagFCM.h"
}
//________________________________________
-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");
}
/*
$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"
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;
/*-----------------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];
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];
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];
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];
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];
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];
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);
}
/*
$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
//
// Copy constructor
//
- Copy(*this);
+ mod.Copy(*this);
}
//_____________________________________________________________________________
}
//_____________________________________________________________________________
-void AliModule::Copy(AliModule &mod) const
+void AliModule::Copy(AliModule & /* mod */) const
{
//
// Copy *this onto mod, not implemented for AliModule
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);
/*
$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
//_____________________________________________________________________________
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
//_____________________________________________________________________________
-void AliRun::Copy(AliRun &run) const
+void AliRun::Copy(AliRun &/* run */) const
{
//
// Copy *this onto run, not implemented for AliRun
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
/*
$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.
//
// 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);
}
//____________________________________________________________________________
//
// Initialise HIGZ
//
- if (!higz) {
+ if (!gHigz) {
new THIGZ(defSize);
gdinit();
}
//
// 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];
}
}
//_____________________________________________________________________________
-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) {
//
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");
}
//_____________________________________________________________________________
// with solid colours can now be stored in a view bank or in 'PICTURE FILES'
//
InitHIGZ();
- higz->Clear();
+ gHigz->Clear();
gdopen(iview);
}
// 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) {
// 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));
// 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
// volume.
//
InitHIGZ();
- higz->Clear();
+ gHigz->Clear();
char vname[5];
Vname(name,vname);
gdspec(PASSCHARD(vname) PASSCHARL(vname));
// 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();
higzSpec->Update();
higzSave->cd();
higzSave->SetName("higz");
- higz = higzSave;
+ gHigz = higzSave;
}
//_____________________________________________________________________________
// - 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 = "";
}
//_____________________________________________________________________________
// 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;
strncpy(vname,(char*)&fZiq[fGclink->jvolum+i],4);
vname[4] = 0;
gdtree(PASSCHARD(vname), levmax, isel PASSCHARL(vname));
- higz->fPname = "";
+ gHigz->fPname = "";
return;
}
}
/*
$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
//___________________________________________
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;}
//___________________________________________
/*
$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.
//
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);
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);
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
//
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");
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 {
//
// 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();
}
}
//
/*
$Log$
+Revision 1.4 1999/09/29 09:24:31 fca
+Introduction of the Copyright and cvs Log
+
*/
///////////////////////////////////////////////////////////////////////////////
static char cpar[1200];
static TGeant3 *geant3=(TGeant3*)gMC;
-THIGZ *higz = 0;
+THIGZ *gHigz = 0;
ClassImp(THIGZ)
THIGZ::THIGZ(Int_t size)
:TCanvas("higz","higz",size,size)
{
- higz = this;
+ gHigz = this;
Reset();
SetFillColor(10);
}
extern "C" void type_of_call iclrwk(Int_t &,Int_t &)
{
// printf("iclrwk called\n");
- higz->Clear();
+ gHigz->Clear();
}
//_______________________________________________________________
//_______________________________________________________________
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");
}
{
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();
}
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;
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);
}
//_______________________________________________________________
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);
}
{
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);
}
//_______________________________________________________________
{
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);
}
//_______________________________________________________________
// 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();
}
}
{
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();
}
// 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;
}
//_______________________________________________________________
// printf("isplci called, col=%d\n",col);
Int_t color = col%1000;
// if (color > 10) color += 35;
- higz->fPLCI = color;
+ gHigz->fPLCI = color;
}
//_______________________________________________________________
// printf("ispmci called, col=%d\n",col);
Int_t color = col%1000;
// if (color > 10) color += 35;
- higz->fPMCI = color;
+ gHigz->fPMCI = color;
}
//_______________________________________________________________
// printf("istxci called, col=%d\n",col);
Int_t color = col%1000;
// if (color > 10) color += 35;
- higz->fTXCI = color;
+ gHigz->fTXCI = color;
}
//_______________________________________________________________
{
// 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);
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();
}
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);
}
//_______________________________________________________________
{
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);
}
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) { }