// Expand the array
//
+ //Check if the array has not been already expanded
+ Int_t verif=0;
+ for(Int_t i=0; i<fNAdim; i++)
+ {
+ if(fADC[i]<-1)
+ {
+ verif++;
+ }
+ }
+
+ if(verif==0)
+ {
+ // AliDebug(1,"Nothing to expand");
+ return;
+ }
+
Int_t *longz;
longz = new Int_t[fNAdim];
Int_t *longm;
if(longz) delete [] longz;
}
+//____________________________________________________________________________________
+void AliTRDarrayADC::DeleteNegatives()
+{
+
+ //
+ //This method modifies the digits array, changing the negative values (-1)
+ //Produced during digitization into zero.
+ //
+
+ for(Int_t a=0; a<fNAdim; a++)
+ {
+ if(fADC[a]==-1)
+ {
+ fADC[a]=0;
+ }
+ }
+}
Int_t GetNrow() const {return fNrow;};
Int_t GetNcol() const {return fNcol;};
Int_t GetDim() const {return fNAdim;};
+ void DeleteNegatives();
protected:
// This is to take care of switched off super modules
if (!digitsIn->HasData()) continue;
digitsIn->Expand();
+ digitsIn->DeleteNegatives(); // Restore digits array to >=0 values
AliTRDSignalIndex* indexes = fDigitsManager->GetIndexes(i);
if (indexes->IsAllocated() == kFALSE){
fDigitsManager->BuildIndexes(i);
}
}
}
+//_______________________________________________________________________________________
+void AliTRDmcmSim::RestoreZeros()
+{
+ //
+ // Restore the zero-suppressed values (set as -1) to the value 0
+ //
+
+ for( Int_t iadc = 1 ; iadc < fNADC-1; iadc++ )
+ {
+ for( Int_t it = 0 ; it < fNTimeBin ; it++ )
+ {
+
+ if(fADCF[iadc][it]==-1) //if is a supressed zero, reset to zero
+ {
+ fADCF[iadc][it]=0;
+ fADCR[iadc][it]=0;
+ }
+ }
+ }
+}
void GeneratefZSM1Dim(); // Generate the ZSM1Dim based on digits array info
void StartfastZS(Int_t pads, Int_t timebis); // For ZS in the digitizer
void FlagDigitsArray(AliTRDarrayADC *tempdigs, Int_t valrow); //Set flags on the digits array
+ void RestoreZeros();
protected:
// mcm[entry]->ZSMapping(); // Calculate zero suppression mapping
mcm[entry]->CopyArrays();
mcm[entry]->GeneratefZSM1Dim();
+ mcm[entry]->RestoreZeros();
if (tracklet_on) {
mcm[entry]->Tracklet();
// mcm[entry]->ZSMapping(); // Calculate zero suppression mapping
mcm[entry]->CopyArrays();
mcm[entry]->GeneratefZSM1Dim();
+ mcm[entry]->RestoreZeros();
if (tracklet_on) {
mcm[entry]->Tracklet();