+//______________________________________________________________________
+void AliITSDetTypeSim::ReadOldSSDBadChannels(const TObjArray *array,
+ AliITSBadChannelsSSDv2 *badChannelsSSD) {
+ //Reads the old SSD calibration object and converts it to the new format
+ Int_t nMod = array->GetEntries();
+ cout<<"Converting old calibration object for bad channels..."<<endl;
+ for (Int_t iModule = 0; iModule < nMod; 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 AliITSDetTypeSim::ReadOldSSDGain(const TObjArray *array,
+ AliITSGainSSDv2 *gainSSD) {
+ //Reads the old SSD calibration object and converts it to the new format
+
+ Int_t nMod = array->GetEntries();
+ cout<<"Converting old calibration object for gain..."<<endl;
+
+ //GAIN
+ for (Int_t iModule = 0; iModule < nMod; 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 AliITSDetTypeSim::ProcessSPDDigitForFastOr(UInt_t module, UInt_t colM, UInt_t rowM) {
+ // Processes wether a single fired pixel will give rise to a fast-or signal
+ fFOGenerator.ProcessPixelHitM(module,colM,rowM);
+}
+//_______________________________________________________________________
+AliITSTriggerConditions* AliITSDetTypeSim::GetTriggerConditions() {
+ // Get Pixel Trigger Conditions (separate method since it is used only when simulating trigger)
+ if (fTriggerConditions==NULL) { // read from db
+ fRunNumber = ((Int_t)AliCDBManager::Instance()->GetRun());
+ Bool_t origCacheStatus = AliCDBManager::Instance()->GetCacheFlag();
+ Bool_t isCacheActive;
+ if (fRunNumber<0) isCacheActive=kFALSE;
+ else isCacheActive=kTRUE;
+ AliCDBManager::Instance()->SetCacheFlag(isCacheActive);
+ AliCDBEntry *pitCond = AliCDBManager::Instance()->Get("ITS/Calib/PITConditions", fRunNumber);
+ if (!pitCond) {
+ AliError("Trigger conditions retrieval failed! ");
+ return NULL;
+ }
+ fTriggerConditions = (AliITSTriggerConditions*) pitCond->GetObject();
+ if (!isCacheActive) pitCond->SetObject(NULL);
+ pitCond->SetOwner(kTRUE);
+ if (!isCacheActive) {
+ delete pitCond;
+ }
+ AliCDBManager::Instance()->SetCacheFlag(origCacheStatus);
+ if (fTriggerConditions==NULL) {
+ AliWarning("fTriggerConditions is NULL!");
+ }