-#ifndef AliGenFLUKAsource_H
-#define AliGenFLUKAsource_H
-/////////////////////////////////////////////////////////
-// Manager and hits classes for set:MUON version 0 //
-/////////////////////////////////////////////////////////
+#ifndef ALIGENFLUKASOURCE_H
+#define ALIGENFLUKASOURCE_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id$ */
+
+
#include "AliGenerator.h"
-#include "TNamed.h"
-#include "TF1.h"
-#include "TArrayF.h"
-#include "TTree.h"
+#include <TChain.h>
+
+class TTree;
+
// Read background particles from a FLUKA boundary source file
class AliGenFLUKAsource : public AliGenerator
{
-
-protected:
-
- Int_t fIkine; //Flag to choose type of particles to be read in
- // 6 - all particles types
- // 7 - only gammas
- // 8 - only neutrons
- // 9 - only charged particles
- Float_t fAgeMax; //Maximum age of particle
- Float_t fAddWeight; //Add weight for neutrons
- Float_t fZshift; //Shift the Z of impact point by this quantity
- Float_t fFrac;
-
- const Text_t *fFileName; //!Choose the file
-
- TTree *fTreeFluka; //pointer to the TTree
-//Declaration of variables read from the file -- TTree type
- Float_t Ip;
- Float_t Ipp;
- Float_t Xi;
- Float_t Yi;
- Float_t Zi;
- Float_t Px;
- Float_t Py;
- Float_t Pz;
- Float_t Ekin;
- Float_t Zv;
- Float_t Rv;
- Float_t Itra;
- Float_t Igas;
- Float_t Wgt;
- Float_t Etag;
- Float_t Ptg;
- Float_t Age;
-
public:
AliGenFLUKAsource();
AliGenFLUKAsource(Int_t npart);
+ AliGenFLUKAsource(const AliGenFLUKAsource &FLUKAsource);
virtual ~AliGenFLUKAsource();
// Initialise
virtual void Init() {}
virtual void SetZshift(Float_t zshift) {fZshift=zshift;}
// set file name of data file
virtual void SetFileName(const Text_t *filname) {fFileName=filname;}
+ // set source
+ virtual void SetSourceId(Int_t id=-1){fSourceId=id;}
+ // add a new source file
+ virtual void AddFile(const Text_t *filname) ;
// read only fraction of data
virtual void SetFraction(Float_t frac=1.){fFrac=frac;}
// generate event
virtual void Generate();
+ AliGenFLUKAsource & operator=(const AliGenFLUKAsource & rhs);
+protected:
+
+ Int_t fIkine; // Flag to choose type of particles to be read in
+ // 6 - all particles types
+ // 7 - only gammas
+ // 8 - only neutrons
+ // 9 - only charged particles
+ Float_t fAgeMax; // Maximum age of particle
+ Float_t fAddWeight; // Add weight for neutrons
+ Float_t fZshift; // Shift the Z of impact point by this quantity
+ Float_t fFrac; // Fraction of file that corresponds to one event
+ Int_t fSourceId; // Source identifier (-1: all sources)
+
+
+ const Text_t *fFileName; //!Choose the file
+ TChain *fTreeChain; //file chaining
+ TTree *fTreeFluka; //pointer to the TTree
+//Declaration of variables read from the file -- TTree type
+ Float_t fIp; // Particle type
+ Float_t fIpp; // Primary particle type
+ Float_t fXi; // x-Impact
+ Float_t fYi; // y-Impact
+ Float_t fZi; // z-Impact
+ Float_t fPx; // Direction cosine x
+ Float_t fPy; // Direction cosine y
+ Float_t fPz; // Direction cosine z
+ Float_t fEkin; // Kinetic energy
+ Float_t fZv; // z-Position of particle vertex
+ Float_t fRv; // r-Position of particle vertex
+ Float_t fItra; // Primary track number
+ Float_t fIgas; // Volume identifier
+ Float_t fWgt; // Particle weight
+ Float_t fEtag; // Pseudorapidity of primary particle
+ Float_t fPtg; // Pt of primary particle
+ Float_t fAge; // Time of flight
+
+
ClassDef(AliGenFLUKAsource,1) //Boundary source
};