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 **************************************************************************/
17 Revision 1.5 2000/07/03 11:54:57 morsch
18 AliMUONSegmentation and AliMUONHitMap have been replaced by AliSegmentation and AliHitMap in STEER
19 The methods GetPadIxy and GetPadXxy of AliMUONSegmentation have changed name to GetPadI and GetPadC.
21 Revision 1.4 2000/06/29 12:34:09 morsch
22 AliMUONSegmentation class has been made independent of AliMUONChamber. This makes
23 it usable with any other geometry class. The link to the object to which it belongs is
24 established via an index. This assumes that there exists a global geometry manager
25 from which the pointer to the parent object can be obtained (in our case gAlice).
27 Revision 1.3 2000/06/28 15:16:35 morsch
28 (1) Client code adapted to new method signatures in AliMUONSegmentation (see comments there)
29 to allow development of slat-muon chamber simulation and reconstruction code in the MUON
30 framework. The changes should have no side effects (mostly dummy arguments).
31 (2) Hit disintegration uses 3-dim hit coordinates to allow simulation
32 of chambers with overlapping modules (MakePadHits, Disintegration).
34 Revision 1.2 2000/06/15 07:58:48 morsch
35 Code from MUON-dev joined
37 Revision 1.1.2.5 2000/06/09 21:27:01 morsch
38 Most coding rule violations corrected.
40 Revision 1.1.2.4 2000/05/05 11:34:12 morsch
43 Revision 1.1.2.3 2000/05/05 10:09:52 morsch
47 #include "AliMUONChamber.h"
50 ClassImp(AliMUONChamber)
52 AliMUONChamber::AliMUONChamber()
54 // Default constructor
55 fSegmentation = new TObjArray(2);
56 (*fSegmentation)[0] = 0;
57 (*fSegmentation)[1] = 0;
64 AliMUONChamber::AliMUONChamber(Int_t id)
66 // Construtor with chamber id
67 fSegmentation = new TObjArray(2);
68 (*fSegmentation)[0] = 0;
69 (*fSegmentation)[1] = 0;
76 AliMUONChamber::~AliMUONChamber()
79 if (fSegmentation) delete fSegmentation;
82 AliMUONChamber::AliMUONChamber(const AliMUONChamber& rChamber)
84 // Dummy copy constructor
89 void AliMUONChamber::Init()
93 // ... for chamber segmentation
94 if ((*fSegmentation)[0])
95 ((AliSegmentation *) (*fSegmentation)[0])->Init(fId);
98 if ((*fSegmentation)[1])
99 ((AliSegmentation *) (*fSegmentation)[1])->Init(fId);
103 Int_t AliMUONChamber::SigGenCond(Float_t x, Float_t y, Float_t z)
105 // Ask segmentation if signal should be generated
107 return ((AliSegmentation*) (*fSegmentation)[0])
108 ->SigGenCond(x, y, z) ;
110 return (((AliSegmentation*) (*fSegmentation)[0])
111 ->SigGenCond(x, y, z)) ||
112 (((AliSegmentation*) (*fSegmentation)[1])
113 ->SigGenCond(x, y, z)) ;
118 void AliMUONChamber::SigGenInit(Float_t x, Float_t y, Float_t z)
121 // Initialisation of segmentation for hit
124 ((AliSegmentation*) (*fSegmentation)[0])->SigGenInit(x, y, z) ;
126 ((AliSegmentation*) (*fSegmentation)[0])->SigGenInit(x, y, z) ;
127 ((AliSegmentation*) (*fSegmentation)[1])->SigGenInit(x, y, z) ;
131 void AliMUONChamber::DisIntegration(Float_t eloss, Float_t tof,
132 Float_t xhit, Float_t yhit, Float_t zhit,
133 Int_t& nnew,Float_t newclust[6][500])
136 // Generates pad hits (simulated cluster)
137 // using the segmentation and the response model
140 // Width of the integration area
142 dx=fResponse->SigmaIntegration()*fResponse->ChargeSpreadX();
143 dy=fResponse->SigmaIntegration()*fResponse->ChargeSpreadY();
145 // Get pulse height from energy loss
146 Float_t qtot = fResponse->IntPH(eloss);
150 Float_t qcheck=0, qp;
153 for (Int_t i=1; i<=fnsec; i++) {
155 AliSegmentation * segmentation=
156 (AliSegmentation *) (*fSegmentation)[i-1];
157 for (segmentation->FirstPad(xhit, yhit, zhit, dx, dy);
158 segmentation->MorePads();
159 segmentation->NextPad())
161 qp=fResponse->IntXY(segmentation);
168 // --- store signal information
169 newclust[0][nnew]=qtot; // total charge
170 newclust[1][nnew]=segmentation->Ix(); // ix-position of pad
171 newclust[2][nnew]=segmentation->Iy(); // iy-position of pad
172 newclust[3][nnew]=qp * qtot; // charge on pad
173 newclust[4][nnew]=segmentation->ISector(); // sector id
174 newclust[5][nnew]=(Float_t) i; // counter
176 // if (i==2) printf("\n i, nnew, q %d %d %f", i, nnew, qp*qtot);
181 } // Cathode plane loop
186 void AliMUONChamber::InitGeo(Float_t zpos)
190 // 3% radiation length of aluminum (X0=8.9 cm)
195 AliMUONChamber & AliMUONChamber::operator =(const AliMUONChamber& rhs)
197 // Dummy assignment operator