StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
digparticle.h
1 #ifndef MAPS_DIGPARTICLE_H
2 #define MAPS_DIGPARTICLE_H
3 
4 #include <TNamed.h>
5 #include <TList.h>
6 #include <TGraph.h>
7 #include "Riostream.h"
8 #include "vector"
9 
10 // ROOT classes
11 #include "TString.h"
12 #include "TObject.h"
13 #include "TVector.h"
14 #include "TFile.h"
15 #include "TSystem.h"
16 #include "TRandom.h"
17 #include "TH1.h"
18 #include "TH2.h"
19 #include "TObjArray.h"
20 #include "TTree.h"
21 #include "TBranch.h"
22 #include "TClonesArray.h"
23 using namespace std;
24 extern Int_t GlobalSeed ;
25 
26 class DIGInitialize;
27 class DIGPlane;
28 class DIGADC;
29 class DIGBeam;
30 class DIGTransport;
31 class DIGParticle;
32 class DIGAction;
33 class DIGEvent;
34 class DIGMAPS;
35 
36 //==============================================================================
37 class DIGParticle : public TObject {
38  public:
39  DIGParticle();
40  DIGParticle(Float_t EntryX, Float_t EntryY, Float_t EntryZ,
41  Float_t ExitX, Float_t ExitY, Float_t ExitZ, Float_t Energy_deposited);
42  DIGParticle(DIGParticle& adigparticle);
43  virtual ~DIGParticle();
44  void Clear(const Option_t * /*option*/ = "");
45  Float_t GetEntryX(){return fEntryX;}
46  Float_t GetEntryY(){return fEntryY;}
47  Float_t GetEntryZ(){return fEntryZ;}
48  Float_t GetExitX(){return fExitX;}
49  Float_t GetExitY(){return fExitY;}
50  Float_t GetExitZ(){return fExitZ;}
51  Float_t GetEnergy_deposited(){return fEnergy_deposited;}
52  Float_t GetTotalAnalogCharge();
53  Int_t GetTotalDigitalCharge();
54 
55  Int_t GetNSegment(){return fNSegment;}
56  std::vector<Float_t> GetSegmentX(){return fSegmentX;}
57  std::vector<Float_t> GetSegmentY(){return fSegmentY;}
58  std::vector<Float_t> GetSegmentZ(){return fSegmentZ;}
59  std::vector<Float_t> GetSegmentCharge(){return fSegmentCharge;}
60  Int_t GetNpixels(){return fNpixels;}
61  std::vector<Int_t> GetPixelMap(){return fPixelMap;}
62  std::vector<Float_t> GetAnalogCharge(){return fAnalogChargeMap;}
63  std::vector<Int_t> GetDigitalCharge(){return fDigitalChargeMap;}
64 
65  void SetNSegment(Int_t NSegment){fNSegment=NSegment;}
66  void SetEntryX(Float_t EntryX){fEntryX=EntryX;}
67  void SetEntryY(Float_t EntryY){fEntryY=EntryY;}
68  void SetEntryZ(Float_t EntryZ){fEntryY=EntryZ;}
69  void SetExitX(Float_t ExitX){fExitX=ExitX;}
70  void SetExitY(Float_t ExitY){fExitY=ExitY;}
71  void SetExitZ(Float_t ExitZ){fExitZ=ExitZ;}
72  void SetEnergy_deposited(Float_t Energy_deposited){fEnergy_deposited=Energy_deposited;}
73  void SetNpixels(Int_t Npixels){fNpixels= Npixels;}
74 
75  void ComputeChargeDeposition(Float_t StartingSegmentSize, Float_t MaximumSegmentSize, Float_t MaximumChargePerSegment);
76  void ComputeChargeTransport(DIGPlane *aDIGPlane,DIGTransport *aDIGTransport);
77  void PrintInfo();
78 
79  void AddPixel(Float_t AnalogCharge, Int_t PixelNumber);
80  void UpdatePixel(Float_t AnalogCharge, Int_t PixelNumber);
81  void AddRandomNoise(DIGPlane *myDIGPlane);
82  void AnalogToDigitalconversion(DIGADC *myDIGADC, DIGPlane *myDIGPlane);
83  Int_t GetPixelNumber(DIGPlane *myDIGPlane, Float_t Xpos, Float_t Ypos);
84  void GetXYPixelNumber(Int_t &Xpix, Int_t &Ypix, DIGPlane *myDIGPlane, Int_t PixelNumber);
85  void GetXYPixelCenter(Float_t &Xpix, Float_t &Ypix, DIGPlane *myDIGPlane, Int_t PixelNumber);
86 
87  Double_t GaussianLaw(Double_t mean, Double_t sigma);
88  // Double_t Lorentz2D(Double_t *x, Double_t *par);
89 
90  protected:
91 
92  Float_t fEntryX;
93  Float_t fEntryY;
94  Float_t fEntryZ;
95  Float_t fExitX;
96  Float_t fExitY;
97  Float_t fExitZ;
98  Float_t fEnergy_deposited;
99  // Float_t fPx;
100  // Float_t fPy;
101  // Float_t fPz;
102 
103  //segments
104  Int_t fNSegment;
105  vector<Float_t> fSegmentX;
106  vector<Float_t> fSegmentY;
107  vector<Float_t> fSegmentZ;
108  vector<Float_t> fSegmentCharge;
109  //pixel with deposited charge list
110  Int_t fNpixels;
111  vector< Int_t > fPixelMap;
112  vector< Float_t > fAnalogChargeMap;
113  vector< Int_t > fDigitalChargeMap; // n'a pas de sens tant qu'on a pas somme la charge de toutes les particules
114  // au niveau du read out.
115 
116 
117  ClassDef(DIGParticle,1);
118 };
119 
120 
121 
122 //==============================================================================
123 
124 #endif
Definition: digadc.h:36