+ rec->SetDetTypeRec(this);
+ rec->RawdataToClusters(rawReader);
+ }
+
+ // Remove PIT in-active chips from Fast-OR fired map
+ if (all || det[0]) { // SPD present
+ RemoveFastOrFiredInActive();
+ // here removing bits which have no associated clusters
+ RemoveFastOrFiredFromDead(GetFiredChipMap());
+
+ }
+}
+//______________________________________________________________________
+void AliITSDetTypeRec::ReadOldSSDNoise(const TObjArray *array,
+ AliITSNoiseSSDv2 *noiseSSD) {
+ //Reads the old SSD calibration object and converts it to the new format
+ const Int_t fgkSSDSTRIPSPERMODULE = 1536;
+ const Int_t fgkSSDPSIDESTRIPSPERMODULE = 768;
+
+ Int_t gNMod = array->GetEntries();
+ AliInfo("Converting old calibration object for noise...\n");
+
+ //NOISE
+ Double_t noise = 0.0;
+ for (Int_t iModule = 0; iModule < gNMod; iModule++) {
+ AliITSNoiseSSD *noiseModule = (AliITSNoiseSSD*) (array->At(iModule));
+ for(Int_t iStrip = 0; iStrip < fgkSSDSTRIPSPERMODULE; iStrip++) {
+ noise = (iStrip < fgkSSDPSIDESTRIPSPERMODULE) ? noiseModule->GetNoiseP(iStrip) : noiseModule->GetNoiseN(1535 - iStrip);
+ if(iStrip < fgkSSDPSIDESTRIPSPERMODULE)
+ noiseSSD->AddNoiseP(iModule,iStrip,noise);
+ if(iStrip >= fgkSSDPSIDESTRIPSPERMODULE)
+ noiseSSD->AddNoiseN(iModule,1535 - iStrip,noise);
+ }//loop over strips
+ }//loop over modules
+}
+
+//______________________________________________________________________
+void AliITSDetTypeRec::ReadOldSSDBadChannels(const TObjArray *array,
+ AliITSBadChannelsSSDv2 *badChannelsSSD) {
+ //Reads the old SSD calibration object and converts it to the new format
+ Int_t gNMod = array->GetEntries();
+ AliInfo("Converting old calibration object for bad channels...");
+ for (Int_t iModule = 0; iModule < gNMod; iModule++) {
+ //for (Int_t iModule = 0; iModule < 1; iModule++) {
+ AliITSBadChannelsSSD *bad = (AliITSBadChannelsSSD*) (array->At(iModule));
+ TArrayI arrayPSide = bad->GetBadPChannelsList();
+ for(Int_t iPCounter = 0; iPCounter < arrayPSide.GetSize(); iPCounter++)
+ badChannelsSSD->AddBadChannelP(iModule,
+ iPCounter,
+ (Char_t)arrayPSide.At(iPCounter));
+
+ TArrayI arrayNSide = bad->GetBadNChannelsList();
+ for(Int_t iNCounter = 0; iNCounter < arrayNSide.GetSize(); iNCounter++)
+ badChannelsSSD->AddBadChannelN(iModule,
+ iNCounter,
+ (Char_t)arrayNSide.At(iNCounter));
+
+ }//loop over modules
+}
+
+//______________________________________________________________________
+void AliITSDetTypeRec::ReadOldSSDGain(const TObjArray *array,
+ AliITSGainSSDv2 *gainSSD) {
+ //Reads the old SSD calibration object and converts it to the new format
+
+ Int_t gNMod = array->GetEntries();
+ AliInfo("Converting old calibration object for gain...\n");
+
+ //GAIN
+ for (Int_t iModule = 0; iModule < gNMod; iModule++) {
+ AliITSGainSSD *gainModule = (AliITSGainSSD*) (array->At(iModule));
+ TArrayF arrayPSide = gainModule->GetGainP();
+ for(Int_t iPCounter = 0; iPCounter < arrayPSide.GetSize(); iPCounter++)
+ gainSSD->AddGainP(iModule,
+ iPCounter,
+ arrayPSide.At(iPCounter));
+ TArrayF arrayNSide = gainModule->GetGainN();
+ for(Int_t iNCounter = 0; iNCounter < arrayNSide.GetSize(); iNCounter++)
+ gainSSD->AddGainN(iModule,
+ iNCounter,
+ arrayNSide.At(iNCounter));
+ }//loop over modules
+}
+//______________________________________________________________________
+void AliITSDetTypeRec::RemoveFastOrFiredInActive() {
+ // Removes the chips that were in-active in the pixel trigger (from fast-or fired map)
+
+ if (fTriggerConditions==NULL) {
+ AliError("Pixel trigger conditions are missing.");
+ return;
+ }
+ Int_t eq = -1;
+ Int_t hs = -1;
+ Int_t chip = -1;
+ while (fTriggerConditions->GetNextInActiveChip(eq,hs,chip)) {
+ UInt_t chipKey = AliITSRawStreamSPD::GetOfflineChipKeyFromOnline(eq,hs,chip);
+ fFastOrFiredMap.SetBitNumber(chipKey,kFALSE);