]>
Commit | Line | Data |
---|---|---|
ba030c0e | 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$ | |
5f91c9e8 | 18 | Revision 1.1 2003/01/28 13:21:06 morsch |
19 | Improved response simulation for station 1. | |
20 | (M. Mac Cormick, I. Hrivnacova, D. Guez) | |
21 | ||
ba030c0e | 22 | */ |
23 | ||
24 | // Authors: David Guez, Ivana Hrivnacova, Marion MacCormick; IPN Orsay | |
25 | // | |
26 | // Class AliMUONSt1ResponseRule | |
27 | // ----------------------------- | |
28 | // Describes a response rule. | |
29 | // A "rule" is defined as being a set of electronic filters to be applied | |
30 | // (ie. a set of AliMUONSt1ResponseParameter) and a set of cathode pads to | |
31 | // which these filters should be applied (set of AliMUONSt1ElectronicElement) | |
32 | ||
33 | #include "AliMUONSt1ResponseRule.h" | |
34 | #include "AliMUONSt1ElectronicElement.h" | |
35 | #include "AliMUONSt1ResponseParameter.h" | |
36 | ||
37 | ClassImp(AliMUONSt1ResponseRule); | |
38 | ||
39 | //__________________________________________________________________________ | |
40 | AliMUONSt1ResponseRule::AliMUONSt1ResponseRule() | |
41 | : TObject(), | |
42 | fElementList(), | |
43 | fParameters() | |
44 | { | |
45 | // default constructor | |
46 | } | |
47 | ||
48 | //__________________________________________________________________________ | |
49 | AliMUONSt1ResponseRule::~AliMUONSt1ResponseRule() | |
50 | { | |
51 | // destructor | |
52 | } | |
53 | ||
54 | //__________________________________________________________________________ | |
55 | void AliMUONSt1ResponseRule::AddElement(AliMUONSt1ElectronicElement* element) | |
56 | { | |
57 | // Add an electronic element to the list | |
58 | // --- | |
59 | ||
60 | fElementList.Add(element); | |
61 | } | |
62 | ||
63 | //__________________________________________________________________________ | |
64 | void AliMUONSt1ResponseRule::AddParameter(AliMUONSt1ResponseParameter* param) | |
65 | { | |
66 | // Add an electronics parameter for this rule | |
67 | // --- | |
68 | ||
69 | fParameters.Add(param); | |
70 | } | |
71 | ||
72 | //__________________________________________________________________________ | |
5f91c9e8 | 73 | Bool_t AliMUONSt1ResponseRule::Contains(const AliMpPad& pad) const |
ba030c0e | 74 | { |
75 | // Is this pad is contained in this rule's list | |
76 | // --- | |
77 | ||
78 | TIter next(&fElementList); | |
79 | AliMUONSt1ElectronicElement* el; | |
80 | while ((el = static_cast<AliMUONSt1ElectronicElement*>(next()))){ | |
81 | if (el->Contains(pad)) return kTRUE; | |
82 | } | |
83 | return kFALSE; | |
84 | } |