AliRoot Core  v5-06-30 (35d6c57)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliTPCCalibTCF Class Reference

Extraction and test of TCF parameters needed by the ALTRO chip. More...

#include <AliTPCCalibTCF.h>

Inheritance diagram for AliTPCCalibTCF:

Public Member Functions

 AliTPCCalibTCF ()
 
 AliTPCCalibTCF (Int_t gateWidth, Int_t Sample, Int_t pulseLength, Int_t lowPulseLim, Int_t upPulseLim, Double_t rmsLim, Double_t ratioIntLim)
 
 AliTPCCalibTCF (const AliTPCCalibTCF &sig)
 
virtual ~AliTPCCalibTCF ()
 
AliTPCCalibTCFoperator= (const AliTPCCalibTCF &source)
 
void ProcessRawFileV3 (const char *nameRawFile, const char *nameFileOut)
 
void ProcessRawEventV3 (AliRawReader *rawReader, AliTPCRawStreamV3 *rawStream, const char *nameFileOut)
 
void MergeHistoPerSector (const char *nameFileIn)
 
void AnalyzeRootFile (const char *nameFileIn, Int_t minNumPulse=1, Int_t histStart=1, Int_t histEnd=1000000)
 
Int_t AnalyzePulse (TH1F *const hisIn, Double_t *coefZ, Double_t *coefP)
 
void TestTCFonRootFile (const char *nameFileIn, const char *nameFileTCF, Int_t nPulseMin=0, Int_t plotFlag=0, Int_t lowKey=1, Int_t upKey=1000000)
 
void TestTCFonRawFile (const char *nameRawFile, const char *nameFileOut, const char *nameFileTCF, Int_t nPulseMin=0, Int_t plotFlag=0, bool bUseHLTOUT=false)
 
Int_t DumpTCFparamToFilePerSector (const char *nameFileTCFPerSec, const char *nameMappingFile="$ALICE_ROOT/TPC/Calib/tpcMapping.root")
 
Int_t DumpTCFparamToFilePerPad (const char *nameFileTCFPerPad, const char *nameFileTCFPerSec, const char *nameMappingFile="$ALICE_ROOT/TPC/Calib/tpcMapping.root")
 
TH2F * PlotOccupSummary2Dhist (const char *nameFileIn, Int_t side=0)
 
void PlotOccupSummary (const char *nameFile, Int_t side=0, Int_t nPulseMin=0)
 
void PlotQualitySummary (const char *nameFileQuality, const char *plotSpec="widthRed:maxUndershot", const char *cut="maxUndershot<0.1&&maxUndershot>-40&&widthRed>0&&widthRed<100", const char *pOpt="LEGO2Z")
 
void PrintPulseThresholds ()
 
void MergeHistoPerFile (const char *fileNameIn, const char *fileSum, Int_t mode=0)
 
void MergeToOneFile (const char *nameFileSum)
 

Private Member Functions

Int_t FitPulse (TNtuple *dataTuple, Double_t *coefZ, Double_t *coefP)
 
Double_t * ExtractPZValues (Double_t *param)
 
Int_t Equalization (TNtuple *dataTuple, Double_t *coefZ, Double_t *coefP)
 
Int_t FindCorTCFparam (TH1F *const hisIn, const char *nameFileTCF, Double_t *coefZ, Double_t *coefP)
 
Double_t * GetQualityOfTCF (TH1F *hisIn, Double_t *coefZ, Double_t *coefP, Int_t plotFlag=0)
 
TNtuple * ApplyTCFilter (TH1F *const hisIn, Double_t *const coefZ, Double_t *const coefP, Int_t plotFlag=0)
 
 ClassDef (AliTPCCalibTCF, 1)
 

Static Private Member Functions

static void FitFcn (Int_t &nPar, Double_t *grad, Double_t &f, Double_t *const par, Int_t iflag)
 

Private Attributes

Int_t fGateWidth
 expected Gate fluctuation length More...
 
Int_t fSample
 expected usefull signal length More...
 
Int_t fPulseLength
 needed pulselength for TC characterisation More...
 
Int_t fLowPulseLim
 lower pulse height limit More...
 
Int_t fUpPulseLim
 upper pulse height limit More...
 
Double_t fRMSLim
 signal RMS limit More...
 
Double_t fRatioIntLim
 ratio of signal-integral/pulse-integral limit More...
 

Detailed Description

Extraction and test of TCF parameters needed by the ALTRO chip.

Class for Evaluation and Validation of the ALTRO Tail Cancelation Filter (TCF) parameters out of TPC Raw data

Author
Stefan Rossegger, Simon Feigl

Definition at line 23 of file AliTPCCalibTCF.h.

Constructor & Destructor Documentation

AliTPCCalibTCF::AliTPCCalibTCF ( )

Definition at line 53 of file AliTPCCalibTCF.cxx.

Referenced by operator=().

AliTPCCalibTCF::AliTPCCalibTCF ( Int_t  gateWidth,
Int_t  Sample,
Int_t  pulseLength,
Int_t  lowPulseLim,
Int_t  upPulseLim,
Double_t  rmsLim,
Double_t  ratioIntLim 
)

AliTPCCalibTCF constructor with specific (non-standard) thresholds

Definition at line 70 of file AliTPCCalibTCF.cxx.

AliTPCCalibTCF::AliTPCCalibTCF ( const AliTPCCalibTCF sig)

AliTPCCalibTCF copy constructor

Definition at line 85 of file AliTPCCalibTCF.cxx.

AliTPCCalibTCF::~AliTPCCalibTCF ( )
virtual

AliTPCCalibTCF destructor

Definition at line 113 of file AliTPCCalibTCF.cxx.

Member Function Documentation

Int_t AliTPCCalibTCF::AnalyzePulse ( TH1F *const  hisIn,
Double_t *  coefZ,
Double_t *  coefP 
)

Performs the analysis on one specific pulse (histogram) by means of fitting the pulse and equalization of the pulseheight. The found TCF parameters are stored in the arrays coefZ and coefP

Definition at line 476 of file AliTPCCalibTCF.cxx.

Referenced by AnalyzeRootFile().

void AliTPCCalibTCF::AnalyzeRootFile ( const char *  nameFileIn,
Int_t  minNumPulse = 1,
Int_t  histStart = 1,
Int_t  histEnd = 1000000 
)

This function takes a prepeared root file (accumulated histograms: output of process function) and performs an analysis (fit and equalization) in order to get the TCF parameters. These are stored in an TNtuple along with the pad and creation infos. The tuple is written to the output file "TCFparam+nameFileIn" To reduce the analysis time, the minimum number of accumulated pulses within one histogram 'minNumPulse' (to perform the analysis on) can be set

Definition at line 409 of file AliTPCCalibTCF.cxx.

TNtuple * AliTPCCalibTCF::ApplyTCFilter ( TH1F *const  hisIn,
Double_t *const  coefZ,
Double_t *const  coefP,
Int_t  plotFlag = 0 
)
private

Applies the given TCF parameters on the given pulse via the ALTRO emulator class (discret values) and stores both pulses into a returned TNtuple

Definition at line 1519 of file AliTPCCalibTCF.cxx.

Referenced by GetQualityOfTCF().

AliTPCCalibTCF::ClassDef ( AliTPCCalibTCF  ,
 
)
private
Int_t AliTPCCalibTCF::DumpTCFparamToFilePerPad ( const char *  nameFileTCFPerPad,
const char *  nameFileTCFPerSec,
const char *  nameMappingFile = "$ALICE_ROOT/TPC/Calib/tpcMapping.root" 
)

Writes TCF parameters per PAD to .data file

from now on: "roc" refers to the offline sector numbering "sector" refers to the 18 sectors per side

Gets TCF parameters of single pads from nameFileTCFPerPad and writes them to the file 'tpcTCFparamPAD.data'

If there are parameters for a pad missing, then the parameters of the roc, in which the pad is located, are used as the pad parameters. The parameters for the roc are retreived from nameFileTCFPerSec. If there are parameters for a roc missing, then the parameters are set to -1.

Definition at line 1761 of file AliTPCCalibTCF.cxx.

Int_t AliTPCCalibTCF::DumpTCFparamToFilePerSector ( const char *  nameFileTCFPerSec,
const char *  nameMappingFile = "$ALICE_ROOT/TPC/Calib/tpcMapping.root" 
)

Writes TCF parameters per SECTOR (=ROC) to .data file

from now on: "roc" refers to the offline sector numbering "sector" refers to the 18 sectors per side

Gets TCF parameters of a roc from nameFileTCFPerSec and writes them to the file 'tpcTCFparamSector.data'

If there are parameters for a roc missing, then the parameters are set to -1

Definition at line 1914 of file AliTPCCalibTCF.cxx.

Int_t AliTPCCalibTCF::Equalization ( TNtuple *  dataTuple,
Double_t *  coefZ,
Double_t *  coefP 
)
private

calculates the 3rd set of TCF parameters (remaining 2 PZ values) in order to restore the original pulse height and adds them to the passed arrays

Definition at line 1221 of file AliTPCCalibTCF.cxx.

Referenced by AnalyzePulse().

Double_t * AliTPCCalibTCF::ExtractPZValues ( Double_t *  param)
private

Calculation of Pole and Zero values out of fit parameters

Definition at line 1152 of file AliTPCCalibTCF.cxx.

Referenced by FitPulse().

Int_t AliTPCCalibTCF::FindCorTCFparam ( TH1F *const  hisIn,
const char *  nameFileTCF,
Double_t *  coefZ,
Double_t *  coefP 
)
private

This function searches for the correct TCF parameters to the given histogram 'hisIn' within the file 'nameFileTCF' If no parameters for this pad (padinfo within the histogram!) where found the function returns 0

Definition at line 1296 of file AliTPCCalibTCF.cxx.

Referenced by TestTCFonRawFile(), and TestTCFonRootFile().

void AliTPCCalibTCF::FitFcn ( Int_t &  nPar,
Double_t *  grad,
Double_t &  f,
Double_t *const  par,
Int_t  iflag 
)
staticprivate

Minimization function needed for TMinuit with FitFunction included Fit function: Sum of three convolution terms (IRF conv. with Exp.)

Definition at line 1104 of file AliTPCCalibTCF.cxx.

Referenced by FitPulse().

Int_t AliTPCCalibTCF::FitPulse ( TNtuple *  dataTuple,
Double_t *  coefZ,
Double_t *  coefP 
)
private

function to fit one pulse and to calculate the according pole-zero parameters

Definition at line 1020 of file AliTPCCalibTCF.cxx.

Referenced by AnalyzePulse().

Double_t * AliTPCCalibTCF::GetQualityOfTCF ( TH1F *  hisIn,
Double_t *  coefZ,
Double_t *  coefP,
Int_t  plotFlag = 0 
)
private

This function evaluates the quality parameters of the given TCF parameters tested on the passed pulse (hisIn) The quality parameters are stored in an array. They are ... height deviation [ADC] area reduction [percent] width reduction [percent] mean undershot [ADC] maximum of undershot after pulse [ADC] Pulse RMS [ADC]

Definition at line 1361 of file AliTPCCalibTCF.cxx.

Referenced by TestTCFonRawFile(), and TestTCFonRootFile().

void AliTPCCalibTCF::MergeHistoPerFile ( const char *  fileNameIn,
const char *  fileSum,
Int_t  mode = 0 
)

Gets histograms from fileNameIn and adds contents to fileSum

If fileSum doesn't exist, fileSum is created mode = 0, just ONE BIG FILE ('fileSum') will be used mode = 1, one file per sector ('fileSum-Sec#.root') will be used mode=1 is much faster, but the additional function 'MergeToOneFile' has to be used in order to get one big and complete collection file again ...

!Make sure not to add the same file more than once!

Definition at line 1620 of file AliTPCCalibTCF.cxx.

void AliTPCCalibTCF::MergeHistoPerSector ( const char *  nameFileIn)

Merges all histograms within one sector, calculates the TCF parameters of the 'histogram-per-sector' and stores (histo and parameters) into seperated files ...

note: first 4 timebins of a histogram hold specific informations about number of collected pulses, sector, row and pad

'nameFileIn': root file produced with Process function which holds one histogram per pad (sum of signals of proper pulses) 'Sec+nameFileIn': root file with one histogram per sector (information of row and pad are set to -1)

Definition at line 332 of file AliTPCCalibTCF.cxx.

void AliTPCCalibTCF::MergeToOneFile ( const char *  nameFileSum)

Merges all Sec-files together ... this is an additional functionality for the function MergeHistsPerFile if for example mode=1

Definition at line 1704 of file AliTPCCalibTCF.cxx.

AliTPCCalibTCF & AliTPCCalibTCF::operator= ( const AliTPCCalibTCF source)

AliTPCCalibTCF assignment operator

Definition at line 101 of file AliTPCCalibTCF.cxx.

void AliTPCCalibTCF::PlotOccupSummary ( const char *  nameFile,
Int_t  side = 0,
Int_t  nPulseMin = 0 
)

Plots the number of summed pulses per pad above a given minimum at the pad position at a given TPC side 'nameFile': root-file created with the Process function

Definition at line 895 of file AliTPCCalibTCF.cxx.

TH2F * AliTPCCalibTCF::PlotOccupSummary2Dhist ( const char *  nameFileIn,
Int_t  side = 0 
)

Plots the number of summed pulses per pad on a given TPC side 'nameFileIn': root-file created with the Process function

Definition at line 816 of file AliTPCCalibTCF.cxx.

void AliTPCCalibTCF::PlotQualitySummary ( const char *  nameFileQuality,
const char *  plotSpec = "widthRed:maxUndershot",
const char *  cut = "maxUndershot<0.1&&maxUndershot>-40&&widthRed>0&&widthRed<100",
const char *  pOpt = "LEGO2Z" 
)

This function is an easy interface to load the QualityTuple (produced with the function 'TestOnFile' and plots them according to the plot specifications 'plotSpec' e.g. "widthRed:maxUndershot" One may also set cut and plot options ("cut","pOpt")

The stored quality parameters are ... sec:row:pad:npulse: ... usual pad info heightDev ... height deviation in percent areaRed ... area reduction in percent widthRed ... width reduction in percent undershot ... mean undershot after the pulse in ADC maxUndershot ... maximum of the undershot after the pulse in ADC pulseRMS ... RMS of the pulse used to calculate the Quality parameters in ADC

Definition at line 976 of file AliTPCCalibTCF.cxx.

void AliTPCCalibTCF::PrintPulseThresholds ( )

Prints the pulse threshold settings

Definition at line 1605 of file AliTPCCalibTCF.cxx.

void AliTPCCalibTCF::ProcessRawEventV3 ( AliRawReader *  rawReader,
AliTPCRawStreamV3 rawStream,
const char *  nameFileOut 
)

New RCU data format!: Standard middle of 2009

Extracts proper pulses (according the given tresholds) within one event and accumulates them into one histogram per pad. All histograms are saved in the file 'nameFileOut'. The first bins of the histograms contain the following information: bin 1: Number of accumulated pulses bin 2;3;4: Sector; Row; Pad;

Definition at line 162 of file AliTPCCalibTCF.cxx.

Referenced by ProcessRawFileV3().

void AliTPCCalibTCF::ProcessRawFileV3 ( const char *  nameRawFile,
const char *  nameFileOut 
)

New RCU data format!: Standard middle of 2009

Loops over all events within one RawData file and collects proper pulses (according to given tresholds) per pad Histograms per pad are stored in 'nameFileOut'

Definition at line 121 of file AliTPCCalibTCF.cxx.

void AliTPCCalibTCF::TestTCFonRawFile ( const char *  nameRawFile,
const char *  nameFileOut,
const char *  nameFileTCF,
Int_t  nPulseMin = 0,
Int_t  plotFlag = 0,
bool  bUseHLTOUT = false 
)

Performs quality parameters evaluation of the calculated TCF parameters in the file 'nameFileTCF' for every proper pulse (according to given thresholds) within the RAW file 'nameRawFile'. The found quality parameters are stored in a TNtuple which will be saved in the Root file 'nameFileOut'. If the parameter for the given pulse (given pad) was not found, the pulse is rejected.

Definition at line 614 of file AliTPCCalibTCF.cxx.

void AliTPCCalibTCF::TestTCFonRootFile ( const char *  nameFileIn,
const char *  nameFileTCF,
Int_t  nPulseMin = 0,
Int_t  plotFlag = 0,
Int_t  lowKey = 1,
Int_t  upKey = 1000000 
)

Performs quality parameters evaluation of the calculated TCF parameters in the file 'nameFileTCF' for every (accumulated) histogram within the prepeared root file 'nameFileIn'. The found quality parameters are stored in an TNtuple which will be saved in a Root file 'Quality-*'. If the parameter for the given pulse (given pad) was not found, the pulse is rejected.

Definition at line 542 of file AliTPCCalibTCF.cxx.

Member Data Documentation

Int_t AliTPCCalibTCF::fGateWidth
private

expected Gate fluctuation length

Definition at line 62 of file AliTPCCalibTCF.h.

Referenced by PrintPulseThresholds(), ProcessRawEventV3(), and TestTCFonRawFile().

Int_t AliTPCCalibTCF::fLowPulseLim
private

lower pulse height limit

Definition at line 65 of file AliTPCCalibTCF.h.

Referenced by PrintPulseThresholds(), ProcessRawEventV3(), and TestTCFonRawFile().

Int_t AliTPCCalibTCF::fPulseLength
private

needed pulselength for TC characterisation

Definition at line 64 of file AliTPCCalibTCF.h.

Referenced by PrintPulseThresholds(), ProcessRawEventV3(), and TestTCFonRawFile().

Double_t AliTPCCalibTCF::fRatioIntLim
private

ratio of signal-integral/pulse-integral limit

Definition at line 68 of file AliTPCCalibTCF.h.

Referenced by PrintPulseThresholds(), and ProcessRawEventV3().

Double_t AliTPCCalibTCF::fRMSLim
private

signal RMS limit

Definition at line 67 of file AliTPCCalibTCF.h.

Referenced by PrintPulseThresholds(), ProcessRawEventV3(), and TestTCFonRawFile().

Int_t AliTPCCalibTCF::fSample
private

expected usefull signal length

Definition at line 63 of file AliTPCCalibTCF.h.

Referenced by PrintPulseThresholds(), ProcessRawEventV3(), and TestTCFonRawFile().

Int_t AliTPCCalibTCF::fUpPulseLim
private

upper pulse height limit

Definition at line 66 of file AliTPCCalibTCF.h.

Referenced by PrintPulseThresholds(), ProcessRawEventV3(), and TestTCFonRawFile().


The documentation for this class was generated from the following files: