fBias(0.),
fTrials(0),
fDeltaPt(0.01),
+ fSelectAll(kFALSE),
fDecayer(0)
{
// Default constructor
}
//____________________________________________________________
-AliGenParam::AliGenParam(Int_t npart, AliGenLib * Library, Int_t param, char* tname)
+AliGenParam::AliGenParam(Int_t npart, const AliGenLib * Library, Int_t param, const char* tname)
:AliGenMC(npart),
fPtParaFunc(Library->GetPt(param, tname)),
fYParaFunc (Library->GetY (param, tname)),
fBias(0.),
fTrials(0),
fDeltaPt(0.01),
+ fSelectAll(kFALSE),
fDecayer(0)
{
// Constructor using number of particles parameterisation id and library
fBias(0.),
fTrials(0),
fDeltaPt(0.01),
+ fSelectAll(kFALSE),
fDecayer(0)
{
// Constructor using parameterisation id and number of particles
fBias(0.),
fTrials(0),
fDeltaPt(0.01),
+ fSelectAll(kFALSE),
fDecayer(0)
{
// Constructor
*/
//End_Html
char name[256];
- sprintf(name, "pt-parameterisation for %s", GetName());
+ snprintf(name, 256, "pt-parameterisation for %s", GetName());
if (fPtPara) fPtPara->Delete();
fPtPara = new TF1(name, fPtParaFunc, fPtMin, fPtMax,0);
fPtPara->SetNpx(npx);
- sprintf(name, "y-parameterisation for %s", GetName());
+ snprintf(name, 256, "y-parameterisation for %s", GetName());
if (fYPara) fYPara->Delete();
fYPara = new TF1(name, fYParaFunc, fYMin, fYMax, 0);
gROOT->GetListOfFunctions()->Remove(fYPara);
- sprintf(name, "pt-for-%s", GetName());
+ snprintf(name, 256, "pt-for-%s", GetName());
TF1 ptPara(name ,fPtParaFunc, 0, 15, 0);
- sprintf(name, "y-for-%s", GetName());
+ snprintf(name, 256, "y-for-%s", GetName());
TF1 yPara(name, fYParaFunc, -6, 6, 0);
//
if (np >1) {
decayed = kTRUE;
- TParticle* iparticle = (TParticle *) particles->At(0);
+ TParticle* iparticle = 0;
Int_t ipF, ipL;
for (i = 1; i<np ; i++) {
trackIt[i] = 1;
//
// children
- if ((ChildSelected(TMath::Abs(kf)) || fForceDecay == kAll) && trackIt[i])
+ if ((ChildSelected(TMath::Abs(kf)) || fForceDecay == kAll || fSelectAll) && trackIt[i])
{
if (fCutOnChild) {
pc[0]=iparticle->Px();