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.2 2000/06/15 07:58:48 morsch
18 Code from MUON-dev joined
20 Revision 1.1.2.5 2000/06/09 21:27:01 morsch
21 Most coding rule violations corrected.
23 Revision 1.1.2.4 2000/05/05 11:34:12 morsch
26 Revision 1.1.2.3 2000/05/05 10:09:52 morsch
30 #include "AliMUONChamber.h"
31 #include "AliMUONSegmentation.h"
32 #include "AliMUONResponse.h"
35 ClassImp(AliMUONChamber)
37 AliMUONChamber::AliMUONChamber()
39 fSegmentation = new TObjArray(2);
40 (*fSegmentation)[0] = 0;
41 (*fSegmentation)[1] = 0;
47 AliMUONChamber::~AliMUONChamber()
49 if (fSegmentation) delete fSegmentation;
52 AliMUONChamber::AliMUONChamber(const AliMUONChamber& rChamber)
54 // Dummy copy constructor
59 void AliMUONChamber::Init()
63 // ... for chamber segmentation
64 if ((*fSegmentation)[0])
65 ((AliMUONSegmentation *) (*fSegmentation)[0])->Init(this);
68 if ((*fSegmentation)[1])
69 ((AliMUONSegmentation *) (*fSegmentation)[1])->Init(this);
73 Int_t AliMUONChamber::SigGenCond(Float_t x, Float_t y, Float_t z)
75 // Ask segmentation if signal should be generated
77 return ((AliMUONSegmentation*) (*fSegmentation)[0])
78 ->SigGenCond(x, y, z) ;
80 return (((AliMUONSegmentation*) (*fSegmentation)[0])
81 ->SigGenCond(x, y, z)) ||
82 (((AliMUONSegmentation*) (*fSegmentation)[1])
83 ->SigGenCond(x, y, z)) ;
88 void AliMUONChamber::SigGenInit(Float_t x, Float_t y, Float_t z)
91 // Initialisation of segmentation for hit
94 ((AliMUONSegmentation*) (*fSegmentation)[0])->SigGenInit(x, y, z) ;
96 ((AliMUONSegmentation*) (*fSegmentation)[0])->SigGenInit(x, y, z) ;
97 ((AliMUONSegmentation*) (*fSegmentation)[1])->SigGenInit(x, y, z) ;
101 void AliMUONChamber::DisIntegration(Float_t eloss, Float_t tof,
102 Float_t xhit, Float_t yhit, Float_t zhit,
103 Int_t& nnew,Float_t newclust[6][500])
106 // Generates pad hits (simulated cluster)
107 // using the segmentation and the response model
110 // Width of the integration area
112 dx=fResponse->SigmaIntegration()*fResponse->ChargeSpreadX();
113 dy=fResponse->SigmaIntegration()*fResponse->ChargeSpreadY();
115 // Get pulse height from energy loss
116 Float_t qtot = fResponse->IntPH(eloss);
120 Float_t qcheck=0, qp;
122 for (Int_t i=1; i<=fnsec; i++) {
124 AliMUONSegmentation * segmentation=
125 (AliMUONSegmentation *) (*fSegmentation)[i-1];
126 for (segmentation->FirstPad(xhit, yhit, zhit, dx, dy);
127 segmentation->MorePads();
128 segmentation->NextPad())
130 qp=fResponse->IntXY(segmentation);
138 // --- store signal information
139 newclust[0][nnew]=qtot; // total charge
140 newclust[1][nnew]=segmentation->Ix(); // ix-position of pad
141 newclust[2][nnew]=segmentation->Iy(); // iy-position of pad
142 newclust[3][nnew]=qp * qtot; // charge on pad
143 newclust[4][nnew]=segmentation->ISector(); // sector id
144 newclust[5][nnew]=(Float_t) i; // counter
148 } // Cathode plane loop
153 void AliMUONChamber::InitGeo(Float_t zpos)
157 // 3% radiation length of aluminum (X0=8.9 cm)
162 AliMUONChamber & AliMUONChamber::operator =(const AliMUONChamber& rhs)
164 // Dummy assignment operator