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 **************************************************************************/
20 ///////////////////////////////////////////////////////////////////////////////
23 // Photon Multiplicity Detector //
24 // This class contains the basic functions for the Photon Multiplicity //
25 // Detector. Functions specific to one particular geometry are //
26 // contained in the derived classes //
30 <img src="picts/AliPMDClass.gif">
33 <font size=+2 color=red>
34 <p>The responsible person for this module is
35 <a href="mailto:sub@vecdec.veccal.ernet.in">Subhasis Chattopadhyay</a>.
41 ///////////////////////////////////////////////////////////////////////////////
52 //_____________________________________________________________________________
56 // Default constructor
61 //_____________________________________________________________________________
62 AliPMD::AliPMD(const char *name, const char *title)
63 : AliDetector(name,title)
66 // Default constructor
70 // Allocate the array of hits
71 fHits = new TClonesArray("AliPMDhit", 405);
93 //_____________________________________________________________________________
94 void AliPMD::AddHit(Int_t track, Int_t *vol, Float_t *hits)
99 TClonesArray &lhits = *fHits;
100 AliPMDhit *newcell, *curcell;
101 // printf("PMD++ Adding energy %f, prim %d, vol %d %d %d %d\n",
102 // hits[3],gAlice->GetPrimary(track-1),vol[0],vol[1],vol[2],vol[3]);
103 newcell = new AliPMDhit(fIshunt, track, vol, hits);
105 for (i=0; i<fNhits; i++) {
107 // See if this cell has already been hit
108 curcell=(AliPMDhit*) lhits[i];
109 if (*curcell==*newcell) {
110 // printf("Cell with same numbers found\n") ; curcell->Print();
111 *curcell = *curcell+*newcell;
112 // printf("Cell after addition\n") ; curcell->Print();
117 new(lhits[fNhits++]) AliPMDhit(newcell);
121 //_____________________________________________________________________________
122 void AliPMD::BuildGeometry()
125 // Build simple ROOT TNode geometry for event display
129 const int kColorPMD = kRed;
132 Top=gAlice->GetGeometry()->GetNode("alice");
135 new TBRIK("S_PMD","PMD box","void",300,300,5);
137 Node = new TNode("PMD","PMD","S_PMD",0,0,600,"");
138 Node->SetLineColor(kColorPMD);
142 //_____________________________________________________________________________
143 Int_t AliPMD::DistancetoPrimitive(Int_t , Int_t )
146 // Distance from mouse to detector on the screen
152 //_____________________________________________________________________________
153 void AliPMD::SetPAR(Float_t p1, Float_t p2, Float_t p3,Float_t p4)
156 // Set PMD parameters
164 //_____________________________________________________________________________
165 void AliPMD::SetIN(Float_t p1, Float_t p2, Float_t p3,Float_t p4,Float_t p5)
168 // Set PMD parameters
177 //_____________________________________________________________________________
178 void AliPMD::SetGEO(Float_t p1, Float_t p2, Float_t p3)
181 // Set geometry parameters
188 //_____________________________________________________________________________
189 void AliPMD::SetPadSize(Float_t p1, Float_t p2, Float_t p3,Float_t p4)
200 //_____________________________________________________________________________
201 void AliPMD::StepManager()
204 // Called at every step in PMD
208 ///////////////////////////////////////////////////////////////////////////////
210 // Photon Multiplicity Detector Version 1 //
214 <img src="picts/AliPMDv1Class.gif">
218 ///////////////////////////////////////////////////////////////////////////////
222 //_____________________________________________________________________________
223 AliPMDhit::AliPMDhit(Int_t shunt,Int_t track, Int_t *vol, Float_t *hits):
230 for (i=0;i<5;i++) fVolume[i] = vol[i];