]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
SetNoGammas can be used to inhibit writing of gammas and pi0.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 12 Feb 2002 08:53:21 +0000 (08:53 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 12 Feb 2002 08:53:21 +0000 (08:53 +0000)
EVGEN/AliGenHijing.cxx
EVGEN/AliGenHijing.h

index 1094f9739a65671d0737831254ae1a1730d33a49..ba0f5811af1023edd6643380beb6dc494504bbf2 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.37  2002/02/08 16:50:50  morsch
+Add name and title in constructor.
+
 Revision 1.36  2002/01/31 20:17:55  morsch
 Allow for triggered jets with simplified topology: Exact pT, back-to-back
 
@@ -200,6 +203,7 @@ AliGenHijing::AliGenHijing(Int_t npart)
     fEventVertex.Set(3);
 //
     SetSimpleJets();
+    SetNoGammas();
     
 //
 // Set random number generator   
@@ -339,7 +343,8 @@ void AliGenHijing::Generate()
         ks        = iparticle->GetStatusCode();
         if (kf == 92) continue;
            
-        if (!fSelectAll) selected = KinematicSelection(iparticle, 0)&&SelectFlavor(kf);
+        if (!fSelectAll) selected = KinematicSelection(iparticle, 0) && 
+                            SelectFlavor(kf);
         hasSelectedDaughters = DaughtersSelection(iparticle, particles);
 //
 // Put particle on the stack if it is either selected or it is the mother of at least one seleted particle
@@ -545,17 +550,21 @@ Bool_t AliGenHijing::SelectFlavor(Int_t pid)
 // 0: all
 // 4: charm and beauty
 // 5: beauty
-    if (fFlavor == 0) return kTRUE;
+    Bool_t res = 0;
     
-    Int_t ifl = TMath::Abs(pid/100);
+    if (fFlavor == 0) res = kTRUE;
+     Int_t ifl = TMath::Abs(pid/100);
     if (ifl > 10) ifl/=10;
-    return (fFlavor == ifl);
+    res = (fFlavor == ifl);
+    if (fNoGammas) res = res && (pid != kGamma && pid != kPi0);
+    return res;
 }
 
 Bool_t AliGenHijing::Stable(TParticle*  particle)
 {
 // Return true for a stable particle
 //
+    
     if (particle->GetFirstDaughter() < 0 )
     {
        return kTRUE;
index 72828c26c730c8fa46744aebdaf5e69e6d41cba8..5d731fbcbaf99246e658d2aed489df48a50ebcff 100644 (file)
@@ -60,7 +60,8 @@ class AliGenHijing : public AliGenMC
     virtual void    SetSpectators(Int_t spects=1)     {fSpectators = spects;}
     virtual void    SetPtJet(Float_t ptmin)           {fPtMinJet   = ptmin;}
     virtual void    SetSimpleJets(Int_t flag=0)       {fSimpleJet  = flag;}
-   
+    virtual void    SetNoGammas(Int_t flag=0)         {fNoGammas   = flag;}
+           
     virtual void    SetJetEtaRange(Float_t etamin = -20., Float_t etamax = 20.)
        {fEtaMinJet = etamin; fEtaMaxJet = etamax;}
     virtual void    SetJetPhiRange(Float_t phimin = -180., Float_t phimax = 180.)
@@ -117,6 +118,7 @@ class AliGenHijing : public AliGenMC
     Float_t     fPhiMaxJet;      // phi range
     Int_t       fRadiation;      // Flag to switch on/off initial and final state radiation
     Int_t       fSimpleJet;      // Flag to produce simple tiggered jet topology
+    Int_t       fNoGammas;       // Don't write gammas if flag "on"
     
 // ZDC proposal (by Chiara) to store num. of SPECTATORS protons and neutrons
     Int_t      fSpecn;          // Num. of spectator neutrons