Possibility to force transport of all particles.
[u/mrichter/AliRoot.git] / EVGEN / AliGenCorrHF.cxx
index bf7dcc35b1577c99265b1d7fe650d720b317ed0d..22bdd1bcdc588fa7055b5ac542de6445d2d4f7af 100644 (file)
@@ -132,6 +132,7 @@ Double_t AliGenCorrHF::fgptbmax[12] = {0.5, 1, 1.5, 2, 2.5, 3, 4, 5, 6, 7, 9, 10
        fEnergy(0),
        fBias(0.),
        fTrials(0),
+       fSelectAll(kFALSE),
        fDecayer(0),
        fgIntegral(0)
 {
@@ -147,7 +148,7 @@ AliGenCorrHF::AliGenCorrHF(Int_t npart, Int_t idquark, Int_t energy):
     fEnergy(energy),
     fBias(0.),
     fTrials(0),
-    //    fDecayer(new AliDecayerPythia())
+    fSelectAll(kFALSE),
     fDecayer(0),
     fgIntegral(0)
 {
@@ -202,7 +203,7 @@ AliGenCorrHF::AliGenCorrHF(char* tname, Int_t npart, Int_t idquark, Int_t energy
     fEnergy(energy),
     fBias(0.),
     fTrials(0),
-    //    fDecayer(new AliDecayerPythia())
+    fSelectAll(kFALSE),
     fDecayer(0),
     fgIntegral(0)
 {
@@ -487,7 +488,7 @@ void AliGenCorrHF::Generate()
            //
            // 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();
@@ -681,9 +682,9 @@ void AliGenCorrHF::GetHadronPair(TFile* fG, Int_t idq, Double_t y1, Double_t y2,
     char tag[100]; 
     TH2F *h2h[12], *h2s[12], *hProbHH; // hard & soft fragmentation and HH-probability functions
     for (Int_t ipt = 0; ipt<fgnptbins; ipt++) { 
-      sprintf(tag,"h2h_pt%d",ipt); 
+      snprintf(tag,100, "h2h_pt%d",ipt); 
       h2h[ipt] = (TH2F*) fG->Get(tag); 
-      sprintf(tag,"h2s_pt%d",ipt); 
+      snprintf(tag,100, "h2s_pt%d",ipt); 
       h2s[ipt] = (TH2F*) fG->Get(tag); 
     }