]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Method SetTriggerParticle added.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 16 Mar 2006 09:35:29 +0000 (09:35 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 16 Mar 2006 09:35:29 +0000 (09:35 +0000)
Obsolete printf's removed.

PYTHIA6/AliGenPythia.cxx
PYTHIA6/AliGenPythia.h

index 0a90e0bd8fdb97f8e601be2d559a97322e5ec9bd..9d4b0b114ea57883c3162de3b8c4a746d4ddd7e4 100644 (file)
@@ -65,6 +65,7 @@ AliGenPythia::AliGenPythia()
   SetJetEtRange();
   SetGammaPhiRange();
   SetGammaEtaRange();
+  SetTriggerParticle();
   SetPtKick();
   SetQuench();
   SetHadronisation();  
@@ -111,6 +112,7 @@ AliGenPythia::AliGenPythia(Int_t npart)
     SetJetEtRange();
     SetGammaPhiRange();
     SetGammaEtaRange();
+    SetTriggerParticle();
     SetJetReconstructionMode();
     SetQuench();
     SetHadronisation();
@@ -668,8 +670,6 @@ void AliGenPythia::Generate()
          }
            if (jev >= fNpart || fNpart == -1) {
                fKineBias=Float_t(fNpart)/Float_t(fTrials);
-               printf("\n Trials: %i %i %i\n",fTrials, fNpart, jev);
-
                fQ  += fPythia->GetVINT(51);
                fX1 += fPythia->GetVINT(41);
                fX2 += fPythia->GetVINT(42);
@@ -700,8 +700,6 @@ Int_t  AliGenPythia::GenerateMB()
 //  converts from mm/c to s
     const Float_t kconv=0.001/2.999792458e8;
     
-
-    
     Int_t np = (fHadronisation) ? fParticles->GetEntriesFast() : fNpartons;
 
 
@@ -713,6 +711,20 @@ Int_t  AliGenPythia::GenerateMB()
        if (!CheckTrigger(jet1, jet2)) return 0;
     }
     
+    if (fTriggerParticle) {
+       Bool_t triggered = kFALSE;
+       for (i = 0; i < np; i++) {
+           TParticle *  iparticle = (TParticle *) fParticles->At(i);
+           kf = CheckPDGCode(iparticle->GetPdgCode());
+           if (TMath::Abs(kf) != fTriggerParticle) continue;
+           if (iparticle->Pt() == 0.) continue;
+           if (TMath::Abs(iparticle->Eta()) > fTriggerEta) continue;
+           triggered = kTRUE;
+           break;
+       }
+       if (!triggered) return 0;
+    }
+    
 
     //Introducing child cuts in case kPyW, kPyZ, kPyMb, and kPyMbNonDiff
     if ( (fProcess == kPyW || fProcess == kPyZ || fProcess == kPyMb || fProcess == kPyMbNonDiffr)  
@@ -724,6 +736,7 @@ Int_t  AliGenPythia::GenerateMB()
     }
   
 
+    
     for (i = 0; i < np; i++) {
        Int_t trackIt = 0;
        TParticle *  iparticle = (TParticle *) fParticles->At(i);
@@ -780,8 +793,6 @@ Int_t  AliGenPythia::GenerateMB()
     } // particle loop 
 
     if (pParent) delete[] pParent;
-    
-    printf("\n I've put %i particles on the stack \n",nc);
     return 1;
 }
 
index 7e307a7227f7a5989ccee877fe177de318aa21d1..a8d3f24cfd5807dab694acbb8395ac8b044932f2 100644 (file)
@@ -76,6 +76,10 @@ class AliGenPythia : public AliGenMC
        {fEtaMinGamma = etamin; fEtaMaxGamma = etamax;}
     virtual void    SetGammaPhiRange(Float_t phimin = 0., Float_t phimax = 360.)
        {fPhiMinGamma = TMath::Pi()*phimin/180.; fPhiMaxGamma = TMath::Pi()*phimax/180.;}
+
+    // Trigger on a particle
+    virtual void    SetTriggerParticle(Int_t particle = 0, Float_t etamax = 0.9) 
+       {fTriggerParticle = particle; fTriggerEta = etamax;}
     // Set option for feed down from higher family
     virtual void SetFeedDownHigherFamily(Bool_t opt) {
       fFeedDownOpt = opt;
@@ -201,12 +205,13 @@ class AliGenPythia : public AliGenMC
                                     // parents and their decays
     Bool_t fFeedDownOpt;            // Option to set feed down from higher
                                     // quark families (e.g. b->c)
-    Bool_t fFragmentation;          // Option to activate fragmentation by Pythia
-    Bool_t fSetNuclei;              // Flag indicating that SetNuclei has been called
-    Bool_t fNewMIS;                 // Flag for the new multipple interactions scenario
-    Bool_t fHFoff;                  // Flag for switching heafy flavor production off 
+    Bool_t  fFragmentation;          // Option to activate fragmentation by Pythia
+    Bool_t  fSetNuclei;              // Flag indicating that SetNuclei has been called
+    Bool_t  fNewMIS;                 // Flag for the new multipple interactions scenario
+    Bool_t  fHFoff;                  // Flag for switching heafy flavor production off
+    Int_t   fTriggerParticle;        // Trigger on this particle ...
+    Float_t fTriggerEta;             // .. within |eta| < fTriggerEta
     //
-
     CountMode_t fCountMode;            // Options for counting when the event will be finished.
     AliGenPythiaEventHeader* fHeader;  //! Event header
     AliRunLoader*            fRL;      //! Run Loader