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