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.6 2000/07/03 11:54:57 morsch
19 AliMUONSegmentation and AliMUONHitMap have been replaced by AliSegmentation and AliHitMap in STEER
20 The methods GetPadIxy and GetPadXxy of AliMUONSegmentation have changed name to GetPadI and GetPadC.
22 Revision 1.5 2000/06/29 12:34:09 morsch
23 AliMUONSegmentation class has been made independent of AliMUONChamber. This makes
24 it usable with any other geometry class. The link to the object to which it belongs is
25 established via an index. This assumes that there exists a global geometry manager
26 from which the pointer to the parent object can be obtained (in our case gAlice).
28 Revision 1.4 2000/06/29 06:52:02 pcrochet
29 pow changed to TMath::Power
31 Revision 1.3 2000/06/28 15:16:35 morsch
32 (1) Client code adapted to new method signatures in AliMUONSegmentation (see comments there)
33 to allow development of slat-muon chamber simulation and reconstruction code in the MUON
34 framework. The changes should have no side effects (mostly dummy arguments).
35 (2) Hit disintegration uses 3-dim hit coordinates to allow simulation
36 of chambers with overlapping modules (MakePadHits, Disintegration).
38 Revision 1.2 2000/06/15 07:58:48 morsch
39 Code from MUON-dev joined
41 Revision 1.1.2.3 2000/06/09 21:27:35 morsch
42 Most coding rule violations corrected.
44 Revision 1.1.2.2 2000/04/26 12:28:25 morsch
45 - flag pad hits with condition on ToF (CP)
46 - Tof included in the method DisIntegration (CP)
48 Revision 1.1.2.1 2000/02/17 14:30:54 morsch
53 #include "AliMUONChamberTrigger.h"
54 #include "AliMUONSegmentationTrigger.h"
55 #include "AliMUONResponseTrigger.h"
56 #include <TObjArray.h>
60 ClassImp(AliMUONChamberTrigger)
62 //-------------------------------------------
64 AliMUONChamberTrigger::AliMUONChamberTrigger()
66 // Default constructor
70 AliMUONChamberTrigger::AliMUONChamberTrigger(Int_t id) : AliMUONChamber(id)
72 // Constructor using chamber id
75 //-------------------------------------------
76 void AliMUONChamberTrigger::DisIntegration(Float_t eloss, Float_t tof,
77 Float_t xhit, Float_t yhit, Float_t zhit,
79 Float_t newclust[6][500])
82 // Generates pad hits (simulated cluster)
83 // using the segmentation and the response model
86 if (tof<75*TMath::Power(10,-9)) {
92 // cout << " time = " << tof << " , " << twentyNano << "\n";
96 for (Int_t i=1; i<=fnsec; i++) {
97 AliSegmentation * segmentation=
98 (AliSegmentation*) (*fSegmentation)[i-1];
100 // Find the module & strip Id. which has fired
103 segmentation->GetPadI(xhit,yhit,0,ix,iy);
104 segmentation->SetPad(ix,iy);
106 // treatment of GEANT hits w/o corresponding strip (due to the fact that
107 // the 2 geometries are computed in a very slightly different way)
109 cout << " AliMUONChamberTrigger hit w/o strip " << xhit << " , " << yhit << "\n";
111 // --- store signal information for this strip
112 newclust[0][nnew]=1.; // total charge
113 newclust[1][nnew]=ix; // ix-position of pad
114 newclust[2][nnew]=iy; // iy-position of pad
115 newclust[3][nnew]=twentyNano; // time of flight
116 newclust[4][nnew]=segmentation->ISector(); // sector id
117 newclust[5][nnew]=(Float_t) i; // counter
120 segmentation->SetHit(xhit,yhit,zhit);
121 // get the list of nearest neighbours
122 Int_t nList, xList[2], yList[2];
123 segmentation->Neighbours(ix,iy,&nList,xList,yList);
125 for (Int_t j=0; j<nList; j++){
127 // neighbour real coordinates (just for checks here)
129 segmentation->GetPadC(xList[j],yList[j],x,y,z);
130 // set pad (fX fY & fIx fIy are the current pad coord. & Id.)
131 segmentation->SetPad(xList[j],yList[j]);
132 // get the chamber (i.e. current strip) response
133 qp=fResponse->IntXY(segmentation);
136 // --- store signal information for neighbours
137 newclust[0][nnew]=qp; // total charge
138 newclust[1][nnew]=segmentation->Ix(); // ix-position of pad
139 newclust[2][nnew]=segmentation->Iy(); // iy-position of pad
140 newclust[3][nnew]=twentyNano; // time of flight
141 newclust[4][nnew]=segmentation->ISector(); // sector id
142 newclust[5][nnew]=(Float_t) i; // counter
145 } // loop on neighbour
146 } // endif hit w/o strip
147 } // loop over planes