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 **************************************************************************/
20 #include "AliMUONchamber.h"
22 ClassImp(AliMUONchamber)
23 AliMUONchamber::AliMUONchamber()
25 fSegmentation = new TObjArray(2);
30 void AliMUONchamber::Init()
33 ((AliMUONsegmentation *) (*fSegmentation)[0])->Init(this);
35 ((AliMUONsegmentation *) (*fSegmentation)[1])->Init(this);
40 void AliMUONchamber::DisIntegration(Float_t eloss, Float_t xhit, Float_t yhit,
41 Int_t& nnew,Float_t newclust[6][500])
44 // Generates pad hits (simulated cluster)
45 // using the segmentation and the response model
48 // Width of the integration area
50 dx=fResponse->SigmaIntegration()*fResponse->ChargeSpreadX();
51 dy=fResponse->SigmaIntegration()*fResponse->ChargeSpreadY();
53 // Get pulse height from energy loss
54 Float_t qtot = fResponse->IntPH(eloss);
60 for (Int_t i=1; i<=fnsec; i++) {
62 AliMUONsegmentation * segmentation=(AliMUONsegmentation *) (*fSegmentation)[i-1];
63 for (segmentation->FirstPad(xhit, yhit, dx, dy);
64 segmentation->MorePads();
65 segmentation->NextPad())
67 qp=fResponse->IntXY(segmentation);
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]);
88 // printf("\n check sum is %f %f %f %f %d \n",qcheck,qtot,xhit,yhit,fGid);
89 } // Cathode plane loop
94 void AliMUONchamber::InitGeo(Float_t)
98 // 3% radiation length of aluminum (X0=8.9 cm)