1 ///////////////////////////////////////////////////////////////////////////////
4 // Photon Multiplicity Detector //
5 // This class contains the basic functions for the Photon Multiplicity //
6 // Detector. Functions specific to one particular geometry are //
7 // contained in the derived classes //
11 <img src="picts/AliPMDClass.gif">
14 <font size=+2 color=red>
15 <p>The responsible person for this module is
16 <a href="mailto:sub@vecdec.veccal.ernet.in">Subhasis Chattopadhyay</a>.
22 ///////////////////////////////////////////////////////////////////////////////
33 //_____________________________________________________________________________
37 // Default constructor
42 //_____________________________________________________________________________
43 AliPMD::AliPMD(const char *name, const char *title)
44 : AliDetector(name,title)
47 // Default constructor
51 // Allocate the array of hits
52 fHits = new TClonesArray("AliPMDhit", 405);
74 //_____________________________________________________________________________
75 void AliPMD::AddHit(Int_t track, Int_t *vol, Float_t *hits)
80 TClonesArray &lhits = *fHits;
81 AliPMDhit *newcell, *curcell;
82 // printf("PMD++ Adding energy %f, prim %d, vol %d %d %d %d\n",
83 // hits[3],gAlice->GetPrimary(track-1),vol[0],vol[1],vol[2],vol[3]);
84 newcell = new AliPMDhit(fIshunt, track, vol, hits);
86 for (i=0; i<fNhits; i++) {
88 // See if this cell has already been hit
89 curcell=(AliPMDhit*) lhits[i];
90 if (*curcell==*newcell) {
91 // printf("Cell with same numbers found\n") ; curcell->Print();
92 *curcell = *curcell+*newcell;
93 // printf("Cell after addition\n") ; curcell->Print();
98 new(lhits[fNhits++]) AliPMDhit(newcell);
102 //_____________________________________________________________________________
103 void AliPMD::BuildGeometry()
106 // Build simple ROOT TNode geometry for event display
110 const int kColorPMD = kRed;
113 Top=gAlice->GetGeometry()->GetNode("alice");
116 new TBRIK("S_PMD","PMD box","void",300,300,5);
118 Node = new TNode("PMD","PMD","S_PMD",0,0,600,"");
119 Node->SetLineColor(kColorPMD);
123 //_____________________________________________________________________________
124 Int_t AliPMD::DistancetoPrimitive(Int_t , Int_t )
127 // Distance from mouse to detector on the screen
133 //_____________________________________________________________________________
134 void AliPMD::SetPAR(Float_t p1, Float_t p2, Float_t p3,Float_t p4)
137 // Set PMD parameters
145 //_____________________________________________________________________________
146 void AliPMD::SetIN(Float_t p1, Float_t p2, Float_t p3,Float_t p4,Float_t p5)
149 // Set PMD parameters
158 //_____________________________________________________________________________
159 void AliPMD::SetGEO(Float_t p1, Float_t p2, Float_t p3)
162 // Set geometry parameters
169 //_____________________________________________________________________________
170 void AliPMD::SetPadSize(Float_t p1, Float_t p2, Float_t p3,Float_t p4)
181 //_____________________________________________________________________________
182 void AliPMD::StepManager()
185 // Called at every step in PMD
189 ///////////////////////////////////////////////////////////////////////////////
191 // Photon Multiplicity Detector Version 1 //
195 <img src="picts/AliPMDv1Class.gif">
199 ///////////////////////////////////////////////////////////////////////////////
203 //_____________________________________________________________________________
204 AliPMDhit::AliPMDhit(Int_t shunt,Int_t track, Int_t *vol, Float_t *hits):
211 for (i=0;i<5;i++) fVolume[i] = vol[i];