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 ///////////////////////////////////////////////////////////////////////////////
30 //_____________________________________________________________________________
31 AliFMD::AliFMD(): AliDetector()
34 // Default constructor for class AliFMD
39 //_____________________________________________________________________________
40 AliFMD::AliFMD(const char *name, const char *title)
41 : AliDetector(name,title)
44 // Standard constructor for Forward Multiplicity Detector
48 // Initialise Hit array
49 fHits = new TClonesArray("AliFMDhit", 405);
54 //_____________________________________________________________________________
55 void AliFMD::AddHit(Int_t track, Int_t *vol, Float_t *hits)
60 TClonesArray &lhits = *fHits;
61 new(lhits[fNhits++]) AliFMDhit(fIshunt,track,vol,hits);
64 //_____________________________________________________________________________
65 void AliFMD::BuildGeometry()
68 // Build simple ROOT TNode geometry for event display
71 const int kColorFMD = 7;
73 Top=gAlice->GetGeometry()->GetNode("alice");
75 // FMD define the different volumes
77 new TTUBE("S_FMD1","FMD sensitive volume 1","void",4.5,10.5,3);
79 Node = new TNode("FMD1","FMD1","S_FMD1",0,0,86.5,"");
80 Node->SetLineColor(kColorFMD);
83 new TTUBE("S_FMD2","FMD sensitive volume 2","void",4.5,10.5,3);
85 Node = new TNode("FMD2","FMD2","S_FMD2",0,0,-86.5,"");
86 Node->SetLineColor(kColorFMD);
89 new TTUBE("S_FMD3","FMD sensitive volume 3","void",8,14,3);
91 Node = new TNode("FMD3","FMD3","S_FMD3",0,0,71.2,"");
92 Node->SetLineColor(kColorFMD);
95 new TTUBE("S_FMD4","FMD sensitive volume 4","void",8,14,3);
97 Node = new TNode("FMD4","FMD4","S_FMD4",0,0,-71.2,"");
99 Node->SetLineColor(kColorFMD);
101 new TTUBE("S_FMD5","FMD sensitive volume 5","void",8,17.5,3);
103 Node = new TNode("FMD5","FMD5","S_FMD5",0,0,44,"");
104 Node->SetLineColor(kColorFMD);
107 new TTUBE("S_FMD6","FMD sensitive volume 6","void",8,17.5,3);
109 Node = new TNode("FMD6","FMD6","S_FMD6",0,0,-44,"");
110 Node->SetLineColor(kColorFMD);
113 new TTUBE("S_FMD7","FMD sensitive volume 7","void",4.2,13,3);
115 Node = new TNode("FMD7","FMD7","S_FMD7",0,0,-231,"");
116 Node->SetLineColor(kColorFMD);
120 //_____________________________________________________________________________
121 Int_t AliFMD::DistancetoPrimitive(Int_t , Int_t )
124 // Calculate the distance from the mouse to the FMD on the screen
130 //_____________________________________________________________________________
131 void AliFMD::StepManager()
134 // Called for each step in the FMD
139 TClonesArray &lhits = *fHits;
142 gMC->CurrentVolID(copy);
144 gMC->TrackPosition(p);
145 for(i=0;i<3;++i) hits[i]=p[i];
146 new(lhits[fNhits++]) AliFMDhit(fIshunt,gAlice->CurrentTrack(),vol,hits);
149 //___________________________________________
153 // Initialis the FMD after it has been built
157 for(i=0;i<35;i++) printf("*");
158 printf(" FMD_INIT ");
159 for(i=0;i<35;i++) printf("*");
162 // Here the FMD initialisation code (if any!)
163 for(i=0;i<80;i++) printf("*");
170 //_____________________________________________________________________________
171 AliFMDhit::AliFMDhit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits):