]>
Commit | Line | Data |
---|---|---|
409f8c84 | 1 | #ifndef ALIITSSIMULATIONSPDDUBNA_H |
2 | #define ALIITSSIMULATIONSPDDUBNA_H | |
3 | ||
f74211b0 | 4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
aacedc3e | 7 | #include "TH1F.h" |
8 | #include "TObjArray.h" | |
409f8c84 | 9 | #include "AliITSsimulation.h" |
fcf95fc7 | 10 | #include "AliITSCalibrationSPD.h" |
12e7c97c | 11 | #include "AliITSsegmentationSPD.h" |
fcf95fc7 | 12 | #include "AliITSresponseSPD.h" |
409f8c84 | 13 | |
409f8c84 | 14 | class AliITSmodule; |
15 | ||
16 | //------------------------------------------------------------------- | |
17 | ||
18 | class AliITSsimulationSPDdubna : public AliITSsimulation { | |
f74211b0 | 19 | public: |
20 | AliITSsimulationSPDdubna(); | |
fcf95fc7 | 21 | // AliITSsimulationSPDdubna(AliITSsegmentation *seg,AliITSCalibration *res, |
8ba39da9 | 22 | // Int_t cup=1); |
23 | AliITSsimulationSPDdubna(AliITSDetTypeSim *dettyp,Int_t cup=1); | |
f74211b0 | 24 | virtual ~AliITSsimulationSPDdubna(); |
12e7c97c | 25 | // copy constructor |
26 | AliITSsimulationSPDdubna(const AliITSsimulationSPDdubna &source); | |
27 | // ass. operator | |
28 | AliITSsimulationSPDdubna& operator=(const AliITSsimulationSPDdubna &s); | |
5402d9ca | 29 | virtual AliITSsimulation& operator=(const AliITSsimulation &source); |
12e7c97c | 30 | // Initilizes the variables |
aacedc3e | 31 | void Init(); |
409f8c84 | 32 | |
aacedc3e | 33 | // General User calling routines |
34 | // Initilize simulation for a specific event and module | |
f74211b0 | 35 | void InitSimulationModule(Int_t module, Int_t event); |
aacedc3e | 36 | // Finish and write S Digitization |
37 | void FinishSDigitiseModule(); | |
38 | // From hits to Digits, without creating SDigits | |
39 | void DigitiseModule(AliITSmodule *mod,Int_t,Int_t); | |
40 | ||
41 | // More or less Internal Routines | |
42 | // Create S Digits from specific module | |
f74211b0 | 43 | void SDigitiseModule(AliITSmodule *mod, Int_t mask, Int_t event); |
aacedc3e | 44 | // Write S Digits to the tree of SDigits. |
12e7c97c | 45 | void WriteSDigits(); |
aacedc3e | 46 | // fill pList from hits, charge sharing, diffusion, coupling |
12e7c97c | 47 | void HitToSDigit(AliITSmodule *mod); |
aacedc3e | 48 | // Take pList of signals and apply noise... create Digis |
49 | void pListToDigits(); | |
50 | // | |
f74211b0 | 51 | void CreateHistograms(); |
aacedc3e | 52 | void FillHistograms(Int_t ix,Int_t iz,Double_t v=1.0); |
f74211b0 | 53 | void ResetHistograms(); |
aacedc3e | 54 | TH1F* GetHistogram(Int_t i){return (TH1F*)(fHis->At(i));}// get histogram |
12e7c97c | 55 | TObjArray* GetHistArray() {return fHis;}// get hist array |
aacedc3e | 56 | TString& GetHistName(){return fSPDname;} |
57 | void SetHistName(TString &n){fSPDname = n;} | |
58 | // | |
59 | // For backwards compatibility | |
60 | void SDigitsToDigits(){ FinishSDigitiseModule();}; | |
61 | void HitToDigit(AliITSmodule *mod){ | |
62 | // Standard interface to DigitiseModule | |
63 | // Inputs: | |
64 | // AliITSmodule *mod Pointer to this module | |
65 | // Outputs: | |
66 | // none. | |
67 | // Return: | |
68 | // none. | |
69 | DigitiseModule(mod,GetModuleNumber(),0);}; | |
409f8c84 | 70 | |
f74211b0 | 71 | private: |
12e7c97c | 72 | void SpreadCharge(Double_t x0,Double_t z0,Int_t ix0,Int_t iz0, |
73 | Double_t el,Double_t sig,Int_t t,Int_t hi); | |
aacedc3e | 74 | void UpdateMapSignal(Int_t ix,Int_t iz,Int_t trk,Int_t ht,Double_t signal){ |
75 | // This function adds a signal to the pList from the pList class | |
76 | // Inputs: | |
77 | // Int_t iz // row number | |
78 | // Int_t ix // column number | |
79 | // Int_t trk // track number | |
80 | // Int_t ht // hit number | |
81 | // Double_t signal // signal strength | |
82 | // Outputs: | |
83 | // none. | |
84 | // Return: | |
85 | // none | |
86 | GetMap()->AddSignal(iz,ix,trk,ht,GetModuleNumber(),signal);}; | |
87 | void UpdateMapNoise(Int_t ix,Int_t iz,Float_t noise){ | |
88 | // This function adds noise to data in the MapA2 as well as the pList | |
89 | // Inputs: | |
90 | // Int_t iz // row number | |
91 | // Int_t ix // column number | |
92 | // Double_t ns // electronic noise generated by pListToDigits | |
93 | // Outputs: | |
94 | // none. | |
95 | // Return: | |
96 | // none | |
8ba39da9 | 97 | GetMap()->AddNoise(iz,ix,GetModuleNumber(),noise);} |
98 | // Get a pointer to the segmentation object | |
99 | virtual AliITSsegmentation* GetSegmentationModel(Int_t /*dt*/){return fDetType->GetSegmentationModel(0);} | |
100 | // set pointer to segmentation objec | |
101 | virtual void SetSegmentationModel(Int_t /*dt*/, AliITSsegmentation *seg){fDetType->SetSegmentationModel(0,seg);} | |
aacedc3e | 102 | // Bari-Salerno Coupling parameters |
103 | // "New" coupling routine Tiziano Virgili | |
12e7c97c | 104 | void SetCoupling(Int_t row,Int_t col,Int_t ntrack,Int_t idhit); |
aacedc3e | 105 | // "Old" coupling routine Rocco Caliandro |
12e7c97c | 106 | void SetCouplingOld(Int_t row, Int_t col,Int_t ntrack,Int_t idhit); |
107 | // Getters for data kept in fSegmentation and fResponse. | |
108 | // Returns the Threshold in electrons | |
3600eb30 | 109 | Double_t GetThreshold(){ |
fcf95fc7 | 110 | Double_t th,sig;AliITSCalibrationSPD* res=(AliITSCalibrationSPD*)GetCalibrationModel(GetModuleNumber()); |
8ba39da9 | 111 | res->Thresholds(th,sig);return th;}; |
12e7c97c | 112 | // Returns the couplings Columb and Row. |
aacedc3e | 113 | void GetCouplings(Double_t &cc,Double_t &cr){ |
fcf95fc7 | 114 | AliITSCalibrationSPD* res = (AliITSCalibrationSPD*)GetCalibrationModel(GetModuleNumber()); |
8ba39da9 | 115 | res->GetCouplingParam(cc,cr);}; |
12e7c97c | 116 | // Returns the number of pixels in x |
8ba39da9 | 117 | Int_t GetNPixelsX(){return GetSegmentationModel(0)->Npx();}; |
12e7c97c | 118 | // Returns the number of pixels in z |
8ba39da9 | 119 | Int_t GetNPixelsZ(){return GetSegmentationModel(0)->Npz();}; |
409f8c84 | 120 | |
f74211b0 | 121 | TObjArray *fHis; //! just in case for histogramming |
aacedc3e | 122 | TString fSPDname; //! Histogram name |
123 | Int_t fCoupling; // Sets the coupling to be used. | |
124 | // ==1 use SetCoupling, ==2 use SetCouplingOld | |
125 | // with diffusion turned off (by constructor) | |
126 | // ==3 use SetCoupling, ==4 use SetCouplingOld | |
127 | // with diffusion, else no coupling. | |
128 | ClassDef(AliITSsimulationSPDdubna,3) // Simulation of SPD clusters | |
f74211b0 | 129 | }; |
409f8c84 | 130 | #endif |