From: kharlov Date: Mon, 29 Jan 2007 16:29:37 +0000 (+0000) Subject: Digits2Raw(): special workaround for digits with time out of range X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=d11294bb5c0eee8a7d328d43b52b6de7de416889 Digits2Raw(): special workaround for digits with time out of range --- diff --git a/PHOS/AliPHOS.cxx b/PHOS/AliPHOS.cxx index 6556010ee37..29038cc2a26 100644 --- a/PHOS/AliPHOS.cxx +++ b/PHOS/AliPHOS.cxx @@ -16,6 +16,9 @@ /* History of cvs commits: * * $Log$ + * Revision 1.106 2007/01/17 17:28:56 kharlov + * Extract ALTRO sample generation to a separate class AliPHOSPulseGenerator + * * Revision 1.105 2007/01/12 21:44:29 kharlov * Simulate and reconstruct two gains simulaneouslsy * @@ -519,36 +522,36 @@ void AliPHOS::Digits2Raw() prevDDL = iDDL; } - // out of time range signal (?) - if (digit->GetTimeR() > pulse->GetRawFormatTimeMax() ) { + AliDebug(2,Form("digit E=%.4f GeV, t=%g s, (mod,col,row)=(%d,%d,%d)\n", + digit->GetEnergy(),digit->GetTimeR(), + relId[0]-1,relId[3]-1,relId[2]-1)); + // if a signal is out of time range, write only trailer + if (digit->GetTimeR() > pulse->GetRawFormatTimeMax()*0.5 ) { AliInfo("Signal is out of time range.\n"); - buffer->FillBuffer((Int_t)digit->GetEnergy()); + buffer->FillBuffer(0); buffer->FillBuffer(pulse->GetRawFormatTimeBins() ); // time bin - buffer->FillBuffer(3); // bunch length - buffer->WriteTrailer(3, relId[3], relId[2], module); // trailer + buffer->FillBuffer(3); // bunch length + buffer->WriteTrailer(3, relId[3]-1, relId[2]-1, 0); // trailer // calculate the time response function } else { Double_t energy = 0 ; Int_t module = relId[0]; - if ( digit->GetId() <= geom->GetNModules() * geom->GetNCristalsInModule()) { + if (digit->GetId() <= geom->GetNModules() * geom->GetNCristalsInModule()) { energy=digit->GetEnergy(); - AliDebug(2,Form("digit energy: %f\n",digit->GetEnergy())); if(energy>eMax) {eMax=energy; modMax=module; colMax=col; rowMax=row;} } else { energy = 0; // CPV raw data format is now know yet - } + } pulse->SetAmplitude(energy); pulse->SetTZero(digit->GetTimeR()); pulse->MakeSamples(); pulse->GetSamples(adcValuesHigh, adcValuesLow) ; - buffer->WriteChannel(relId[3]-1, relId[2]-1, 0, pulse->GetRawFormatTimeBins(), adcValuesLow , kAdcThreshold); buffer->WriteChannel(relId[3]-1, relId[2]-1, 1, pulse->GetRawFormatTimeBins(), adcValuesHigh, kAdcThreshold); - } }