/*
$Log$
+Revision 1.45 2001/11/28 08:06:52 morsch
+Use fMaxLifeTime parameter.
+
Revision 1.44 2001/11/27 13:13:07 morsch
Maximum lifetime for long-lived particles to be put on the stack is parameter.
It can be set via SetMaximumLifetime(..).
// Default Constructor
fParticles = 0;
fPythia = 0;
- fDecayer = new AliDecayerPythia();
+ fDecayer = new AliDecayerPythia();
SetEventListRange();
+ SetJetPhiRange();
+ SetJetEtaRange();
}
AliGenPythia::AliGenPythia(Int_t npart)
fDecayer = new AliDecayerPythia();
// Set random number generator
sRandom=fRandom;
- SetEventListRange();
fFlavorSelect = 0;
// Produced particles
fParticles = new TClonesArray("TParticle",1000);
fEventVertex.Set(3);
+ SetEventListRange();
+ SetJetPhiRange();
+ SetJetEtaRange();
}
AliGenPythia::AliGenPythia(const AliGenPythia & Pythia)
Int_t np = fParticles->GetEntriesFast();
Int_t* pParent = new Int_t[np];
for (i=0; i< np-1; i++) pParent[i] = -1;
-
+ if (fProcess == kPyJets) {
+ TParticle* jet1 = (TParticle *) fParticles->At(6);
+ TParticle* jet2 = (TParticle *) fParticles->At(7);
+ if (!CheckTrigger(jet1, jet2)) return 0;
+ }
+
for (i = 0; i<np-1; i++) {
Int_t trackIt = 0;
TParticle * iparticle = (TParticle *) fParticles->At(i);
gAlice->SetGenEventHeader(header);
}
+
+Bool_t AliGenPythia::CheckTrigger(TParticle* jet1, TParticle* jet2)
+{
+// Check the kinematic trigger condition
+//
+ Double_t eta1 = jet1->Eta();
+ Double_t eta2 = jet2->Eta();
+ Double_t phi1 = jet1->Phi();
+ Double_t phi2 = jet2->Phi();
+ Bool_t triggered = kFALSE;
+ //Check eta range first...
+ if ((eta1 < fEtaMaxJet && eta1 > fEtaMinJet) ||
+ (eta2 < fEtaMaxJet && eta2 > fEtaMinJet))
+ {
+ //Eta is okay, now check phi range
+ if ((phi1 < fPhiMaxJet && phi1 > fPhiMinJet) ||
+ (phi2 < fPhiMaxJet && phi2 > fPhiMinJet))
+ {
+ triggered = kTRUE;
+ }
+ }
+ return triggered;
+}
AliGenPythia& AliGenPythia::operator=(const AliGenPythia& rhs)
{
virtual void SetEnergyCMS(Float_t energy = 5500) {fEnergyCMS = energy;}
// treat protons as inside nuclei
virtual void SetNuclei(Int_t a1, Int_t a2);
+ 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.)
+ {fPhiMinJet = TMath::Pi()*phimin/180.; fPhiMaxJet = TMath::Pi()*phimax/180.;}
// get cross section of process
virtual Float_t GetXsection() {return fXsection;}
virtual void FinishRun();
+ Bool_t CheckTrigger(TParticle* jet1, TParticle* jet2);
// Assignment Operator
AliGenPythia & operator=(const AliGenPythia & rhs);
AliDecayer *fDecayer; //!Pointer to the decayer instance
Int_t fDebugEventFirst; //!First event to debug
Int_t fDebugEventLast; //!Last event to debug
+ Float_t fEtaMinJet; // Minimum eta of triggered Jet
+ Float_t fEtaMaxJet; // Maximum eta of triggered Jet
+ Float_t fPhiMinJet; // At least one of triggered Jets must be in this
+ Float_t fPhiMaxJet; // phi range
+
private:
// adjust the weight from kinematic cuts
void AdjustWeights();