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