]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONchamber.cxx
Fixed positioning of spacers inside freon.
[u/mrichter/AliRoot.git] / MUON / AliMUONchamber.cxx
CommitLineData
4c039060 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15
16/*
17$Log$
18*/
19
a897a37a 20#include "AliMUONchamber.h"
21#include "TMath.h"
22ClassImp(AliMUONchamber)
23 AliMUONchamber::AliMUONchamber()
24{
25 fSegmentation = new TObjArray(2);
26 fResponse=0;
27 fnsec=1;
28}
29
30void AliMUONchamber::Init()
31{
32
33 ((AliMUONsegmentation *) (*fSegmentation)[0])->Init(this);
34 if (fnsec==2) {
35 ((AliMUONsegmentation *) (*fSegmentation)[1])->Init(this);
36 }
37
38}
39
40void AliMUONchamber::DisIntegration(Float_t eloss, Float_t xhit, Float_t yhit,
41 Int_t& nnew,Float_t newclust[6][500])
42{
43//
44// Generates pad hits (simulated cluster)
45// using the segmentation and the response model
46 Float_t dx, dy;
47 //
48 // Width of the integration area
49 //
50 dx=fResponse->SigmaIntegration()*fResponse->ChargeSpreadX();
51 dy=fResponse->SigmaIntegration()*fResponse->ChargeSpreadY();
52 //
53 // Get pulse height from energy loss
54 Float_t qtot = fResponse->IntPH(eloss);
55 //
56 // Loop Over Pads
57
58 Float_t qcheck=0, qp;
59 nnew=0;
60 for (Int_t i=1; i<=fnsec; i++) {
61 qcheck=0;
62 AliMUONsegmentation * segmentation=(AliMUONsegmentation *) (*fSegmentation)[i-1];
63 for (segmentation->FirstPad(xhit, yhit, dx, dy);
64 segmentation->MorePads();
65 segmentation->NextPad())
66 {
67 qp=fResponse->IntXY(segmentation);
68 qp=TMath::Abs(qp);
69
70//
71//
72 if (qp > 1.e-4) {
73 qcheck+=qp;
74 //
75 // --- store signal information
76 newclust[0][nnew]=qtot;
77 newclust[1][nnew]=segmentation->Ix();
78 newclust[2][nnew]=segmentation->Iy();
79 newclust[3][nnew]=qp * qtot;
80 newclust[4][nnew]=segmentation->ISector();
81 newclust[5][nnew]=(Float_t) i;
82// printf("\n pad hit %d %d %f %f \n",nnew,i,newclust[1][nnew],newclust[2][nnew]);
83 nnew++;
84
85
86 }
87 } // Pad loop
88// printf("\n check sum is %f %f %f %f %d \n",qcheck,qtot,xhit,yhit,fGid);
89 } // Cathode plane loop
90}
91
92
93
e3a4d40e 94 void AliMUONchamber::InitGeo(Float_t)
a897a37a 95{
96// sensitive gas gap
97 fdGas= 0.5;
98// 3% radiation length of aluminum (X0=8.9 cm)
99 fdAlu= 3.0/100*8.9;
100}