Line data Source code
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 : /////////////////////////////////////////////////////////////////
18 : // //
19 : // Class containing the parameters that are configured //
20 : // to trigger events with the ZDC (in A-A collisions) //
21 : // Use: store the set of parameters needed to calculate //
22 : // the trigger function sent to the CTP //
23 : // //
24 : // Author: Chiara.Oppedisano@to.infn.it //
25 : // //
26 : /////////////////////////////////////////////////////////////////
27 :
28 : #include "AliZDCTriggerParameters.h"
29 :
30 12 : ClassImp(AliZDCTriggerParameters)
31 :
32 : //________________________________________________________________
33 : AliZDCTriggerParameters::AliZDCTriggerParameters() :
34 0 : TObject(),
35 0 : fADCZEMCentralityThr(0),
36 0 : fADCMBThreshold(0),
37 0 : fDiscZEMCentralityThr(0),
38 0 : fDiscMBThreshold(0)
39 0 : {
40 : // Default constructor
41 0 : for(Int_t j=0; j<4; j++){
42 0 : fADCEMDWindow[j] = fDiscEMDWindow[j] = 0.;
43 0 : if(j<2){
44 0 : fADCCentralWindow[j] = fADCSemicentralWindow[j] = 0.;
45 0 : fDiscCentralWindow[j] = fDiscSemicentralWindow[j] = 0.;
46 0 : }
47 : }
48 0 : }
49 :
50 : //________________________________________________________________
51 0 : AliZDCTriggerParameters::AliZDCTriggerParameters(Float_t *adcParam,
52 : Float_t *discParam) :
53 0 : fADCZEMCentralityThr(adcParam[0]),
54 0 : fADCMBThreshold(adcParam[1]),
55 0 : fDiscZEMCentralityThr(discParam[0]),
56 0 : fDiscMBThreshold(discParam[1])
57 0 : {
58 : // Standard constructor
59 0 : fADCCentralWindow[0] = adcParam[2];
60 0 : fADCCentralWindow[1] = adcParam[3];
61 0 : fADCSemicentralWindow[0] = adcParam[4];
62 0 : fADCSemicentralWindow[1] = adcParam[5];
63 0 : fADCEMDWindow[0] = adcParam[6];
64 0 : fADCEMDWindow[1] = adcParam[7];
65 0 : fADCEMDWindow[2] = adcParam[8];
66 0 : fADCEMDWindow[3] = adcParam[9];
67 : //
68 0 : fDiscCentralWindow[0] = discParam[2];
69 0 : fDiscCentralWindow[1] = discParam[3];
70 0 : fDiscSemicentralWindow[0] = discParam[4];
71 0 : fDiscSemicentralWindow[1] = discParam[5];
72 0 : fDiscEMDWindow[0] = discParam[6];
73 0 : fDiscEMDWindow[1] = discParam[7];
74 0 : fDiscEMDWindow[2] = discParam[8];
75 0 : fDiscEMDWindow[3] = discParam[9];
76 0 : }
77 :
78 : //____________________________________________________________________________
79 : AliZDCTriggerParameters::AliZDCTriggerParameters(const AliZDCTriggerParameters& oldTrigPar) :
80 0 : TObject(),
81 0 : fADCZEMCentralityThr(oldTrigPar.fADCZEMCentralityThr),
82 0 : fADCMBThreshold(oldTrigPar.fADCMBThreshold),
83 0 : fDiscZEMCentralityThr(oldTrigPar.fDiscZEMCentralityThr),
84 0 : fDiscMBThreshold(oldTrigPar.fDiscMBThreshold)
85 0 : {
86 : // Copy constructor
87 0 : fADCCentralWindow[0] = oldTrigPar.fADCCentralWindow[0];
88 0 : fADCCentralWindow[1] = oldTrigPar.fADCCentralWindow[1];
89 0 : fADCSemicentralWindow[0] = oldTrigPar.fADCSemicentralWindow[0];
90 0 : fADCSemicentralWindow[1] = oldTrigPar.fADCSemicentralWindow[1];
91 0 : fADCEMDWindow[0] = oldTrigPar.fADCEMDWindow[0];
92 0 : fADCEMDWindow[1] = oldTrigPar.fADCEMDWindow[1];
93 0 : fADCEMDWindow[2] = oldTrigPar.fADCEMDWindow[2];
94 0 : fADCEMDWindow[3] = oldTrigPar.fADCEMDWindow[3];
95 : //
96 0 : fDiscCentralWindow[0] = oldTrigPar.fDiscCentralWindow[0];
97 0 : fDiscCentralWindow[1] = oldTrigPar.fDiscCentralWindow[1];
98 0 : fDiscSemicentralWindow[0] = oldTrigPar.fDiscSemicentralWindow[0];
99 0 : fDiscSemicentralWindow[1] = oldTrigPar.fDiscSemicentralWindow[1];
100 0 : fDiscEMDWindow[0] = oldTrigPar.fDiscEMDWindow[0];
101 0 : fDiscEMDWindow[1] = oldTrigPar.fDiscEMDWindow[1];
102 0 : fDiscEMDWindow[2] = oldTrigPar.fDiscEMDWindow[2];
103 0 : fDiscEMDWindow[3] = oldTrigPar.fDiscEMDWindow[3];
104 :
105 0 : }
106 :
107 : //____________________________________________________________________________
108 : AliZDCTriggerParameters &AliZDCTriggerParameters::operator= (const AliZDCTriggerParameters& param)
109 : {
110 : //assignement operator
111 :
112 0 : if(¶m == this) return *this;
113 :
114 0 : fADCZEMCentralityThr = param.fADCZEMCentralityThr;
115 0 : fADCMBThreshold = param.fADCMBThreshold;
116 0 : fDiscZEMCentralityThr = param.fDiscZEMCentralityThr;
117 0 : fDiscMBThreshold = param.fDiscMBThreshold;
118 0 : for(int i=0; i<2; i++) {
119 0 : fADCCentralWindow[i] = param.fADCCentralWindow[i];
120 0 : fADCSemicentralWindow[i] = param.fADCSemicentralWindow[i];
121 0 : fDiscCentralWindow[i] = param.fDiscCentralWindow[i];
122 0 : fDiscSemicentralWindow[i] = param.fDiscSemicentralWindow[i];
123 : }
124 0 : for(int j=0; j<4; j++){
125 0 : fADCEMDWindow[j] = param.fADCEMDWindow[j];
126 0 : fDiscEMDWindow[j] = param.fDiscEMDWindow[j];
127 : }
128 :
129 0 : return *this;
130 0 : }
|