1 ///////////////////////////////////////////////////////////////////////////////
3 // Forward Multiplicity Detector //
4 // This class contains the base procedures for the Forward Multiplicity //
9 <img src="picts/AliFMDClass.gif">
12 <font size=+2 color=red>
13 <p>The responsible person for this module is
14 <a href="mailto:Valeri.Kondratiev@cern.ch">Valeri Kondratiev</a>.
21 ///////////////////////////////////////////////////////////////////////////////
31 //_____________________________________________________________________________
32 AliFMD::AliFMD(): AliDetector()
35 // Default constructor for class AliFMD
40 //_____________________________________________________________________________
41 AliFMD::AliFMD(const char *name, const char *title)
42 : AliDetector(name,title)
45 // Standard constructor for Forward Multiplicity Detector
49 // Initialise Hit array
50 fHits = new TClonesArray("AliFMDhit", 405);
55 //_____________________________________________________________________________
56 void AliFMD::AddHit(Int_t track, Int_t *vol, Float_t *hits)
61 TClonesArray &lhits = *fHits;
62 new(lhits[fNhits++]) AliFMDhit(fIshunt,track,vol,hits);
65 //_____________________________________________________________________________
66 void AliFMD::BuildGeometry()
69 // Build simple ROOT TNode geometry for event display
72 const int kColorFMD = 7;
74 Top=gAlice->GetGeometry()->GetNode("alice");
76 // FMD define the different volumes
78 new TTUBE("S_FMD1","FMD sensitive volume 1","void",4.5,10.5,3);
80 Node = new TNode("FMD1","FMD1","S_FMD1",0,0,86.5,"");
81 Node->SetLineColor(kColorFMD);
84 new TTUBE("S_FMD2","FMD sensitive volume 2","void",4.5,10.5,3);
86 Node = new TNode("FMD2","FMD2","S_FMD2",0,0,-86.5,"");
87 Node->SetLineColor(kColorFMD);
90 new TTUBE("S_FMD3","FMD sensitive volume 3","void",8,14,3);
92 Node = new TNode("FMD3","FMD3","S_FMD3",0,0,71.2,"");
93 Node->SetLineColor(kColorFMD);
96 new TTUBE("S_FMD4","FMD sensitive volume 4","void",8,14,3);
98 Node = new TNode("FMD4","FMD4","S_FMD4",0,0,-71.2,"");
100 Node->SetLineColor(kColorFMD);
102 new TTUBE("S_FMD5","FMD sensitive volume 5","void",8,17.5,3);
104 Node = new TNode("FMD5","FMD5","S_FMD5",0,0,44,"");
105 Node->SetLineColor(kColorFMD);
108 new TTUBE("S_FMD6","FMD sensitive volume 6","void",8,17.5,3);
110 Node = new TNode("FMD6","FMD6","S_FMD6",0,0,-44,"");
111 Node->SetLineColor(kColorFMD);
114 new TTUBE("S_FMD7","FMD sensitive volume 7","void",4.2,13,3);
116 Node = new TNode("FMD7","FMD7","S_FMD7",0,0,-231,"");
117 Node->SetLineColor(kColorFMD);
121 //_____________________________________________________________________________
122 Int_t AliFMD::DistancetoPrimitive(Int_t , Int_t )
125 // Calculate the distance from the mouse to the FMD on the screen
131 //_____________________________________________________________________________
132 void AliFMD::StepManager()
135 // Called for each step in the FMD
140 TClonesArray &lhits = *fHits;
143 gMC->CurrentVolID(copy);
145 gMC->TrackPosition(p);
146 for(i=0;i<3;++i) hits[i]=p[i];
147 new(lhits[fNhits++]) AliFMDhit(fIshunt,gAlice->CurrentTrack(),vol,hits);
150 //___________________________________________
154 // Initialis the FMD after it has been built
158 for(i=0;i<35;i++) printf("*");
159 printf(" FMD_INIT ");
160 for(i=0;i<35;i++) printf("*");
163 // Here the FMD initialisation code (if any!)
164 for(i=0;i<80;i++) printf("*");
171 //_____________________________________________________________________________
172 AliFMDhit::AliFMDhit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits):