1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
15 //////////////////////////////////////////////////////////////////////////////
17 // Forward Multiplicity Detector based on Silicon plates //
18 // This class contains the base procedures for the Forward Multiplicity //
20 // Detector consists of 6 Si volumes covered pseudorapidity interval //
21 // from 1.6 to 6.0. //
25 <img src="gif/AliFMDClass.gif">
28 <font size=+2 color=red>
29 <p>The responsible person for this module is
30 <a href="mailto:Alla.Maevskaia@cern.ch">Alla Maevskaia</a>.
37 ///////////////////////////////////////////////////////////////////////////////
41 #include <TGeometry.h>
46 #include "AliFMDhit.h"
50 //_____________________________________________________________________________
51 AliFMD::AliFMD(): AliDetector()
54 // Default constructor for class AliFMD
59 //_____________________________________________________________________________
60 AliFMD::AliFMD(const char *name, const char *title)
61 : AliDetector(name,title)
64 // Standard constructor for Forward Multiplicity Detector
68 // Initialise Hit array
69 fHits = new TClonesArray("AliFMDhit", 1000);
82 //_____________________________________________________________________________
83 void AliFMD::AddHit(Int_t track, Int_t *vol, Float_t *hits)
86 // Add a hit to the list
88 TClonesArray &lhits = *fHits;
89 new(lhits[fNhits++]) AliFMDhit(fIshunt,track,vol,hits);
91 //_____________________________________________________________________________
92 void AliFMD::BuildGeometry()
95 // Build simple ROOT TNode geometry for event display
98 const int kColorFMD = 7;
100 top=gAlice->GetGeometry()->GetNode("alice");
102 // FMD define the different volumes
103 new TRotMatrix("rot901","rot901", 90, 0, 90, 90, 180, 0);
105 new TTUBE("S_FMD0","FMD volume 0","void",4.73,17.7,1.5);
107 node = new TNode("FMD0","FMD0","S_FMD0",0,0,64,"");
108 node->SetLineColor(kColorFMD);
111 new TTUBE("S_FMD1","FMD volume 1","void",23.4,36.,1.5);
113 node = new TNode("FMD1","FMD1","S_FMD1",0,0,85,"");
114 node->SetLineColor(kColorFMD);
117 new TTUBE("S_FMD2","FMD volume 2","void",4.73,17.7,1.5);
119 node = new TNode("FMD2","FMD2","S_FMD2",0,0,-64,"");
120 node->SetLineColor(kColorFMD);
123 new TTUBE("S_FMD3","FMD volume 3","void",23.4,36.,1.5);
125 node = new TNode("FMD3","FMD3","S_FMD3",0,0,-85,"");
126 node->SetLineColor(kColorFMD);
129 new TTUBE("S_FMD4","FMD volume 4","void",5,15,0.015);
131 node = new TNode("FMD4","FMD4","S_FMD4",0,0,-270,"");
132 node->SetLineColor(kColorFMD);
136 new TTUBE("S_FMD5","FMD volume 5","void",5,14,0.015);
138 node = new TNode("FMD5","FMD5","S_FMD5",0,0,-630,"");
139 node->SetLineColor(kColorFMD);
144 //_____________________________________________________________________________
145 Int_t AliFMD::DistanceToPrimitive(Int_t px, Int_t py)
148 // Calculate the distance from the mouse to the FMD on the screen
154 //_____________________________________________________________________________
156 //-------------------------------------------------------------------------
160 // Initialis the FMD after it has been built
162 AliMC* pMC = AliMC::GetMC();
165 for(i=0;i<35;i++) printf("*");
166 printf(" FMD_INIT ");
167 for(i=0;i<35;i++) printf("*");
170 // Here the FMD initialisation code (if any!)
171 for(i=0;i<80;i++) printf("*");
175 fIdSens1=pMC->VolId("GFSI"); //Si sensetive volume
178 //---------------------------------------------------------------------
179 void AliFMD::MakeBranch(Option_t* option)
181 // Create Tree branches for the FMD.
182 Int_t buffersize = 4000;
184 sprintf(branchname,"%s",GetName());
186 AliDetector::MakeBranch(option);
188 if (fDigits && gAlice->TreeD()) {
189 gAlice->TreeD()->Branch(branchname,&fDigits, buffersize);
190 printf("Making Branch %s for digits\n",branchname);
194 //---------------------------------------------------------------------
196 void AliFMD::Eta2Radius(Float_t eta, Float_t zDisk, Float_t *radius)
198 Float_t expEta=TMath::Exp(-eta);
199 Float_t theta=TMath::ATan(expEta);
201 Float_t rad=zDisk*(TMath::Tan(theta));
204 printf(" eta %f radius %f\n", eta, rad);