]>
Commit | Line | Data |
---|---|---|
409f8c84 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
409f8c84 | 15 | |
703a4e51 | 16 | #include<Riostream.h> |
409f8c84 | 17 | #include "AliITSresponseSPDdubna.h" |
703a4e51 | 18 | ////////////////////////////////////////////////////// |
19 | // Response class for set:ITS // | |
20 | // Specific subdetector implementation for // | |
21 | // Silicon pixels // | |
22 | // This is and alternative version // | |
23 | // to the default version // | |
24 | ////////////////////////////////////////////////////// | |
25 | const Float_t AliITSresponseSPDdubna::fgkNoiseDefault = 200.; | |
26 | const Float_t AliITSresponseSPDdubna::fgkThresholdDefault = 2000.; | |
27 | ||
12e7c97c | 28 | //___________________________________________ |
409f8c84 | 29 | ClassImp(AliITSresponseSPDdubna) |
30 | ||
12e7c97c | 31 | AliITSresponseSPDdubna::AliITSresponseSPDdubna() : AliITSresponse(){ |
32 | // Default constructor | |
33 | // Inputs: | |
34 | // none. | |
35 | // Outputs: | |
36 | // none. | |
37 | // Return: | |
38 | // A default constructed AliITSresponseSPD class | |
39 | ||
703a4e51 | 40 | SetNoiseParam(fgkNoiseDefault,0.); // fNoise, fBaseline |
41 | SetThresholds(fgkThresholdDefault,0.); // fThreshold | |
12e7c97c | 42 | SetCouplings(); // fCouplCol, fCouplRow |
43 | SetFractionDeadPixels(); // fDeadPixels | |
44 | SetDataType(); // fDataType | |
45 | } | |
46 | //_________________________________________________________________________ | |
47 | Bool_t AliITSresponseSPDdubna::IsPixelDead(Int_t mod,Int_t ix,Int_t iz) const { | |
48 | // Returns kTRUE if pixel is dead | |
49 | // Inputs: | |
50 | // Int_t mod module number | |
51 | // Int_t ix x pixel number | |
52 | // Int_t iz z pixel number | |
53 | // Outputs: | |
54 | // none. | |
55 | // Return: | |
56 | // kFALSE if pixel is alive, or kTRUE if pixel is dead. | |
57 | Bool_t dead = kFALSE; | |
58 | Int_t seed; | |
59 | static TRandom ran; // don't use gRandom. This must not be a true randome | |
60 | // sequence. These sequence must be random one and then fully repetable. | |
61 | ||
62 | seed = mod*256*256+iz*256+ix; | |
63 | ran.SetSeed(seed); | |
64 | if(ran.Rndm(0)<fDeadPixels) dead = kTRUE; | |
65 | return dead; | |
66 | } | |
703a4e51 | 67 | |
12e7c97c | 68 | //---------------------------------------------------------------------- |
703a4e51 | 69 | void AliITSresponseSPDdubna::Print(ostream *os) const{ |
12e7c97c | 70 | // Standard output format for this class. |
71 | // Inputs: | |
72 | // ostream *os Pointer to the output stream | |
73 | // Outputs: | |
74 | // none: | |
75 | // Return: | |
76 | // none. | |
409f8c84 | 77 | |
12e7c97c | 78 | AliITSresponse::Print(os); |
12e7c97c | 79 | *os << fNoise << " " << fBaseline << " " << fCouplCol << " "; |
80 | *os << fCouplRow << " "<< fThreshold << " " << fDeadPixels << " "; | |
81 | *os << fDataType; | |
82 | // *os << " " << endl; | |
12e7c97c | 83 | return; |
409f8c84 | 84 | } |
703a4e51 | 85 | |
12e7c97c | 86 | //---------------------------------------------------------------------- |
703a4e51 | 87 | void AliITSresponseSPDdubna::Read(istream *is) { |
12e7c97c | 88 | // Standard input format for this class. |
89 | // Inputs: | |
90 | // ostream *os Pointer to the output stream | |
91 | // Outputs: | |
92 | // none: | |
93 | // Return: | |
94 | // none. | |
409f8c84 | 95 | |
703a4e51 | 96 | AliITSresponse::Read(is); |
12e7c97c | 97 | *is >> fNoise >> fBaseline >> fCouplCol >> fCouplRow; |
98 | *is >> fThreshold >> fDeadPixels >> fDataType; | |
99 | return; | |
f74211b0 | 100 | } |
12e7c97c | 101 | //---------------------------------------------------------------------- |
703a4e51 | 102 | |
12e7c97c | 103 | ostream &operator<<(ostream &os,AliITSresponseSPDdubna &p){ |
104 | // Standard output streaming function. | |
105 | // Inputs: | |
106 | // ostream *os Pointer to the output stream | |
107 | // Outputs: | |
108 | // none: | |
109 | // Return: | |
110 | // none. | |
111 | ||
112 | p.Print(&os); | |
113 | return os; | |
114 | } | |
703a4e51 | 115 | |
12e7c97c | 116 | //---------------------------------------------------------------------- |
117 | istream &operator>>(istream &is,AliITSresponseSPDdubna &r){ | |
118 | // Standard input streaming function. | |
119 | // Inputs: | |
120 | // ostream *os Pointer to the output stream | |
121 | // Outputs: | |
122 | // none: | |
123 | // Return: | |
124 | // none. | |
125 | ||
126 | r.Read(&is); | |
127 | return is; | |
128 | } | |
129 | //---------------------------------------------------------------------- | |
130 |