]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Obsolete. Use AliGenExtFile with AliGenReaderTreeK instead.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 9 Nov 2001 09:17:16 +0000 (09:17 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 9 Nov 2001 09:17:16 +0000 (09:17 +0000)
STEER/AliGenKine.cxx [deleted file]
STEER/AliGenKine.h [deleted file]

diff --git a/STEER/AliGenKine.cxx b/STEER/AliGenKine.cxx
deleted file mode 100644 (file)
index 7df75c0..0000000
+++ /dev/null
@@ -1,149 +0,0 @@
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- *                                                                        *
- * Author: The ALICE Off-line Project.                                    *
- * Contributors are mentioned in the code where appropriate.              *
- *                                                                        *
- * Permission to use, copy, modify and distribute this software and its   *
- * documentation strictly for non-commercial purposes is hereby granted   *
- * without fee, provided that the above copyright notice appears in all   *
- * copies and that both the copyright notice and this permission notice   *
- * appear in the supporting documentation. The authors make no claims     *
- * about the suitability of this software for any purpose. It is          *
- * provided "as is" without express or implied warranty.                  *
- **************************************************************************/
-
-/*
-$Log$
-*/
-
-#include <iostream.h>
-
-#include "AliGenKine.h"
-#include "AliMCProcess.h"
-#include "AliMC.h"
-#include "AliRun.h"
-#include "AliStack.h"
-
-#include <TROOT.h>
-#include <TTree.h>
-#include <TDirectory.h>
-#include <TDatabasePDG.h>
-#include <TFile.h>
-#include <TH1.h>
-#include <TArrayI.h>
-#include <TClonesArray.h>
-#include <TObjArray.h>
-#include <TParticle.h>
-#include <stdlib.h>
-
- ClassImp(AliGenKine)
-     AliGenKine::AliGenKine()
-        :AliGenerator(-1)
-{
-//  Constructor
-    fName           = "Kine";
-    fTitle          = "Primaries from ext. File";
-    fFileName       = NULL;
-    fStack          = 0;
-    fNcurrent       = 0;
-//
-//  Read all particles
-    fNpart       = -1;
-    fFile        =  0;
-    fBaseFile    =  0;
-}
-
-AliGenKine::AliGenKine(Int_t npart)
-    :AliGenerator(npart)
-{
-//  Constructor
-    fName           = "Kine";
-    fTitle          = "Primaries from ext. File";
-    fFileName       = NULL;
-    fStack          = 0;
-    fNcurrent       = 0;
-    fFile           = 0;
-    fBaseFile       = 0;
-}
-
-//____________________________________________________________
-AliGenKine::~AliGenKine()
-{
-// Destructor
-    
-}
-
-//____________________________________________________________
-
-//____________________________________________________________
-void AliGenKine::Generate()
-{
-    Float_t polar[3], vpos[3], pmom[3];
-//
-//  Connect file and get next event  
-//
-    if (!fBaseFile) {
-       TTree *ali = gAlice->TreeE();
-       if (ali) fBaseFile = ali->GetCurrentFile();
-    }
-
-    if (!fFile) {
-        fFile = new TFile(fFileName);
-    }
-
-//  cd to file with old kine tree    
-    if (fStack) delete fStack;
-    fStack = new AliStack(1000);
-    fFile->cd();
-//  Connect treeE
-    TTree* treeE = (TTree*)gDirectory->Get("TE");
-    treeE->SetBranchAddress("Stack", &fStack);
-//  Get next event
-    treeE->GetEntry(fNcurrent);
-    fStack->GetEvent(fNcurrent);
-//  cd back to base file
-    fBaseFile->cd();
-//
-//  Read Particles
-//
-    Int_t ntr;
-
-    for (Int_t i = 0; i < fStack->GetNtrack(); i++)
-    {
-       TParticle* part = fStack->Particle(i);
-
-       
-       Int_t pdg = part->GetPdgCode();
-//     if (pdg == -1) continue;
-       
-       Int_t parent = part->GetFirstMother();
-       Float_t tof  = part->T();
-       
-       vpos[0] = part->Vx();
-       vpos[1] = part->Vy();   
-       vpos[2] = part->Vz();
-
-       pmom[0] = part->Px();
-       pmom[1] = part->Py();
-       pmom[2] = part->Pz();
-
-       printf("\n %d %d %d %f", i, fStack->GetNtrack(), part->GetPdgCode(), pmom[2]);
-       gAlice->SetTrack(fTrackIt, parent, pdg, pmom, vpos, polar, 
-                        tof,  kPPrimary, ntr);
-       gAlice->KeepTrack(ntr);
-    }
-    gAlice->SetHighWaterMark(ntr);
-    fNcurrent++;
-    
-// cd back to output file
-
-}
-
-
-
-
-
-
-
-
diff --git a/STEER/AliGenKine.h b/STEER/AliGenKine.h
deleted file mode 100644 (file)
index 72b9127..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-#ifndef ALIGENKINE_H
-#define ALIGENKINE_H
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice                               */
-
-/* $Id$ */
-
-
-
-#include "AliGenerator.h"
-#include "AliHeader.h"
-#include "TTree.h"
-#include "TFile.h"
-#include "TArrayI.h"
-#include "TParticle.h"
-
-class TParticle;
-class AliStack;
-class TClonesArray;
-
-// Read background particles from a FLUKA boundary source file
-
-class AliGenKine : public AliGenerator
-{
- public:
-    AliGenKine();
-    AliGenKine(Int_t npart);
-    virtual ~AliGenKine();
-    // Initialise 
-    virtual void Init() {}
-    // set file name for data file
-    virtual void SetFileName (const Text_t *filname)  {fFileName  = filname;}
-    // generate event
-    virtual void Generate();
-protected:
-    const Text_t     *fFileName;          //! Choose the file
-    Int_t             fNcurrent;          // points to the next entry
-    Int_t             fNp;                // number of particles
-    TFile            *fFile;              // ! pointer to file
-    TFile            *fBaseFile;          // ! pointer to base file
-    AliStack         *fStack;             // ! Particle stack
-    
-//
-    ClassDef(AliGenKine,1)                // Generate particles from external file
-};
-#endif
-
-
-
-
-
-
-
-
-
-
-
-
-
-