]>
Commit | Line | Data |
---|---|---|
4c039060 | 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 | **************************************************************************/ | |
d28dcc0d | 15 | ////////////////////////////////////////////////////////////////////////////// |
fe4da5cc | 16 | // // |
d28dcc0d | 17 | // Forward Multiplicity Detector based on Silicon plates // |
fe4da5cc | 18 | // This class contains the base procedures for the Forward Multiplicity // |
19 | // detector // | |
d28dcc0d | 20 | // Detector consists of 6 Si volumes covered pseudorapidity interval // |
21 | // from 1.6 to 6.0. // | |
fe4da5cc | 22 | // // |
23 | //Begin_Html | |
24 | /* | |
d28dcc0d | 25 | <img src="gif/AliFMDClass.gif"> |
fe4da5cc | 26 | </pre> |
27 | <br clear=left> | |
28 | <font size=+2 color=red> | |
29 | <p>The responsible person for this module is | |
d28dcc0d | 30 | <a href="mailto:Alla.Maevskaia@cern.ch">Alla Maevskaia</a>. |
fe4da5cc | 31 | </font> |
32 | <pre> | |
33 | */ | |
34 | //End_Html | |
35 | // // | |
36 | // // | |
37 | /////////////////////////////////////////////////////////////////////////////// | |
38 | ||
39 | #include <TTUBE.h> | |
40 | #include <TNode.h> | |
94de3818 | 41 | #include <TGeometry.h> |
d28dcc0d | 42 | #include <TTree.h> |
fe4da5cc | 43 | #include "AliRun.h" |
d28dcc0d | 44 | #include "AliMC.h" |
fe4da5cc | 45 | #include "AliFMD.h" |
d28dcc0d | 46 | #include "AliFMDhit.h" |
47 | ||
fe4da5cc | 48 | ClassImp(AliFMD) |
49 | ||
50 | //_____________________________________________________________________________ | |
51 | AliFMD::AliFMD(): AliDetector() | |
52 | { | |
53 | // | |
54 | // Default constructor for class AliFMD | |
55 | // | |
56 | fIshunt = 0; | |
57 | } | |
58 | ||
59 | //_____________________________________________________________________________ | |
60 | AliFMD::AliFMD(const char *name, const char *title) | |
61 | : AliDetector(name,title) | |
62 | { | |
63 | // | |
64 | // Standard constructor for Forward Multiplicity Detector | |
65 | // | |
66 | ||
67 | // | |
68 | // Initialise Hit array | |
d28dcc0d | 69 | fHits = new TClonesArray("AliFMDhit", 1000); |
fe4da5cc | 70 | |
71 | fIshunt = 0; | |
d28dcc0d | 72 | fIdSens1 = 0; |
73 | ||
74 | SetMarkerColor(kRed); | |
fe4da5cc | 75 | } |
76 | ||
d28dcc0d | 77 | |
78 | AliFMD::~AliFMD() | |
79 | { | |
80 | delete fHits; | |
81 | } | |
fe4da5cc | 82 | //_____________________________________________________________________________ |
83 | void AliFMD::AddHit(Int_t track, Int_t *vol, Float_t *hits) | |
84 | { | |
85 | // | |
d28dcc0d | 86 | // Add a hit to the list |
fe4da5cc | 87 | // |
88 | TClonesArray &lhits = *fHits; | |
89 | new(lhits[fNhits++]) AliFMDhit(fIshunt,track,vol,hits); | |
90 | } | |
fe4da5cc | 91 | //_____________________________________________________________________________ |
92 | void AliFMD::BuildGeometry() | |
93 | { | |
94 | // | |
95 | // Build simple ROOT TNode geometry for event display | |
96 | // | |
d28dcc0d | 97 | TNode *node, *top; |
fe4da5cc | 98 | const int kColorFMD = 7; |
99 | // | |
d28dcc0d | 100 | top=gAlice->GetGeometry()->GetNode("alice"); |
fe4da5cc | 101 | |
102 | // FMD define the different volumes | |
d28dcc0d | 103 | new TRotMatrix("rot901","rot901", 90, 0, 90, 90, 180, 0); |
104 | ||
105 | new TTUBE("S_FMD0","FMD volume 0","void",4.73,17.7,1.5); | |
106 | top->cd(); | |
107 | node = new TNode("FMD0","FMD0","S_FMD0",0,0,64,""); | |
108 | node->SetLineColor(kColorFMD); | |
109 | fNodes->Add(node); | |
110 | ||
111 | new TTUBE("S_FMD1","FMD volume 1","void",23.4,36.,1.5); | |
112 | top->cd(); | |
113 | node = new TNode("FMD1","FMD1","S_FMD1",0,0,85,""); | |
114 | node->SetLineColor(kColorFMD); | |
115 | fNodes->Add(node); | |
fe4da5cc | 116 | |
d28dcc0d | 117 | new TTUBE("S_FMD2","FMD volume 2","void",4.73,17.7,1.5); |
118 | top->cd(); | |
119 | node = new TNode("FMD2","FMD2","S_FMD2",0,0,-64,""); | |
120 | node->SetLineColor(kColorFMD); | |
121 | fNodes->Add(node); | |
122 | ||
123 | new TTUBE("S_FMD3","FMD volume 3","void",23.4,36.,1.5); | |
124 | top->cd(); | |
125 | node = new TNode("FMD3","FMD3","S_FMD3",0,0,-85,""); | |
126 | node->SetLineColor(kColorFMD); | |
127 | fNodes->Add(node); | |
128 | ||
129 | new TTUBE("S_FMD4","FMD volume 4","void",5,15,0.015); | |
130 | top->cd(); | |
131 | node = new TNode("FMD4","FMD4","S_FMD4",0,0,-270,""); | |
132 | node->SetLineColor(kColorFMD); | |
133 | fNodes->Add(node); | |
fe4da5cc | 134 | |
fe4da5cc | 135 | |
d28dcc0d | 136 | new TTUBE("S_FMD5","FMD volume 5","void",5,14,0.015); |
137 | top->cd(); | |
138 | node = new TNode("FMD5","FMD5","S_FMD5",0,0,-630,""); | |
139 | node->SetLineColor(kColorFMD); | |
140 | fNodes->Add(node); | |
141 | ||
fe4da5cc | 142 | } |
143 | ||
144 | //_____________________________________________________________________________ | |
d28dcc0d | 145 | Int_t AliFMD::DistanceToPrimitive(Int_t px, Int_t py) |
fe4da5cc | 146 | { |
147 | // | |
148 | // Calculate the distance from the mouse to the FMD on the screen | |
149 | // Dummy routine | |
150 | // | |
151 | return 9999; | |
152 | } | |
153 | ||
154 | //_____________________________________________________________________________ | |
fe4da5cc | 155 | |
d28dcc0d | 156 | //------------------------------------------------------------------------- |
fe4da5cc | 157 | void AliFMD::Init() |
158 | { | |
159 | // | |
160 | // Initialis the FMD after it has been built | |
161 | Int_t i; | |
d28dcc0d | 162 | AliMC* pMC = AliMC::GetMC(); |
fe4da5cc | 163 | // |
164 | printf("\n"); | |
165 | for(i=0;i<35;i++) printf("*"); | |
166 | printf(" FMD_INIT "); | |
167 | for(i=0;i<35;i++) printf("*"); | |
168 | printf("\n"); | |
169 | // | |
170 | // Here the FMD initialisation code (if any!) | |
171 | for(i=0;i<80;i++) printf("*"); | |
172 | printf("\n"); | |
d28dcc0d | 173 | // |
174 | // | |
175 | fIdSens1=pMC->VolId("GFSI"); //Si sensetive volume | |
176 | ||
fe4da5cc | 177 | } |
d28dcc0d | 178 | //--------------------------------------------------------------------- |
179 | void AliFMD::MakeBranch(Option_t* option) | |
180 | { | |
181 | // Create Tree branches for the FMD. | |
182 | Int_t buffersize = 4000; | |
183 | char branchname[10]; | |
184 | sprintf(branchname,"%s",GetName()); | |
fe4da5cc | 185 | |
d28dcc0d | 186 | AliDetector::MakeBranch(option); |
187 | ||
188 | if (fDigits && gAlice->TreeD()) { | |
189 | gAlice->TreeD()->Branch(branchname,&fDigits, buffersize); | |
190 | printf("Making Branch %s for digits\n",branchname); | |
191 | } | |
192 | } | |
fe4da5cc | 193 | |
d28dcc0d | 194 | //--------------------------------------------------------------------- |
195 | ||
196 | void AliFMD::Eta2Radius(Float_t eta, Float_t zDisk, Float_t *radius) | |
fe4da5cc | 197 | { |
d28dcc0d | 198 | Float_t expEta=TMath::Exp(-eta); |
199 | Float_t theta=TMath::ATan(expEta); | |
200 | theta=2.*theta; | |
201 | Float_t rad=zDisk*(TMath::Tan(theta)); | |
202 | *radius=rad; | |
203 | ||
204 | printf(" eta %f radius %f\n", eta, rad); | |
fe4da5cc | 205 | } |
206 | ||
d28dcc0d | 207 | |
208 | ||
209 | ||
210 |