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.1.2.5 2000/06/09 21:27:01 morsch
18 Most coding rule violations corrected.
20 Revision 1.1.2.4 2000/05/05 11:34:12 morsch
23 Revision 1.1.2.3 2000/05/05 10:09:52 morsch
27 #include "AliMUONChamber.h"
28 #include "AliMUONSegmentation.h"
29 #include "AliMUONResponse.h"
32 ClassImp(AliMUONChamber)
34 AliMUONChamber::AliMUONChamber()
36 fSegmentation = new TObjArray(2);
37 (*fSegmentation)[0] = 0;
38 (*fSegmentation)[1] = 0;
44 AliMUONChamber::~AliMUONChamber()
46 if (fSegmentation) delete fSegmentation;
49 AliMUONChamber::AliMUONChamber(const AliMUONChamber& rChamber)
51 // Dummy copy constructor
56 void AliMUONChamber::Init()
60 // ... for chamber segmentation
61 if ((*fSegmentation)[0])
62 ((AliMUONSegmentation *) (*fSegmentation)[0])->Init(this);
65 if ((*fSegmentation)[1])
66 ((AliMUONSegmentation *) (*fSegmentation)[1])->Init(this);
70 Int_t AliMUONChamber::SigGenCond(Float_t x, Float_t y, Float_t z)
72 // Ask segmentation if signal should be generated
74 return ((AliMUONSegmentation*) (*fSegmentation)[0])
75 ->SigGenCond(x, y, z) ;
77 return (((AliMUONSegmentation*) (*fSegmentation)[0])
78 ->SigGenCond(x, y, z)) ||
79 (((AliMUONSegmentation*) (*fSegmentation)[1])
80 ->SigGenCond(x, y, z)) ;
85 void AliMUONChamber::SigGenInit(Float_t x, Float_t y, Float_t z)
88 // Initialisation of segmentation for hit
91 ((AliMUONSegmentation*) (*fSegmentation)[0])->SigGenInit(x, y, z) ;
93 ((AliMUONSegmentation*) (*fSegmentation)[0])->SigGenInit(x, y, z) ;
94 ((AliMUONSegmentation*) (*fSegmentation)[1])->SigGenInit(x, y, z) ;
98 void AliMUONChamber::DisIntegration(Float_t eloss, Float_t tof,
99 Float_t xhit, Float_t yhit,
100 Int_t& nnew,Float_t newclust[6][500])
103 // Generates pad hits (simulated cluster)
104 // using the segmentation and the response model
107 // Width of the integration area
109 dx=fResponse->SigmaIntegration()*fResponse->ChargeSpreadX();
110 dy=fResponse->SigmaIntegration()*fResponse->ChargeSpreadY();
112 // Get pulse height from energy loss
113 Float_t qtot = fResponse->IntPH(eloss);
117 Float_t qcheck=0, qp;
119 for (Int_t i=1; i<=fnsec; i++) {
121 AliMUONSegmentation * segmentation=
122 (AliMUONSegmentation *) (*fSegmentation)[i-1];
123 for (segmentation->FirstPad(xhit, yhit, dx, dy);
124 segmentation->MorePads();
125 segmentation->NextPad())
127 qp=fResponse->IntXY(segmentation);
135 // --- store signal information
136 newclust[0][nnew]=qtot; // total charge
137 newclust[1][nnew]=segmentation->Ix(); // ix-position of pad
138 newclust[2][nnew]=segmentation->Iy(); // iy-position of pad
139 newclust[3][nnew]=qp * qtot; // charge on pad
140 newclust[4][nnew]=segmentation->ISector(); // sector id
141 newclust[5][nnew]=(Float_t) i; // counter
145 } // Cathode plane loop
150 void AliMUONChamber::InitGeo(Float_t zpos)
154 // 3% radiation length of aluminum (X0=8.9 cm)
159 AliMUONChamber & AliMUONChamber::operator =(const AliMUONChamber& rhs)
161 // Dummy assignment operator