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.4 2000/06/29 12:34:09 morsch
18 AliMUONSegmentation class has been made independent of AliMUONChamber. This makes
19 it usable with any other geometry class. The link to the object to which it belongs is
20 established via an index. This assumes that there exists a global geometry manager
21 from which the pointer to the parent object can be obtained (in our case gAlice).
23 Revision 1.3 2000/06/28 15:16:35 morsch
24 (1) Client code adapted to new method signatures in AliMUONSegmentation (see comments there)
25 to allow development of slat-muon chamber simulation and reconstruction code in the MUON
26 framework. The changes should have no side effects (mostly dummy arguments).
27 (2) Hit disintegration uses 3-dim hit coordinates to allow simulation
28 of chambers with overlapping modules (MakePadHits, Disintegration).
30 Revision 1.2 2000/06/15 07:58:48 morsch
31 Code from MUON-dev joined
33 Revision 1.1.2.5 2000/06/09 21:27:01 morsch
34 Most coding rule violations corrected.
36 Revision 1.1.2.4 2000/05/05 11:34:12 morsch
39 Revision 1.1.2.3 2000/05/05 10:09:52 morsch
43 #include "AliMUONChamber.h"
44 #include "AliMUONResponse.h"
47 ClassImp(AliMUONChamber)
49 AliMUONChamber::AliMUONChamber()
51 // Default constructor
52 fSegmentation = new TObjArray(2);
53 (*fSegmentation)[0] = 0;
54 (*fSegmentation)[1] = 0;
61 AliMUONChamber::AliMUONChamber(Int_t id)
63 // Construtor with chamber id
64 fSegmentation = new TObjArray(2);
65 (*fSegmentation)[0] = 0;
66 (*fSegmentation)[1] = 0;
73 AliMUONChamber::~AliMUONChamber()
76 if (fSegmentation) delete fSegmentation;
79 AliMUONChamber::AliMUONChamber(const AliMUONChamber& rChamber)
81 // Dummy copy constructor
86 void AliMUONChamber::Init()
90 // ... for chamber segmentation
91 if ((*fSegmentation)[0])
92 ((AliSegmentation *) (*fSegmentation)[0])->Init(fId);
95 if ((*fSegmentation)[1])
96 ((AliSegmentation *) (*fSegmentation)[1])->Init(fId);
100 Int_t AliMUONChamber::SigGenCond(Float_t x, Float_t y, Float_t z)
102 // Ask segmentation if signal should be generated
104 return ((AliSegmentation*) (*fSegmentation)[0])
105 ->SigGenCond(x, y, z) ;
107 return (((AliSegmentation*) (*fSegmentation)[0])
108 ->SigGenCond(x, y, z)) ||
109 (((AliSegmentation*) (*fSegmentation)[1])
110 ->SigGenCond(x, y, z)) ;
115 void AliMUONChamber::SigGenInit(Float_t x, Float_t y, Float_t z)
118 // Initialisation of segmentation for hit
121 ((AliSegmentation*) (*fSegmentation)[0])->SigGenInit(x, y, z) ;
123 ((AliSegmentation*) (*fSegmentation)[0])->SigGenInit(x, y, z) ;
124 ((AliSegmentation*) (*fSegmentation)[1])->SigGenInit(x, y, z) ;
128 void AliMUONChamber::DisIntegration(Float_t eloss, Float_t tof,
129 Float_t xhit, Float_t yhit, Float_t zhit,
130 Int_t& nnew,Float_t newclust[6][500])
133 // Generates pad hits (simulated cluster)
134 // using the segmentation and the response model
137 // Width of the integration area
139 dx=fResponse->SigmaIntegration()*fResponse->ChargeSpreadX();
140 dy=fResponse->SigmaIntegration()*fResponse->ChargeSpreadY();
142 // Get pulse height from energy loss
143 Float_t qtot = fResponse->IntPH(eloss);
147 Float_t qcheck=0, qp;
149 for (Int_t i=1; i<=fnsec; i++) {
151 AliSegmentation * segmentation=
152 (AliSegmentation *) (*fSegmentation)[i-1];
153 for (segmentation->FirstPad(xhit, yhit, zhit, dx, dy);
154 segmentation->MorePads();
155 segmentation->NextPad())
157 qp=fResponse->IntXY(segmentation);
165 // --- store signal information
166 newclust[0][nnew]=qtot; // total charge
167 newclust[1][nnew]=segmentation->Ix(); // ix-position of pad
168 newclust[2][nnew]=segmentation->Iy(); // iy-position of pad
169 newclust[3][nnew]=qp * qtot; // charge on pad
170 newclust[4][nnew]=segmentation->ISector(); // sector id
171 newclust[5][nnew]=(Float_t) i; // counter
175 } // Cathode plane loop
180 void AliMUONChamber::InitGeo(Float_t zpos)
184 // 3% radiation length of aluminum (X0=8.9 cm)
189 AliMUONChamber & AliMUONChamber::operator =(const AliMUONChamber& rhs)
191 // Dummy assignment operator