for (j=0; j < 3; j++) origin0[j] = fVertex[j];
}
+
+ Float_t sign = (fRandomPz && (Rndm() < 0.5))? -1. : 1.;
while(1)
{
// Generate one event
// --------------------------------------------------------------------------
fProjectileSpecn = 0;
fProjectileSpecp = 0;
- fTargetSpecn = 0;
- fTargetSpecp = 0;
+ fTargetSpecn = 0;
+ fTargetSpecp = 0;
// --------------------------------------------------------------------------
fHijing->GenerateEvent();
fTrials++;
ks = iparticle->GetStatusCode();
p[0] = iparticle->Px();
p[1] = iparticle->Py();
- p[2] = iparticle->Pz();
+ p[2] = iparticle->Pz() * sign;
origin[0] = origin0[0]+iparticle->Vx()/10;
origin[1] = origin0[1]+iparticle->Vy()/10;
origin[2] = origin0[2]+iparticle->Vz()/10;
virtual void SetJetPhiRange(Float_t phimin = -180., Float_t phimax = 180.)
{fPhiMinJet = TMath::Pi()*phimin/180.; fPhiMaxJet = TMath::Pi()*phimax/180.;}
virtual void SetBoostLHC(Int_t flag = 0) {fLHC = flag;}
+ virtual void SetRandomPz(Bool_t flag = 0) {fRandomPz = flag;}
// Getters
virtual Float_t GetEnergyCMS() const {return fEnergyCMS;}
virtual TString GetReferenceFrame() const {return fFrame;}
Int_t fTargetSpecn; // Num. of spectator neutrons from target nucleus
Int_t fTargetSpecp; // Num. of spectator protons from target nucleus
Int_t fLHC; // Assume LHC as lab frame
+ Int_t fRandomPz; // Randomise sign of pz event by event
private:
void Copy(TObject &rhs) const;
// adjust the weight from kinematic cuts