]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
In member data: char* replaced by TString, Init takes care of resizing the strings to
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 30 Jun 2000 12:08:36 +0000 (12:08 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 30 Jun 2000 12:08:36 +0000 (12:08 +0000)
8 characters required by Hijing.

EVGEN/AliGenHijing.cxx
EVGEN/AliGenHijing.h

index e82373349a3dac5fffee895ff14b404b4bbdb1e1..bff0c38c4731ac3ea3812701febdf6dec6133a55 100644 (file)
 
 /*
 $Log$
+Revision 1.2  2000/06/15 14:15:05  morsch
+Add possibility for heavy flavor selection: charm and beauty.
+
 Revision 1.1  2000/06/09 20:47:27  morsch
 AliGenerator interface class to HIJING using THijing (test version)
 
 */
 
 #include "AliGenHijing.h"
+#include "AliGenHijingEventHeader.h"
 #include "AliRun.h"
 
 #include <TArrayI.h>
@@ -68,6 +72,10 @@ AliGenHijing::~AliGenHijing()
 void AliGenHijing::Init()
 {
 // Initialisation
+    fFrame.Resize(8);
+    fTarget.Resize(8);
+    fProjectile.Resize(8);
+    
     SetMC(new THijing(fEnergyCMS, fFrame, fProjectile, fTarget, 
                      fAProjectile, fZProjectile, fATarget, fZTarget, 
                      fMinImpactParam, fMaxImpactParam));
@@ -339,6 +347,24 @@ Bool_t AliGenHijing::SelectFlavor(Int_t pid)
 
 }
 
+void AliGenHijing::MakeHeader()
+{
+// Builds the event header, to be called after each event
+    AliGenHijingEventHeader* header = new AliGenHijingEventHeader("Hijing");
+//    header->SetDate(date);
+//    header->SetRunNumber(run);
+//    header->SetEventNumber(event);
+    header->SetNProduced(fHijing->GetNATT());
+    header->SetImpactParameter(fHijing->GetHINT1(19));
+    header->SetTotalEnergy(fHijing->GetEATT());
+    header->SetHardScatters(fHijing->GetJATT());
+    header->SetParticipants(fHijing->GetNP(), fHijing->GetNT());
+    header->SetCollisions(fHijing->GetN0(),
+                         fHijing->GetN01(),
+                         fHijing->GetN10(),
+                         fHijing->GetN11());
+}
+
 AliGenHijing& AliGenHijing::operator=(const  AliGenHijing& rhs)
 {
 // Assignment operator
index 666c5764d54d0e90b15c365c6fbf5a231f794ec9..51717cc98ddddd89b7b8b6fc558755077cc04ba9 100644 (file)
@@ -9,6 +9,7 @@
 #include "AliGenerator.h"
 #include "GenTypeDefs.h"
 #include <THijing.h>
+#include <TString.h>
 #include <TArrayI.h>
 
 class TArrayI;
@@ -27,12 +28,15 @@ class AliGenHijing : public AliGenerator
     virtual void    Init();
     // set centre of mass energy
     virtual void    SetEnergyCMS(Float_t energy=5500) {fEnergyCMS=energy;}
-    virtual void    SetReferenceFrame(char* frame="CMS     ") {fFrame=frame;}
-    virtual void    SetProjectile(char* proj="A       ", Int_t a=208, Int_t z=97)
+    virtual void    SetReferenceFrame(TString frame=TString("CMS"))
+       {fFrame=frame;}
+    virtual void    SetProjectile(TString proj=TString("A"),
+                                 Int_t a=208, Int_t z=82)
        {fProjectile = proj;
        fAProjectile = a;
        fZProjectile = z;}    
-    virtual void    SetTarget(char* tar="A       ", Int_t a=208, Int_t z=97)
+    virtual void    SetTarget(TString tar=TString("A"),
+                             Int_t a=208, Int_t z=82)
        {fTarget = tar;
        fATarget = a;
        fZTarget =z;}    
@@ -51,37 +55,38 @@ class AliGenHijing : public AliGenerator
     AliGenHijing &  operator=(const AliGenHijing & rhs);
 // Physics Routines        
     virtual void EvaluateCrossSections();
-    
  protected:
     Bool_t SelectFlavor(Int_t pid);
+    void   MakeHeader();
+
  protected:
-    char       *fFrame;         // Reference frame 
-    char       *fProjectile;    // Projectile
-    char       *fTarget;        // Target
-    Int_t       fAProjectile;   // Projectile A
-    Int_t       fZProjectile;   // Projectile Z
-    Int_t       fATarget;       // Target A
-    Int_t       fZTarget;       // Target Z
+    TString     fFrame;         // Reference frame 
+    TString     fProjectile;    // Projectile
+    TString     fTarget;        // Target
+    Int_t       fAProjectile;    // Projectile A
+    Int_t       fZProjectile;    // Projectile Z
+    Int_t       fATarget;        // Target A
+    Int_t       fZTarget;        // Target Z
     Float_t     fMinImpactParam; // minimum impact parameter
     Float_t     fMaxImpactParam; // maximum impact parameter   
-    Int_t       fKeep;          // Flag to keep full event information
-    Int_t       fQuench;        // Flag to switch on jet quenching
-    Int_t       fShadowing;     // Flag to switch on voclear effects on parton distribution function
-    Int_t       fDecaysOff;     // Flag to turn off decays of pi0, K_s, D, Lambda, sigma
-    Int_t       fTrigger;       // Trigger type
-    Int_t       fEvaluate;      // Evaluate total and partial cross-sections
-    Int_t       fSelectAll;     // Flag to write the full event
-    Int_t       fFlavor;        // Selected particle flavor 4: charm+beauty 5: beauty
-    Decay_t     fForceDecay;    // Decay channel  are forced
-    Float_t     fEnergyCMS;     // Centre of mass energy
-    Float_t     fKineBias;      // Bias from kinematic selection
-    Int_t       fTrials;        // Number of trials
-    TArrayI     fParentSelect;  // Parent particles to be selected 
-    TArrayI     fChildSelect;   // Decay products to be selected
-    Float_t     fXsection;      // Cross-section
-    THijing    *fHijing;        // Hijing
-    Float_t     fPtHardMin;     // lower pT-hard cut 
-    Float_t     fPtHardMax;     // higher pT-hard cut
+    Int_t       fKeep;           // Flag to keep full event information
+    Int_t       fQuench;         // Flag to switch on jet quenching
+    Int_t       fShadowing;      // Flag to switch on voclear effects on parton distribution function
+    Int_t       fDecaysOff;      // Flag to turn off decays of pi0, K_s, D, Lambda, sigma
+    Int_t       fTrigger;        // Trigger type
+    Int_t       fEvaluate;       // Evaluate total and partial cross-sections
+    Int_t       fSelectAll;      // Flag to write the full event
+    Int_t       fFlavor;         // Selected particle flavor 4: charm+beauty 5: beauty
+    Decay_t     fForceDecay;     // Decay channel  are forced
+    Float_t     fEnergyCMS;      // Centre of mass energy
+    Float_t     fKineBias;       // Bias from kinematic selection
+    Int_t       fTrials;         // Number of trials
+    TArrayI     fParentSelect;   // Parent particles to be selected 
+    TArrayI     fChildSelect;    // Decay products to be selected
+    Float_t     fXsection;       // Cross-section
+    THijing    *fHijing;         // Hijing
+    Float_t     fPtHardMin;      // lower pT-hard cut 
+    Float_t     fPtHardMax;      // higher pT-hard cut
 
  private:
     // check if particle is selected as parent particle