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 #include "AliMUONChamberTrigger.h"
19 #include "AliMUONSegmentationTrigger.h"
20 #include "AliMUONResponseTrigger.h"
21 #include "AliMUONResponseTriggerV1.h"
22 #include <TObjArray.h>
24 #include <Riostream.h>
26 ClassImp(AliMUONChamberTrigger)
28 //-------------------------------------------
30 AliMUONChamberTrigger::AliMUONChamberTrigger()
32 // Default constructor
36 AliMUONChamberTrigger::AliMUONChamberTrigger(Int_t id) : AliMUONChamber(id)
38 // Constructor using chamber id
41 //-------------------------------------------
42 void AliMUONChamberTrigger::DisIntegration(Float_t /*eloss*/, Float_t tof,
43 Float_t xhit, Float_t yhit, Float_t zhit,
45 Float_t newclust[6][500])
48 // Generates pad hits (simulated cluster)
49 // using the segmentation and the response model
52 if (tof<75*TMath::Power(10,-9)) {
60 for (Int_t i=1; i<=fnsec; i++) {
61 AliSegmentation * segmentation=
62 (AliSegmentation*) (*fSegmentation)[i-1];
64 // Find the module & strip Id. which has fired
67 segmentation->GetPadI(xhit,yhit,0,ix,iy);
68 segmentation->SetPad(ix,iy);
70 // treatment of GEANT hits w/o corresponding strip (due to the fact that
71 // the 2 geometries are computed in a very slightly different way)
73 printf("AliMUONChamberTrigger hit w/o strip %f %f \n",xhit,yhit);
75 // --- store signal information for this strip
76 newclust[0][nnew]=1.; // total charge
77 newclust[1][nnew]=ix; // ix-position of pad
78 newclust[2][nnew]=iy; // iy-position of pad
79 newclust[3][nnew]=twentyNano; // time of flight
80 newclust[4][nnew]=segmentation->ISector(); // sector id
81 newclust[5][nnew]=(Float_t) i; // counter
84 // cluster-size if AliMUONResponseTriggerV1, nothing if AliMUONResponseTrigger
85 if (((AliMUONResponseTrigger*) fResponse)->SetGenerCluster()) {
88 segmentation->SetHit(xhit,yhit,zhit);
89 // get the list of nearest neighbours
90 Int_t nList, xList[10], yList[10];
91 segmentation->Neighbours(ix,iy,&nList,xList,yList);
94 for (Int_t j=0; j<nList; j++){ // loop over neighbours
95 if (xList[j]!=0) { // existing neighbour
96 if (j==0||j==5||qp!=0) { // built-up cluster-size
98 // neighbour real coordinates (just for checks here)
100 segmentation->GetPadC(xList[j],yList[j],x,y,z);
101 // set pad (fx fy & fix fiy are the current pad coord. & Id.)
102 segmentation->SetPad(xList[j],yList[j]);
103 // get the chamber (i.e. current strip) response
104 qp=fResponse->IntXY(segmentation);
107 // --- store signal information for neighbours
108 newclust[0][nnew]=qp; // total charge
109 newclust[1][nnew]=segmentation->Ix(); // ix-pos. of pad
110 newclust[2][nnew]=segmentation->Iy(); // iy-pos. of pad
111 newclust[3][nnew]=twentyNano; // time of flight
112 newclust[4][nnew]=segmentation->ISector(); // sector id
113 newclust[5][nnew]=(Float_t) i; // counter
116 } // built-up cluster-size
117 } // existing neighbour
118 } // loop over neighbours
119 } // endif hit w/o strip
120 } // loop over planes
121 } // if AliMUONResponseTriggerV1