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