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.4 2000/06/29 06:52:02 pcrochet
19 pow changed to TMath::Power
21 Revision 1.3 2000/06/28 15:16:35 morsch
22 (1) Client code adapted to new method signatures in AliMUONSegmentation (see comments there)
23 to allow development of slat-muon chamber simulation and reconstruction code in the MUON
24 framework. The changes should have no side effects (mostly dummy arguments).
25 (2) Hit disintegration uses 3-dim hit coordinates to allow simulation
26 of chambers with overlapping modules (MakePadHits, Disintegration).
28 Revision 1.2 2000/06/15 07:58:48 morsch
29 Code from MUON-dev joined
31 Revision 1.1.2.3 2000/06/09 21:27:35 morsch
32 Most coding rule violations corrected.
34 Revision 1.1.2.2 2000/04/26 12:28:25 morsch
35 - flag pad hits with condition on ToF (CP)
36 - Tof included in the method DisIntegration (CP)
38 Revision 1.1.2.1 2000/02/17 14:30:54 morsch
43 #include "AliMUONChamberTrigger.h"
44 #include "AliMUONSegmentationTrigger.h"
45 #include "AliMUONResponseTrigger.h"
46 #include <TObjArray.h>
50 ClassImp(AliMUONChamberTrigger)
52 //-------------------------------------------
54 AliMUONChamberTrigger::AliMUONChamberTrigger()
56 // Default constructor
60 AliMUONChamberTrigger::AliMUONChamberTrigger(Int_t id) : AliMUONChamber(id)
62 // Constructor using chamber id
65 //-------------------------------------------
66 void AliMUONChamberTrigger::DisIntegration(Float_t eloss, Float_t tof,
67 Float_t xhit, Float_t yhit, Float_t zhit,
69 Float_t newclust[6][500])
72 // Generates pad hits (simulated cluster)
73 // using the segmentation and the response model
76 if (tof<75*TMath::Power(10,-9)) {
82 // cout << " time = " << tof << " , " << twentyNano << "\n";
86 for (Int_t i=1; i<=fnsec; i++) {
87 AliMUONSegmentation * segmentation=
88 (AliMUONSegmentation*) (*fSegmentation)[i-1];
90 // Find the module & strip Id. which has fired
93 segmentation->GetPadIxy(xhit,yhit,0,ix,iy);
94 segmentation->SetPad(ix,iy);
96 // treatment of GEANT hits w/o corresponding strip (due to the fact that
97 // the 2 geometries are computed in a very slightly different way)
99 cout << " AliMUONChamberTrigger hit w/o strip " << xhit << " , " << yhit << "\n";
101 // --- store signal information for this strip
102 newclust[0][nnew]=1.; // total charge
103 newclust[1][nnew]=ix; // ix-position of pad
104 newclust[2][nnew]=iy; // iy-position of pad
105 newclust[3][nnew]=twentyNano; // time of flight
106 newclust[4][nnew]=segmentation->ISector(); // sector id
107 newclust[5][nnew]=(Float_t) i; // counter
110 segmentation->SetHit(xhit,yhit,zhit);
111 // get the list of nearest neighbours
112 Int_t nList, xList[2], yList[2];
113 segmentation->Neighbours(ix,iy,&nList,xList,yList);
115 for (Int_t j=0; j<nList; j++){
117 // neighbour real coordinates (just for checks here)
119 segmentation->GetPadCxy(xList[j],yList[j],x,y,z);
120 // set pad (fx fy & fix fiy are the current pad coord. & Id.)
121 segmentation->SetPad(xList[j],yList[j]);
122 // get the chamber (i.e. current strip) response
123 qp=fResponse->IntXY(segmentation);
126 // --- store signal information for neighbours
127 newclust[0][nnew]=qp; // total charge
128 newclust[1][nnew]=segmentation->Ix(); // ix-position of pad
129 newclust[2][nnew]=segmentation->Iy(); // iy-position of pad
130 newclust[3][nnew]=twentyNano; // time of flight
131 newclust[4][nnew]=segmentation->ISector(); // sector id
132 newclust[5][nnew]=(Float_t) i; // counter
135 } // loop on neighbour
136 } // endif hit w/o strip
137 } // loop over planes