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 **************************************************************************/
18 Revision 1.5 1999/09/29 09:24:27 fca
19 Introduction of the Copyright and cvs Log
23 ///////////////////////////////////////////////////////////////////////////////
26 // Photon Multiplicity Detector //
27 // This class contains the basic functions for the Photon Multiplicity //
28 // Detector. Functions specific to one particular geometry are //
29 // contained in the derived classes //
33 <img src="picts/AliPMDClass.gif">
36 <font size=+2 color=red>
37 <p>The responsible person for this module is
38 <a href="mailto:sub@vecdec.veccal.ernet.in">Subhasis Chattopadhyay</a>.
44 ///////////////////////////////////////////////////////////////////////////////
55 //_____________________________________________________________________________
59 // Default constructor
64 //_____________________________________________________________________________
65 AliPMD::AliPMD(const char *name, const char *title)
66 : AliDetector(name,title)
69 // Default constructor
73 // Allocate the array of hits
74 fHits = new TClonesArray("AliPMDhit", 405);
75 gAlice->AddHitList(fHits);
97 //_____________________________________________________________________________
98 void AliPMD::AddHit(Int_t track, Int_t *vol, Float_t *hits)
103 TClonesArray &lhits = *fHits;
104 AliPMDhit *newcell, *curcell;
105 // printf("PMD++ Adding energy %f, prim %d, vol %d %d %d %d\n",
106 // hits[3],gAlice->GetPrimary(track-1),vol[0],vol[1],vol[2],vol[3]);
107 newcell = new AliPMDhit(fIshunt, track, vol, hits);
109 for (i=0; i<fNhits; i++) {
111 // See if this cell has already been hit
112 curcell=(AliPMDhit*) lhits[i];
113 if (*curcell==*newcell) {
114 // printf("Cell with same numbers found\n") ; curcell->Print();
115 *curcell = *curcell+*newcell;
116 // printf("Cell after addition\n") ; curcell->Print();
121 new(lhits[fNhits++]) AliPMDhit(newcell);
125 //_____________________________________________________________________________
126 void AliPMD::BuildGeometry()
129 // Build simple ROOT TNode geometry for event display
133 const int kColorPMD = kRed;
136 Top=gAlice->GetGeometry()->GetNode("alice");
139 new TBRIK("S_PMD","PMD box","void",300,300,5);
141 Node = new TNode("PMD","PMD","S_PMD",0,0,600,"");
142 Node->SetLineColor(kColorPMD);
146 //_____________________________________________________________________________
147 Int_t AliPMD::DistancetoPrimitive(Int_t , Int_t )
150 // Distance from mouse to detector on the screen
156 //_____________________________________________________________________________
157 void AliPMD::SetPAR(Float_t p1, Float_t p2, Float_t p3,Float_t p4)
160 // Set PMD parameters
168 //_____________________________________________________________________________
169 void AliPMD::SetIN(Float_t p1, Float_t p2, Float_t p3,Float_t p4,Float_t p5)
172 // Set PMD parameters
181 //_____________________________________________________________________________
182 void AliPMD::SetGEO(Float_t p1, Float_t p2, Float_t p3)
185 // Set geometry parameters
192 //_____________________________________________________________________________
193 void AliPMD::SetPadSize(Float_t p1, Float_t p2, Float_t p3,Float_t p4)
204 //_____________________________________________________________________________
205 void AliPMD::StepManager()
208 // Called at every step in PMD
212 ///////////////////////////////////////////////////////////////////////////////
214 // Photon Multiplicity Detector Version 1 //
218 <img src="picts/AliPMDv1Class.gif">
222 ///////////////////////////////////////////////////////////////////////////////
226 //_____________________________________________________________________________
227 AliPMDhit::AliPMDhit(Int_t shunt,Int_t track, Int_t *vol, Float_t *hits):
234 for (i=0;i<5;i++) fVolume[i] = vol[i];