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