]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONchamber.cxx
New version of MUON from M.Bondila & A.Morsch
[u/mrichter/AliRoot.git] / MUON / AliMUONchamber.cxx
CommitLineData
a897a37a 1#include "AliMUONchamber.h"
2#include "TMath.h"
3ClassImp(AliMUONchamber)
4 AliMUONchamber::AliMUONchamber()
5{
6 fSegmentation = new TObjArray(2);
7 fResponse=0;
8 fnsec=1;
9}
10
11void AliMUONchamber::Init()
12{
13
14 ((AliMUONsegmentation *) (*fSegmentation)[0])->Init(this);
15 if (fnsec==2) {
16 ((AliMUONsegmentation *) (*fSegmentation)[1])->Init(this);
17 }
18
19}
20
21void AliMUONchamber::DisIntegration(Float_t eloss, Float_t xhit, Float_t yhit,
22 Int_t& nnew,Float_t newclust[6][500])
23{
24//
25// Generates pad hits (simulated cluster)
26// using the segmentation and the response model
27 Float_t dx, dy;
28 //
29 // Width of the integration area
30 //
31 dx=fResponse->SigmaIntegration()*fResponse->ChargeSpreadX();
32 dy=fResponse->SigmaIntegration()*fResponse->ChargeSpreadY();
33 //
34 // Get pulse height from energy loss
35 Float_t qtot = fResponse->IntPH(eloss);
36 //
37 // Loop Over Pads
38
39 Float_t qcheck=0, qp;
40 nnew=0;
41 for (Int_t i=1; i<=fnsec; i++) {
42 qcheck=0;
43 AliMUONsegmentation * segmentation=(AliMUONsegmentation *) (*fSegmentation)[i-1];
44 for (segmentation->FirstPad(xhit, yhit, dx, dy);
45 segmentation->MorePads();
46 segmentation->NextPad())
47 {
48 qp=fResponse->IntXY(segmentation);
49 qp=TMath::Abs(qp);
50
51//
52//
53 if (qp > 1.e-4) {
54 qcheck+=qp;
55 //
56 // --- store signal information
57 newclust[0][nnew]=qtot;
58 newclust[1][nnew]=segmentation->Ix();
59 newclust[2][nnew]=segmentation->Iy();
60 newclust[3][nnew]=qp * qtot;
61 newclust[4][nnew]=segmentation->ISector();
62 newclust[5][nnew]=(Float_t) i;
63// printf("\n pad hit %d %d %f %f \n",nnew,i,newclust[1][nnew],newclust[2][nnew]);
64 nnew++;
65
66
67 }
68 } // Pad loop
69// printf("\n check sum is %f %f %f %f %d \n",qcheck,qtot,xhit,yhit,fGid);
70 } // Cathode plane loop
71}
72
73
74
75 void AliMUONchamber::InitGeo(Float_t zpos)
76{
77// sensitive gas gap
78 fdGas= 0.5;
79// 3% radiation length of aluminum (X0=8.9 cm)
80 fdAlu= 3.0/100*8.9;
81}