Digitize:
[u/mrichter/AliRoot.git] / EVGEN / AliGenFLUKAsource.h
CommitLineData
f87cfe57 1#ifndef ALIGENFLUKASOURCE_H
2#define ALIGENFLUKASOURCE_H
3da30618 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
7
f87cfe57 8
fe4da5cc 9#include "AliGenerator.h"
f87cfe57 10#include <TChain.h>
11
12class TTree;
13
14
fe4da5cc 15// Read background particles from a FLUKA boundary source file
16
17class AliGenFLUKAsource : public AliGenerator
18{
fe4da5cc 19public:
20 AliGenFLUKAsource();
21 AliGenFLUKAsource(Int_t npart);
f87cfe57 22 AliGenFLUKAsource(const AliGenFLUKAsource &FLUKAsource);
fe4da5cc 23 virtual ~AliGenFLUKAsource();
299e476a 24 // Initialise
25 virtual void Init() {}
26 // Initialise fluka data
fe4da5cc 27 virtual void FlukaInit();
299e476a 28 // choose particle type
fe4da5cc 29 virtual void SetPartFlag(Int_t ikine) {fIkine=ikine;}
299e476a 30 // set time cut
fe4da5cc 31 virtual void SetAgeMax(Float_t agemax) {fAgeMax=agemax;}
299e476a 32 // use additional weight on neutrals
fe4da5cc 33 virtual void SetAddWeight(Float_t addwgt) {fAddWeight=addwgt;}
299e476a 34 // z-shift of vertex
fe4da5cc 35 virtual void SetZshift(Float_t zshift) {fZshift=zshift;}
299e476a 36 // set file name of data file
fe4da5cc 37 virtual void SetFileName(const Text_t *filname) {fFileName=filname;}
f87cfe57 38 // set source
39 virtual void SetSourceId(Int_t id=-1){fSourceId=id;}
40 // add a new source file
886b6f73 41 virtual void AddFile(const Text_t *filname) ;
299e476a 42 // read only fraction of data
43 virtual void SetFraction(Float_t frac=1.){fFrac=frac;}
44 // generate event
fe4da5cc 45 virtual void Generate();
f87cfe57 46 AliGenFLUKAsource & operator=(const AliGenFLUKAsource & rhs);
47protected:
48
49 Int_t fIkine; // Flag to choose type of particles to be read in
50 // 6 - all particles types
51 // 7 - only gammas
52 // 8 - only neutrons
53 // 9 - only charged particles
54 Float_t fAgeMax; // Maximum age of particle
55 Float_t fAddWeight; // Add weight for neutrons
56 Float_t fZshift; // Shift the Z of impact point by this quantity
57 Float_t fFrac; // Fraction of file that corresponds to one event
58 Int_t fSourceId; // Source identifier (-1: all sources)
59
60
61 const Text_t *fFileName; //!Choose the file
62 TChain *fTreeChain; //file chaining
63 TTree *fTreeFluka; //pointer to the TTree
64//Declaration of variables read from the file -- TTree type
65 Float_t fIp; // Particle type
66 Float_t fIpp; // Primary particle type
67 Float_t fXi; // x-Impact
68 Float_t fYi; // y-Impact
69 Float_t fZi; // z-Impact
70 Float_t fPx; // Direction cosine x
71 Float_t fPy; // Direction cosine y
72 Float_t fPz; // Direction cosine z
73 Float_t fEkin; // Kinetic energy
74 Float_t fZv; // z-Position of particle vertex
75 Float_t fRv; // r-Position of particle vertex
76 Float_t fItra; // Primary track number
77 Float_t fIgas; // Volume identifier
78 Float_t fWgt; // Particle weight
79 Float_t fEtag; // Pseudorapidity of primary particle
80 Float_t fPtg; // Pt of primary particle
81 Float_t fAge; // Time of flight
82
83
fe4da5cc 84
299e476a 85 ClassDef(AliGenFLUKAsource,1) //Boundary source
fe4da5cc 86};
87#endif
88
89
90
91
92
93