1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 /* $Id: AliTRDCalDCS.cxx 18952 2007-06-08 11:36:12Z cblume $ */
18 ///////////////////////////////////////////////////////////////////////////////
20 // TRD calibration class for TRD DCS parameters //
22 ///////////////////////////////////////////////////////////////////////////////
24 #include "AliTRDCalDCS.h"
25 #include "AliTRDCalDCSFEE.h"
26 #include "AliTRDCalDCSGTU.h"
28 ClassImp(AliTRDCalDCS)
30 //_____________________________________________________________________________
31 AliTRDCalDCS::AliTRDCalDCS()
33 ,fGNumberOfTimeBins(-1)
36 ,fGThreePadClustThres(-1)
39 ,fGTCFilterShortDecPar(-1)
40 ,fGTCFilterLongDecPar(-1)
54 ,fFEEArr(new TObjArray(540))
55 ,fPTRArr(new TObjArray(6))
56 ,fGTUObj(new AliTRDCalDCSGTU())
59 // AliTRDCalDCS default constructor
63 //_____________________________________________________________________________
64 AliTRDCalDCS::AliTRDCalDCS(const Text_t *name, const Text_t *title)
66 ,fGNumberOfTimeBins(-1)
69 ,fGThreePadClustThres(-1)
72 ,fGTCFilterShortDecPar(-1)
73 ,fGTCFilterLongDecPar(-1)
87 ,fFEEArr(new TObjArray(540))
88 ,fPTRArr(new TObjArray(6))
89 ,fGTUObj(new AliTRDCalDCSGTU())
92 // AliTRDCalDCS constructor
96 //_____________________________________________________________________________
97 AliTRDCalDCS::AliTRDCalDCS(const AliTRDCalDCS &cd)
99 ,fGNumberOfTimeBins(-1)
101 ,fGSingleHitThres(-1)
102 ,fGThreePadClustThres(-1)
104 ,fGTCFilterWeight(-1)
105 ,fGTCFilterShortDecPar(-1)
106 ,fGTCFilterLongDecPar(-1)
120 ,fFEEArr(new TObjArray(540))
121 ,fPTRArr(new TObjArray(6))
122 ,fGTUObj(new AliTRDCalDCSGTU())
125 // AliTRDCalDCS copy constructor
129 //_____________________________________________________________________________
130 AliTRDCalDCS &AliTRDCalDCS::operator=(const AliTRDCalDCS &cd)
133 // Assignment operator
135 if (&cd == this) return *this;
137 new (this) AliTRDCalDCS(cd);
141 //_____________________________________________________________________________
142 void AliTRDCalDCS::EvaluateGlobalParameters()
145 // Do an evaluation of all global parameters
148 for(Int_t i=0; i<540; i++) {
149 AliTRDCalDCSFEE *iDCSFEEObj;
150 iDCSFEEObj = GetCalDCSFEEObj(i);
151 if(iDCSFEEObj != NULL) {
152 if(iDCSFEEObj->GetStatusBit() == 0) {
153 // first, set the parameters of the first good ROC as global
154 fGNumberOfTimeBins = iDCSFEEObj->GetNumberOfTimeBins();
155 fGConfigTag = iDCSFEEObj->GetConfigTag();
156 fGSingleHitThres = iDCSFEEObj->GetSingleHitThres();
157 fGThreePadClustThres = iDCSFEEObj->GetThreePadClustThres();
158 fGSelNoZS = iDCSFEEObj->GetSelectiveNoZS();
159 fGTCFilterWeight = iDCSFEEObj->GetTCFilterWeight();
160 fGTCFilterShortDecPar = iDCSFEEObj->GetTCFilterShortDecPar();
161 fGTCFilterLongDecPar = iDCSFEEObj->GetTCFilterLongDecPar();
162 fGFastStatNoise = iDCSFEEObj->GetFastStatNoise();
163 fGConfigVersion = iDCSFEEObj->GetConfigVersion();
164 fGConfigName = iDCSFEEObj->GetConfigName();
165 fGFilterType = iDCSFEEObj->GetFilterType();
166 fGReadoutParam = iDCSFEEObj->GetReadoutParam();
167 fGTestPattern = iDCSFEEObj->GetTestPattern();
168 fGTrackletMode = iDCSFEEObj->GetTrackletMode();
169 fGTrackletDef = iDCSFEEObj->GetTrackletDef();
170 fGTriggerSetup = iDCSFEEObj->GetTriggerSetup();
171 fGAddOptions = iDCSFEEObj->GetAddOptions();
177 for(Int_t i=0; i<540; i++) {
178 AliTRDCalDCSFEE *iDCSFEEObj;
179 iDCSFEEObj = GetCalDCSFEEObj(i);
180 if(iDCSFEEObj != NULL) {
181 if(iDCSFEEObj->GetStatusBit() == 0) {
182 // second, if any of the other good chambers differ, set the global value to -1/""
183 if(fGNumberOfTimeBins != iDCSFEEObj->GetNumberOfTimeBins()) fGNumberOfTimeBins = -2;
184 if(fGConfigTag != iDCSFEEObj->GetConfigTag()) fGConfigTag = -2;
185 if(fGSingleHitThres != iDCSFEEObj->GetSingleHitThres()) fGSingleHitThres = -2;
186 if(fGThreePadClustThres != iDCSFEEObj->GetThreePadClustThres()) fGThreePadClustThres = -2;
187 if(fGSelNoZS != iDCSFEEObj->GetSelectiveNoZS()) fGSelNoZS = -2;
188 if(fGTCFilterWeight != iDCSFEEObj->GetTCFilterWeight()) fGTCFilterWeight = -2;
189 if(fGTCFilterShortDecPar != iDCSFEEObj->GetTCFilterShortDecPar()) fGTCFilterShortDecPar = -2;
190 if(fGTCFilterLongDecPar != iDCSFEEObj->GetTCFilterLongDecPar()) fGTCFilterLongDecPar = -2;
191 if(fGFastStatNoise != iDCSFEEObj->GetFastStatNoise()) fGFastStatNoise = -2;
192 if(fGConfigVersion != iDCSFEEObj->GetConfigVersion()) fGConfigVersion = "mixed";
193 if(fGConfigName != iDCSFEEObj->GetConfigName()) fGConfigName = "mixed";
194 if(fGFilterType != iDCSFEEObj->GetFilterType()) fGFilterType = "mixed";
195 if(fGReadoutParam != iDCSFEEObj->GetReadoutParam()) fGReadoutParam = "mixed";
196 if(fGTestPattern != iDCSFEEObj->GetTestPattern()) fGTestPattern = "mixed";
197 if(fGTrackletMode != iDCSFEEObj->GetTrackletMode()) fGTrackletMode = "mixed";
198 if(fGTrackletDef != iDCSFEEObj->GetTrackletDef()) fGTrackletDef = "mixed";
199 if(fGTriggerSetup != iDCSFEEObj->GetTriggerSetup()) fGTriggerSetup = "mixed";
200 if(fGAddOptions != iDCSFEEObj->GetAddOptions()) fGAddOptions = "mixed";