]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSModuleDaSSD.cxx
Bug fix: adding SHLIB to SYSLIBS (C.Holm)
[u/mrichter/AliRoot.git] / ITS / AliITSModuleDaSSD.cxx
CommitLineData
223dda26 1/**************************************************************************
2 * Copyright(c) 2007-2009, 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
371588bb 16/* $Id$ */
223dda26 17
18///////////////////////////////////////////////////////////////////////////////
19///
20/// This class provides storage container ITS SSD module callibration data
21/// used by DA.
22///
23///////////////////////////////////////////////////////////////////////////////
24
25#include "AliITSNoiseSSD.h"
2e2c6def 26#include "AliITSPedestalSSD.h"
27#include "AliITSBadChannelsSSD.h"
f67db810 28#include "AliITSModuleDaSSD.h"
c4d90345 29#include "TString.h"
30#include "AliLog.h"
f67db810 31
32ClassImp(AliITSModuleDaSSD)
33
c4d90345 34
35const Int_t AliITSModuleDaSSD::fgkStripsPerModule = 1536; // Number of strips per SSD module
36const Int_t AliITSModuleDaSSD::fgkPNStripsPerModule = 768; // Number of N/P strips per SSD module
37const Int_t AliITSModuleDaSSD::fgkStripsPerChip = 128; // Number of strips per chip HAL25
38const UChar_t AliITSModuleDaSSD::fgkMaxAdNumber = 9; // MAx SSD FEROM AD number
39const UChar_t AliITSModuleDaSSD::fgkMaxAdcNumber = 13; // MAx SSD FEROM ADC number
40const Int_t AliITSModuleDaSSD::fgkChipsPerModule = 12; // Number of HAL25 chips per SSD module
41
42
43
f67db810 44using namespace std;
45
c4d90345 46//______________________________________________________________________________
f67db810 47AliITSModuleDaSSD::AliITSModuleDaSSD() :
48 fEquipId(0),
49 fEquipType(0),
50 fDdlId(0),
51 fAd(0),
52 fAdc(0),
53 fModuleId(0),
54 fNumberOfStrips(0),
55 fStrips(NULL),
c4d90345 56 fNumberOfChips(0),
57 fCm(NULL),
371588bb 58 fCmFerom(NULL),
f67db810 59 fEventsNumber(0)
60{
223dda26 61// Default constructor
f67db810 62}
63
64
c4d90345 65//______________________________________________________________________________
f67db810 66AliITSModuleDaSSD::AliITSModuleDaSSD(const UChar_t ddlID, const UChar_t ad, const UChar_t adc, const UShort_t moduleID) :
67 fEquipId(0),
68 fEquipType(0),
69 fDdlId(ddlID),
70 fAd(ad),
71 fAdc(adc),
72 fModuleId(moduleID),
73 fNumberOfStrips(0),
74 fStrips(NULL),
c4d90345 75 fNumberOfChips(0),
76 fCm(NULL),
371588bb 77 fCmFerom(NULL),
f67db810 78 fEventsNumber(0)
79{
223dda26 80// Constructor, set module id data
f67db810 81}
82
83
84
c4d90345 85//______________________________________________________________________________
f67db810 86AliITSModuleDaSSD::AliITSModuleDaSSD(const Int_t numberofstrips) :
87 fEquipId(0),
88 fEquipType(0),
89 fDdlId(0),
90 fAd(0),
91 fAdc(0),
92 fModuleId(0),
93 fNumberOfStrips(0),
94 fStrips(NULL),
c4d90345 95 fNumberOfChips(0),
96 fCm(NULL),
371588bb 97 fCmFerom(NULL),
f67db810 98 fEventsNumber(0)
99{
371588bb 100// Constructor, allocates memory for AliITSChannelDaSSD* and TArrayS* array for CM calculated in FEROM
f67db810 101 if (numberofstrips != fgkStripsPerModule)
c4d90345 102 AliWarning(Form("AliITSModuleDaSSD: ALICE ITS SSD Module contains %i strips", fgkStripsPerModule));
223dda26 103 fStrips = new (nothrow) AliITSChannelDaSSD* [numberofstrips];
104 if (fStrips) {
f67db810 105 fNumberOfStrips = numberofstrips;
106 for (Int_t i = 0; i < numberofstrips; i++) fStrips[i]= NULL;
223dda26 107 } else {
c4d90345 108 AliError(Form("AliITSModuleDaSSD: Error allocating memory for %i AliITSChannelDaSSD* objects!", numberofstrips));
f67db810 109 fNumberOfStrips = 0;
110 fStrips = NULL;
223dda26 111 }
371588bb 112 fCmFerom = new (nothrow) TArrayS [fgkChipsPerModule];
113 if (!fCmFerom) {
114 AliError(Form("AliITSModuleDaSSD: Error allocating memory for %i TArrayS objects!", fgkChipsPerModule));
115 fCmFerom = NULL;
116 }
f67db810 117}
118
119
c4d90345 120//______________________________________________________________________________
f67db810 121AliITSModuleDaSSD::AliITSModuleDaSSD(const Int_t numberofstrips, const Long_t eventsnumber) :
122 fEquipId(0),
123 fEquipType(0),
124 fDdlId(0),
125 fAd(0),
126 fAdc(0),
127 fModuleId(0),
128 fNumberOfStrips(0),
129 fStrips(NULL),
c4d90345 130 fNumberOfChips(0),
131 fCm(NULL),
371588bb 132 fCmFerom(NULL),
f67db810 133 fEventsNumber(0)
134{
223dda26 135// Constructor, allocates memory for AliITSChannelDaSSD* and events data
f67db810 136 if (numberofstrips != fgkStripsPerModule)
c4d90345 137 AliWarning(Form("AliITSModuleDaSSD: ALICE ITS SSD Module contains %i strips", fgkStripsPerModule));
223dda26 138 fStrips = new (nothrow) AliITSChannelDaSSD* [numberofstrips];
139 if (fStrips) {
f67db810 140 fNumberOfStrips = numberofstrips;
223dda26 141 memset(fStrips, 0, numberofstrips * sizeof(AliITSChannelDaSSD*));
142 for (Int_t i = 0; i < fNumberOfStrips; i++) {
143 fStrips[i] = new AliITSChannelDaSSD(i, eventsnumber);
c4d90345 144 if (!fStrips[i]) AliError(Form("AliITSModuleDaSSD: Error allocating memory for AliITSChannelDaSSD %i-th object", i));
223dda26 145 }
146 } else {
c4d90345 147 AliError(Form("AliITSModuleDaSSD: Error allocating memory for %i AliITSChannelDaSSD* objects!", numberofstrips));
f67db810 148 fNumberOfStrips = 0;
149 fStrips = NULL;
f67db810 150 }
371588bb 151 fCmFerom = new (nothrow) TArrayS [fgkChipsPerModule];
152 if (fCmFerom) {
153 for (Int_t i = 0; i < fgkChipsPerModule; i++) {
154 fCmFerom[i].Set(eventsnumber);
155 fCmFerom[i].Reset(0);
156 }
157 }
158 else {
159 AliError(Form("AliITSModuleDaSSD: Error allocating memory for %i TArrayS objects!", fgkChipsPerModule));
160 fCmFerom = NULL;
161 }
f67db810 162}
163
164
165
c4d90345 166//______________________________________________________________________________
f67db810 167AliITSModuleDaSSD::AliITSModuleDaSSD(const AliITSModuleDaSSD& module) :
168 TObject(module),
169 fEquipId(module.fEquipId),
170 fEquipType(module.fEquipType),
171 fDdlId(module.fDdlId),
172 fAd(module.fAd),
173 fAdc(module.fAdc),
174 fModuleId(module.fModuleId),
175 fNumberOfStrips(module.fNumberOfStrips),
a69c8ba0 176 fStrips(NULL),
c4d90345 177 fNumberOfChips(module.fNumberOfChips),
a69c8ba0 178 fCm(NULL),
371588bb 179 fCmFerom(NULL),
f67db810 180 fEventsNumber(module.fEventsNumber)
181{
223dda26 182// copy constructor
a69c8ba0 183 if ((module.fNumberOfStrips > 0) && (module.fStrips)) {
184 fStrips = new (nothrow) AliITSChannelDaSSD* [module.fNumberOfStrips];
185 if (fStrips) {
186 for (Int_t strind = 0; strind < module.fNumberOfStrips; strind++) {
187 if (module.fStrips[strind]) {
188 fStrips[strind] = new AliITSChannelDaSSD(*(module.fStrips[strind]));
189 if (!fStrips[strind]) {
190 AliError("AliITSModuleDaSSD: Error copy constructor");
191 for (Int_t i = (strind - 1); i >= 0; i--) delete fStrips[strind];
192 delete [] fStrips;
193 fStrips = NULL;
194 break;
195 }
196 } else fStrips[strind] = NULL;
197 }
198 } else {
199 AliError(Form("AliITSModuleDaSSD: Error allocating memory for %i AliITSChannelDaSSD* objects!", module.fNumberOfStrips));
200 fNumberOfStrips = 0;
201 fStrips = NULL;
202 }
203 }
204 if (module.fCm) {
205 fCm = new (nothrow) TArrayF [module.fNumberOfChips];
206 if (fCm) {
207 for (Int_t chind = 0; chind < module.fNumberOfChips; chind++) fCm[chind] = module.fCm[chind];
208 } else {
209 AliError(Form("AliITSModuleDaSSD: Error allocating memory for %i TArrayF objects!", module.fNumberOfChips));
210 fNumberOfChips = 0;
211 fCm = NULL;
212 }
371588bb 213 }
214
215 if (module.fCmFerom) {
216 fCmFerom = new (nothrow) TArrayS [fgkChipsPerModule];
217 if (fCmFerom) {
218 for (Int_t chind = 0; chind < fgkChipsPerModule; chind++) fCmFerom[chind] = module.fCmFerom[chind];
219 } else {
220 AliError(Form("AliITSModuleDaSSD: Error allocating memory for %i TArrayS objects!", fgkChipsPerModule));
221 fCmFerom = NULL;
222 }
a69c8ba0 223 }
f67db810 224}
225
226
227
c4d90345 228//______________________________________________________________________________
f67db810 229AliITSModuleDaSSD& AliITSModuleDaSSD::operator = (const AliITSModuleDaSSD& module)
230{
231// assignment operator
a69c8ba0 232 if (this == &module) return *this;
233 if (fStrips) {
234 for (Long_t i = 0; i < fNumberOfStrips; i++) if (fStrips[i]) delete fStrips[i];
235 delete [] fStrips;
236 }
237 fEquipId = module.fEquipId;
238 fEquipType = module.fEquipType;
239 fDdlId = module.fDdlId;
240 fAd = module.fAd;
241 fAdc = module.fAdc;
242 fModuleId = module.fModuleId;
243 fNumberOfStrips = module.fNumberOfStrips;
244 fStrips = NULL;
245 fNumberOfChips = module.fNumberOfChips;
246 fCm = NULL;
247 fEventsNumber = module.fEventsNumber;
248 if ((module.fNumberOfStrips > 0) && (module.fStrips)) {
249 fStrips = new (nothrow) AliITSChannelDaSSD* [module.fNumberOfStrips];
250 if (fStrips) {
251 for (Int_t strind = 0; strind < module.fNumberOfStrips; strind++) {
252 if (module.fStrips[strind]) {
253 fStrips[strind] = new AliITSChannelDaSSD(*(module.fStrips[strind]));
254 if (!fStrips[strind]) {
255 AliError("AliITSModuleDaSSD: Error copy constructor");
256 for (Int_t i = (strind - 1); i >= 0; i--) delete fStrips[strind];
257 delete [] fStrips;
258 fStrips = NULL;
259 break;
260 }
261 } else fStrips[strind] = NULL;
262 }
263 } else {
264 AliError(Form("AliITSModuleDaSSD: Error allocating memory for %i AliITSChannelDaSSD* objects!", module.fNumberOfStrips));
265 fNumberOfStrips = 0;
266 fStrips = NULL;
267 }
268 }
269 if (fCm) delete [] fCm;
270 if (module.fCm) {
271 fCm = new (nothrow) TArrayF [module.fNumberOfChips];
272 if (fCm) {
273 for (Int_t chind = 0; chind < module.fNumberOfChips; chind++) fCm[chind] = module.fCm[chind];
274 } else {
275 AliError(Form("AliITSModuleDaSSD: Error allocating memory for %i TArrayF objects!", module.fNumberOfChips));
276 fNumberOfChips = 0;
277 fCm = NULL;
278 }
279 }
371588bb 280 if (fCmFerom) delete [] fCmFerom;
281 if (module.fCmFerom) {
282 fCmFerom = new (nothrow) TArrayS [module.fNumberOfChips];
283 if (fCmFerom) {
284 for (Int_t chind = 0; chind < fgkChipsPerModule; chind++) fCmFerom[chind] = module.fCmFerom[chind];
285 } else {
286 AliError(Form("AliITSModuleDaSSD: Error allocating memory for %i TArrayS objects!", fgkChipsPerModule));
287 fCmFerom = NULL;
288 }
289 }
f67db810 290 return *this;
291}
292
293
294
c4d90345 295//______________________________________________________________________________
f67db810 296AliITSModuleDaSSD::~AliITSModuleDaSSD()
297{
223dda26 298// Destructor
f67db810 299 if (fStrips)
300 {
301 for (Long_t i = 0; i < fNumberOfStrips; i++)
302 {
303 if (fStrips[i]) delete fStrips[i];
f67db810 304 }
305 delete [] fStrips;
306 }
c4d90345 307 if (fCm) delete [] fCm;
371588bb 308 if (fCmFerom) delete [] fCmFerom;
c4d90345 309}
310
311
312
313//______________________________________________________________________________
314Bool_t AliITSModuleDaSSD::SetNumberOfStrips(const Int_t numberofstrips)
315{
316// Allocates memory for AliITSChannelDaSSD*
317 if (fStrips) {
318 for (Int_t i = 0; i < fNumberOfStrips; i++) if (fStrips[i]) delete fStrips[i];
319 delete [] fStrips;
320 fStrips = NULL;
321 }
322 if (numberofstrips <= 0) {fNumberOfStrips = 0; return kTRUE; }
323 if (numberofstrips != fgkStripsPerModule)
324 AliWarning(Form("AliITSModuleDaSSD: ALICE ITS SSD Module contains %i strips", fgkStripsPerModule));
325 fStrips = new (nothrow) AliITSChannelDaSSD* [numberofstrips];
326 if (fStrips) {
327 fNumberOfStrips = numberofstrips;
328 memset(fStrips, 0, sizeof(AliITSChannelDaSSD*) * numberofstrips);
329 return kTRUE;
330 } else {
331 AliError(Form("AliITSModuleDaSSD: Error allocating memory for %i AliITSChannelDaSSD* objects!", numberofstrips));
332 fNumberOfStrips = 0;
333 fStrips = NULL;
334 return kFALSE;
335 }
f67db810 336}
337
338
c4d90345 339//______________________________________________________________________________
340Bool_t AliITSModuleDaSSD::SetNumberOfChips(const Int_t nchips)
341{
342// Allocate nchips TArrayF objects to save Common Mode
343 DeleteCM();
344 if (nchips <= 0) {fNumberOfChips = 0; return kTRUE; }
345 if (nchips != fgkChipsPerModule)
346 AliWarning(Form("AliITSModuleDaSSD: ALICE ITS SSD Module contains %i HAL25 chips", fgkChipsPerModule));
347 fCm = new (nothrow) TArrayF [nchips];
348 if (fCm) {
349 fNumberOfChips = nchips;
350 return kTRUE;
351 } else {
352 AliError(Form("AliITSModuleDaSSD: Error allocating memory for %i TArrayF objects!", nchips));
353 fNumberOfChips = 0;
354 fCm = NULL;
355 return kFALSE;
356 }
357}
358
f67db810 359
c4d90345 360//______________________________________________________________________________
361Bool_t AliITSModuleDaSSD::SetModuleIdData (const UChar_t ddlID, const UChar_t ad, const UChar_t adc, const Short_t moduleID)
f67db810 362{
223dda26 363// SetModuleIdData
f67db810 364 if (ad > fgkMaxAdNumber) {
c4d90345 365 AliWarning(Form("AliITSModuleDaSSD: Wrong AD number: %i", ad));
f67db810 366 return kFALSE;
367 }
368 if (adc > fgkMaxAdcNumber || ForbiddenAdcNumber(adc)) {
c4d90345 369 AliWarning(Form("AliITSModuleDaSSD: Wrong ADC number: %i", adc));
f67db810 370 return kFALSE;
371 }
372 fDdlId = ddlID;
373 fAd = ad;
374 fAdc = adc;
375 fModuleId = moduleID;
376 return kTRUE;
377}
378
379
c4d90345 380//______________________________________________________________________________
f67db810 381void AliITSModuleDaSSD::SetModuleFEEId (const UChar_t ddlID, const UChar_t ad, const UChar_t adc)
382{
223dda26 383// Set id data of FEE connected to the Module
f67db810 384 fDdlId = ddlID;
385 fAd = ad;
386 fAdc = adc;
387}
388
389
c4d90345 390//______________________________________________________________________________
f67db810 391void AliITSModuleDaSSD::SetModuleRorcId (const Int_t equipid, const Int_t equiptype)
392{
223dda26 393// Set data to access FEROM registres via DDL
f67db810 394 fEquipId = equipid;
395 fEquipType = equiptype;
396}
397
398
c4d90345 399//______________________________________________________________________________
f67db810 400Bool_t AliITSModuleDaSSD::SetEventsNumber(const Long_t eventsnumber)
401{
00e18e8f 402// Allocate the memory for the events data
f67db810 403 Int_t i;
404 if (!fStrips) return kFALSE;
00e18e8f 405 for (i = 0; i < fNumberOfStrips; i++) {
406 if (fStrips[i])
407 if (!fStrips[i]->SetEvenetsNumber(eventsnumber)) {
408 for (Int_t j = 0; j < i; j++) fStrips[j]->DeleteSignal();
c4d90345 409 AliError(Form("AliITSModuleDaSSD: Error allocating memory for i% events for module %i, strip %i",
410 eventsnumber, (Int_t)fModuleId, i));
00e18e8f 411 return kFALSE;
412 }
413 else
414 if (!(fStrips[i] = new AliITSChannelDaSSD(i, eventsnumber))) {
415 for (Int_t j = 0; j < i; j++) delete fStrips[j];
416 delete [] fStrips;
417 fNumberOfStrips = 0;
418 fStrips = NULL;
c4d90345 419 AliError(Form("AliITSModuleDaSSD: Error allocating memory for strip %i of module %i!", (Int_t)fModuleId, i));
00e18e8f 420 return kFALSE;
421 }
422 }
371588bb 423 if (fCmFerom) {
424 for (Int_t i = 0; i < fgkChipsPerModule; i++) {
425 fCmFerom[i].Set(eventsnumber);
426 fCmFerom[i].Reset(0);
427 }
428 }
429 else AliError("AliITSModuleDaSSD: No memory was allocated for fCmFerom!");
430 fEventsNumber = eventsnumber;
f67db810 431 return kTRUE;
432}
433
434
435
c4d90345 436//______________________________________________________________________________
437Bool_t AliITSModuleDaSSD::SetCM (const Float_t cm, const Int_t chipn, const Int_t evn)
438{
439// Set value of CM for a given chip and event
440 if ((!fCm) || (chipn >= fNumberOfChips)) return kFALSE;
441 if (evn >= fCm[chipn].GetSize()) return kFALSE;
442 else fCm[chipn][evn] = cm;
443 return kTRUE;
444}
445
446
447
448//______________________________________________________________________________
449Float_t AliITSModuleDaSSD::GetCM(const Int_t chipn, const Long_t evn) const
450{
451// Get value of CM for a given chip and event
452 if ((!fCm) || (chipn >= fNumberOfChips)) return 0.0f;
453 if (evn >= fCm[chipn].GetSize()) return 0.0f;
454 else return fCm[chipn][evn];
455}
456
457
458
371588bb 459//______________________________________________________________________________
460Bool_t AliITSModuleDaSSD::SetCMFeromEventsNumber(const Long_t eventsnumber)
461{
462// Allocates memory for the values of CM calculated in Ferom
463 if (!fCmFerom) return kFALSE;
464 for (Int_t chipind = 0; chipind < fgkChipsPerModule; chipind++) {
465 fCmFerom[chipind].Set(eventsnumber);
466 fCmFerom[chipind].Reset(0);
467 }
468 return kTRUE;
469}
470
471//______________________________________________________________________________
472Bool_t AliITSModuleDaSSD::SetCMFerom (const Short_t cm, const Int_t chipn, const Int_t evn)
473{
474// Set value of FeromCM for a given chip and event
475 if ((!fCmFerom) || (chipn >= fgkChipsPerModule)) return kFALSE;
476 if (evn >= fCmFerom[chipn].GetSize()) return kFALSE;
477 else fCmFerom[chipn][evn] = cm;
478 return kTRUE;
479}
480
481
482
483//______________________________________________________________________________
484Short_t AliITSModuleDaSSD::GetCMFerom(const Int_t chipn, const Long_t evn) const
485{
486// Get value of FeromCM for a given chip and event
487 if ((!fCmFerom) || (chipn >= fgkChipsPerModule)) return 0;
488 if (evn >= fCmFerom[chipn].GetSize()) return 0;
489 else return fCmFerom[chipn][evn];
490}
491
492
493
c4d90345 494//______________________________________________________________________________
2e2c6def 495AliITSNoiseSSD* AliITSModuleDaSSD::GetCalibrationNoise() const
f67db810 496{
223dda26 497// Creates the AliITSNoiseSSD objects with callibration data
f67db810 498 AliITSNoiseSSD *mc;
c4d90345 499 Float_t noise;
f67db810 500 if (!fStrips) return NULL;
501 mc = new AliITSNoiseSSD();
502 mc->SetMod(fModuleId);
503 mc->SetNNoiseP(fgkPNStripsPerModule);
504 mc->SetNNoiseN(fgkPNStripsPerModule);
505 for (Int_t i = 0; i < fNumberOfStrips; i++) {
c4d90345 506 if (!fStrips[i]) noise = AliITSChannelDaSSD::GetUndefinedValue();
507 else noise = fStrips[i]->GetNoiseCM();
f67db810 508 if (i < fgkPNStripsPerModule)
c4d90345 509 mc->AddNoiseP(i, noise);
510 else mc->AddNoiseN((AliITSChannelDaSSD::GetMaxStripIdConst() - i), noise);
f67db810 511 }
512 return mc;
513}
2e2c6def 514
515
516
517//______________________________________________________________________________
518AliITSPedestalSSD* AliITSModuleDaSSD::GetCalibrationPedestal() const
519{
520// Creates the AliITSPedestalSSD objects with callibration data
521 AliITSPedestalSSD *mc;
522 Float_t ped;
523 if (!fStrips) return NULL;
524 mc = new AliITSPedestalSSD();
525 mc->SetMod(fModuleId);
526 mc->SetNPedestalP(fgkPNStripsPerModule);
527 mc->SetNPedestalN(fgkPNStripsPerModule);
528 for (Int_t i = 0; i < fNumberOfStrips; i++) {
529 if (!fStrips[i]) ped = AliITSChannelDaSSD::GetUndefinedValue();
530 else ped = fStrips[i]->GetPedestal();
531 if (i < fgkPNStripsPerModule)
532 mc->AddPedestalP(i, ped);
533 else mc->AddPedestalN((AliITSChannelDaSSD::GetMaxStripIdConst() - i), ped);
534 }
535 return mc;
536}
537
538
539
540//______________________________________________________________________________
541AliITSBadChannelsSSD* AliITSModuleDaSSD::GetCalibrationBadChannels() const
542{
543// Creates the AliITSBadChannelsSSD objects with callibration data
544 AliITSBadChannelsSSD *mc;
545 Int_t *chlist, nch = 0, nchn = 0, nchp = 0;
546 if (!fStrips) return NULL;
547 chlist = new Int_t [GetStripsPerModuleConst()];
548 for (Int_t i = 0; i < fNumberOfStrips; i++) {
549 if (!fStrips[i]) { chlist[nch++] = i; if (i < fgkPNStripsPerModule) nchp++; else nchn++; continue;}
550 if (fStrips[i]->GetNoiseCM() == AliITSChannelDaSSD::GetUndefinedValue())
551 { chlist[nch++] = i; if (i < fgkPNStripsPerModule) nchp++; else nchn++; }
552 }
553 mc = new AliITSBadChannelsSSD();
554 mc->SetMod(fModuleId);
555 if (!nch) return mc;
556 mc->SetNBadPChannelsList(nchp);
557 mc->SetNBadNChannelsList(nchn);
558 for (Int_t i = 0; i < nch; i++) {
559 if (chlist[i] < fgkPNStripsPerModule) mc->AddBadPChannel(chlist[i], i);
560 else mc->AddBadNChannel((AliITSChannelDaSSD::GetMaxStripIdConst() - chlist[i]), (i-nchp));
561 }
562 return mc;
563}