]>
Commit | Line | Data |
---|---|---|
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 | |
675e9664 | 9 | // Read background particles from a FLUKA boundary source file |
10 | // This is a very special generator that works for background studies for the muon-spectrometer | |
11 | // Ask: andreas.morsch@cern.ch | |
12 | ||
fe4da5cc | 13 | #include "AliGenerator.h" |
65fb704d | 14 | class TChain; |
f87cfe57 | 15 | class TTree; |
fe4da5cc | 16 | class AliGenFLUKAsource : public AliGenerator |
675e9664 | 17 | |
fe4da5cc | 18 | { |
fe4da5cc | 19 | public: |
09d89034 | 20 | enum constants {kAll = 6, kGammas = 7, kNeutrons = 8, kCharged = 9, kNoNeutron = 10}; |
21 | ||
22 | AliGenFLUKAsource(); | |
23 | AliGenFLUKAsource(Int_t npart); | |
24 | AliGenFLUKAsource(const AliGenFLUKAsource &FLUKAsource); | |
25 | virtual ~AliGenFLUKAsource(); | |
26 | // Initialise | |
27 | virtual void Init() {} | |
28 | // Initialise fluka data | |
29 | virtual void FlukaInit(); | |
30 | // choose particle type | |
31 | virtual void SetPartFlag(Int_t ikine) {fIkine=ikine;} | |
32 | // set time cut | |
33 | virtual void SetAgeMax(Float_t agemax) {fAgeMax=agemax;} | |
34 | // use additional weight on neutrals | |
35 | virtual void SetAddWeight(Float_t addwgt) {fAddWeight=addwgt;} | |
36 | // z-shift of vertex | |
37 | virtual void SetZshift(Float_t zshift) {fZshift=zshift;} | |
38 | // set file name of data file | |
39 | virtual void SetFileName(const Text_t *filname) {fFileName=filname;} | |
40 | // set source | |
41 | virtual void SetSourceId(Int_t id=-1){fSourceId=id;} | |
42 | // add a new source file | |
43 | virtual void AddFile(const Text_t *filname) ; | |
44 | // read only fraction of data | |
45 | virtual void SetFraction(Float_t frac=1.){fFrac=frac;} | |
46 | // generate event | |
47 | virtual void Generate(); | |
48 | AliGenFLUKAsource & operator=(const AliGenFLUKAsource & rhs); | |
0af12c00 | 49 | |
09d89034 | 50 | protected: |
51 | ||
52 | Int_t fIkine; // Flag to choose type of particles to be read | |
53 | Float_t fAgeMax; // Maximum age of particle | |
54 | Float_t fAddWeight; // Add weight for neutrons | |
55 | Float_t fZshift; // Shift the Z of impact point by this quantity | |
56 | Float_t fFrac; // Fraction of file that corresponds to one event | |
57 | Int_t fSourceId; // Source identifier (-1: all sources) | |
f87cfe57 | 58 | |
59 | ||
09d89034 | 60 | const Text_t *fFileName; //!Choose the file |
61 | TChain *fTreeChain; //file chaining | |
62 | TTree *fTreeFluka; //pointer to the TTree | |
f87cfe57 | 63 | //Declaration of variables read from the file -- TTree type |
09d89034 | 64 | Float_t fIp; // Particle type |
65 | Float_t fIpp; // Primary particle type | |
66 | Float_t fXi; // x-Impact | |
67 | Float_t fYi; // y-Impact | |
68 | Float_t fZi; // z-Impact | |
69 | Float_t fPx; // Direction cosine x | |
70 | Float_t fPy; // Direction cosine y | |
71 | Float_t fPz; // Direction cosine z | |
72 | Float_t fEkin; // Kinetic energy | |
73 | Float_t fZv; // z-Position of particle vertex | |
74 | Float_t fRv; // r-Position of particle vertex | |
75 | Float_t fItra; // Primary track number | |
76 | Float_t fIgas; // Volume identifier | |
77 | Float_t fWgt; // Particle weight | |
78 | Float_t fEtag; // Pseudorapidity of primary particle | |
79 | Float_t fPtg; // Pt of primary particle | |
80 | Float_t fAge; // Time of flight | |
81 | ||
0af12c00 | 82 | private: |
dc1d768c | 83 | void Copy(TObject &arun) const; |
09d89034 | 84 | |
85 | ClassDef(AliGenFLUKAsource,1) //Boundary source | |
fe4da5cc | 86 | }; |
87 | #endif | |
88 | ||
89 | ||
90 | ||
91 | ||
92 | ||
93 |