FGT pedestal and ADC

Me and Amilkar working on the FGT tracking, Amilkar wrote the tracking code and now we both test it on a simulation sample.

The summery below for some of the FGT makers:

In the StFgtA2CMaker:

The StFgtA2CMaker used to read the ADC value for each strips and then subtract the pedestal and calculate the charge on the strip 
  • read the pedestal and the pedestal err for each electId
ped = mDb->getPedestalFromElecId( elecId );
pedErr = mDb->getPedestalSigmaFromElecId( elecId );
  • check the pedestal if it is > kFgtMaxAdc or it is < 0 we remove the strip (broken)
if( ped > kFgtMaxAdc || ped < 0 ){
strip->setGeoId( -1 ); 
  • now for the good strips we read the adc for each timebin
for( Int_t timebin = 0; timebin < mMaxTimeBin && strip->getGeoId() > -1; ++timebin ){
Int_t adc = strip->getAdc( timebin );
  • then we subtract the ped from the adc 
Int_t adcMinusPed = adc - ped;
strip->setAdc(adcMinusPed, timebin );
  • now add the adcMinusPed form all the time bin
 sumC += adcMinusPed;
  • After that we read the gain for each strip, right now we have the gain =1 , then we calculate the charge, where the charge =
strip->setCharge( sumC/gain );
  • the charge uncert =
 strip->setChargeUncert(gain ? mPedSigFactor4Charge*sqrt(7)*pedErr/gain : 10000);     // mPedSigFactor4Charge(1.0)
  • then check for seed, by looking to the the adc for each timebin and have a cluster SeedType, we have two types :
if( !nTbAboveThres && (mRelThres || mAbsThres>-kFgtMaxAdc) )
strip->setClusterSeedType(kFgtSeedTypeNo);  //no signal
else if( mRelThres || mAbsThres>-kFgtMaxAdc ){
strip->setClusterSeedType(checkValidPulse(strip, pedErr));

if(pStrip->getAdc(0) <3*ped && numHighBins==3 && peakAdc > pStrip->getAdc(6) && numAlmostHighBins>=3 && numHighBinsAfterLeadingEdge>=2) {
return kFgtSeedType1;
    }
if(pStrip->getAdc(0) <3*ped && numHighBins==2 && peakAdc > pStrip->getAdc(6)&& numHighBinsAfterLeadingEdge>=2)
return kFgtSeedType2;

for( Int_t t = 0; t < mMaxTimeBin-2; t++ ) {
float thr=mClusterThreshold*5*ped;
if(adc[t]>thr && adc[t+1]>thr && adc[t+2]>thr) {flag=1; break;}
}
if(adc[mMaxTimeBin-1]<maxadc) 
return kFgtSeedType3;
return kFgtSeedType4;
  • Then check the status of the strip:
The status map is applied as follows: status 0x00 is good, all else is bad.