]>
Commit | Line | Data |
---|---|---|
a9e2aefa | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
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 | **************************************************************************/ | |
15 | ||
88cb7938 | 16 | /* $Id$ */ |
a9e2aefa | 17 | |
18 | #include "AliMUONChamberTrigger.h" | |
a9e2aefa | 19 | #include "AliMUONResponseTrigger.h" |
76fa1113 | 20 | #include "AliMUONHit.h" |
b7ef3c96 | 21 | #include "AliMUON.h" |
22 | #include "AliMUONSegmentation.h" | |
76fa1113 | 23 | #include "AliMUONGeometrySegmentation.h" |
b7ef3c96 | 24 | #include "AliMUONGeometryTransformer.h" |
c4a97bcd | 25 | #include "AliLog.h" |
a9e2aefa | 26 | |
27 | ClassImp(AliMUONChamberTrigger) | |
28 | ||
29 | //------------------------------------------- | |
d81db581 | 30 | |
03f221a7 | 31 | AliMUONChamberTrigger::AliMUONChamberTrigger() |
b7ef3c96 | 32 | : AliMUONChamber(), |
33 | fkGeomTransformer(0) | |
d81db581 | 34 | { |
35 | // Default constructor | |
36 | } | |
37 | ||
884a73f1 | 38 | //------------------------------------------- |
39 | ||
40 | AliMUONChamberTrigger::AliMUONChamberTrigger(const AliMUONChamberTrigger& right) | |
41 | : AliMUONChamber(right) | |
42 | { | |
43 | /// Protected copy constructor (not implemented) | |
44 | ||
45 | AliFatal("Copy constructor not provided."); | |
46 | } | |
47 | ||
48 | //------------------------------------------- | |
d81db581 | 49 | |
b7ef3c96 | 50 | AliMUONChamberTrigger::AliMUONChamberTrigger(Int_t id, |
51 | const AliMUONGeometryTransformer* kGeometryTransformer) | |
52 | : AliMUONChamber(id), | |
53 | fkGeomTransformer(kGeometryTransformer) | |
a9e2aefa | 54 | { |
d81db581 | 55 | // Constructor using chamber id |
a9e2aefa | 56 | } |
57 | ||
884a73f1 | 58 | //------------------------------------------- |
59 | AliMUONChamberTrigger& | |
60 | AliMUONChamberTrigger::operator=(const AliMUONChamberTrigger& right) | |
61 | { | |
62 | /// Protected assignement operator (not implemented) | |
63 | ||
64 | // check assignement to self | |
65 | if (this == &right) return *this; | |
66 | ||
67 | AliFatal("Assignement operator not provided."); | |
68 | ||
69 | return *this; | |
70 | } | |
71 | ||
76fa1113 | 72 | //------------------------------------------- |
73 | void AliMUONChamberTrigger::DisIntegration(AliMUONHit* hit, | |
74 | Int_t& nnew, | |
75 | Float_t newclust[6][500]) | |
76 | { | |
77 | // | |
78 | // Generates pad hits (simulated cluster) | |
79 | // using the segmentation and the response model | |
80 | ||
81 | ||
82 | Float_t tof = hit->Age(); | |
83 | Float_t xhit = hit->X(); | |
84 | Float_t yhit = hit->Y(); | |
85 | Float_t zhit = hit->Z(); | |
86 | Int_t id = hit->DetElemId(); | |
87 | ||
88 | Int_t twentyNano; | |
89 | if (tof<75*TMath::Power(10,-9)) { | |
90 | twentyNano=1; | |
91 | } else { | |
92 | twentyNano=100; | |
93 | } | |
94 | ||
95 | Float_t qp; | |
96 | nnew=0; | |
953daa5a | 97 | for (Int_t i = 1; i <= 2; i++) { |
b7ef3c96 | 98 | |
99 | AliMUONGeometrySegmentation* segmentation= | |
100 | fMUON->GetSegmentation()->GetModuleSegmentation(fId, i-1); | |
101 | ||
76fa1113 | 102 | |
103 | // Find the module & strip Id. which has fired | |
ba2d2202 | 104 | Int_t ix(-1); |
105 | Int_t iy(-1); | |
76fa1113 | 106 | segmentation->GetPadI(id,xhit,yhit,0,ix,iy); |
67e7e5a7 | 107 | // treatment of GEANT hits w/o corresponding strip (due to the fact that |
108 | // geometry & segmentation are computed in a very slightly different way) | |
ba2d2202 | 109 | if ( ix<0 || iy<0 ) |
110 | { | |
111 | Float_t lx,ly,lz; | |
b7ef3c96 | 112 | fkGeomTransformer->Global2Local(id,xhit,yhit,0,lx,ly,lz); |
ba2d2202 | 113 | AliWarning(Form("AliMUONChamberTrigger hit w/o strip %i-%d %e %e " |
114 | "local %e %e %e ix,iy=%d,%d\n",id,i-1,xhit,yhit,lx,ly,lz,ix,iy)); | |
115 | } else | |
116 | { | |
117 | segmentation->SetPad(id,ix,iy); | |
118 | if (xhit<0) ix = -ix; | |
119 | // printf(" fId id fnsec xhit yhit zhit ix iy %i %i %i %f %f %f %i %i \n",fId,i,id,xhit,yhit,zhit,ix,iy); | |
120 | // if (ix < 0 || ix > 10000) return; | |
121 | // if (iy < 0 || iy > 10000) return; | |
122 | ||
76fa1113 | 123 | // --- store signal information for this strip |
ba2d2202 | 124 | newclust[0][nnew]=1.; // total charge |
125 | newclust[1][nnew]=ix; // ix-position of pad | |
126 | newclust[2][nnew]=iy; // iy-position of pad | |
127 | newclust[3][nnew]=twentyNano; // time of flight | |
128 | newclust[4][nnew]=segmentation->ISector(); // sector id | |
129 | newclust[5][nnew]=(Float_t) i; // counter | |
130 | nnew++; | |
131 | ||
132 | // cluster-size if AliMUONResponseTriggerV1, nothing if AliMUONResponseTrigger | |
133 | if (((AliMUONResponseTrigger*) fResponse)->SetGenerCluster()) { | |
67e7e5a7 | 134 | |
135 | // set hits | |
136 | segmentation->SetHit(id,xhit,yhit,zhit); | |
137 | // get the list of nearest neighbours | |
138 | Int_t nList, xList[10], yList[10]; | |
139 | segmentation->Neighbours(id,ix,iy,&nList,xList,yList); | |
140 | ||
141 | qp = 0; | |
142 | for (Int_t j=0; j<nList; j++){ // loop over neighbours | |
143 | if (xList[j]!=0) { // existing neighbour | |
144 | if (j==0||j==5||qp!=0) { // built-up cluster-size | |
145 | ||
146 | // neighbour real coordinates (just for checks here) | |
147 | Float_t x,y,z; | |
148 | segmentation->GetPadC(id,xList[j],yList[j],x,y,z); | |
149 | // set pad (fx fy & fix fiy are the current pad coord. & Id.) | |
150 | segmentation->SetPad(id,xList[j],yList[j]); | |
151 | // get the chamber (i.e. current strip) response | |
152 | qp=fResponse->IntXY(id,segmentation); | |
153 | ||
154 | if (qp > 0.5) { | |
155 | // --- store signal information for neighbours | |
156 | newclust[0][nnew]=qp; // total charge | |
157 | newclust[1][nnew]=segmentation->Ix(); // ix-pos. of pad | |
158 | newclust[2][nnew]=segmentation->Iy(); // iy-pos. of pad | |
159 | newclust[3][nnew]=twentyNano; // time of flight | |
160 | newclust[4][nnew]=segmentation->ISector(); // sector id | |
161 | newclust[5][nnew]=(Float_t) i; // counter | |
162 | nnew++; | |
163 | } // qp > 0.5 | |
164 | } // built-up cluster-size | |
165 | } // existing neighbour | |
166 | } // loop over neighbours | |
167 | } // endif hit w/o strip | |
76fa1113 | 168 | } // loop over planes |
169 | } // if AliMUONResponseTriggerV1 | |
170 | } | |
a9e2aefa | 171 | |
172 | ||
173 | ||
174 | ||
03f221a7 | 175 | |
176 |