fDPMjet(0),
fNoGammas(0),
fLHC(0),
- fPi0Decay(0),
+ fPi0Decay(1),
fDecayAll(0),
fGenImpPar(0.),
- fProcess(kDpmMb)
+ fProcess(kDpmMb),
+ fTriggerMultiplicity(0),
+ fTriggerMultiplicityEta(0),
+ fTriggerMultiplicityPtMin(0)
{
// Constructor
fEnergyCMS = 5500.;
fDPMjet(0),
fNoGammas(0),
fLHC(0),
- fPi0Decay(0),
+ fPi0Decay(1),
fDecayAll(0),
fGenImpPar(0.),
- fProcess(kDpmMb)
+ fProcess(kDpmMb),
+ fTriggerMultiplicity(0),
+ fTriggerMultiplicityEta(0),
+ fTriggerMultiplicityPtMin(0)
{
// Default PbPb collisions at 5. 5 TeV
//
fDPMjet(0),
fNoGammas(0),
fLHC(0),
- fPi0Decay(0),
+ fPi0Decay(1),
fDecayAll(0),
fGenImpPar(0.),
- fProcess(kDpmMb)
+ fProcess(kDpmMb),
+ fTriggerMultiplicity(0),
+ fTriggerMultiplicityEta(0),
+ fTriggerMultiplicityPtMin(0)
{
// Dummy copy constructor
fEnergyCMS = 5500.;
{
// Generate one event
- Float_t polar[3] = {0,0,0};
- Float_t origin[3] = {0,0,0};
- Float_t p[3];
+ Double_t polar[3] = {0,0,0};
+ Double_t origin[3] = {0,0,0};
+ Double_t p[4] = {0};
Float_t tof;
// converts from mm/c to s
fSpecp = 0;
// --------------------------------------------------------------------------
fDPMjet->GenerateEvent();
+
fTrials++;
fDPMjet->ImportParticles(&fParticles,"All");
// Temporaneo
fGenImpPar = fDPMjet->GetBImpac();
-
+
+ if(TMath::Abs(fXingAngleY) > 1.e-10) BeamCrossAngle();
+
Int_t np = fParticles.GetEntriesFast();
- printf("\n **************************************************%d\n",np);
- Int_t nc=0;
- if (np==0) continue;
+ //
+ // Multiplicity Trigger
+ if (fTriggerMultiplicity > 0) {
+ Int_t multiplicity = 0;
+ for (Int_t i = 0; i < np; i++) {
+ TParticle * iparticle = (TParticle *) fParticles.At(i);
+
+ Int_t statusCode = iparticle->GetStatusCode();
+
+ // Initial state particle
+ if (statusCode != 1)
+ continue;
+ // eta cut
+ if (fTriggerMultiplicityEta > 0 && TMath::Abs(iparticle->Eta()) > fTriggerMultiplicityEta)
+ continue;
+ // pt cut
+ if (iparticle->Pt() < fTriggerMultiplicityPtMin)
+ continue;
+
+ TParticlePDG* pdgPart = iparticle->GetPDG();
+ if (pdgPart && pdgPart->Charge() == 0)
+ continue;
+ ++multiplicity;
+ }
+ //
+ //
+ if (multiplicity < fTriggerMultiplicity) continue;
+ Printf("Triggered on event with multiplicity of %d >= %d", multiplicity, fTriggerMultiplicity);
+ }
+
+ Int_t nc = 0;
+ if (np == 0) continue;
+
Int_t i;
Int_t* newPos = new Int_t[np];
Int_t* pSelected = new Int_t[np];
if (!fSelectAll) selected = KinematicSelection(iparticle, 0) &&
SelectFlavor(kf);
+
+
hasSelectedDaughters = DaughtersSelection(iparticle);
+
// Put particle on the stack if it is either selected or
// it is the mother of at least one seleted particle
p[0] = iparticle->Px();
p[1] = iparticle->Py();
p[2] = iparticle->Pz();
+ p[3] = iparticle->Energy();
origin[0] = fVertex[0]+iparticle->Vx()/10; // [cm]
origin[1] = fVertex[1]+iparticle->Vy()/10; // [cm]
origin[2] = fVertex[2]+iparticle->Vz()/10; // [cm]
imo = (mother->GetPdgCode() != 92 && mother->GetPdgCode() != 99999) ? newPos[imo] : -1;
} // if has mother
+
+
Bool_t tFlag = (fTrackIt && (ks == 1));
- PushTrack(tFlag,imo,kf,p,origin,polar,tof,kPNoProcess,nt, 1., ks);
+ PushTrack(tFlag, imo, kf,
+ p[0], p[1], p[2], p[3],
+ origin[0], origin[1], origin[2], tof,
+ polar[0], polar[1], polar[2],
+ kPNoProcess, nt, 1., ks);
KeepTrack(nt);
newPos[i] = nt;
} // if selected
//______________________________________________________________________________
void AliGenDPMjet::MakeHeader()
{
+ printf("MakeHeader %13.3f \n", fDPMjet->GetBImpac());
// Builds the event header, to be called after each event
AliGenEventHeader* header = new AliGenDPMjetEventHeader("DPMJET");
((AliGenDPMjetEventHeader*) header)->SetNProduced(fDPMjet->GetNumStablePc());
((AliGenDPMjetEventHeader*) header)->SetImpactParameter(fDPMjet->GetBImpac());
((AliGenDPMjetEventHeader*) header)->SetTotalEnergy(fDPMjet->GetTotEnergy());
- ((AliGenDPMjetEventHeader*) header)->SetParticipants(fDPMjet->GetfIp(),
- fDPMjet->GetfIt());
- ((AliGenDPMjetEventHeader*) header)->SetProcessType(fDPMjet->GetProcessCode());
-// Bookkeeping for kinematic bias
+ ((AliGenDPMjetEventHeader*) header)->SetParticipants(fDPMjet->GetProjParticipants(),
+ fDPMjet->GetTargParticipants());
+ ((AliGenDPMjetEventHeader*) header)->SetProcessType(fDPMjet->GetProcessCode());
+ // Bookkeeping for kinematic bias
((AliGenDPMjetEventHeader*) header)->SetTrials(fTrials);
-// Event Vertex
+ // Event Vertex
header->SetPrimaryVertex(fVertex);
gAlice->SetGenEventHeader(header);
AddHeader(header);
if (fContainer) {
fContainer->AddHeader(header);
} else {
- AliRunLoader::GetRunLoader()->GetHeader()->SetGenEventHeader(header);
+ AliRunLoader::Instance()->GetHeader()->SetGenEventHeader(header);
}
}