Clean-up. Call to ConnectTree to store correctly the stack
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 1 Aug 2007 13:51:08 +0000 (13:51 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 1 Aug 2007 13:51:08 +0000 (13:51 +0000)
test/genkine/gen/fastGen.C

index 9be11ce1b4c57e2d2f7f3d13c7b458a3a295f1e5..6a0c68a30f724334cb414bfdb4ac4b85d5539f5d 100644 (file)
@@ -28,7 +28,7 @@ void GetFinalDecayProducts(Int_t ind, AliStack & stack , TArrayI & ar);
 void fastGen(Int_t nev = 1, char* filename = "galice.root")
 {
   AliPDG::AddParticlesToPdgDataBase();
-  TDatabasePDG*  pPdg = TDatabasePDG::Instance();
+  TDatabasePDG::Instance();
  
 
 
@@ -102,7 +102,6 @@ void fastGen(Int_t nev = 1, char* filename = "galice.root")
     //  Generate event
     Int_t nprim = 0;
     Int_t ntrial = 0;
-    Int_t minmult = 1000;
     Int_t ndstar = 0;
    
    
@@ -110,9 +109,9 @@ void fastGen(Int_t nev = 1, char* filename = "galice.root")
     //-------------------------------------------------------------------------------------
 
     while(!ndstar) {
-      // Selection of events with multiplicity
-      // bigger than "minmult"
+      // Selection of events with D*
       stack->Reset();
+      stack->ConnectTree(rl->TreeK());
       gener->Generate();
       ntrial++;
       nprim = stack->GetNprimary();
@@ -176,8 +175,6 @@ void fastGen(Int_t nev = 1, char* filename = "galice.root")
   //                         Termination
   //  Generator
   gener->FinishRun();
-  //  Stack
-  stack->FinishRun();
   //  Write file
   rl->WriteHeader("OVERWRITE");
   gener->Write();