]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Count the number of spectator neutrons and protons and add information
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 20 Jul 2001 09:34:56 +0000 (09:34 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 20 Jul 2001 09:34:56 +0000 (09:34 +0000)
to the event header. (Chiara Oppedisano)

EVGEN/AliGenHijing.cxx
EVGEN/AliGenHijing.h
EVGEN/AliGenHijingEventHeader.h

index c5f4b1b01a5ff7f50fcfad92ae57afa7acdb96f5..f70bf1a43d74606062a85cc77ce54e056f2921d9 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.23  2001/07/13 17:30:22  morsch
+Derive from AliGenMC.
+
 Revision 1.22  2001/06/11 13:09:23  morsch
 - Store cross-Section and number of binary collisions as a function of impact parameter
 - Pass AliGenHijingEventHeader to gAlice.
@@ -100,6 +103,7 @@ AliGenerator interface class to HIJING using THijing (test version)
 #include "AliGenHijing.h"
 #include "AliGenHijingEventHeader.h"
 #include "AliRun.h"
+#include "AliPDG.h"
 
 #include <TArrayI.h>
 #include <TParticle.h>
@@ -219,6 +223,10 @@ void AliGenHijing::Generate()
   while(1)
   {
 //    Generate one event
+// --------------------------------------------------------------------------
+      fSpecn   = 0;  
+      fSpecp   = 0;
+// --------------------------------------------------------------------------
       fHijing->GenerateEvent();
       fTrials++;
       fHijing->ImportParticles(particles,"All");
@@ -287,11 +295,19 @@ void AliGenHijing::Generate()
         TParticle *  iparticle       = (TParticle *) particles->At(i);
 // Is this a final state particle ?
         if (!Stable(iparticle)) continue;
-//         
+
         Bool_t  hasMother            =  (iparticle->GetFirstMother()   >=0);
         Bool_t  selected             =  kTRUE;
         kf        = iparticle->GetPdgCode();
         ks        = iparticle->GetStatusCode();
+// --------------------------------------------------------------------------
+// Count spectator neutrons and protons
+        if(ks == 0 || ks == 1 || ks == 10 || ks == 11){
+         if(kf == kNeutron) fSpecn += 1;
+         if(kf == kProton)  fSpecp += 1;
+       }
+// --------------------------------------------------------------------------
+//         
         if (!fSelectAll) {
            selected = KinematicSelection(iparticle,0)&&SelectFlavor(kf);
            if (!fSpectators && selected) selected = (ks != 0 && ks != 1 && ks != 10
@@ -479,6 +495,7 @@ void AliGenHijing::MakeHeader()
                          fHijing->GetN01(),
                          fHijing->GetN10(),
                          fHijing->GetN11());
+   ((AliGenHijingEventHeader*) header)->SetSpectators(fSpecn, fSpecp);
    gAlice->SetGenEventHeader(header);
    
 }
index 8e6c5194c2601575ca50a78f51feff7f5026deb8..7b4623a9973f77a2e3865ac9549150a47424e1da 100644 (file)
@@ -96,6 +96,10 @@ class AliGenHijing : public AliGenMC
     Int_t       fSpectators;     // put spectators on stack
     TGraph*     fDsigmaDb;       // dSigma/db for the system
     TGraph*     fDnDb;           // dNBinaryCollisions/db    
+// ZDC proposal (by Chiara) to store num. of SPECTATORS protons and neutrons
+    Int_t      fSpecn;          // Num. of spectator neutrons
+    Int_t      fSpecp;          // Num. of spectator protons
+     
  private:
     // adjust the weight from kinematic cuts
     void   AdjustWeights();
index 29f2cfc0624bab078749f531dbe487faec9e6240..7445a9525a1a4eb4724efba31f732a051dc74779 100644 (file)
@@ -20,7 +20,9 @@ class AliGenHijingEventHeader : public AliGenEventHeader
   Float_t TotalEnergy()  {return fTotalEnergy;} 
   Int_t   HardScatters() {return fNHardScatters;}
   Int_t   ProjectileParticipants()  {return fNProjectileParticipants;}
-  Int_t   TargetParticipants()      {return fNTargetParticipants;}       
+  Int_t   TargetParticipants()      {return fNTargetParticipants;}
+  Int_t   Spectatorsn()        {return fSpecn;}
+  Int_t   Spectatorsp()        {return fSpecp;}
   Int_t   NN()    {return fNNColl;}
   Int_t   NNw()   {return fNNwColl;}
   Int_t   NwN()   {return fNwNColl;}
@@ -32,6 +34,8 @@ class AliGenHijingEventHeader : public AliGenEventHeader
       {fNProjectileParticipants=np, fNTargetParticipants=nt;}
   void SetCollisions(Int_t nn, Int_t nnw, Int_t nwn, Int_t nwnw)
       {fNNColl=nn, fNNwColl=nnw, fNwNColl=nwn,  fNwNwColl=nwnw;}
+  void SetSpectators(Int_t nspecn, Int_t nspecp)
+      {fSpecn=nspecn, fSpecp=nspecp;}
   
 protected:
   Float_t fTotalEnergy;              // Total energy of produced particles
@@ -42,6 +46,8 @@ protected:
   Int_t   fNNwColl;                  // Number of N-Nwounded collisions
   Int_t   fNwNColl;                  // Number of Nwounded-N collisons
   Int_t   fNwNwColl;                 // Number of Nwounded-Nwounded collisions
+  Int_t   fSpecn;                    // Number of spectators neutrons
+  Int_t   fSpecp;                    // Number of spectators protons
   
   
   ClassDef(AliGenHijingEventHeader,1) // Event header for hijing event