]>
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 | ||
16 | /* | |
17 | $Log$ | |
18 | Revision 1.1.2.1 2000/06/09 21:48:28 morsch | |
19 | Code from AliMUONSegResTrigger.cxx | |
20 | ||
21 | */ | |
22 | ||
23 | #include "AliMUONResponseTrigger.h" | |
24 | #include "AliMUONSegmentation.h" | |
25 | #include <TMath.h> | |
26 | #include <TRandom.h> | |
27 | #include <iostream.h> | |
28 | ||
29 | ||
30 | ClassImp(AliMUONResponseTrigger) | |
31 | ||
32 | //------------------------------------------------------------------ | |
33 | Float_t AliMUONResponseTrigger::IntXY(AliMUONSegmentation * segmentation){ | |
34 | // Returns 1 or 0 if the current strip is fired or not according | |
35 | // to the cluster size and the width of the main strip. | |
36 | // For the time being the probability to fire a neighbour depends | |
37 | // only on the width of the main strip and is limited to a maximum | |
38 | // cluster-size of 2. | |
39 | // The corresponding probabilities are given below (O.Roig PhD Thesis) | |
40 | // This will be improved in the future by including a parametrization | |
41 | // of the cluster size as a function of the position of the physical | |
42 | // hit with respect to the center of the strip. | |
43 | //------------------------------------------------------------------ | |
44 | // clust. size = 1 2 3 4 5 >5 | |
45 | // strip width = 1 | 54.7 | 44.5 | 0.7 | 0.06 | 0.04 | 0.0 | | |
46 | // strip width = 2 | 89.0 | 10.7 | 0.2 | 0.1 | 0.0 | 0.0 | | |
47 | // strip width = 4 | 99.0 | 1.0 | 0.0 | 0.0 | 0.0 | 0.0 | | |
48 | //------------------------------------------------------------------ | |
49 | ||
50 | // cout << "in AliMUONResponseTrigger::IntXY" << "\n"; | |
51 | ||
52 | // get the "parameters" needed to evaluate the strip response | |
53 | // x1 : hit x(y) position | |
54 | // x2 : x(y) coordinate of the main strip | |
55 | // x3 : current strip real x(y) coordinate | |
56 | // width : width of the main strip | |
57 | Float_t x1,x2,x3,width; | |
58 | segmentation->IntegrationLimits(x1,x2,x3,width); | |
59 | // cout << " x or y main & current = " << x2 << " , " << x3 | |
60 | // << " width main = " << width << "\n"; | |
61 | ||
62 | /* | |
63 | if (TMath::Abs(x3-x1)<TMath::Abs(x3-x2)) { // find neighbour candidate | |
64 | Int_t iwidth=Int_t(width); | |
65 | Float_t rand = gRandom->Rndm()*100.; | |
66 | if (iwidth==1) { | |
67 | if (rand<44.5) { return 1.; } | |
68 | else { return 0.; } | |
69 | } else if (iwidth==2) { | |
70 | if (rand<10.7) { return 1.; } | |
71 | else { return 0.; } | |
72 | } else if (iwidth==4) { | |
73 | if (rand<1.) { return 1.; } | |
74 | else { return 0.; } | |
75 | } | |
76 | } else { return 0.;} | |
77 | return -1; | |
78 | */ | |
79 | return 0; | |
80 | } | |
81 | ||
82 | ||
83 | //------------------------------------------------------------------ | |
84 | Int_t AliMUONResponseTrigger::DigitResponse(Int_t digit) | |
85 | { | |
86 | // | |
87 | // only digital (0/1) information available | |
88 | if (digit) digit=1; | |
89 | return digit; | |
90 | } | |
91 | ||
92 | ||
93 | ||
94 | ||
95 | ||
96 |