Skip to content

Commit

Permalink
Merge branch 'v5-05-Rev-30-patches-markus' of http://portal.nersc.gov…
Browse files Browse the repository at this point in the history
…/project/alice/git/mfasel_AliRoot into v5-05-Rev-30-patches
  • Loading branch information
dberzano committed Jun 16, 2015
2 parents 55e1441 + 3cd5c9a commit bec8523
Show file tree
Hide file tree
Showing 15 changed files with 82 additions and 31 deletions.
2 changes: 1 addition & 1 deletion EVGEN/AliDecayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ typedef TVirtualMCDecayer AliDecayer;
#if ROOT_VERSION_CODE >= 197633 //Corresponds to Root v3-04-01
typedef enum
{
kBSemiElectronic, kSemiElectronic, kDiElectron, kBSemiMuonic, kSemiMuonic, kDiMuon, kJpsiDiMuon,
kBSemiElectronic, kSemiElectronic, kDiElectron, kBSemiMuonic, kDSemiMuonic, kSemiMuonic, kDiMuon, kJpsiDiMuon,
kBJpsiDiMuon, kBJpsiDiElectron,
kBPsiPrimeDiMuon, kBPsiPrimeDiElectron, kPiToMu, kKaToMu,
kNoDecay, kHadronicD, kHadronicDWithout4Bodies, kOmega, kLambda, kPhiKK,
Expand Down
6 changes: 3 additions & 3 deletions EVGEN/AliGenMC.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ void AliGenMC::Init()
break;
case kHardMuons:
case kBSemiMuonic:
case kDSemiMuonic:
case kSemiMuonic:
case kDiMuon:
case kJpsiDiMuon:
Expand Down Expand Up @@ -415,11 +416,10 @@ void AliGenMC::BeamCrossAngle()
// Applies a boost in the y-direction in order to take into account the
// beam crossing angle

Double_t thetaPr0, phiPr0, pyPr2, pzPr2;
Double_t thetaPr0, pyPr2, pzPr2;
TVector3 beta;

thetaPr0 = fXingAngleY / 2.;
phiPr0 = 0;

// Momentum of the CMS system
pyPr2 = TMath::Sqrt(fEnergyCMS * fEnergyCMS/ 4 - 0.938 * 0.938) * TMath::Sin(thetaPr0);
Expand Down Expand Up @@ -457,6 +457,6 @@ void AliGenMC::AddHeader(AliGenEventHeader* header)
header->SetName(fName);
fContainer->AddHeader(header);
} else {
gAlice->SetGenEventHeader(header);
if (gAlice) gAlice->SetGenEventHeader(header);
}
}
10 changes: 7 additions & 3 deletions STEER/AOD/AliAODMCParticle.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ AliVParticle(),
fVx(0),
fVy(0),
fVz(0),
fVt(0)
fVt(0),
fGeneratorIndex(-1)
{
// Default Constructor
fDaughter[0] = fDaughter[1] = 0;
Expand All @@ -67,7 +68,8 @@ AliAODMCParticle::AliAODMCParticle(const AliMCParticle* mcpart, Int_t label,Int_
fVx(mcpart->Particle()->Vx()),
fVy(mcpart->Particle()->Vy()),
fVz(mcpart->Particle()->Vz()),
fVt(mcpart->Particle()->T())
fVt(mcpart->Particle()->T()),
fGeneratorIndex(mcpart->GetGeneratorIndex())
{
// Constructor
fDaughter[0] = mcpart->GetFirstDaughter();
Expand All @@ -88,7 +90,8 @@ AliAODMCParticle::AliAODMCParticle(const AliAODMCParticle& mcPart) :
fVx(mcPart.fVx),
fVy(mcPart.fVy),
fVz(mcPart.fVz),
fVt(mcPart.fVt)
fVt(mcPart.fVt),
fGeneratorIndex(-1)
{
// Copy constructor
fDaughter[0] = mcPart.fDaughter[0];
Expand All @@ -114,6 +117,7 @@ AliAODMCParticle& AliAODMCParticle::operator=(const AliAODMCParticle& mcPart)
fVy = mcPart.fVy;
fVz = mcPart.fVz;
fVt = mcPart.fVt;
fGeneratorIndex = mcPart.fGeneratorIndex;
fDaughter[0] = mcPart.fDaughter[0];
fDaughter[1] = mcPart.fDaughter[1];
}
Expand Down
11 changes: 8 additions & 3 deletions STEER/AOD/AliAODMCParticle.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,15 @@ class AliAODMCParticle: public AliVParticle {
virtual Int_t GetNDaughters () const { return fDaughter[1]>0 ? fDaughter[1]-fDaughter[0]+1 : (fDaughter[0]>0 ? 1:0 ) ;}
virtual void SetMother(Int_t im){fMother = im;}
virtual Int_t GetMother() const {return fMother;}

virtual Int_t GetFirstDaughter() const {return fDaughter[0];}
virtual Int_t GetLastDaughter() const {return fDaughter[1];}

virtual void Print(const Option_t *opt = "") const;
virtual Int_t GetPdgCode() const { return fPdgCode;}
virtual Int_t PdgCode() const { return GetPdgCode();}

virtual void SetGeneratorIndex(Short_t i) {fGeneratorIndex = i;}
virtual Short_t GetGeneratorIndex() const {return fGeneratorIndex;}
enum { kPrimary = 1<<0, kPhysicalPrim = 1<<1, kSecondaryFromWeakDecay = 1<<2, kSecondaryFromMaterial = 1 <<3}; // use only the first 8bits!
void SetFlag(UInt_t flag){fFlag = flag;} // carefull flag encodes three different types of information
UInt_t GetFlag() const {return fFlag;}
Expand Down Expand Up @@ -152,7 +157,7 @@ class AliAODMCParticle: public AliVParticle {
Double32_t fVy; // [0.,0.,12] y of production vertex
Double32_t fVz; // [0.,0.,12] z of production vertex
Double32_t fVt; // [0.,0.,12] t of production vertex

Short_t fGeneratorIndex; //! Index of generator in cocktail
// Copy the uniquID to another data member? unique ID is correctly handled
// via TOBject Copy construct but not by AliVParticle ctor (no passing of
// TParticles
Expand All @@ -170,7 +175,7 @@ class AliAODMCParticle: public AliVParticle {
};
*/

ClassDef(AliAODMCParticle,7) // AliVParticle realisation for AODMCParticles
ClassDef(AliAODMCParticle,8) // AliVParticle realisation for AODMCParticles

};

Expand Down
10 changes: 7 additions & 3 deletions STEER/STEERBase/AliGenPythiaEventHeader.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ AliGenPythiaEventHeader::AliGenPythiaEventHeader():
fTrials(0),
fNJets(0),
fNUQJets(0),
fNMPI(0),
fXJet(-1.),
fYJet(-1.),
fInMediumLength(0.),
fImpactParameter(-1),
fPtHard(0.)
fPtHard(0.),
fXsection(0)
{
// Default Constructor
for (Int_t i = 0; i < 4; i++) fZquench[i] = 0.;
Expand All @@ -44,12 +46,14 @@ AliGenPythiaEventHeader::AliGenPythiaEventHeader(const char* name):
fProcessType(0),
fTrials(0),
fNJets(0),
fNUQJets(0),
fNUQJets(0),
fNMPI(0),
fXJet(-1.),
fYJet(-1.),
fInMediumLength(0.),
fImpactParameter(-1),
fPtHard(0.)
fPtHard(0.),
fXsection(0)
{
// Constructor
for (Int_t i = 0; i < 4; i++) fZquench[i] = 0.;
Expand Down
9 changes: 6 additions & 3 deletions STEER/STEERBase/AliGenPythiaEventHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class AliGenPythiaEventHeader : public AliGenEventHeader
virtual ~AliGenPythiaEventHeader() {}
// Getters
Int_t ProcessType() const {return fProcessType;}
void SetNMPI(Int_t mpi) {fNMPI = mpi;}
// Setters
void SetProcessType(Int_t type) {fProcessType = type;}
Int_t Trials() const {return fTrials;}
Expand All @@ -40,12 +41,14 @@ class AliGenPythiaEventHeader : public AliGenEventHeader
Float_t GetPtHard() const {return fPtHard;}
void SetXsection(Float_t xsec) {fXsection = xsec;}
Float_t GetXsection() const {return fXsection;}
Int_t GetNMPI() const {return fNMPI;}

protected:
Int_t fProcessType; // PYTHIA process id for this event
Int_t fTrials; // Number of trials to fulfill trigger condition
Int_t fNJets; // Number of triggered jets
Int_t fNUQJets; // Number of unquenched
Int_t fNUQJets; // Number of unquenched jets
Int_t fNMPI; // numbers of MPI
Double_t fXJet; // Jet production point (x)
Double_t fYJet; // Jet production point (y)
Double_t fInMediumLength; // In medium length
Expand All @@ -54,9 +57,9 @@ class AliGenPythiaEventHeader : public AliGenEventHeader
Float_t fUQJets[4][10]; // Unquenched trigger jets
Double_t fZquench[4]; // Quenching fraction
Float_t fPtHard; // pT hard
Float_t fXsection; //Cross-section
Float_t fXsection; // Cross-section

ClassDef(AliGenPythiaEventHeader,7) // Event header for Pythia event
ClassDef(AliGenPythiaEventHeader,8) // Event header for Pythia event
};


Expand Down
27 changes: 27 additions & 0 deletions STEER/STEERBase/AliMCEvent.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,33 @@ Bool_t AliMCEvent::IsFromBGEvent(Int_t index)
TString empty="";
return empty;}

void AliMCEvent::AssignGeneratorIndex() {
//
// Assign the generator index to each particle
//
TList* list;
Int_t nt = GetCocktailList(list);
if (nt == 0) {
} else {
Int_t nh = list->GetEntries();
Int_t nsumpart = 0;
for(Int_t i = 0; i < nh; i++){
AliGenEventHeader* gh = (AliGenEventHeader*)list->At(i);
Int_t npart = gh->NProduced();
for (Int_t j = nsumpart; j < npart; j++) {
AliVParticle* part = GetTrack(j);
part->SetGeneratorIndex(i);
Int_t dmin = part->GetFirstDaughter();
Int_t dmax = part->GetLastDaughter();
for (Int_t k = dmin; k <= dmax; k++) {
AliVParticle* dpart = GetTrack(k);
dpart->SetGeneratorIndex(i);
}
}
nsumpart += npart;
}
}
}


Bool_t AliMCEvent::GetCocktailGenerator(Int_t index,TString &nameGen){
Expand Down
4 changes: 2 additions & 2 deletions STEER/STEERBase/AliMCEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ class AliMCEvent : public AliVEvent {
virtual void SetExternalHeader(AliVHeader* aodmcHeader)
{fAODMCHeader=aodmcHeader;}
virtual AliGenEventHeader *FindHeader(Int_t ipart);
virtual void AssignGeneratorIndex();
//Following needed only for mixed event
virtual Int_t EventIndex(Int_t) const {return 0;}
virtual Int_t EventIndexForCaloCluster(Int_t) const {return 0;}
Expand All @@ -151,7 +152,7 @@ class AliMCEvent : public AliVEvent {

virtual AliVVZERO *GetVZEROData() const {return 0;}
virtual AliVZDC *GetZDCData() const {return 0;}


private:
virtual void ReorderAndExpandTreeTR();
Expand Down Expand Up @@ -179,7 +180,6 @@ class AliMCEvent : public AliVEvent {
static Int_t fgkBgLabelOffset; // Standard branch name
mutable AliVVertex* fVertex; // MC Vertex
Int_t fNBG; //! Background particles in current event

ClassDef(AliMCEvent, 2) // AliVEvent realisation for MC data
};

Expand Down
9 changes: 6 additions & 3 deletions STEER/STEERBase/AliMCParticle.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ AliMCParticle::AliMCParticle():
fLabel(-1),
fMother(-1),
fFirstDaughter(-1),
fLastDaughter(-1)
fLastDaughter(-1),
fGeneratorIndex(-1)
{
// Constructor
}
Expand All @@ -51,7 +52,8 @@ AliMCParticle::AliMCParticle(TParticle* part, TObjArray* rarray, Int_t index):
fLabel(index),
fMother(-1),
fFirstDaughter(-1),
fLastDaughter(-1)
fLastDaughter(-1),
fGeneratorIndex(-1)
{
// Constructor
if (rarray != 0) {
Expand All @@ -68,7 +70,8 @@ AliMCParticle::AliMCParticle(const AliMCParticle& mcPart) :
fLabel(-1),
fMother(-1),
fFirstDaughter(-1),
fLastDaughter(-1)
fLastDaughter(-1),
fGeneratorIndex(-1)
{
// Copy constructor
}
Expand Down
6 changes: 4 additions & 2 deletions STEER/STEERBase/AliMCParticle.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ class AliMCParticle: public AliVParticle {
void SetFirstDaughter(Int_t idx) {fFirstDaughter = idx;}
void SetLastDaughter(Int_t idx) {fLastDaughter = idx;}
void SetLabel(Int_t label) {fLabel = label;}

virtual void SetGeneratorIndex(Short_t i) {fGeneratorIndex = i;}
virtual Short_t GetGeneratorIndex() const {return fGeneratorIndex;}

private:
TParticle *fParticle; // The wrapped TParticle
TObjArray *fTrackReferences; // Array to track references
Expand All @@ -84,7 +86,7 @@ class AliMCParticle: public AliVParticle {
Int_t fMother; // Mother particles
Int_t fFirstDaughter; // First daughter
Int_t fLastDaughter; // LastDaughter

Short_t fGeneratorIndex; // !Generator index in cocktail
ClassDef(AliMCParticle,0) // AliVParticle realisation for MCParticles
};

Expand Down
9 changes: 6 additions & 3 deletions STEER/STEERBase/AliVParticle.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,13 @@ class AliVParticle: public TObject {
Bool_t Local2GlobalPosition(Double_t r[3], Double_t alpha) const;
Bool_t Global2LocalMomentum(Double_t p[3], Short_t charge, Double_t &alpha) const;
Bool_t Global2LocalPosition(Double_t r[3], Double_t alpha) const;
//Navigation
virtual Int_t GetMother() const {return -1;}


//Navigation
virtual Int_t GetMother() const {return -1;}
virtual Int_t GetFirstDaughter() const {return -1;}
virtual Int_t GetLastDaughter() const {return -1;}
virtual void SetGeneratorIndex(Short_t) {;}
virtual Short_t GetGeneratorIndex() const {return -1;}
ClassDef(AliVParticle, 3) // base class for particles
};

Expand Down
2 changes: 1 addition & 1 deletion TEvtGen/CMakelibEvtGenExternal.pkg
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ set (EVTGEN_TAUOLA "ON")
set ( CXXFLAGS "${CXXFLAGS} -D EVTGEN_PYTHIA -D EVTGEN_PHOTOS -D EVTGEN_TAUOLA")


set ( EINCLUDE TEvtGen EVGEN TEvtGen/Photos TEvtGen/Tauola TEvtGen/HepMC/ PYTHIA8)
set ( EINCLUDE TEvtGen EVGEN TEvtGen/Photos TEvtGen/Tauola TEvtGen/HepMC/ PYTHIA8 PYTHIA8/pythia8205/include)


2 changes: 1 addition & 1 deletion TEvtGen/EvtGenExternal/EvtPythiaEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "EvtGenExternal/EvtPythia6CommandConverter.hh"

//#include "Pythia8/Event.h"
#include "pythia8175/include/Event.h"
#include "pythia8205/include/Pythia8/Event.h"

#include <iostream>
#include <sstream>
Expand Down
4 changes: 2 additions & 2 deletions TEvtGen/EvtGenExternal/EvtPythiaEngine.hh
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@

//#include "Pythia8/Pythia.h"
//#include "Pythia8/ParticleData.h"
#include "pythia8175/include/Pythia.h"
#include "pythia8175/include/ParticleData.h"
#include "pythia8205/include/Pythia8/Pythia.h"
#include "pythia8205/include/Pythia8/ParticleData.h"

#include <string>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion TEvtGen/EvtGenExternal/EvtPythiaRandom.hh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "EvtGenBase/EvtRandom.hh"

//#include "Pythia8/Basics.h"
#include "pythia8175/include/Basics.h"
#include "pythia8205/include/Pythia8/Basics.h"

class EvtPythiaRandom : public Pythia8::RndmEngine {

Expand Down

0 comments on commit bec8523

Please sign in to comment.