Fixed some coding convention violations
authoralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 21 Oct 2004 11:15:59 +0000 (11:15 +0000)
committeralla <alla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 21 Oct 2004 11:15:59 +0000 (11:15 +0000)
19 files changed:
FMD/AliFMD.cxx
FMD/AliFMD1.h
FMD/AliFMD2.h
FMD/AliFMD3.h
FMD/AliFMDDigit.h
FMD/AliFMDHit.h
FMD/AliFMDMap.h
FMD/AliFMDPolygon.h
FMD/AliFMDRawStream.h
FMD/AliFMDReconstructor.cxx
FMD/AliFMDReconstructor.h
FMD/AliFMDRing.cxx
FMD/AliFMDRing.h
FMD/AliFMDSDigitizer.cxx [deleted file]
FMD/AliFMDSDigitizer.h [deleted file]
FMD/AliFMDSubDetector.h
FMD/AliFMDv1.cxx
FMD/Config.C
FMD/ViewFMD.C

index 375d586..2dd5a4b 100644 (file)
@@ -334,11 +334,11 @@ AliFMD::CreateGeometry()
   par[0]      =  fLegRadius - .1;
   par[1]      =  fLegRadius;
   par[2]      =  fLegLength / 2;
-  name        =  "SLEG";
+  name        =  "FSL";
   fShortLegId =  gMC->Gsvolu(name.Data(),"TUBE",(*fIdtmed)[kPlasticId],par,3);
   
   par[2]      += fModuleSpacing / 2;
-  name        = "LLEG";
+  name        = "FLL";
   fLongLegId  =  gMC->Gsvolu(name.Data(),"TUBE",(*fIdtmed)[kPlasticId],par,3);
 
   fInner->SetupGeometry((*fIdtmed)[kAirId], 
index 3ea6d32..7fd074a 100644 (file)
 
 class AliFMD1 : public AliFMDSubDetector 
 {
-private:
-  Int_t    fVolumeId;
-  Double_t fDz;
 public:
   AliFMD1();
   virtual ~AliFMD1();
   virtual void   SetupGeometry(Int_t airId, Int_t kaptionId);  
   virtual void   Geometry(const char* mother, Int_t pbRotId, 
                          Int_t idRotId, Double_t z=0);
+protected:
+  Int_t    fVolumeId;
+  Double_t fDz;
   ClassDef(AliFMD1,1); // Geometry of FMD1 
 };
 
index 5d71c6d..5558902 100644 (file)
 
 class AliFMD2 : public AliFMDSubDetector 
 {
-private:
-  Int_t    fVolumeId;
-  Double_t fDz;
 public:
   AliFMD2();
   virtual ~AliFMD2();
   virtual void   SetupGeometry(Int_t airId, Int_t kaptionId);  
   virtual void   Geometry(const char* mother, Int_t pbRotId, 
                          Int_t idRotId, Double_t z=0);
-  ClassDef(AliFMD2,1); // Geometry of FMD2 
+protected:
+  Int_t    fVolumeId;
+  Double_t fDz;
+  ClassDef(AliFMD2,1); // Geometry of FMD2
 };
 
 #endif
index 2d3f318..b9fdb71 100644 (file)
 
 class AliFMD3 : public AliFMDSubDetector 
 {
-private:
-  Int_t    fVolumeId;
-  Double_t fDz;
 public:
   AliFMD3();
   virtual ~AliFMD3();
   virtual void   SetupGeometry(Int_t airId, Int_t kaptionId);  
   virtual void   Geometry(const char* mother, Int_t pbRotId, 
                          Int_t idRotId, Double_t z=0);
+protected:
+  Int_t    fVolumeId;
+  Double_t fDz;
   ClassDef(AliFMD3,1); // Geometry of FMD3 
 };
 
index b150e39..167431e 100644 (file)
 //____________________________________________________________________
 class AliFMDBaseDigit : public TObject 
 {
-protected:
-  UShort_t fDetector;  // (Sub) Detector # (1,2, or 3)
-  Char_t   fRing;      // Ring ID ('I' or 'O')
-  UShort_t fSector;    // Sector # (phi division)
-  UShort_t fStrip;     // Strip # (radial division)
 public: 
   AliFMDBaseDigit();
   AliFMDBaseDigit(UShort_t detector, 
@@ -30,6 +25,12 @@ public:
   UShort_t     Sector()                   const { return fSector;   }
   UShort_t     Strip()            const { return fStrip;    }
   virtual void Print(Option_t* opt="") const;
+
+protected:
+  UShort_t fDetector;  // (Sub) Detector # (1,2, or 3)
+  Char_t   fRing;      // Ring ID ('I' or 'O')
+  UShort_t fSector;    // Sector # (phi division)
+  UShort_t fStrip;     // Strip # (radial division)
   ClassDef(AliFMDBaseDigit, 1) // Base class for FMD digits 
 };
 
index 8cb59a6..6abec54 100644 (file)
@@ -5,77 +5,18 @@
  *
  * See cxx source for full Copyright notice                               
  */
-////////////////////////////////////////////////
+//___________________________________________________________________
 //
-//  Manager and hits classes for set:FMD     
+// AliFMDhit is the hit class for the FMD. Hits are the information
+// that comes from a Monte Carlo at each step as a particle mass
+// through sensitive detector elements as particles are transported
+// through a detector.
 //
-////////////////////////////////////////////////
 #ifndef ALIHIT_H
 # include "AliHit.h"
 #endif
  
 
-///////////////////////////////////////////////////////////////////////
-// AliFMDhit is the hit class for the FMD. Hits are the information
-// that comes from a Monte Carlo at each step as a particle mass through
-// sensitive detector elements as particles are transported through a
-// detector.
-//
-// Data members:
-//
-// Int_t fTrack
-//     See AliHit for a full description. The track number of the track
-// that made this hit.
-//
-// Float_t fX
-//     See AliHit for a full description. The global x position of the
-// hit (in the standard units of the Monte Carlo).
-//
-// Float_t fY
-//     See AliHit for a full description. The global y position of the
-// hit (in the standard units of the Monte Carlo).
-//
-// Float_t fZ
-//     See AliHit for a full description. The global z position of the
-// hit (in the standard units of the Monte Carlo).
-//
-// Int_t fStatus
-//     The track status flag. This flag indicates the track status
-// at the time of creating this hit. It is made up of the following 8
-// status bits from highest order to lowest order bits
-// 0           :  IsTrackAlive():    IsTrackStop():IsTrackDisappeared():
-// IsTrackOut():IsTrackExiting():IsTrackEntering():IsTrackInside()     .
-// See AliMC for a description of these functions. If the function is
-// true then the bit is set to one, otherwise it is zero.
-
-// Int_t fVolume
-//     The number of the FMD detector that contains this hit. 
-
-// Float_t fEdep
-//     The energy lost by the particle during the step ending in this
-// hit. The units are those determined by the Monte Carlo.
-//
-// Float_t fPx
-//     The x momentum, in global coordinates, of the particle that
-// "created" the hit at the time and position of the hit. The units
-// are those determined by the Monte Carlo.
-//
-// Float_t fPy
-//     The y momentum, in global coordinates, of the particle that
-// "created" the hit at the time and position of the hit. The units
-// are those determined by the Monte Carlo.
-//
-// Float_t fPz
-//     The z momentum, in global coordinates, of the particle that
-// "created" the hit at the time and position of the hit. The units
-// are those determined by the Monte Carlo.
-//
-///
-// Float_t fTime
-//     The time of flight associated with the particle ending in this
-// hit. The time is typically measured from the point of creation of the
-// original particle (if this particle is a daughter).  The units
-// are those determined by the Monte Carlo. 
 
 class AliFMDHit : public AliHit 
 {
@@ -111,7 +52,7 @@ public:
   void     Print(Option_t* opt="") const;
 
   void     SetEdep(Float_t edep) { fEdep = edep; }
-private:
+protected:
   UShort_t fDetector;  // (Sub) Detector # (1,2, or 3)
   Char_t   fRing;      // Ring ID ('I' or 'O')
   UShort_t fSector;    // Sector # (phi division)
index a963292..8487cd7 100644 (file)
 template <typename Type> 
 class AliFMDMap : public TObject 
 {
+public:
+  AliFMDMap(size_t maxDet=3, size_t maxRing=2, size_t maxSec=40, 
+           size_t maxStr=512);
+  virtual ~AliFMDMap() {}
+  void Clear();
+  Type& operator()(size_t det, Char_t ring, size_t sec, size_t str);
+  const Type& operator()(size_t det, Char_t ring, size_t sec, size_t str)const;
 private:
   typedef std::vector<Type> ValueVector; // Type of container
   ValueVector fValues;                   // Contained values
@@ -21,13 +28,6 @@ private:
   size_t      fMaxStrips;                // Maximum # of strips
   
   size_t CalcIndex(size_t det, Char_t ring, size_t sec, size_t str) const;
-public:
-  AliFMDMap(size_t maxDet=3, size_t maxRing=2, size_t maxSec=40, 
-           size_t maxStr=512);
-  virtual ~AliFMDMap() {}
-  void Clear();
-  Type& operator()(size_t det, Char_t ring, size_t sec, size_t str);
-  const Type& operator()(size_t det, Char_t ring, size_t sec, size_t str)const;
   ClassDef(AliFMDMap, 0); // Map of FMD index's to values 
 };
 
index 877f9a4..022f1e8 100644 (file)
 
 class AliFMDPolygon : public TObject 
 {
-private:
-  enum {
-    kUnknown, 
-    kConvex, 
-    kConcave
-  };
-  mutable Int_t fState;
-  // List of coordinates 
-  TObjArray fVerticies;
-  // Force convexity check 
-  bool ConvexCheck() const;
-  // Check if a point is at the right-hand side of a segment 
-  bool IsOnLeftHand(const TVector2* c, size_t i1, size_t i2) const;
 public:
   // Construct a alipolygon with N sides
   AliFMDPolygon();
@@ -55,6 +42,20 @@ public:
   
   void Draw(const char* option="PL", const char* name=0) const;
 
+private:
+  enum {
+    kUnknown, 
+    kConvex, 
+    kConcave
+  };
+  mutable Int_t fState;
+  // List of coordinates 
+  TObjArray fVerticies;
+  // Force convexity check 
+  bool ConvexCheck() const;
+  // Check if a point is at the right-hand side of a segment 
+  bool IsOnLeftHand(const TVector2* c, size_t i1, size_t i2) const;
+
   ClassDef(AliFMDPolygon,1) // Polygon parameters
 };
 
index 9b31b4b..ad62694 100644 (file)
@@ -22,9 +22,6 @@
 // 
 class AliFMDRawStream : public AliAltroRawStream 
 {
-private:
-  UShort_t fSampleRate; // # of ALTRO samples per VA1_ALICE clock
-  Int_t    fPrevTime;   // Last time bin
 public:
   AliFMDRawStream(AliRawReader* reader);
 
@@ -44,6 +41,10 @@ public:
   
   virtual Bool_t   Next();
   
+private:
+  UShort_t fSampleRate; // # of ALTRO samples per VA1_ALICE clock
+  Int_t    fPrevTime;   // Last time bin
+
   ClassDef(AliFMDRawStream, 0) // Read raw FMD Altro data 
 };
 
index a4370c7..0468f0b 100644 (file)
@@ -16,6 +16,7 @@
 /* $Id$ */
 
 //____________________________________________________________________
+//
 // This is a class that constructs ReconstParticles (reconstructed
 // particles) out of Digits
 //
@@ -69,6 +70,7 @@ AliFMDReconstructor::AliFMDReconstructor()
     fPedestal(0), 
     fPedestalWidth(0)
 {
+  // Make a new FMD reconstructor object - default CTOR.
   SetDeltaEta();
   SetDeltaPhi();
   SetThreshold();
@@ -80,6 +82,48 @@ AliFMDReconstructor::AliFMDReconstructor()
   fFMD       = 0;
 }
   
+
+//____________________________________________________________________
+AliFMDReconstructor::AliFMDReconstructor(const AliFMDReconstructor& other) 
+  : AliReconstructor(),
+    fAdcs(kMaxDetectors, kMaxRings, kMaxSectors, kMaxStrips),
+    fDeltaEta(0), 
+    fDeltaPhi(0), 
+    fThreshold(0),
+    fPedestal(0), 
+    fPedestalWidth(0)
+{
+  // Make a new FMD reconstructor object - default CTOR.
+  SetDeltaEta(other.fDeltaEta);
+  SetDeltaPhi(other.fDeltaPhi);
+  SetThreshold(other.fThreshold);
+  SetPedestal(other.fPedestal, other.fPedestalWidth);
+
+  // fParticles = new TClonesArray("AliFMDParticles", 1000);
+  fFMDLoader = other.fFMDLoader;
+  fRunLoader = other.fRunLoader;
+  fFMD       = other.fFMD;
+}
+  
+
+//____________________________________________________________________
+AliFMDReconstructor&
+AliFMDReconstructor::operator=(const AliFMDReconstructor& other) 
+{
+  // Make a new FMD reconstructor object - default CTOR.
+  SetDeltaEta(other.fDeltaEta);
+  SetDeltaPhi(other.fDeltaPhi);
+  SetThreshold(other.fThreshold);
+  SetPedestal(other.fPedestal, other.fPedestalWidth);
+
+  // fParticles = new TClonesArray("AliFMDParticles", 1000);
+  fFMDLoader = other.fFMDLoader;
+  fRunLoader = other.fRunLoader;
+  fFMD       = other.fFMD;
+
+  return *this;
+}
+  
 //____________________________________________________________________
 void 
 AliFMDReconstructor::SetPedestal(Float_t mean, Float_t width) 
@@ -173,6 +217,8 @@ AliFMDReconstructor::ProcessEvent(Int_t event,
                                  AliRawReader* reader, 
                                  TClonesArray* digits) const
 {
+  // Process one event read from either a clones array or from a a raw
+  // data reader. 
   fRunLoader->GetEvent(event) ;
   //event z-vertex for correction eta-rad dependence      
   AliHeader *header            = fRunLoader->GetHeader();
@@ -246,6 +292,7 @@ AliFMDReconstructor::ProcessEvent(Int_t event,
 Bool_t
 AliFMDReconstructor::ReadAdcs(TClonesArray* digits) const
 {
+  // Read the ADC values from a clones array. 
   AliDebug(10, "Reading ADCs from Digits array");
   // read Digits, and reconstruct the particles
   if (!fFMDLoader->TreeD()->GetEvent(0)) return kFALSE;
@@ -266,6 +313,7 @@ AliFMDReconstructor::ReadAdcs(TClonesArray* digits) const
 Bool_t
 AliFMDReconstructor::ReadAdcs(AliRawReader* reader) const
 {
+  // Read the ADC values from a raw data reader. 
   AliDebug(10, "Reading ADCs from RawReader");
   // Reads the digits from a RAW data 
   fAdcs.Clear();
@@ -542,7 +590,11 @@ void
 AliFMDReconstructor::FillESD(AliRunLoader* /*fRunLoader*/, 
                             AliESD* /*esd*/) const
 {
-// nothing to be done
+  // nothing to be done
 
 }
 
+//____________________________________________________________________
+//
+// EOF
+//
index 4aff5e0..57ac30a 100644 (file)
   */
 /* $Id$ */
 
+//____________________________________________________________________
+//
+// Class to do reconstruction of events based on the FMD data.  The
+// class will do two kinds of reconstruction, one based on energy
+// deposition, and one using hit patterns. 
+//
+
 // Header guards in the header files speeds up the compilation
 // considerably.  Please leave them in. 
 #ifndef ALIRECONSTRUCTOR_H
@@ -42,31 +49,11 @@ typedef AliFMDMap<UShort_t> AliFMDAdcMap;
 //____________________________________________________________________
 class AliFMDReconstructor: public AliReconstructor 
 {
-protected:
-  mutable AliFMDAdcMap  fAdcs;
-  mutable AliRunLoader* fRunLoader;
-  mutable AliLoader*    fFMDLoader;
-  mutable TClonesArray* fParticles;
-  mutable AliFMD*       fFMD;
-  
-  Float_t               fDeltaEta;
-  Float_t               fDeltaPhi;
-  UShort_t              fThreshold;
-  Float_t               fPedestal;
-  Float_t               fPedestalWidth;
-  mutable Int_t         fEmptyStrips;
-  mutable Int_t         fTotalStrips;
-  
-  enum { 
-    kMaxDetectors = 3, 
-    kMaxRings     = 2, 
-    kMaxSectors   = 20, 
-    kMaxStrips    = 512
-  };
-  
 public:
   AliFMDReconstructor();
+  AliFMDReconstructor(const AliFMDReconstructor& other);
   virtual ~AliFMDReconstructor() {}
+  AliFMDReconstructor& operator=(const AliFMDReconstructor& other);
 
   void         SetDeltaEta(Float_t deta=.1)  { fDeltaEta = deta;  }
   void         SetDeltaPhi(Float_t dphi=360) { fDeltaPhi = dphi;  } 
@@ -87,6 +74,28 @@ protected:
   virtual void     ProcessDigit(AliFMDDigit* digit) const;
   virtual UShort_t SubtractPedestal(AliFMDDigit* digit) const;
   virtual void     ReconstructFromCache(Float_t zVertex) const;
+
+  mutable AliFMDAdcMap  fAdcs;       // Cached ADC values
+  mutable AliRunLoader* fRunLoader;  // Run loader 
+  mutable AliLoader*    fFMDLoader;  // FMD specific loader 
+  mutable TClonesArray* fParticles;  // Array of particles 
+  mutable AliFMD*       fFMD;        // Pointer to FMD manager 
+  
+  Float_t               fDeltaEta;      // Bin size in eta
+  Float_t               fDeltaPhi;      // Bin size in phi
+  UShort_t              fThreshold;     // Threshold for Poisson recon.
+  Float_t               fPedestal;      // Pedestal to subtract
+  Float_t               fPedestalWidth; // Width of pedestal
+  mutable Int_t         fEmptyStrips;   // Number of empty strips
+  mutable Int_t         fTotalStrips;   // Total number of strips 
+  
+  enum { 
+    kMaxDetectors = 3,                  // Maximum number of sub-det.
+    kMaxRings     = 2,                  // Maximum number of rings
+    kMaxSectors   = 40,                 // Maximum number of sectors
+    kMaxStrips    = 512                 // Maximum number of strips
+  };
+  
   ClassDef(AliFMDReconstructor, 0)  // class for the FMD reconstruction
 }; 
 #endif
index 6feac47..1d7e899 100644 (file)
 # include <iostream>
 #endif
 
+static const char* kRingFormat         = "FRG%c";
+static const char* kVirtualFormat      = "FV%c%c";
+static const char* kActiveFormat       = "FAC%c";
+static const char* kSectorFormat       = "FSE%c";
+static const char* kStripFormat        = "FST%c";
+static const char* kPrintboardFormat   = "FP%c%c";
+
+
+//____________________________________________________________________
 ClassImp(AliFMDRing);
 
 //____________________________________________________________________
-// Construct a alifmdring. 
-// 
-//     id              Id of the ring (either 'i' or 'o').
-//     lowr            Lower radius of ring (in centimeters).
-//     highr           Upper radius of ring (in centimeters).
-//     r               Radius of the silicon wafers (in centimeters). 
-//     theta           Opening angle of the silicon wafers.
-//     strips          Number of strips. 
 AliFMDRing::AliFMDRing(Char_t id, Bool_t detailed) 
   : fId(id), 
     fDetailed(detailed),
@@ -95,7 +96,17 @@ AliFMDRing::AliFMDRing(Char_t id, Bool_t detailed)
     fNStrips(0), 
     fShape(0),
     fRotMatricies(0)
-{}
+{
+  // Construct a alifmdring. 
+  // 
+  //     id            Id of the ring (either 'i' or 'o').
+  //     lowr          Lower radius of ring (in centimeters).
+  //     highr         Upper radius of ring (in centimeters).
+  //     r             Radius of the silicon wafers (in centimeters). 
+  //     theta         Opening angle of the silicon wafers.
+  //     strips                Number of strips. 
+}
+
 
 //____________________________________________________________________
 void 
@@ -111,6 +122,7 @@ AliFMDRing::Init()
 //____________________________________________________________________
 AliFMDRing::~AliFMDRing() 
 {
+  // Destructor - deletes shape and rotation matricies 
   if (fShape) delete fShape;
   if (fRotMatricies) delete fRotMatricies;
 }
@@ -253,21 +265,21 @@ AliFMDRing::SetupGeometry(Int_t vacuumId, Int_t siId, Int_t pcbId,
   // 
   // The hieracy of the RNGx volume is 
   // 
-  //    RNGx                        // Ring volume
-  //      VFx                       // Container of hybrid + legs
-  //        ACTx                    // Active volume (si sensor approx)
-  //          SECx                  // Section division
-  //            STRx                // Strip division 
-  //        PBTx                    // Print board (bottom)
-  //        PTTx                    // Print board (top)  
-  //        LLEG                    // Support leg (long version)
-  //      VBx                       // Container of hybrid + legs
-  //        ACTx                    // Active volume (si sensor approx)
-  //          SECx                  // Section division
-  //            STRx                // Strip division 
-  //        PBTx                    // Print board (bottom)
-  //        PTTx                    // Print board (top)  
-  //        SLEG                    // Support leg (long version)
+  //    FRGx                        // Ring volume
+  //      FVFx                      // Container of hybrid + legs
+  //        FACx                    // Active volume (si sensor approx)
+  //          FSEx                  // Section division
+  //            FSTx                // Strip division 
+  //        FPTx                    // Print board (bottom)
+  //        FPBx                    // Print board (top)  
+  //        FLL                     // Support leg (long version)
+  //      FVBx                      // Container of hybrid + legs
+  //        FACx                    // Active volume (si sensor approx)
+  //          FSEx                  // Section division
+  //            FSTx                // Strip division 
+  //        FPTx                    // Print board (bottom)
+  //        FPBx                    // Print board (top)  
+  //        FSL                     // Support leg (long version)
   //        
   // Parameters: 
   //
@@ -299,39 +311,38 @@ AliFMDRing::SetupGeometry(Int_t vacuumId, Int_t siId, Int_t pcbId,
   pars[0]             = rmin;
   pars[1]             = fHighR;
   pars[2]             = fRingDepth / 2;
-  name                = Form("RNG%c", fId);
+  name                = Form(kRingFormat, fId);
   fRingId             = gMC->Gsvolu(name.Data(), "TUBE", vacuumId, pars, 3);
   
   // Virtual volume for modules with long legs 
   pars[1]             = rmax;
   pars[3]             = -fTheta;
   pars[4]             =  fTheta;
-  name                = Form("VF%c", fId);
+  name                = Form(kVirtualFormat, 'F', fId);
   fVirtualFrontId     = gMC->Gsvolu(name.Data(), "TUBS", vacuumId, pars, 5);
 
   // Virtual volume for modules with long legs 
   pars[2]             =  (fRingDepth - fModuleSpacing) / 2;
-  name                =  Form("VB%c", fId);
+  name                =  Form(kVirtualFormat, 'B', fId);
   fVirtualBackId      =  gMC->Gsvolu(name.Data(), "TUBS", vacuumId, pars, 5);
   
   // Virtual mother volume for silicon
   pars[2]             =  fSiThickness/2;
   name2               =  name;
-  name                =  Form("ACT%c",fId);
+  name                =  Form(kActiveFormat, fId);
   fActiveId           =  gMC->Gsvolu(name.Data(), "TUBS", vacuumId , pars, 5);
 
   if (fDetailed) {
     // Virtual sector volumes 
     name2               = name;
-    name                = Form("SEC%c",fId);
+    name                = Form(kSectorFormat, fId);
     gMC->Gsdvn2(name.Data(), name2.Data(), 2, 2, -fTheta, vacuumId);
     fSectionId          = gMC->VolId(name.Data());
     
     // Active strip volumes 
     name2               = name;
-    name                = Form("STR%c", fId);
-    gMC->Gsdvt2(name.Data(), name2.Data(), dStrip, 1, 
-               stripOff, siId, fNStrips);
+    name                = Form(kStripFormat, fId);
+    gMC->Gsdvt2(name.Data(), name2.Data(), dStrip, 1,stripOff, siId, fNStrips);
     fStripId            = gMC->VolId(name.Data());
   }
   
@@ -342,14 +353,14 @@ AliFMDRing::SetupGeometry(Int_t vacuumId, Int_t siId, Int_t pcbId,
   pars[1]             = bCorner.Y() - pars[4];
   pars[2]             = fPrintboardThickness / 2; // PCB half thickness
   pars[3]             = (bCorner.X() - cCorner.X()) / 2;
-  name                = Form("PBT%c", fId);
+  name                = Form(kPrintboardFormat, 'T', fId);
   fPrintboardTopId    = gMC->Gsvolu(name.Data(), "TRD1", pcbId, pars, 4);
 
   // Bottom of the print board
   pars[0]             = aCorner.Y() - pars[4];
   pars[1]             = cCorner.Y() - pars[4];
   pars[3]             = (cCorner.X() - aCorner.X()) / 2;
-  name                = Form("PBB%c", fId);
+  name                = Form(kPrintboardFormat, 'B', fId);
   fPrintboardBottomId = gMC->Gsvolu(name.Data(), "TRD1", pcbId, pars, 4);
 
   // Define rotation matricies
@@ -373,7 +384,7 @@ AliFMDRing::SetupGeometry(Int_t vacuumId, Int_t siId, Int_t pcbId,
                         * fBondingWidth)); 
   
   for (int i = 0; i < nModules; i++) {
-    TString  name2    = Form("RNG%c", fId);
+    TString  name2    = Form(kRingFormat, fId);
 
     Int_t     id      = i;
     // Double_t  theta   = (i + .5) * dTheta;
@@ -382,7 +393,7 @@ AliFMDRing::SetupGeometry(Int_t vacuumId, Int_t siId, Int_t pcbId,
     Double_t  w       = fRingDepth - (isFront ? 0 : fModuleSpacing);
 
     // Place virtual module volume 
-    name = Form("V%c%c", (isFront ? 'F' : 'B'), fId);
+    name = Form(kVirtualFormat, (isFront ? 'F' : 'B'), fId);
     dz   = (w - fRingDepth) / 2;
     gMC->Gspos(name.Data(), id, name2.Data(), 0., 0., dz,fRotations[i]);
 
@@ -393,16 +404,16 @@ AliFMDRing::SetupGeometry(Int_t vacuumId, Int_t siId, Int_t pcbId,
 
     // Place active silicon wafer - this is put so that the front of
     // the silicon is on the edge of the virtual volume. 
-    name  = Form("ACT%c", fId);
+    name  = Form(kActiveFormat, fId);
     dz    = (w - fSiThickness) / 2;
     gMC->Gspos(name.Data(), id, name2.Data(),0.,0.,dz,idRotId);
 
     // Place print board.  This is put immediately behind the silicon
-    name = Form("PBT%c", fId);
+    name = Form(kPrintboardFormat, 'T', fId);
     dz   =  w / 2 - fSiThickness - fPrintboardThickness / 2;
     gMC->Gspos(name.Data(), id, name2.Data(), 
               fLowR + pbBotL + pbTopL / 2, 0, dz, pbRotId, "ONLY");
-    name = Form("PBB%c", fId);
+    name = Form(kPrintboardFormat, fId);
     gMC->Gspos(name.Data(), id, name2.Data(), 
               fLowR + pbBotL / 2, 0, dz, pbRotId, "ONLY");
 
@@ -410,7 +421,7 @@ AliFMDRing::SetupGeometry(Int_t vacuumId, Int_t siId, Int_t pcbId,
     // This is put immediately behind the pringboard. 
     dz     = (w / 2 - fSiThickness - fPrintboardThickness 
             - (fLegLength + (isFront ? fModuleSpacing : 0)) /2);
-    name  = (isFront ? "LLEG" : "SLEG");
+    name  = (isFront ? "FLL" : "FSL");
     gMC->Gspos(name.Data(), id*10 + 1, name2.Data(), 
               aCorner.X() + fLegOffset + fLegRadius, 0., dz, idRotId, "");
     Double_t y = cCorner.Y() - yoffset - fLegOffset - fLegRadius;
@@ -440,7 +451,7 @@ AliFMDRing::Geometry(const char* mother, Int_t baseId, Double_t z,
   Double_t offsetZ   = (fSiThickness 
                        + fPrintboardThickness 
                        + fLegLength + fModuleSpacing) / 2;
-  name = Form("RNG%c", fId);
+  name = Form(kRingFormat, fId);
   gMC->Gspos(name.Data(), baseId, mother, 0., 0., z - offsetZ, idRotId, "");
 }
 
@@ -472,7 +483,7 @@ AliFMDRing::SimpleGeometry(TList* nodes,
 
   // If the shape hasn't been defined yet, we define it here. 
   if (!fShape) {
-    TString name(Form("ACT%c", fId));
+    TString name(Form(kActiveFormat, fId));
     TString title(Form("Shape of modules in %c Rings", fId));
     Int_t n = fPolygon.GetNVerticies();
     TXTRU* shape = new TXTRU(name.Data(), title.Data(), "void", n, 2);
@@ -512,7 +523,7 @@ AliFMDRing::SimpleGeometry(TList* nodes,
     Bool_t    isFront = (i % 2 == 1);
     mother->cd();
     TRotMatrix* rot = static_cast<TRotMatrix*>(fRotMatricies->At(i));
-    TString name(Form("ACT%c_%d_%d", fId, n, i));
+    TString name(Form("FAC%c_%d_%d", fId, n, i));
     TString title(Form("Active FMD%d volume in %c Ring", n, fId));
     TNode* node = new TNode(name.Data(), title.Data(), fShape, 
                            0, 0, 
@@ -534,22 +545,22 @@ AliFMDRing::Gsatt()
   // DebugGuard guard("AliFMDRing::Gsatt");
   AliDebug(10, "AliFMDRing::Gsatt");
   TString name;
-  name = Form("RNG%c",fId);
+  name = Form(kRingFormat,fId);
   gMC->Gsatt(name.Data(), "SEEN", 0);
 
-  name = Form("VF%c",fId);
+  name = Form(kVirtualFormat, 'T', fId);
   gMC->Gsatt(name.Data(), "SEEN", 0);
 
-  name = Form("VB%c",fId);
+  name = Form(kVirtualFormat, 'B', fId);
   gMC->Gsatt(name.Data(), "SEEN", 0);
 
-  name = Form("ACT%c",fId);
+  name = Form(kActiveFormat,fId);
   gMC->Gsatt(name.Data(), "SEEN", 1);
 
-  name = Form("PBT%c",fId);
+  name = Form(kPrintboardFormat, 'T', fId);
   gMC->Gsatt(name.Data(), "SEEN", 1);
 
-  name = Form("PBB%c",fId);
+  name = Form(kPrintboardFormat, 'B',fId);
   gMC->Gsatt(name.Data(), "SEEN", 1);
 }
 
index 4741abd..45e6ccf 100644 (file)
@@ -22,42 +22,9 @@ class TList;
 
 
 //__________________________________________________________________
-struct AliFMDRing : public TObject
+class AliFMDRing : public TObject
 {
-  Char_t   fId;                         // ID
-  Bool_t   fDetailed;
-  Int_t    fActiveId;           // Active volume 
-  Int_t    fPrintboardBottomId;  // Print board bottom volume
-  Int_t    fPrintboardTopId;     // Print board top volume
-  Int_t    fRingId;             // Ring volume
-  Int_t    fSectionId;          // Section volumes 
-  Int_t    fStripId;            // Strip volumes 
-  Int_t    fVirtualBackId;      // Virtual Back volume
-  Int_t    fVirtualFrontId;     // Virtual Front volume
-
-  Double_t fBondingWidth;       // With of bonding pad on sensor
-  Double_t fWaferRadius;        // Size of wafer the sensor was made from 
-  Double_t fSiThickness;        // Thickness of sensor
-  Double_t fLowR;               // Lower radius of ring
-  Double_t fHighR;              // Upper radius of ring
-  Double_t fTheta;              // Opening angle of the silicon wafers
-  Int_t    fNStrips;            // Number of strips 
-  Double_t fRingDepth;           // How far the ring extends beyond
-                                // the z value given. 
-  Double_t fLegRadius;          // Radius of support legs 
-  Double_t fLegLength;          // Radius of support legs 
-  Double_t fLegOffset;          // Radius of support legs 
-
-  Double_t fModuleSpacing;      // Staggering offset 
-  Double_t fPrintboardThickness; // Thickness of print board
-
-  TArrayI    fRotations;        // Array of rotations
-  TShape*    fShape;             // Shape used for event display
-  TObjArray* fRotMatricies;      // Matricies used for event display
-
-  AliFMDPolygon  fPolygon;              // Polygon shape 
 public:
-  //----------------------------------------------------------------
   AliFMDRing(Char_t id='\0', Bool_t detailed=kTRUE);
   virtual ~AliFMDRing();
   void   Init();
@@ -114,6 +81,40 @@ public:
   void SetModuleSpacing(Double_t       spacing)          { fModuleSpacing = spacing; }
   void SetPrintboardThickness(Double_t thickness) { fPrintboardThickness = thickness; }
 
+protected:
+  Char_t   fId;                         // ID
+  Bool_t   fDetailed;
+  Int_t    fActiveId;           // Active volume 
+  Int_t    fPrintboardBottomId;  // Print board bottom volume
+  Int_t    fPrintboardTopId;     // Print board top volume
+  Int_t    fRingId;             // Ring volume
+  Int_t    fSectionId;          // Section volumes 
+  Int_t    fStripId;            // Strip volumes 
+  Int_t    fVirtualBackId;      // Virtual Back volume
+  Int_t    fVirtualFrontId;     // Virtual Front volume
+
+  Double_t fBondingWidth;       // With of bonding pad on sensor
+  Double_t fWaferRadius;        // Size of wafer the sensor was made from 
+  Double_t fSiThickness;        // Thickness of sensor
+  Double_t fLowR;               // Lower radius of ring
+  Double_t fHighR;              // Upper radius of ring
+  Double_t fTheta;              // Opening angle of the silicon wafers
+  Int_t    fNStrips;            // Number of strips 
+  Double_t fRingDepth;           // How far the ring extends beyond
+                                // the z value given. 
+  Double_t fLegRadius;          // Radius of support legs 
+  Double_t fLegLength;          // Radius of support legs 
+  Double_t fLegOffset;          // Radius of support legs 
+
+  Double_t fModuleSpacing;      // Staggering offset 
+  Double_t fPrintboardThickness; // Thickness of print board
+
+  TArrayI    fRotations;        // Array of rotations
+  TShape*    fShape;             // Shape used for event display
+  TObjArray* fRotMatricies;      // Matricies used for event display
+
+  AliFMDPolygon  fPolygon;              // Polygon shape 
+
   ClassDef(AliFMDRing, 1) // FMD Ring volume parameters 
 };
 #endif 
diff --git a/FMD/AliFMDSDigitizer.cxx b/FMD/AliFMDSDigitizer.cxx
deleted file mode 100644 (file)
index febce13..0000000
+++ /dev/null
@@ -1,260 +0,0 @@
-/**************************************************************************
- * 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.                  *
- **************************************************************************/
-
-/* $Id$ */
-
-//_________________________________________________________________________
-// This is a TTask that constructs SDigits out of Hits
-// A Summable Digits is the sum of all hits in a cell
-// A threshold is applied 
-//
-//-- Author: Alla Maevskaia(INR)
-//////////////////////////////////////////////////////////////////////////////
-
-// --- Standard library ---
-#include <Riostream.h>
-#include <stdlib.h>
-
-// --- ROOT system ---
-#include <TFile.h>
-#include <TFolder.h>
-#include <TROOT.h>
-#include <TSystem.h>
-#include <TTask.h>
-#include <TTree.h>
-#include <TVirtualMC.h>
-
-// --- AliRoot header files ---
-#include "AliConfig.h"
-#include "AliDetector.h"
-#include "AliFMD.h"
-#include "AliFMDSDigitizer.h"
-#include "AliFMDdigit.h"
-#include "AliFMDhit.h"
-#include "AliFMDv1.h"
-#include "AliLoader.h"
-#include "AliRun.h"
-#include "AliRunLoader.h"
-#include "AliStack.h"
-
-ClassImp(AliFMDSDigitizer)
-
-//____________________________________________________________________________ 
-  AliFMDSDigitizer::AliFMDSDigitizer():TTask("AliFMDSDigitizer","") 
-{
-  // ctor
-  fNevents = 0 ;     
-  fSDigits = 0 ;
-  fHits = 0 ;
-  fRunLoader = 0;
-}
-           
-//____________________________________________________________________________ 
-AliFMDSDigitizer::AliFMDSDigitizer(const char* HeaderFile,char *SdigitsFile ):TTask("AliFMDSDigitizer","") 
-{
-  fNevents = 0 ;     // Number of events to digitize, 0 means all evens in current file
-  // add Task to //root/Tasks folder
-  fRunLoader = AliRunLoader::Open(HeaderFile);//Load event in default folder
-  if (fRunLoader == 0x0)
-   {
-     Fatal("AliFMDSDigitizer","Can not open session. Header File is %s ",HeaderFile);
-     return;//never reached
-   }
-  AliLoader* gime = fRunLoader->GetLoader("FMDLoader");
-  if (gime == 0x0)
-   {
-     Fatal("AliFMDSDigitizer","Can not find FMD (loader) in specified event");
-     return;//never reached
-   }
-  //add Task to //root/Tasks folder
-  gime->PostSDigitizer(this);
-}
-
-//____________________________________________________________________________ 
-  AliFMDSDigitizer::~AliFMDSDigitizer()
-{
-  // dtor
-  AliLoader* gime = fRunLoader->GetLoader("FMDLoader");
-  gime->CleanSDigitizer();
-}
-
-//---------------------------------------------------------------------
-void AliFMDSDigitizer::SetRingsSi1(Int_t ringsSi1)
-{
-  fRingsSi1=ringsSi1;
-}
-void AliFMDSDigitizer::SetSectorsSi1(Int_t sectorsSi1)
-{
-  fSectorsSi1=sectorsSi1;
-}
-void AliFMDSDigitizer::SetRingsSi2(Int_t ringsSi2)
-{
-  fRingsSi2=ringsSi2;
-}
-void AliFMDSDigitizer::SetSectorsSi2(Int_t sectorsSi2)
-{
-  fSectorsSi2=sectorsSi2;
-}
-
-//____________________________________________________________________________
-void AliFMDSDigitizer::Exec(Option_t *option) 
- { 
-  Int_t NumberOfRings[5]=
-  {fRingsSi1,fRingsSi2,fRingsSi1,fRingsSi2,fRingsSi1};
-  Int_t NumberOfSectors[5]=
-  {fSectorsSi1,fSectorsSi2,fSectorsSi1,fSectorsSi2,fSectorsSi1};
-
-  if (fRunLoader)
-   {
-    Error("Exec","Run Loader loader is NULL - Session not opened");
-    return;
-   }
-  AliLoader* gime = fRunLoader->GetLoader("FMDLoader");
-  if (gime == 0x0)
-   {
-     Fatal("AliFMDReconstruction","Can not find FMD (loader) in specified event");
-     return;//never reached
-   }
-
-  if (!fRunLoader->GetAliRun()) fRunLoader->LoadgAlice();
-  if (!fRunLoader->TreeE()) fRunLoader->LoadHeader();
-  if (!fRunLoader->TreeK()) fRunLoader->LoadKinematics("READ");
-  
-  Int_t retval;
-
-  retval = gime->LoadHits("READ");
-  if (retval)
-   {
-     Error("Exec","Error occured while loading hits. Exiting.");
-     return;
-   }
-
-
-  // Initialise Hit array
-  fHits = new TClonesArray ("AliFMDhit", 1000);
-  fSDigits = new TClonesArray ("AliFMDdigit", 1000);
-
-  AliFMD *FMD = (AliFMD *) gAlice->GetDetector ("FMD");
-
-  if (fNevents == 0)
-    fNevents = (Int_t) fRunLoader->TreeE ()->GetEntries ();
-
-  for (Int_t ievent = 0; ievent < fNevents; ievent++)
-    {
-      fRunLoader->GetEvent (ievent);
-
-      TTree* TH = gime->TreeH();
-      if (TH == 0x0)
-       {
-         Error("Exec","Can not get TreeH");
-         return;
-       }
-      if (gime->TreeS () == 0)  gime->MakeTree("S");
-
-      //Make branch for digits
-      FMD->MakeBranch ("S");
-      //Now made SDigits from hits, for PHOS it is the same
-      Int_t volume, sector, ring, charge;
-      Float_t e;
-      Float_t de[10][50][150];
-      Int_t ivol, isec, iring;
-      Int_t hit, nbytes;
-      TParticle *particle;
-      AliFMDhit *fmdHit;
-      TClonesArray *FMDhits = FMD->Hits ();
-
-      // Event ------------------------- LOOP  
-
-      for (ivol = 0; ivol < 10; ivol++)
-       for (isec = 0; isec < 50; isec++)
-         for (iring = 0; iring < 150; iring++)
-           de[ivol][isec][iring] = 0;
-
-      if (FMD)
-       {
-         FMDhits = FMD->Hits ();
-
-         
-         Stat_t ntracks = TH->GetEntries ();
-         for (Int_t track = 0; track < ntracks; track++)
-           {
-             gAlice->ResetHits ();
-             nbytes += TH->GetEvent(track);
-             particle = fRunLoader->Stack()->Particle (track);
-             Int_t nhits = FMDhits->GetEntriesFast ();
-
-             for (hit = 0; hit < nhits; hit++)
-              {
-                fmdHit = (AliFMDhit *) FMDhits->UncheckedAt (hit);
-
-                volume = fmdHit->Volume ();
-                sector = fmdHit->NumberOfSector ();
-                ring = fmdHit->NumberOfRing ();
-                e = fmdHit->Edep ();
-                de[volume][sector][ring] += e;
-              }              //hit loop
-           }                     //track loop
-       }                     //if FMD
-
-
-      Int_t digit[5];
-      Float_t I = 1.664 * 0.04 * 2.33 / 22400;       // = 0.69e-6;
-      for (ivol = 1; ivol < 6; ivol++)
-       { 
-         for (isec = 1; isec <= NumberOfSectors[ivol-1]; isec++)
-           { 
-             for (iring = 1; iring <= NumberOfRings[ivol-1]; iring++)
-              {
-                    digit[0] = ivol;
-                    digit[1] = isec;
-                    digit[2] = iring;
-                    charge = Int_t (de[ivol][isec][iring] / I);
-
-                    digit[3] = charge;
-                    //dinamic diapason from MIP(0.155MeV) to 30MIP(4.65MeV)
-                    //1024 ADC channels 
-                    Float_t channelWidth = (22400 * 30) / 1024;
-
-                    digit[4] = Int_t (digit[3] / channelWidth);
-                    FMD->AddSDigit(digit);
-
-              }              // iring loop
-           }                     //sector loop
-       }                     // volume loop
-      
-      gime->TreeS()->Reset();
-      gime->TreeS()->Fill();
-      gime->WriteSDigits("OVERWRITE");
-    }  //event loop
-
-
-}
-//__________________________________________________________________
-void AliFMDSDigitizer::SetSDigitsFile(char * file ){
-  if(!fSDigitsFile.IsNull())
-    cout << "Changing SDigits file from " <<(char *)fSDigitsFile.Data() << " to " << file << endl ;
-  fSDigitsFile=file ;
-}
-//__________________________________________________________________
-void AliFMDSDigitizer::Print(Option_t* option)const
-{
-  cout << "------------------- "<< GetName() << " -------------" << endl ;
-  if(fSDigitsFile.IsNull())
-    cout << " Writing SDigitis to file galice.root "<< endl ;
-  else
-    cout << "    Writing SDigitis to file  " << (char*) fSDigitsFile.Data() << endl ;
-
-}
diff --git a/FMD/AliFMDSDigitizer.h b/FMD/AliFMDSDigitizer.h
deleted file mode 100644 (file)
index 56c2f15..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-#ifndef ALIFMDSDigitizer_H
-#define ALIFMDSDigitizer_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice                               */
-
-/* $Id$ */
-
-//_________________________________________________________________________
-//  Task Class for making SDigits in FMD      
-//                  
-//-- Author: Alla Maevskaia(INR)
-
-
-// --- ROOT system ---
-#include "TTask.h"
-#include "TString.h"
-#include "AliFMD.h"
-#include "AliDetector.h"
-
-// --- Standard library ---
-
-// --- AliRoot header files ---
-
-class AliRunLoader;
-
-class AliFMDSDigitizer: public TTask {
-
-public:
-  AliFMDSDigitizer() ;          // ctor
-  AliFMDSDigitizer(const char* HeaderFile,char *SdigitsFile = 0) ; 
-
-  virtual ~AliFMDSDigitizer() ; // dtor
-  // Int_t    Digitize(Float_t Energy);
-
-  char *GetSDigitsFile()const{return (char*) fSDigitsFile.Data();}  
-  virtual void  Exec(Option_t *option); 
-  void SetNEvents(Int_t Nevents){fNevents = Nevents;}
-  Stat_t GetNEvents(){return fNevents;}
-  void SetSDigitsFile(char * file ) ;
-  virtual void Print(Option_t* option) const ;
-  TClonesArray *SDigits() const {return fSDigits;}
-  TClonesArray *Hits() const {return fHits;}
-  // Granularity
-   virtual void SetRingsSi1(Int_t ringsSi1);
-   virtual void SetSectorsSi1(Int_t sectorsSi1);
-   virtual void SetRingsSi2(Int_t ringsSi2);
-   virtual void SetSectorsSi2(Int_t sectorsSi2);
-
-
-private:
-  Int_t   fNevents ;        // Number of events to digitize
-  TString fSDigitsFile ;    //output file 
-  TClonesArray *fSDigits      ; // List of summable digits
-  TClonesArray *fHits      ; // List of summable digits
-  TString fHeadersFile ;    //input file
-
-  AliRunLoader *fRunLoader;//!Run Loader
-
- protected:
-  //Granularity
-   Int_t fRingsSi1;       // Number of rings
-   Int_t fSectorsSi1;    // Number of sectors
-   Int_t fRingsSi2;       // Number of rings
-  Int_t fSectorsSi2;    // Number of sectors
-  
-
-  ClassDef(AliFMDSDigitizer,1)  // description 
-
-};
-
-#endif // AliFMDSDigitizer_H
index d1530ce..c1641fa 100644 (file)
@@ -7,37 +7,21 @@
  *
  * See cxx source for full Copyright notice                               
  */
+//____________________________________________________________________
+// 
+// Parameters of a sub-detector, and builder of sub detector geometry 
+//
 #ifndef ROOT_TObject
 # include <TObject.h>
 #endif
-
 class TNode;
 class TList;
 class AliFMDRing;
 
 
 //__________________________________________________________________
-struct AliFMDSubDetector : public TObject
+class AliFMDSubDetector : public TObject
 {
-protected:
-  Int_t       fId;                 // Detector number 
-  Double_t    fInnerZ;             // Position of outer ring along z
-  Double_t    fOuterZ;             // Position of outer ring along z 
-  Double_t    fHoneycombThickness; // Thickness of honeycomb plate 
-  Double_t    fKaptionThickness;   // Thickness of kaption of honeycomb
-  Double_t    fInnerHoneyLowR;     // Inner radius of inner honeycomb
-  Double_t    fInnerHoneyHighR;    // Outer radius of inner honeycomb
-  Int_t       fInnerHoneyTopId;    // Volume ID of top of inner honeycomb
-  Int_t       fInnerHoneyBottomId; // Volume ID of bottom of inner honeycomb
-  Double_t    fOuterHoneyLowR;     // Inner radius of outer honeycomb
-  Double_t    fOuterHoneyHighR;    // Outer radius of outer honeycomb
-  Int_t       fOuterHoneyTopId;    // Volume ID of top of outer honeycomb   
-  Int_t       fOuterHoneyBottomId; // Volume ID of bottom of outer honeycomb
-
-  Int_t       fRotationId;         // The ID of the sub-detector rotation
-  
-  AliFMDRing* fInner;              // Reference to inner ring description
-  AliFMDRing* fOuter;              // Reference to outer ring description
 public:  
   AliFMDSubDetector(Int_t n);
   virtual ~AliFMDSubDetector() {}
@@ -77,6 +61,26 @@ public:
   Int_t       GetId()                 const { return fId; }     
   Bool_t      IsFolder()              const { return kTRUE; }
 
+protected:
+  Int_t       fId;                 // Detector number 
+  Double_t    fInnerZ;             // Position of outer ring along z
+  Double_t    fOuterZ;             // Position of outer ring along z 
+  Double_t    fHoneycombThickness; // Thickness of honeycomb plate 
+  Double_t    fKaptionThickness;   // Thickness of kaption of honeycomb
+  Double_t    fInnerHoneyLowR;     // Inner radius of inner honeycomb
+  Double_t    fInnerHoneyHighR;    // Outer radius of inner honeycomb
+  Int_t       fInnerHoneyTopId;    // Volume ID of top of inner honeycomb
+  Int_t       fInnerHoneyBottomId; // Volume ID of bottom of inner honeycomb
+  Double_t    fOuterHoneyLowR;     // Inner radius of outer honeycomb
+  Double_t    fOuterHoneyHighR;    // Outer radius of outer honeycomb
+  Int_t       fOuterHoneyTopId;    // Volume ID of top of outer honeycomb   
+  Int_t       fOuterHoneyBottomId; // Volume ID of bottom of outer honeycomb
+
+  Int_t       fRotationId;         // The ID of the sub-detector rotation
+  
+  AliFMDRing* fInner;              // Reference to inner ring description
+  AliFMDRing* fOuter;              // Reference to outer ring description
+
   ClassDef(AliFMDSubDetector, 1) // FMD Sub detector base class
 };
 
index 9a91fd4..60d04c2 100644 (file)
@@ -120,16 +120,24 @@ AliFMDv1::StepManager()
   // Only process charged particles 
   if(TMath::Abs(gMC->TrackCharge()) <= 0) return; 
 
-  // Only do stuff is the track is in one of the strips. 
   TString vol(gMC->CurrentVolName());
-  if (!vol.Contains("STR")) return;
-
-
+  std::cout << "Is inside " << vol << " ... " << std::endl;
+  // Only do stuff is the track is in one of the strips. 
+  // TString vol(gMC->CurrentVolName());
+  // if (!vol.Contains("STR")) return;
+  Int_t copy;
+  Int_t volumeId = gMC->CurrentVolID(copy);
+  if (volumeId != fInner->GetStripId() || volumeId != fOuter->GetStripId()) {
+    std::cout << "Not a FMD strip volume: " 
+             << volumeId << " != " << fInner->GetStripId() << " or " 
+             << fOuter->GetStripId() << std::endl;
+    return;
+  }
+  std::cout << "OK, an FMD strip volume!" << std::endl;
+  
   // Get the strip number.  Note, that GEANT numbers divisions from 1,
   // so we subtract one 
-  Int_t strip;             
-  gMC->CurrentVolID(strip);
-  strip--;                 
+  Int_t strip = copy - 1;
 
   // Get the phi division of the module 
   Int_t phiDiv;                         // * The phi division number (1 or 2)
index 056501b..39fb3d8 100644 (file)
-static Int_t    eventsPerRun = 1;
-static Int_t    nParticles   = 100;
+//____________________________________________________________________
+//
+// $Id$
+//
+// One can use the configuration macro in compiled mode by
+// root [0] gSystem->Load("libgeant321");
+// root [0] gSystem->SetIncludePath("-I$ROOTSYS/include -I$ALICE_ROOT/include\
+//                   -I$ALICE_ROOT -I$ALICE/geant3/TGeant3");
+// root [0] .x grun.C(1,"ConfigPPR.C++")
+//
+#if !defined(__CINT__) || defined(__MAKECINT__)
+#include <Riostream.h>
+#include <TRandom.h>
+#include <TSystem.h>
+#include <TVirtualMC.h>
+#include <TGeant3.h>
+#include "STEER/AliRunLoader.h"
+#include "STEER/AliRun.h"
+#include "STEER/AliConfig.h"
+#include "STEER/AliGenerator.h"
+#include "PYTHIA6/AliDecayerPythia.h"
+#include "EVGEN/AliGenHIJINGpara.h"
+#include "THijing/AliGenHijing.h"
+#include "EVGEN/AliGenCocktail.h"
+#include "EVGEN/AliGenSlowNucleons.h"
+#include "EVGEN/AliSlowNucleonModelExp.h"
+#include "EVGEN/AliGenParam.h"
+#include "EVGEN/AliGenMUONlib.h"
+#include "EVGEN/AliGenMUONCocktail.h"
+#include "PYTHIA6/AliGenPythia.h"
+#include "STEER/AliMagFMaps.h"
+#include "STRUCT/AliBODY.h"
+#include "STRUCT/AliMAG.h"
+#include "STRUCT/AliABSOv0.h"
+#include "STRUCT/AliDIPOv2.h"
+#include "STRUCT/AliHALL.h"
+#include "STRUCT/AliFRAMEv2.h"
+#include "STRUCT/AliSHILv2.h"
+#include "STRUCT/AliPIPEv0.h"
+#include "ITS/AliITSvPPRasymmFMD.h"
+#include "TPC/AliTPCv2.h"
+#include "TOF/AliTOFv4T0.h"
+#include "RICH/AliRICHv1.h"
+#include "ZDC/AliZDCv2.h"
+#include "TRD/AliTRDv1.h"
+#include "FMD/AliFMDv1.h"
+#include "MUON/AliMUONv1.h"
+#include "MUON/AliMUONSt1GeometryBuilderV2.h"
+#include "MUON/AliMUONSt2GeometryBuilder.h"
+#include "MUON/AliMUONSlatGeometryBuilder.h"
+#include "MUON/AliMUONTriggerGeometryBuilder.h"
+#include "PHOS/AliPHOSv1.h"
+#include "PMD/AliPMDv1.h"
+#include "START/AliSTARTv1.h"
+#include "EMCAL/AliEMCALv1.h"
+#include "CRT/AliCRTv0.h"
+#include "VZERO/AliVZEROv2.h"
+#endif
 
+//____________________________________________________________________
+// 
+// Generator types 
+//
 enum PprRun_t {
   test50,
-  kParam_8000,   
-  kParam_4000,  
-  kParam_2000,
-  kHijing_cent1, 
-  kHijing_cent2,
-  kHijing_per1,  
-  kHijing_per2, 
-  kHijing_per3, 
-  kHijing_per4,  
-  kHijing_per5,
-  kHijing_jj25,  
-  kHijing_jj50, 
-  kHijing_jj75, 
-  kHijing_jj100, 
-  kHijing_jj200,
-  kHijing_gj25,  
-  kHijing_gj50, 
-  kHijing_gj75, 
-  kHijing_gj100, 
-  kHijing_gj200,
-  kHijing_pA, 
-  kPythia6, 
-  kPythia6Jets, 
-  kD0PbPb5500, 
-  kD_TRD, 
-  kB_TRD, 
-  kJpsi_TRD,
-  kU_TRD, 
-  kPyJJ, 
-  kPyGJ
+  kParam_8000,                 //
+  kParam_4000,                 //
+  kParam_2000,                 //
+  kHijing_cent1,               //
+  kHijing_cent2,               //
+  kHijing_per1,                        //
+  kHijing_per2,                        //
+  kHijing_per3,                        //
+  kHijing_per4,                        //
+  kHijing_per5,                        //
+  kHijing_jj25,                        //
+  kHijing_jj50,                        //
+  kHijing_jj75,                        //
+  kHijing_jj100,               //
+  kHijing_jj200,               //
+  kHijing_gj25,                        //
+  kHijing_gj50,                        //
+  kHijing_gj75,                        //
+  kHijing_gj100,               //
+  kHijing_gj200,               //
+  kHijing_pA,                  //
+  kPythia6,                    //
+  kPythia6Jets20_24,           //
+  kPythia6Jets24_29,           //
+  kPythia6Jets29_35,           //
+  kPythia6Jets35_42,           //
+  kPythia6Jets42_50,           //
+  kPythia6Jets50_60,           //
+  kPythia6Jets60_72,           //
+  kPythia6Jets72_86,           //
+  kPythia6Jets86_104,          //
+  kPythia6Jets104_125,         //
+  kPythia6Jets125_150,         //
+  kPythia6Jets150_180,         //
+  kD0PbPb5500,                 //
+  kCharmSemiElPbPb5500,                //
+  kBeautySemiElPbPb5500,       //
+  kCocktailTRD,                        //
+  kPyJJ,                       //
+  kPyGJ,                       //
+  kMuonCocktailCent1,          //
+  kMuonCocktailPer1,           //
+  kMuonCocktailPer4,           //
+  kMuonCocktailCent1HighPt,    //
+  kMuonCocktailPer1HighPt,     //
+  kMuonCocktailPer4HighPt,     //
+  kMuonCocktailCent1Single,    //
+  kMuonCocktailPer1Single,     //
+  kMuonCocktailPer4Single,
+  kRunMax
 };
 
+//____________________________________________________________________
+// 
+// Generator types names
+//
+const char* pprRunName[kRunMax] = {
+  "test50",
+  "kParam_8000",               //
+  "kParam_4000",               //
+  "kParam_2000",               //
+  "kHijing_cent1",             //
+  "kHijing_cent2",             //
+  "kHijing_per1",              //
+  "kHijing_per2",              //
+  "kHijing_per3",              //
+  "kHijing_per4",              //
+  "kHijing_per5",              //
+  "kHijing_jj25",              //
+  "kHijing_jj50",              //
+  "kHijing_jj75",              //
+  "kHijing_jj100",             //
+  "kHijing_jj200",             //
+  "kHijing_gj25",              //
+  "kHijing_gj50",              //
+  "kHijing_gj75",              //
+  "kHijing_gj100",             //
+  "kHijing_gj200",             //
+  "kHijing_pA",                        //
+  "kPythia6",                  //
+  "kPythia6Jets20_24",         //
+  "kPythia6Jets24_29",         //
+  "kPythia6Jets29_35",         //
+  "kPythia6Jets35_42",         //
+  "kPythia6Jets42_50",         //
+  "kPythia6Jets50_60",         //
+  "kPythia6Jets60_72",         //
+  "kPythia6Jets72_86",         //
+  "kPythia6Jets86_104",                //
+  "kPythia6Jets104_125",       //
+  "kPythia6Jets125_150",       //
+  "kPythia6Jets150_180",       //
+  "kD0PbPb5500",               //
+  "kCharmSemiElPbPb5500",      //
+  "kBeautySemiElPbPb5500",     //
+  "kCocktailTRD",              //
+  "kPyJJ",                     //
+  "kPyGJ",                     //
+  "kMuonCocktailCent1",                //
+  "kMuonCocktailPer1",         //
+  "kMuonCocktailPer4",         //
+  "kMuonCocktailCent1HighPt",  //
+  "kMuonCocktailPer1HighPt",   //
+  "kMuonCocktailPer4HighPt",   //
+  "kMuonCocktailCent1Single",  //
+  "kMuonCocktailPer1Single",   //
+  "kMuonCocktailPer4Single"
+};
+
+//____________________________________________________________________
 enum PprGeo_t {
-  kHoles, 
-  kNoHoles
+  kHoles,                      //
+  kNoHoles                     //
 };
 
+//____________________________________________________________________
 enum PprRad_t {
-  kGluonRadiation, 
-  kNoGluonRadiation
+  kGluonRadiation,             //
+  kNoGluonRadiation            //
 };
 
+//____________________________________________________________________
 enum PprMag_t {
-  k2kG, 
-  k4kG, 
-  k5kG
+  k2kG,                                //
+  k4kG,                                //
+  k5kG                         //
 };
 
+//____________________________________________________________________
 enum MC_t {
   kFLUKA, 
   kGEANT3, 
   kGEANT4
 };
 
-
-// This part for configuration
+//____________________________________________________________________
+// This part for configuration    
 //static PprRun_t srun = test50;
-static PprRun_t srun = kPythia6;
-static PprGeo_t sgeo = kHoles;
-static PprRad_t srad = kGluonRadiation;
-static PprMag_t smag = k5kG;
-// static MC_t     smc  = kFLUKA;
-static MC_t     smc  = kGEANT3;
-
-// Comment line
+static PprRun_t srun  = kParam_8000;
+static PprGeo_t sgeo  = kNoHoles;
+static PprRad_t srad  = kGluonRadiation;
+static PprMag_t smag  = k5kG;
+static Int_t    sseed = 12345; //Set 0 to use the current time
+static MC_t     smc   = kGEANT3;
+
+
+//____________________________________________________________________
+// Comment line 
 static TString  comment;
 
+//____________________________________________________________________
 // Functions
-Float_t EtaToTheta(Float_t arg);
-
+Float_t       EtaToTheta(Float_t arg);
+AliGenerator* GeneratorFactory(PprRun_t srun);
+AliGenHijing* HijingStandard();
+void          ProcessEnvironmentVars();
 
-void Config()
+//____________________________________________________________________
+void 
+Config()
 {
-  cout << "==> Config.C..." << endl;
-  
+  // ThetaRange is (0., 180.). It was (0.28,179.72) 7/12/00 09:00
+  // Theta range given through pseudorapidity limits 22/6/2001
+
+  // Get settings from environment variables
+  ProcessEnvironmentVars();
+
   // Set Random Number seed
-  gRandom->SetSeed(12345);
-  cout<<"Seed for random number generation= "<<gRandom->GetSeed()<<endl;
+  gRandom->SetSeed(sseed);
+  cout<<"Seed for random number generation= "<<gRandom->GetSeed()<<endl; 
+
 
+  //__________________________________________________________________
   switch (smc) {
   case kFLUKA: 
     // 
@@ -112,14 +266,14 @@ void Config()
     gAlice->Fatal("Config.C", "No MC type chosen");
     return;
   }
-  
-  //
-  // Run loader
-  //
+
+  //__________________________________________________________________
+  AliRunLoader* rl = 0;
+
   cout<<"Config.C: Creating Run Loader ..."<<endl;
-  AliRunLoader* rl = AliRunLoader::Open("galice.root",
-                                       AliConfig::GetDefaultEventFolderName(),
-                                       "recreate");
+  rl = AliRunLoader::Open("galice.root",
+                         AliConfig::GetDefaultEventFolderName(),
+                         "recreate");
   if (!rl) {
     gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
     return;
@@ -128,6 +282,8 @@ void Config()
   rl->SetNumberOfEventsPerFile(3);
   gAlice->SetRunLoader(rl);
 
+  //__________________________________________________________________
+  // For FLUKA 
   switch (smc) {
   case kFLUKA: 
     {
@@ -142,33 +298,51 @@ void Config()
     }
     break;
   }
-  
-     
+
   //
   // Set External decayer
-  // 
   AliDecayer *decayer = new AliDecayerPythia();
-  decayer->SetForceDecay(kAll);
+
+
+  switch (srun) {
+  case kD0PbPb5500:
+    decayer->SetForceDecay(kHadronicD);
+    break;
+  case kCharmSemiElPbPb5500:
+    decayer->SetForceDecay(kSemiElectronic);
+    break;
+  case kBeautySemiElPbPb5500:
+    decayer->SetForceDecay(kSemiElectronic);
+    break;
+  default:
+    decayer->SetForceDecay(kAll);
+    break;
+  }
   decayer->Init();
   gMC->SetExternalDecayer(decayer);
 
-
   //
-  // Physics process control
-  // 
+  //
+  //=======================================================================
+  //
+  //=======================================================================
+  // ************* STEERING parameters FOR ALICE SIMULATION **************
+  // --- Specify event type to be tracked through the ALICE setup
+  // --- All positions are in cm, angles in degrees, and P and E in GeV
+
   gMC->SetProcess("DCAY",1);
   gMC->SetProcess("PAIR",1);
   gMC->SetProcess("COMP",1);
   gMC->SetProcess("PHOT",1);
   gMC->SetProcess("PFIS",0);
-  gMC->SetProcess("DRAY",1);
+  gMC->SetProcess("DRAY",0);
   gMC->SetProcess("ANNI",1);
   gMC->SetProcess("BREM",1);
   gMC->SetProcess("MUNU",1);
-  gMC->SetProcess("CKOV",1); 
+  gMC->SetProcess("CKOV",1);
   gMC->SetProcess("HADR",1);
   gMC->SetProcess("LOSS",2);
-  gMC->SetProcess("MULS",1);  
+  gMC->SetProcess("MULS",1);
   gMC->SetProcess("RAYL",1);
 
   Float_t cut = 1.e-3;        // 1MeV cut by default
@@ -179,42 +353,24 @@ void Config()
   gMC->SetCut("CUTNEU", cut);
   gMC->SetCut("CUTHAD", cut);
   gMC->SetCut("CUTMUO", cut);
-  gMC->SetCut("BCUTE",  cut);
-  gMC->SetCut("BCUTM",  cut);
-  gMC->SetCut("DCUTE",  cut);
-  gMC->SetCut("DCUTM",  cut);
+  gMC->SetCut("BCUTE",  cut); 
+  gMC->SetCut("BCUTM",  cut); 
+  gMC->SetCut("DCUTE",  cut); 
+  gMC->SetCut("DCUTM",  cut); 
   gMC->SetCut("PPCUTM", cut);
-  gMC->SetCut("TOFMAX", tofmax);
+  gMC->SetCut("TOFMAX", tofmax); 
 
-  //
-  //=======================================================================
-  // STEERING parameters FOR ALICE SIMULATION 
-  // 
-  // Specify event type to be tracked through the ALICE setup.  All
-  // positions are in cm, angles in degrees, and P and E in GeV
-  // 
-  if (gSystem->Getenv("CONFIG_NPARTICLES"))
-    nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES"));
-
-  cout << "\t* Creating and configuring generator for " << nParticles 
-       << " particles..." << endl;
-  AliGenHIJINGpara *gener = new AliGenHIJINGpara(nParticles);
-  gener->SetMomentumRange(0., 999);
-  gener->SetPhiRange(0, 360);
-
-  // Set pseudorapidity range from -6 to 6.
-  Float_t thmin = EtaToTheta( 6.);   // theta min. <---> eta max
-  Float_t thmax = EtaToTheta(-6.);   // theta max. <---> eta min 
-  gener->SetThetaRange(thmin,thmax);
-  gener->SetOrigin(0, 0, 0);  //vertex position
-  gener->SetSigma(0, 0, 0);   //Sigma in (X,Y,Z) (cm) on IP position
-  gener->Init();
-  // 
-  // Activate this line if you want the vertex smearing to happen
-  // track by track
-  //
-  gAlice->SetDebug(10);
 
+  // Generator Configuration
+  gAlice->SetDebug(0);
+  AliGenerator* gener = GeneratorFactory(srun);
+  gener->SetOrigin(0, 0, 0);    // vertex position
+  gener->SetSigma(0, 0, 5.3);   // Sigma in (X,Y,Z) (cm) on IP position
+  gener->SetCutVertexZ(1.);     // Truncate at 1 sigma
+  gener->SetVertexSmear(kPerEvent); 
+  gener->SetTrackingFlag(1);
+  gener->Init();
+    
   // 
   // Comments 
   // 
@@ -238,13 +394,12 @@ void Config()
 
   std::cout << "\n\n Comment: " << comment << "\n" << std::endl;
 
-  // 
+  //__________________________________________________________________
   // Field (L3 0.4 T)
-  // 
   AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., smag);
   field->SetL3ConstField(0); //Using const. field in the barrel
   rl->CdGAFile();
-  gAlice->SetField(field);
+  gAlice->SetField(field);    
 
   // 
   // Used detectors 
@@ -506,8 +661,909 @@ void Config()
   }
 }
 
+//____________________________________________________________________
 Float_t EtaToTheta(Float_t arg)
 {
   return (180./TMath::Pi())*2.*atan(exp(-arg));
 }
 
+
+//____________________________________________________________________
+AliGenerator* 
+GeneratorFactory(PprRun_t srun) 
+{
+  Int_t isw = 3;
+  if (srad == kNoGluonRadiation) isw = 0;
+  
+  
+  AliGenerator * gGener = 0;
+  switch (srun) {
+  case test50:
+    {
+      comment = comment.Append(":HIJINGparam test 50 particles");
+      AliGenHIJINGpara *gener = new AliGenHIJINGpara(50);
+      gener->SetMomentumRange(0, 999999.);
+      gener->SetPhiRange(0., 360.);
+      // Set pseudorapidity range from -8 to 8.
+      Float_t thmin = EtaToTheta(8);   // theta min. <---> eta max
+      Float_t thmax = EtaToTheta(-8);  // theta max. <---> eta min 
+      gener->SetThetaRange(thmin,thmax);
+      gGener=gener;
+    }
+    break;
+  case kParam_8000:
+    {
+      comment = comment.Append(":HIJINGparam N=8000");
+      AliGenHIJINGpara *gener = new AliGenHIJINGpara(86030);
+      gener->SetMomentumRange(0, 999999.);
+      gener->SetPhiRange(0., 360.);
+      // Set pseudorapidity range from -8 to 8.
+      Float_t thmin = EtaToTheta(8);   // theta min. <---> eta max
+      Float_t thmax = EtaToTheta(-8);  // theta max. <---> eta min 
+      gener->SetThetaRange(thmin,thmax);
+      gGener=gener;
+    }
+    break;
+  case kParam_4000:
+    {
+      comment = comment.Append("HIJINGparam N=4000");
+      AliGenHIJINGpara *gener = new AliGenHIJINGpara(43015);
+      gener->SetMomentumRange(0, 999999.);
+      gener->SetPhiRange(0., 360.);
+      // Set pseudorapidity range from -8 to 8.
+      Float_t thmin = EtaToTheta(8);   // theta min. <---> eta max
+      Float_t thmax = EtaToTheta(-8);  // theta max. <---> eta min 
+      gener->SetThetaRange(thmin,thmax);
+      gGener=gener;
+    }
+    break;
+  case kParam_2000:
+    {
+      comment = comment.Append("HIJINGparam N=2000");
+      AliGenHIJINGpara *gener = new AliGenHIJINGpara(21507);
+      gener->SetMomentumRange(0, 999999.);
+      gener->SetPhiRange(0., 360.);
+      // Set pseudorapidity range from -8 to 8.
+      Float_t thmin = EtaToTheta(8);   // theta min. <---> eta max
+      Float_t thmax = EtaToTheta(-8);  // theta max. <---> eta min 
+      gener->SetThetaRange(thmin,thmax);
+      gGener=gener;
+    }
+    break;
+    //
+    //  Hijing Central
+    //
+  case kHijing_cent1:
+    {
+      comment = comment.Append("HIJING cent1");
+      AliGenHijing *gener = HijingStandard();
+      // impact parameter range
+      gener->SetImpactParameterRange(0., 5.);
+      gGener=gener;
+    }
+    break;
+  case kHijing_cent2:
+    {
+      comment = comment.Append("HIJING cent2");
+      AliGenHijing *gener = HijingStandard();
+      // impact parameter range
+      gener->SetImpactParameterRange(0., 2.);
+      gGener=gener;
+    }
+    break;
+    //
+    // Hijing Peripheral 
+    //
+  case kHijing_per1:
+    {
+      comment = comment.Append("HIJING per1");
+      AliGenHijing *gener = HijingStandard();
+      // impact parameter range
+      gener->SetImpactParameterRange(5., 8.6);
+      gGener=gener;
+    }
+    break;
+  case kHijing_per2:
+    {
+      comment = comment.Append("HIJING per2");
+      AliGenHijing *gener = HijingStandard();
+      // impact parameter range
+      gener->SetImpactParameterRange(8.6, 11.2);
+      gGener=gener;
+    }
+    break;
+  case kHijing_per3:
+    {
+      comment = comment.Append("HIJING per3");
+      AliGenHijing *gener = HijingStandard();
+      // impact parameter range
+      gener->SetImpactParameterRange(11.2, 13.2);
+      gGener=gener;
+    }
+    break;
+  case kHijing_per4:
+    {
+      comment = comment.Append("HIJING per4");
+      AliGenHijing *gener = HijingStandard();
+      // impact parameter range
+      gener->SetImpactParameterRange(13.2, 15.);
+      gGener=gener;
+    }
+    break;
+  case kHijing_per5:
+    {
+      comment = comment.Append("HIJING per5");
+      AliGenHijing *gener = HijingStandard();
+      // impact parameter range
+      gener->SetImpactParameterRange(15., 100.);
+      gGener=gener;
+    }
+    break;
+    //
+    //  Jet-Jet
+    //
+  case kHijing_jj25:
+    {
+      comment = comment.Append("HIJING Jet 25 GeV");
+      AliGenHijing *gener = HijingStandard();
+      // impact parameter range
+      gener->SetImpactParameterRange(0., 5.);
+      // trigger
+      gener->SetTrigger(1);
+      gener->SetPtJet(25.);
+      gener->SetRadiation(isw);
+      gener->SetSimpleJets(!isw);
+      gener->SetJetEtaRange(-0.3,0.3);
+      gener->SetJetPhiRange(75., 165.);   
+      gGener=gener;
+    }
+    break;
+
+  case kHijing_jj50:
+    {
+      comment = comment.Append("HIJING Jet 50 GeV");
+      AliGenHijing *gener = HijingStandard();
+      // impact parameter range
+      gener->SetImpactParameterRange(0., 5.);
+      // trigger
+      gener->SetTrigger(1);
+      gener->SetPtJet(50.);
+      gener->SetRadiation(isw);
+      gener->SetSimpleJets(!isw);
+      gener->SetJetEtaRange(-0.3,0.3);
+      gener->SetJetPhiRange(75., 165.);   
+      gGener=gener;
+    }
+    break;
+
+  case kHijing_jj75:
+    {
+      comment = comment.Append("HIJING Jet 75 GeV");
+      AliGenHijing *gener = HijingStandard();
+      // impact parameter range
+      gener->SetImpactParameterRange(0., 5.);
+      // trigger
+      gener->SetTrigger(1);
+      gener->SetPtJet(75.);
+      gener->SetRadiation(isw);
+      gener->SetSimpleJets(!isw);
+      gener->SetJetEtaRange(-0.3,0.3);
+      gener->SetJetPhiRange(75., 165.);   
+      gGener=gener;
+    }
+    break;
+
+  case kHijing_jj100:
+    {
+      comment = comment.Append("HIJING Jet 100 GeV");
+      AliGenHijing *gener = HijingStandard();
+      // impact parameter range
+      gener->SetImpactParameterRange(0., 5.);
+      // trigger
+      gener->SetTrigger(1);
+      gener->SetPtJet(100.);
+      gener->SetRadiation(isw);
+      gener->SetSimpleJets(!isw);
+      gener->SetJetEtaRange(-0.3,0.3);
+      gener->SetJetPhiRange(75., 165.);   
+      gGener=gener;
+    }
+    break;
+
+  case kHijing_jj200:
+    {
+      comment = comment.Append("HIJING Jet 200 GeV");
+      AliGenHijing *gener = HijingStandard();
+      // impact parameter range
+      gener->SetImpactParameterRange(0., 5.);
+      // trigger
+      gener->SetTrigger(1);
+      gener->SetPtJet(200.);
+      gener->SetRadiation(isw);
+      gener->SetSimpleJets(!isw);
+      gener->SetJetEtaRange(-0.3,0.3);
+      gener->SetJetPhiRange(75., 165.);   
+      gGener=gener;
+    }
+    break;
+    //
+    // Gamma-Jet
+    //
+  case kHijing_gj25:
+    {
+      comment = comment.Append("HIJING Gamma 25 GeV");
+      AliGenHijing *gener = HijingStandard();
+      // impact parameter range
+      gener->SetImpactParameterRange(0., 5.);
+      // trigger
+      gener->SetTrigger(2);
+      gener->SetPtJet(25.);
+      gener->SetRadiation(isw);
+      gener->SetSimpleJets(!isw);
+      gener->SetJetEtaRange(-0.12, 0.12);
+      gener->SetJetPhiRange(220., 320.);
+      gGener=gener;
+    }
+    break;
+
+  case kHijing_gj50:
+    {
+      comment = comment.Append("HIJING Gamma 50 GeV");
+      AliGenHijing *gener = HijingStandard();
+      // impact parameter range
+      gener->SetImpactParameterRange(0., 5.);
+      // trigger
+      gener->SetTrigger(2);
+      gener->SetPtJet(50.);
+      gener->SetRadiation(isw);
+      gener->SetSimpleJets(!isw);
+      gener->SetJetEtaRange(-0.12, 0.12);
+      gener->SetJetPhiRange(220., 320.);
+      gGener=gener;
+    }
+    break;
+
+  case kHijing_gj75:
+    {
+      comment = comment.Append("HIJING Gamma 75 GeV");
+      AliGenHijing *gener = HijingStandard();
+      // impact parameter range
+      gener->SetImpactParameterRange(0., 5.);
+      // trigger
+      gener->SetTrigger(2);
+      gener->SetPtJet(75.);
+      gener->SetRadiation(isw);
+      gener->SetSimpleJets(!isw);
+      gener->SetJetEtaRange(-0.12, 0.12);
+      gener->SetJetPhiRange(220., 320.);
+      gGener=gener;
+    }
+    break;
+
+  case kHijing_gj100:
+    {
+      comment = comment.Append("HIJING Gamma 100 GeV");
+      AliGenHijing *gener = HijingStandard();
+      // impact parameter range
+      gener->SetImpactParameterRange(0., 5.);
+      // trigger
+      gener->SetTrigger(2);
+      gener->SetPtJet(100.);
+      gener->SetRadiation(isw);
+      gener->SetSimpleJets(!isw);
+      gener->SetJetEtaRange(-0.12, 0.12);
+      gener->SetJetPhiRange(220., 320.);
+      gGener=gener;
+    }
+    break;
+
+  case kHijing_gj200:
+    {
+      comment = comment.Append("HIJING Gamma 200 GeV");
+      AliGenHijing *gener = HijingStandard();
+      // impact parameter range
+      gener->SetImpactParameterRange(0., 5.);
+      // trigger
+      gener->SetTrigger(2);
+      gener->SetPtJet(200.);
+      gener->SetRadiation(isw);
+      gener->SetSimpleJets(!isw);
+      gener->SetJetEtaRange(-0.12, 0.12);
+      gener->SetJetPhiRange(220., 320.);
+      gGener=gener;
+    }
+    break;
+  case kHijing_pA:
+    {
+      comment = comment.Append("HIJING pA");
+
+      AliGenCocktail *gener  = new AliGenCocktail();
+
+      AliGenHijing   *hijing = new AliGenHijing(-1);
+      // centre of mass energy 
+      hijing->SetEnergyCMS(TMath::Sqrt(82./208.) * 14000.);
+      // impact parameter range
+      hijing->SetImpactParameterRange(0., 15.);
+      // reference frame
+      hijing->SetReferenceFrame("CMS");
+      hijing->SetBoostLHC(1);
+      // projectile
+      hijing->SetProjectile("P", 1, 1);
+      hijing->SetTarget    ("A", 208, 82);
+      // tell hijing to keep the full parent child chain
+      hijing->KeepFullEvent();
+      // enable jet quenching
+      hijing->SetJetQuenching(0);
+      // enable shadowing
+      hijing->SetShadowing(1);
+      // Don't track spectators
+      hijing->SetSpectators(0);
+      // kinematic selection
+      hijing->SetSelectAll(0);
+      //
+      AliGenSlowNucleons*  gray    = new AliGenSlowNucleons(1);
+      AliSlowNucleonModel* model   = new AliSlowNucleonModelExp();
+      gray->SetSlowNucleonModel(model);
+      gray->SetDebug(1);
+      gener->AddGenerator(hijing,"Hijing pPb", 1);
+      gener->AddGenerator(gray,  "Gray Particles",1);
+      gGener=gener;
+    }
+    break;
+  case kPythia6:
+    {
+      comment = comment.Append(":Pythia p-p @ 14 TeV");
+      AliGenPythia *gener = new AliGenPythia(-1); 
+      gener->SetMomentumRange(0,999999);
+      gener->SetThetaRange(0., 180.);
+      gener->SetYRange(-12,12);
+      gener->SetPtRange(0,1000);
+      gener->SetProcess(kPyMb);
+      gener->SetEnergyCMS(14000.);
+      gGener=gener;
+    }
+    break;
+  case kPythia6Jets20_24:
+    {
+      comment = comment.Append(":Pythia jets 20-24 GeV @ 5.5 TeV");
+      AliGenPythia * gener = new AliGenPythia(-1);
+      gener->SetEnergyCMS(5500.);//        Centre of mass energy
+      gener->SetProcess(kPyJets);//        Process type
+      gener->SetJetEtaRange(-0.5, 0.5);//  Final state kinematic cuts
+      gener->SetJetPhiRange(0., 360.);
+      gener->SetJetEtRange(10., 1000.);
+      gener->SetGluonRadiation(1,1);
+      //    gener->SetPtKick(0.);
+      //   Structure function
+      gener->SetStrucFunc(kCTEQ4L);
+      gener->SetPtHard(20., 24.);// Pt transfer of the hard scattering
+      gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
+      gener->SetForceDecay(kAll);//  Decay type (semielectronic, etc.)
+      gGener=gener;
+    }
+    break;
+  case kPythia6Jets24_29:
+    {
+      comment = comment.Append(":Pythia jets 24-29 GeV @ 5.5 TeV");
+      AliGenPythia * gener = new AliGenPythia(-1);
+      gener->SetEnergyCMS(5500.);//        Centre of mass energy
+      gener->SetProcess(kPyJets);//        Process type
+      gener->SetJetEtaRange(-0.5, 0.5);//  Final state kinematic cuts
+      gener->SetJetPhiRange(0., 360.);
+      gener->SetJetEtRange(10., 1000.);
+      gener->SetGluonRadiation(1,1);
+      //    gener->SetPtKick(0.);
+      //   Structure function
+      gener->SetStrucFunc(kCTEQ4L);
+      gener->SetPtHard(24., 29.);// Pt transfer of the hard scattering
+      gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
+      gener->SetForceDecay(kAll);//  Decay type (semielectronic, etc.)
+      gGener=gener;
+    }
+    break;
+  case kPythia6Jets29_35:
+    {
+      comment = comment.Append(":Pythia jets 29-35 GeV @ 5.5 TeV");
+      AliGenPythia * gener = new AliGenPythia(-1);
+      gener->SetEnergyCMS(5500.);//        Centre of mass energy
+      gener->SetProcess(kPyJets);//        Process type
+      gener->SetJetEtaRange(-0.5, 0.5);//  Final state kinematic cuts
+      gener->SetJetPhiRange(0., 360.);
+      gener->SetJetEtRange(10., 1000.);
+      gener->SetGluonRadiation(1,1);
+      //    gener->SetPtKick(0.);
+      //   Structure function
+      gener->SetStrucFunc(kCTEQ4L);
+      gener->SetPtHard(29., 35.);// Pt transfer of the hard scattering
+      gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
+      gener->SetForceDecay(kAll);//  Decay type (semielectronic, etc.)
+      gGener=gener;
+    }
+    break;
+  case kPythia6Jets35_42:
+    {
+      comment = comment.Append(":Pythia jets 35-42 GeV @ 5.5 TeV");
+      AliGenPythia * gener = new AliGenPythia(-1);
+      gener->SetEnergyCMS(5500.);//        Centre of mass energy
+      gener->SetProcess(kPyJets);//        Process type
+      gener->SetJetEtaRange(-0.5, 0.5);//  Final state kinematic cuts
+      gener->SetJetPhiRange(0., 360.);
+      gener->SetJetEtRange(10., 1000.);
+      gener->SetGluonRadiation(1,1);
+      //    gener->SetPtKick(0.);
+      //   Structure function
+      gener->SetStrucFunc(kCTEQ4L);
+      gener->SetPtHard(35., 42.);// Pt transfer of the hard scattering
+      gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
+      gener->SetForceDecay(kAll);//  Decay type (semielectronic, etc.)
+      gGener=gener;
+    }
+    break;
+  case kPythia6Jets42_50:
+    {
+      comment = comment.Append(":Pythia jets 42-50 GeV @ 5.5 TeV");
+      AliGenPythia * gener = new AliGenPythia(-1);
+      gener->SetEnergyCMS(5500.);//        Centre of mass energy
+      gener->SetProcess(kPyJets);//        Process type
+      gener->SetJetEtaRange(-0.5, 0.5);//  Final state kinematic cuts
+      gener->SetJetPhiRange(0., 360.);
+      gener->SetJetEtRange(10., 1000.);
+      gener->SetGluonRadiation(1,1);
+      //    gener->SetPtKick(0.);
+      //   Structure function
+      gener->SetStrucFunc(kCTEQ4L);
+      gener->SetPtHard(42., 50.);// Pt transfer of the hard scattering
+      gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
+      gener->SetForceDecay(kAll);//  Decay type (semielectronic, etc.)
+      gGener=gener;
+    }
+    break;
+  case kPythia6Jets50_60:
+    {
+      comment = comment.Append(":Pythia jets 50-60 GeV @ 5.5 TeV");
+      AliGenPythia * gener = new AliGenPythia(-1);
+      gener->SetEnergyCMS(5500.);//        Centre of mass energy
+      gener->SetProcess(kPyJets);//        Process type
+      gener->SetJetEtaRange(-0.5, 0.5);//  Final state kinematic cuts
+      gener->SetJetPhiRange(0., 360.);
+      gener->SetJetEtRange(10., 1000.);
+      gener->SetGluonRadiation(1,1);
+      //    gener->SetPtKick(0.);
+      //   Structure function
+      gener->SetStrucFunc(kCTEQ4L);
+      gener->SetPtHard(50., 60.);// Pt transfer of the hard scattering
+      gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
+      gener->SetForceDecay(kAll);//  Decay type (semielectronic, etc.)
+      gGener=gener;
+    }
+    break;
+  case kPythia6Jets60_72:
+    {
+      comment = comment.Append(":Pythia jets 60-72 GeV @ 5.5 TeV");
+      AliGenPythia * gener = new AliGenPythia(-1);
+      gener->SetEnergyCMS(5500.);//        Centre of mass energy
+      gener->SetProcess(kPyJets);//        Process type
+      gener->SetJetEtaRange(-0.5, 0.5);//  Final state kinematic cuts
+      gener->SetJetPhiRange(0., 360.);
+      gener->SetJetEtRange(10., 1000.);
+      gener->SetGluonRadiation(1,1);
+      //    gener->SetPtKick(0.);
+      //   Structure function
+      gener->SetStrucFunc(kCTEQ4L);
+      gener->SetPtHard(60., 72.);// Pt transfer of the hard scattering
+      gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
+      gener->SetForceDecay(kAll);//  Decay type (semielectronic, etc.)
+      gGener=gener;
+    }
+    break;
+  case kPythia6Jets72_86:
+    {
+      comment = comment.Append(":Pythia jets 72-86 GeV @ 5.5 TeV");
+      AliGenPythia * gener = new AliGenPythia(-1);
+      gener->SetEnergyCMS(5500.);//        Centre of mass energy
+      gener->SetProcess(kPyJets);//        Process type
+      gener->SetJetEtaRange(-0.5, 0.5);//  Final state kinematic cuts
+      gener->SetJetPhiRange(0., 360.);
+      gener->SetJetEtRange(10., 1000.);
+      gener->SetGluonRadiation(1,1);
+      //    gener->SetPtKick(0.);
+      //   Structure function
+      gener->SetStrucFunc(kCTEQ4L);
+      gener->SetPtHard(72., 86.);// Pt transfer of the hard scattering
+      gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
+      gener->SetForceDecay(kAll);//  Decay type (semielectronic, etc.)
+      gGener=gener;
+    }
+    break;
+  case kPythia6Jets86_104:
+    {
+      comment = comment.Append(":Pythia jets 86-104 GeV @ 5.5 TeV");
+      AliGenPythia * gener = new AliGenPythia(-1);
+      gener->SetEnergyCMS(5500.);//        Centre of mass energy
+      gener->SetProcess(kPyJets);//        Process type
+      gener->SetJetEtaRange(-0.5, 0.5);//  Final state kinematic cuts
+      gener->SetJetPhiRange(0., 360.);
+      gener->SetJetEtRange(10., 1000.);
+      gener->SetGluonRadiation(1,1);
+      //    gener->SetPtKick(0.);
+      //   Structure function
+      gener->SetStrucFunc(kCTEQ4L);
+      gener->SetPtHard(86., 104.);// Pt transfer of the hard scattering
+      gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
+      gener->SetForceDecay(kAll);//  Decay type (semielectronic, etc.)
+      gGener=gener;
+    }
+    break;
+  case kPythia6Jets104_125:
+    {
+      comment = comment.Append(":Pythia jets 105-125 GeV @ 5.5 TeV");
+      AliGenPythia * gener = new AliGenPythia(-1);
+      gener->SetEnergyCMS(5500.);//        Centre of mass energy
+      gener->SetProcess(kPyJets);//        Process type
+      gener->SetJetEtaRange(-0.5, 0.5);//  Final state kinematic cuts
+      gener->SetJetPhiRange(0., 360.);
+      gener->SetJetEtRange(10., 1000.);
+      gener->SetGluonRadiation(1,1);
+      //    gener->SetPtKick(0.);
+      //   Structure function
+      gener->SetStrucFunc(kCTEQ4L);
+      gener->SetPtHard(104., 125.);// Pt transfer of the hard scattering
+      gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
+      gener->SetForceDecay(kAll);//  Decay type (semielectronic, etc.)
+      gGener=gener;
+    }
+    break;
+  case kPythia6Jets125_150:
+    {
+      comment = comment.Append(":Pythia jets 125-150 GeV @ 5.5 TeV");
+      AliGenPythia * gener = new AliGenPythia(-1);
+      gener->SetEnergyCMS(5500.);//        Centre of mass energy
+      gener->SetProcess(kPyJets);//        Process type
+      gener->SetJetEtaRange(-0.5, 0.5);//  Final state kinematic cuts
+      gener->SetJetPhiRange(0., 360.);
+      gener->SetJetEtRange(10., 1000.);
+      gener->SetGluonRadiation(1,1);
+      //    gener->SetPtKick(0.);
+      //   Structure function
+      gener->SetStrucFunc(kCTEQ4L);
+      gener->SetPtHard(125., 150.);// Pt transfer of the hard scattering
+      gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
+      gener->SetForceDecay(kAll);//  Decay type (semielectronic, etc.)
+      gGener=gener;
+    }
+    break;
+  case kPythia6Jets150_180:
+    {
+      comment = comment.Append(":Pythia jets 150-180 GeV @ 5.5 TeV");
+      AliGenPythia * gener = new AliGenPythia(-1);
+      gener->SetEnergyCMS(5500.);//        Centre of mass energy
+      gener->SetProcess(kPyJets);//        Process type
+      gener->SetJetEtaRange(-0.5, 0.5);//  Final state kinematic cuts
+      gener->SetJetPhiRange(0., 360.);
+      gener->SetJetEtRange(10., 1000.);
+      gener->SetGluonRadiation(1,1);
+      //    gener->SetPtKick(0.);
+      //   Structure function
+      gener->SetStrucFunc(kCTEQ4L);
+      gener->SetPtHard(150., 180.);// Pt transfer of the hard scattering
+      gener->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
+      gener->SetForceDecay(kAll);//  Decay type (semielectronic, etc.)
+      gGener=gener;
+    }
+    break;
+  case kD0PbPb5500:
+    {
+      comment = comment.Append(" D0 in Pb-Pb at 5.5 TeV");
+      AliGenPythia * gener = new AliGenPythia(10);
+      gener->SetProcess(kPyD0PbPbMNR);
+      gener->SetStrucFunc(kCTEQ4L);
+      gener->SetPtHard(2.1,-1.0);
+      gener->SetEnergyCMS(5500.);
+      gener->SetNuclei(208,208);
+      gener->SetForceDecay(kHadronicD);
+      gener->SetYRange(-2,2);
+      gener->SetFeedDownHigherFamily(kFALSE);
+      gener->SetStackFillOpt(AliGenPythia::kParentSelection);
+      gener->SetCountMode(AliGenPythia::kCountParents);
+      gGener=gener;
+    }
+    break;
+  case kCharmSemiElPbPb5500:
+    {
+      comment = comment.Append(" Charm in Pb-Pb at 5.5 TeV");
+      AliGenPythia * gener = new AliGenPythia(10);
+      gener->SetProcess(kPyCharmPbPbMNR);
+      gener->SetStrucFunc(kCTEQ4L);
+      gener->SetPtHard(2.1,-1.0);
+      gener->SetEnergyCMS(5500.);
+      gener->SetNuclei(208,208);
+      gener->SetForceDecay(kSemiElectronic);
+      gener->SetYRange(-2,2);
+      gener->SetFeedDownHigherFamily(kFALSE);
+      gener->SetCountMode(AliGenPythia::kCountParents);
+      gGener=gener;
+    }
+    break;
+  case kBeautySemiElPbPb5500:
+    {
+      comment = comment.Append(" Beauty in Pb-Pb at 5.5 TeV");
+      AliGenPythia *gener = new AliGenPythia(10);
+      gener->SetProcess(kPyBeautyPbPbMNR);
+      gener->SetStrucFunc(kCTEQ4L);
+      gener->SetPtHard(2.75,-1.0);
+      gener->SetEnergyCMS(5500.);
+      gener->SetNuclei(208,208);
+      gener->SetForceDecay(kSemiElectronic);
+      gener->SetYRange(-2,2);
+      gener->SetFeedDownHigherFamily(kFALSE);
+      gener->SetCountMode(AliGenPythia::kCountParents);
+      gGener=gener;
+    }
+    break;
+  case kCocktailTRD:
+    {
+      comment = comment.Append(" Cocktail for TRD at 5.5 TeV");
+      AliGenCocktail *gener  = new AliGenCocktail();
+
+      AliGenParam *jpsi = new AliGenParam(10,
+                                         new AliGenMUONlib(),
+                                         AliGenMUONlib::kJpsiFamily,
+                                         "Vogt PbPb");
+
+      jpsi->SetPtRange(0, 100);
+      jpsi->SetYRange(-1., +1.);
+      jpsi->SetForceDecay(kDiElectron);
+
+      AliGenParam *ups = new AliGenParam(10,
+                                        new AliGenMUONlib(),
+                                        AliGenMUONlib::kUpsilonFamily,
+                                        "Vogt PbPb");
+      ups->SetPtRange(0, 100);
+      ups->SetYRange(-1., +1.);
+      ups->SetForceDecay(kDiElectron);
+       
+      AliGenParam *charm = new AliGenParam(10,
+                                          new AliGenMUONlib(), 
+                                          AliGenMUONlib::kCharm,
+                                          "central");
+      charm->SetPtRange(0, 100);
+      charm->SetYRange(-1.5, +1.5);
+      charm->SetForceDecay(kSemiElectronic);
+       
+       
+      AliGenParam *beauty = new AliGenParam(10,
+                                           new AliGenMUONlib(), 
+                                           AliGenMUONlib::kBeauty,
+                                           "central");
+      beauty->SetPtRange(0, 100);
+      beauty->SetYRange(-1.5, +1.5);
+      beauty->SetForceDecay(kSemiElectronic);
+
+      gener->AddGenerator(jpsi,"J/psi",1);
+      gener->AddGenerator(ups,"Upsilon",1);
+      gener->AddGenerator(charm,"Charm",1);
+      gener->AddGenerator(beauty,"Beauty",1);
+      gGener=gener;
+    }
+    break;
+  case kPyJJ:
+    {
+      comment = comment.Append(" Jet-jet at 5.5 TeV");
+      AliGenPythia *gener = new AliGenPythia(-1);
+      gener->SetEnergyCMS(5500.);
+      gener->SetProcess(kPyJets);
+      Double_t ptHardMin=10.0, ptHardMax=-1.0;
+      gener->SetPtHard(ptHardMin,ptHardMax);
+      gener->SetYHard(-0.7,0.7);
+      gener->SetJetEtaRange(-0.2,0.2);
+      gener->SetEventListRange(0,1);
+      gGener=gener;
+    }
+    break;
+  case kPyGJ:
+    {
+      comment = comment.Append(" Gamma-jet at 5.5 TeV");
+      AliGenPythia *gener = new AliGenPythia(-1);
+      gener->SetEnergyCMS(5500.);
+      gener->SetProcess(kPyDirectGamma);
+      Double_t ptHardMin=10.0, ptHardMax=-1.0;
+      gener->SetPtHard(ptHardMin,ptHardMax);
+      gener->SetYHard(-1.0,1.0);
+      gener->SetGammaEtaRange(-0.13,0.13);
+      gener->SetGammaPhiRange(210.,330.);
+      gener->SetEventListRange(0,1);
+      gGener=gener;
+    }
+    break;
+  case kMuonCocktailCent1:
+    {
+      comment = comment.Append(" Muon Cocktail Cent1");
+      AliGenMUONCocktail * gener = new AliGenMUONCocktail();
+      gener->SetPtRange(1.0,100.);       // Transverse momentum range   
+      gener->SetPhiRange(0.,360.);    // Azimuthal angle range  
+      gener->SetYRange(-4.0,-2.4);
+      gener->SetMuonPtCut(0.8);
+      gener->SetMuonThetaCut(171.,178.);
+      gener->SetMuonMultiplicity(2);
+      gener->SetNumberOfCollisions(1626.);  //Centrality class Cent1 for PDC04
+      gener->SetNumberOfParticipants(359.4);//Centrality class Cent1 for PDC04
+      gGener=gener;
+    }
+    break;
+  case kMuonCocktailPer1:
+    {
+      comment = comment.Append(" Muon Cocktail Per1");
+      AliGenMUONCocktail * gener = new AliGenMUONCocktail();
+      gener->SetPtRange(1.0,100.);       // Transverse momentum range   
+      gener->SetPhiRange(0.,360.);    // Azimuthal angle range  
+      gener->SetYRange(-4.0,-2.4);
+      gener->SetMuonPtCut(0.8);
+      gener->SetMuonThetaCut(171.,178.);
+      gener->SetMuonMultiplicity(2);
+      gener->SetNumberOfCollisions(820.0);//Centrality class Per1 for PDC04
+      gener->SetNumberOfParticipants(229.3);//Centrality class Per1 for PDC04
+      gGener=gener;
+    }
+    break;
+  case kMuonCocktailPer4:
+    {
+      comment = comment.Append(" Muon Cocktail Per4");
+      AliGenMUONCocktail * gener = new AliGenMUONCocktail();
+      gener->SetPtRange(1.0,100.);       // Transverse momentum range   
+      gener->SetPhiRange(0.,360.);    // Azimuthal angle range  
+      gener->SetYRange(-4.0,-2.4);
+      gener->SetMuonPtCut(0.8);
+      gener->SetMuonThetaCut(171.,178.);
+      gener->SetMuonMultiplicity(2);
+      gener->SetNumberOfCollisions(13.6);//Centrality class Per4 for PDC04
+      gener->SetNumberOfParticipants(13.3);//Centrality class Per4 for PDC04
+      gGener=gener;
+    }
+    break;
+  case kMuonCocktailCent1HighPt:
+    {
+      comment = comment.Append(" Muon Cocktail HighPt Cent1");
+      AliGenMUONCocktail * gener = new AliGenMUONCocktail();
+      gener->SetPtRange(1.0,100.);       // Transverse momentum range   
+      gener->SetPhiRange(0.,360.);    // Azimuthal angle range  
+      gener->SetYRange(-4.0,-2.4);
+      gener->SetMuonPtCut(2.5);
+      gener->SetMuonThetaCut(171.,178.);
+      gener->SetMuonMultiplicity(2);
+      gener->SetNumberOfCollisions(1626.);  //Centrality class Cent1 for PDC04
+      gener->SetNumberOfParticipants(359.4);//Centrality class Cent1 for PDC04
+      gGener=gener;
+    }
+    break;
+  case kMuonCocktailPer1HighPt :
+    {
+      comment = comment.Append(" Muon Cocktail HighPt Per1");
+      AliGenMUONCocktail * gener = new AliGenMUONCocktail();
+      gener->SetPtRange(1.0,100.);       // Transverse momentum range   
+      gener->SetPhiRange(0.,360.);    // Azimuthal angle range  
+      gener->SetYRange(-4.0,-2.4);
+      gener->SetMuonPtCut(2.5);
+      gener->SetMuonThetaCut(171.,178.);
+      gener->SetMuonMultiplicity(2);
+      gener->SetNumberOfCollisions(820.0);//Centrality class Per1 for PDC04
+      gener->SetNumberOfParticipants(229.3);//Centrality class Per1 for PDC04
+      gGener=gener;
+    }
+    break;
+  case kMuonCocktailPer4HighPt:
+    {
+      comment = comment.Append(" Muon Cocktail HighPt Per4");
+      AliGenMUONCocktail * gener = new AliGenMUONCocktail();
+      gener->SetPtRange(1.0,100.);       // Transverse momentum range   
+      gener->SetPhiRange(0.,360.);    // Azimuthal angle range  
+      gener->SetYRange(-4.0,-2.4);
+      gener->SetMuonPtCut(2.5);
+      gener->SetMuonThetaCut(171.,178.);
+      gener->SetMuonMultiplicity(2);
+      gener->SetNumberOfCollisions(13.6);//Centrality class Per4 for PDC04
+      gener->SetNumberOfParticipants(13.3);//Centrality class Per4 for PDC04
+      gGener=gener;
+    }
+    break;
+  case kMuonCocktailCent1Single:
+    {
+      comment = comment.Append(" Muon Cocktail Single Cent1");
+      AliGenMUONCocktail * gener = new AliGenMUONCocktail();
+      gener->SetPtRange(1.0,100.);       // Transverse momentum range   
+      gener->SetPhiRange(0.,360.);    // Azimuthal angle range  
+      gener->SetYRange(-4.0,-2.4);
+      gener->SetMuonPtCut(0.8);
+      gener->SetMuonThetaCut(171.,178.);
+      gener->SetMuonMultiplicity(1);
+      gener->SetNumberOfCollisions(1626.);  //Centrality class Cent1 for PDC04
+      gener->SetNumberOfParticipants(359.4);//Centrality class Cent1 for PDC04
+      gGener=gener;
+    }
+    break;
+  case kMuonCocktailPer1Single :
+    {
+      comment = comment.Append(" Muon Cocktail Single Per1");
+      AliGenMUONCocktail * gener = new AliGenMUONCocktail();
+      gener->SetPtRange(1.0,100.);       // Transverse momentum range   
+      gener->SetPhiRange(0.,360.);    // Azimuthal angle range  
+      gener->SetYRange(-4.0,-2.4);
+      gener->SetMuonPtCut(0.8);
+      gener->SetMuonThetaCut(171.,178.);
+      gener->SetMuonMultiplicity(1);
+      gener->SetNumberOfCollisions(820.0);//Centrality class Per1 for PDC04
+      gener->SetNumberOfParticipants(229.3);//Centrality class Per1 for PDC04
+      gGener=gener;
+    }
+    break;
+  case kMuonCocktailPer4Single:
+    {
+      comment = comment.Append(" Muon Cocktail Single Per4");
+      AliGenMUONCocktail * gener = new AliGenMUONCocktail();
+      gener->SetPtRange(1.0,100.);       // Transverse momentum range   
+      gener->SetPhiRange(0.,360.);    // Azimuthal angle range  
+      gener->SetYRange(-4.0,-2.4);
+      gener->SetMuonPtCut(0.8);
+      gener->SetMuonThetaCut(171.,178.);
+      gener->SetMuonMultiplicity(1);
+      gener->SetNumberOfCollisions(13.6);//Centrality class Per4 for PDC04
+      gener->SetNumberOfParticipants(13.3);//Centrality class Per4 for PDC04
+      gGener=gener;
+    }
+    break;
+  default: break;
+  }
+  return gGener;
+}
+
+//____________________________________________________________________
+AliGenHijing* 
+HijingStandard()
+{
+  AliGenHijing *gener = new AliGenHijing(-1);
+  // centre of mass energy 
+  gener->SetEnergyCMS(5500.);
+  // reference frame
+  gener->SetReferenceFrame("CMS");
+  // projectile
+  gener->SetProjectile("A", 208, 82);
+  gener->SetTarget    ("A", 208, 82);
+  // tell hijing to keep the full parent child chain
+  gener->KeepFullEvent();
+  // enable jet quenching
+  gener->SetJetQuenching(1);
+  // enable shadowing
+  gener->SetShadowing(1);
+  // neutral pion and heavy particle decays switched off
+  gener->SetDecaysOff(1);
+  // Don't track spectators
+  gener->SetSpectators(0);
+  // kinematic selection
+  gener->SetSelectAll(0);
+  return gener;
+}
+
+
+//____________________________________________________________________
+void 
+ProcessEnvironmentVars()
+{
+  // Run type
+  if (gSystem->Getenv("CONFIG_RUN_TYPE")) {
+    for (Int_t iRun = 0; iRun < kRunMax; iRun++) {
+      if (strcmp(gSystem->Getenv("CONFIG_RUN_TYPE"), pprRunName[iRun])==0) {
+       srun = (PprRun_t)iRun;
+       cout<<"Run type set to "<<pprRunName[iRun]<<endl;
+      }
+    }
+  }
+
+  // Random Number seed
+  if (gSystem->Getenv("CONFIG_SEED")) {
+    sseed = atoi(gSystem->Getenv("CONFIG_SEED"));
+  }
+}
+
+//____________________________________________________________________
+//
+// EOF
+// 
index cd7e3f2..a38b32e 100644 (file)
@@ -3,16 +3,16 @@ void ViewFMD()
    gMC->Gsatt("FMD1","seen",0);
    gMC->Gsatt("FMD2","seen",0);
    gMC->Gsatt("FMD3","seen",0);
-   gMC->Gsatt("RNGI","seen",0);
-   gMC->Gsatt("RNGO","seen",0);
-   gMC->Gsatt("VFI","seen",0);
-   gMC->Gsatt("VFO","seen",0);
-   gMC->Gsatt("VBI","seen",0);
-   gMC->Gsatt("VBO","seen",0);
-   gMC->Gsatt("ACTI","seen",1);
-   gMC->Gsatt("ACTO","seen",1);
-   gMC->Gsatt("PBTI","seen",1);
-   gMC->Gsatt("PBTO","seen",1);
-   gMC->Gsatt("PBBI","seen",1);
-   gMC->Gsatt("PBBO","seen",1);
+   gMC->Gsatt("FRGI","seen",0);
+   gMC->Gsatt("FRGO","seen",0);
+   gMC->Gsatt("FVFI","seen",0);
+   gMC->Gsatt("FVFO","seen",0);
+   gMC->Gsatt("FVBI","seen",0);
+   gMC->Gsatt("FVBO","seen",0);
+   gMC->Gsatt("FACI","seen",1);
+   gMC->Gsatt("FACO","seen",1);
+   gMC->Gsatt("FPTI","seen",1);
+   gMC->Gsatt("FPTO","seen",1);
+   gMC->Gsatt("FPBI","seen",1);
+   gMC->Gsatt("FPBO","seen",1);
 }