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 **************************************************************************/
18 Revision 1.7 2000/10/02 16:58:29 egangler
19 Cleaning of the code :
22 -> some useless includes removed or replaced by "class" statement
24 Revision 1.6 2000/07/03 11:54:57 morsch
25 AliMUONSegmentation and AliMUONHitMap have been replaced by AliSegmentation and AliHitMap in STEER
26 The methods GetPadIxy and GetPadXxy of AliMUONSegmentation have changed name to GetPadI and GetPadC.
28 Revision 1.5 2000/06/29 12:34:09 morsch
29 AliMUONSegmentation class has been made independent of AliMUONChamber. This makes
30 it usable with any other geometry class. The link to the object to which it belongs is
31 established via an index. This assumes that there exists a global geometry manager
32 from which the pointer to the parent object can be obtained (in our case gAlice).
34 Revision 1.4 2000/06/29 06:52:02 pcrochet
35 pow changed to TMath::Power
37 Revision 1.3 2000/06/28 15:16:35 morsch
38 (1) Client code adapted to new method signatures in AliMUONSegmentation (see comments there)
39 to allow development of slat-muon chamber simulation and reconstruction code in the MUON
40 framework. The changes should have no side effects (mostly dummy arguments).
41 (2) Hit disintegration uses 3-dim hit coordinates to allow simulation
42 of chambers with overlapping modules (MakePadHits, Disintegration).
44 Revision 1.2 2000/06/15 07:58:48 morsch
45 Code from MUON-dev joined
47 Revision 1.1.2.3 2000/06/09 21:27:35 morsch
48 Most coding rule violations corrected.
50 Revision 1.1.2.2 2000/04/26 12:28:25 morsch
51 - flag pad hits with condition on ToF (CP)
52 - Tof included in the method DisIntegration (CP)
54 Revision 1.1.2.1 2000/02/17 14:30:54 morsch
59 #include "AliMUONChamberTrigger.h"
60 #include "AliMUONSegmentationTrigger.h"
61 #include "AliMUONResponseTrigger.h"
62 #include "AliMUONResponseTriggerV1.h"
63 #include <TObjArray.h>
67 ClassImp(AliMUONChamberTrigger)
69 //-------------------------------------------
71 AliMUONChamberTrigger::AliMUONChamberTrigger()
73 // Default constructor
77 AliMUONChamberTrigger::AliMUONChamberTrigger(Int_t id) : AliMUONChamber(id)
79 // Constructor using chamber id
82 //-------------------------------------------
83 void AliMUONChamberTrigger::DisIntegration(Float_t eloss, Float_t tof,
84 Float_t xhit, Float_t yhit, Float_t zhit,
86 Float_t newclust[6][500])
89 // Generates pad hits (simulated cluster)
90 // using the segmentation and the response model
93 if (tof<75*TMath::Power(10,-9)) {
99 // cout << " time = " << tof << " , " << twentyNano << "\n";
103 for (Int_t i=1; i<=fnsec; i++) {
104 AliSegmentation * segmentation=
105 (AliSegmentation*) (*fSegmentation)[i-1];
107 // Find the module & strip Id. which has fired
110 segmentation->GetPadI(xhit,yhit,0,ix,iy);
111 segmentation->SetPad(ix,iy);
113 // treatment of GEANT hits w/o corresponding strip (due to the fact that
114 // the 2 geometries are computed in a very slightly different way)
116 cout << " AliMUONChamberTrigger hit w/o strip " << xhit << " , " << yhit << "\n";
118 // --- store signal information for this strip
119 newclust[0][nnew]=1.; // total charge
120 newclust[1][nnew]=ix; // ix-position of pad
121 newclust[2][nnew]=iy; // iy-position of pad
122 newclust[3][nnew]=twentyNano; // time of flight
123 newclust[4][nnew]=segmentation->ISector(); // sector id
124 newclust[5][nnew]=(Float_t) i; // counter
127 // cluster-size if AliMUONResponseTriggerV1, nothing if AliMUONResponseTrigger
128 if (((AliMUONResponseTrigger*) fResponse)->SetGenerCluster()) {
131 segmentation->SetHit(xhit,yhit,zhit);
132 // get the list of nearest neighbours
133 Int_t nList, xList[10], yList[10];
134 segmentation->Neighbours(ix,iy,&nList,xList,yList);
137 for (Int_t j=0; j<nList; j++){ // loop over neighbours
138 if (xList[j]!=0) { // existing neighbour
139 if (j==0||j==5||qp!=0) { // built-up cluster-size
141 // neighbour real coordinates (just for checks here)
143 segmentation->GetPadC(xList[j],yList[j],x,y,z);
144 // set pad (fx fy & fix fiy are the current pad coord. & Id.)
145 segmentation->SetPad(xList[j],yList[j]);
146 // get the chamber (i.e. current strip) response
147 qp=fResponse->IntXY(segmentation);
150 // --- store signal information for neighbours
151 newclust[0][nnew]=qp; // total charge
152 newclust[1][nnew]=segmentation->Ix(); // ix-pos. of pad
153 newclust[2][nnew]=segmentation->Iy(); // iy-pos. of pad
154 newclust[3][nnew]=twentyNano; // time of flight
155 newclust[4][nnew]=segmentation->ISector(); // sector id
156 newclust[5][nnew]=(Float_t) i; // counter
159 } // built-up cluster-size
160 } // existing neighbour
161 } // loop over neighbours
162 } // endif hit w/o strip
163 } // loop over planes
164 } // if AliMUONResponseTriggerV1