ROOT logo
AliRoot » TPC » BASE » AliTPCCalibCE

class AliTPCCalibCE: public AliTPCCalibRawBase


Implementation of the TPC Central Electrode calibration

Origin: Jens Wiechula, Marian Ivanov   J.Wiechula@gsi.de, Marian.Ivanov@cern.ch





 *                                Class Description                                  *



The AliTPCCalibCE class is used to get calibration data from the Central Electrode using laser runs.

The information retrieved is
  • Time arrival from the CE
  • Signal width
  • Signal sum

Overview:

  1. Working principle
  2. User interface for filling data
  3. Stored information

I. Working principle

Raw laser data is processed by calling one of the ProcessEvent(...) functions (see below). These in the end call the Update(...) function.

  • the Update(...) function:
    In this function the array fPadSignal is filled with the adc signals between the specified range fFirstTimeBin and fLastTimeBin for the current pad. before going to the next pad the ProcessPad() function is called, which analyses the data for one pad stored in fPadSignal.
    • the ProcessPad() function:
      1. Find Pedestal and Noise information
        • use database information which has to be set by calling
          SetPedestalDatabase(AliTPCCalPad *pedestalTPC, AliTPCCalPad *padNoiseTPC)
        • if no information from the pedestal data base is available the informaion is calculated on the fly ( see FindPedestal() function )
      2. Find local maxima of the pad signal
        • maxima arise from the laser tracks, the CE and also periodic postpeaks after the CE signal have have been observed ( see FindLocalMaxima(...) )
      3. Find the CE signal information
        • to find the position of the CE signal the Tmean information from the previos event is used as the CE signal the local maximum closest to this Tmean is identified
        • calculate mean = T0, RMS = signal width and Q sum in a range of -4+7 timebins around Q max position the Q sum is scaled by pad area (see FindPulserSignal(...) function)
      4. Fill a temprary array for the T0 information (GetPadTimesEvent(fCurrentSector,kTRUE)) (why see below)
      5. Fill the Q sum and RMS values in the histograms (GetHisto[RMS,Q](ROC,kTRUE))

At the end of each event the EndEvent() function is called

  • the EndEvent() function:
    • calculate the mean T0 for side A and side C. Fill T0 histogram with Time0- This is done to overcome syncronisation problems between the trigger and the fec clock.
    • calculate Mean T for each ROC using the COG aroud the median of the LocalMaxima distribution in one sector
    • calculate Mean Q
    • calculate Global fit parameters for Pol1 and Pol2 fits

After accumulating the desired statistics the Analyse() function has to be called.

  • the Analyse() function:
    • calculate the mean values of T0, RMS, Q for each pad, using the AliMathBase::GetCOG(...) function
    • fill the calibration storage classes (AliTPCCalROC) for each ROC
    • (The calibration information is stored in the TObjArrays fCalRocArrayT0, fCalRocArrayRMS and fCalRocArrayQ

II. User interface for filling data

To Fill information one of the following functions can be used:

  • Bool_t ProcessEvent(eventHeaderStruct *event);
    • process Date event
    • use AliTPCRawReaderDate and call ProcessEvent(AliRawReader *rawReader)

  • Bool_t ProcessEvent(AliRawReader *rawReader);
    • process AliRawReader event
    • use AliTPCRawStream to loop over data and call ProcessEvent(AliTPCRawStream *rawStream)

  • Bool_t ProcessEvent(AliTPCRawStream *rawStream);
    • process event from AliTPCRawStream
    • call Update function for signal filling

  • Int_t Update(const Int_t isector, const Int_t iRow, const Int_t iPad, const Int_t iTimeBin, const Float_t signal);
    • directly fill signal information (sector, row, pad, time bin, pad) to the reference histograms

It is also possible to merge two independently taken calibrations using the function

  • void Merge(AliTPCCalibSignal *sig)
    • copy histograms in 'sig' if they do not exist in this instance
    • Add histograms in 'sig' to the histograms in this instance if the allready exist
    • After merging call Analyse again!

example: filling data using root raw data:

 
 void fillCE(Char_t *filename)
 {
    rawReader = new AliRawReaderRoot(fileName);
    if ( !rawReader ) return;
    AliTPCCalibCE *calib = new AliTPCCalibCE;
    while (rawReader->NextEvent()){
      calib->ProcessEvent(rawReader);
    }
    calib->Analyse();
    calib->DumpToFile("CEData.root");
    delete rawReader;
    delete calib;
 }
 

III. What kind of information is stored and how to retrieve it

III.1 Stored information

  • Histograms:
    • For each ROC three TH2S histos 'Reference Histograms' (ROC channel vs. [Time0, signal width, Q sum]) is created when it is filled for the first time (GetHisto[T0,RMS,Q](ROC,kTRUE)). The histos are stored in the TObjArrays fHistoT0Array, fHistoRMSArray and fHistoQArray.

  • Calibration Data:
    • For each ROC three types of calibration data (AliTPCCalROC) is stored: for the mean arrival Time, the signal width and the signal Sum. The AliTPCCalROC objects are stored in the TObjArrays fCalRocArrayT0, fCalRocArrayRMS , fCalRocArrayQ. The object for each roc is created the first time it is accessed (GetCalRoc[T0,RMS,Q](ROC,kTRUE));

  • For each event the following information is stored:
    • event time ( TVectorD fVEventTime )
    • event id ( TVectorD fVEventNumber )

    • mean arrival time for each ROC ( TObjArray fTMeanArrayEvent )
    • mean Q for each ROC ( TObjArray fQMeanArrayEvent )
    • parameters of a plane fit for each ROC ( TObjArray fParamArrayEventPol1 )
    • parameters of a 2D parabola fit for each ROC ( TObjArray fParamArrayEventPol2 )

III.2 Retrieving information

  • Accessing the 'Reference Histograms' (Time0, signal width and Q sum information pad by pad):
    • TH2F *GetHistoT0(Int_t sector);
    • TH2F *GetHistoRMS(Int_t sector);
    • TH2F *GetHistoQ(Int_t sector);

  • Accessing the calibration storage objects:
    • AliTPCCalROC *GetCalRocT0(Int_t sector); // for the Time0 values
    • AliTPCCalROC *GetCalRocRMS(Int_t sector); // for the signal width values
    • AliTPCCalROC *GetCalRocQ(Int_t sector); // for the Q sum values

  • Accessin the event by event information:
    • The event by event information can be displayed using the
    • MakeGraphTimeCE(Int_t sector, Int_t xVariable, Int_t fitType, Int_t fitParameter)
    • which creates a graph from the specified variables

example for visualisation:

  //if the file "CEData.root" was created using the above example one could do the following:
  TFile fileCE("CEData.root")
  AliTPCCalibCE *ce = (AliTPCCalibCE*)fileCE->Get("AliTPCCalibCE");
  ce->GetCalRocT0(0)->Draw("colz");
  ce->GetCalRocRMS(0)->Draw("colz");
  //or use the AliTPCCalPad functionality:
  AliTPCCalPad padT0(ped->GetCalPadT0());
  AliTPCCalPad padSigWidth(ped->GetCalPadRMS());
  padT0->MakeHisto2D()->Draw("colz");       //Draw A-Side Time0 Information
  padSigWidth->MakeHisto2D()->Draw("colz"); //Draw A-Side signal width Information
  //display event by event information:
  //Draw mean arrival time as a function of the event time for oroc sector A00
  ce->MakeGraphTimeCE(36, 0, 2)->Draw("alp");
  //Draw first derivative in local x from a plane fit as a function of the event time for oroc sector A00
  ce->MakeGraphTimeCE(36, 0, 0, 1)->Draw("alp");  
  
 

Function Members (Methods)

public:
AliTPCCalibCE()
AliTPCCalibCE(const AliTPCCalibCE& sig)
AliTPCCalibCE(const TMap* config)
virtual~AliTPCCalibCE()
voidTObject::AbstractMethod(const char* method) const
virtual voidAnalyse()
voidAnalyseTrack()
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidDumpToFile(const Char_t* filename, const Char_t* dir = "", Bool_t append = kFALSE)
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
Int_tFindLaserTrackID(Int_t sector, Int_t row, const Double_t* peakpos, Double_t& mindist, const Double_t* peakposloc, Int_t& itrackMin2)
voidFindLocalMaxima(TObjArray *const arrObj, Double_t timestamp, Int_t burst)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
AliTPCAltroMapping**AliTPCCalibRawBase::GetAltroMapping()
const AliAltroRawStream*AliTPCCalibRawBase::GetAltroRawStream() const
const TObjArray*GetArrFitGraphs() const
const TObjArray&GetArrHnDrift() const
const TObjArray*GetCalPadOutliers() const
const TObjArray*GetCalPadQ() const
const TObjArray*GetCalPadRMS() const
const TObjArray*GetCalPadT0() const
const TObjArray*GetCalPadT0Err() const
AliTPCCalROC*GetCalRocOutliers(Int_t sector, Bool_t force = kFALSE)
AliTPCCalROC*GetCalRocQ(Int_t sector, Bool_t force = kFALSE)
AliTPCCalROC*GetCalRocRMS(Int_t sector, Bool_t force = kFALSE)
AliTPCCalROC*GetCalRocT0(Int_t sector, Bool_t force = kFALSE)
AliTPCCalROC*GetCalRocT0Err(Int_t sector, Bool_t force = kFALSE)
Int_tAliTPCCalibRawBase::GetDebugLevel() const
TTreeSRedirector*AliTPCCalibRawBase::GetDebugStreamer()
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
const TVectorD*GetEventIds() const
const TVectorD*GetEventTimes() const
UInt_tAliTPCCalibRawBase::GetEventType() const
Int_tAliTPCCalibRawBase::GetFirstTimeBin() const
UInt_tAliTPCCalibRawBase::GetFirstTimeStamp() const
TH2S*GetHistoQ(Int_t sector, Bool_t force = kFALSE)
TH2S*GetHistoRMS(Int_t sector, Bool_t force = kFALSE)
TH2S*GetHistoT0(Int_t sector, Bool_t force = kFALSE)
TH1S*GetHistoTmean(Int_t sector, Bool_t force = kFALSE)
const THnSparseI*GetHnDrift() const
virtual const char*TObject::GetIconName() const
Bool_tGetIsZeroSuppressed() const
Double_tAliTPCCalibRawBase::GetL1Phase() const
Double_tAliTPCCalibRawBase::GetL1PhaseTB() const
Int_tAliTPCCalibRawBase::GetLastTimeBin() const
UInt_tAliTPCCalibRawBase::GetLastTimeStamp() const
Float_tGetMeanQrms() const
Float_tGetMeanRMSrms() const
Float_tGetMeanT0rms() const
virtual const char*TNamed::GetName() const
Int_tAliTPCCalibRawBase::GetNevents() const
Int_tGetNeventsProcessed() const
Float_tGetNnoiseThresholdMax() const
Float_tGetNnoiseThresholdSum() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
TObjArray*GetParamArrayPol1(Int_t sector, Bool_t force = kFALSE)
TObjArray*GetParamArrayPol2(Int_t sector, Bool_t force = kFALSE)
Int_tGetPeakDetectionMinus() const
Int_tGetPeakDetectionPlus() const
Float_tGetPeakIntegralMinus() const
Float_tGetPeakIntegralPlus() const
Int_tGetPeakIntRangeMinus() const
Int_tGetPeakIntRangePlus() const
TVectorF*GetQMeanEvents(Int_t sector, Bool_t force = kFALSE)
UInt_tAliTPCCalibRawBase::GetRunNumber() const
Float_tGetSecRejectRatio() const
Int_tAliTPCCalibRawBase::GetStreamLevel() const
const TVectorF*GetTime0Side(Int_t side = 0) const
const TVectorD&GetTimeBursts() const
UInt_tAliTPCCalibRawBase::GetTimeStamp() const
virtual const char*TNamed::GetTitle() const
TVectorF*GetTMeanEvents(Int_t sector, Bool_t force = kFALSE)
const AliTPCROC*AliTPCCalibRawBase::GetTPCROC() const
virtual UInt_tTObject::GetUniqueID() const
Bool_tAliTPCCalibRawBase::GetUseL1Phase() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
voidAliTPCCalibRawBase::IncrementNevents()
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
Bool_tIsEdgePad(Int_t sector, Int_t row, Int_t pad) const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
TGraph*MakeGraphTimeCE(Int_t sector, Int_t xVariable = 0, Int_t fitType = 0, Int_t fitParameter = 0)
voidTObject::MayNotUse(const char* method) const
voidMerge(AliTPCCalibCE *const ce)
virtual Long64_tMerge(TCollection *const list)
voidAliTPCCalibRawBase::MergeBase(const AliTPCCalibRawBase* calib)
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
AliTPCCalibCE&operator=(const AliTPCCalibCE& source)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTNamed::Print(Option_t* option = "") const
virtual voidProcessBunch(const Int_t sector, const Int_t row, const Int_t pad, const Int_t length, const UInt_t startTimeBin, const UShort_t* signal)
Bool_tAliTPCCalibRawBase::ProcessEvent(AliTPCRawStreamV3 *const rawStreamV3)
Bool_tAliTPCCalibRawBase::ProcessEvent(AliRawReader *const rawReader)
Bool_tAliTPCCalibRawBase::ProcessEvent(eventHeaderStruct *const event)
virtual Int_tTObject::Read(const char* name)
static AliTPCCalibCE*ReadFromFile(const Char_t* filename)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidAliTPCCalibRawBase::SetAltroMapping(AliTPCAltroMapping** mapp)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidAliTPCCalibRawBase::SetDebugLevel(Int_t level)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidSetEventInfo(UInt_t runNumber, UInt_t timestamp, UInt_t eventId)
voidSetIsZeroSuppressed(Bool_t zs = kTRUE)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
voidSetNnoiseThresholdMax(Float_t n)
voidSetNnoiseThresholdSum(Float_t n)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetPedestalDatabase(AliTPCCalPad *const pedestalTPC, AliTPCCalPad *const padNoiseTPC)
voidSetProcessNew(Bool_t process = kTRUE)
voidSetProcessOld(Bool_t process = kTRUE)
voidSetRangePeakDetection(Int_t minus, Int_t plus)
voidSetRangePeakIntegral(Int_t minus, Int_t plus)
voidSetRangeRefQ(Int_t nBins, Float_t xMin, Float_t xMax)
voidSetRangeRefRMS(Int_t nBins, Float_t xMin, Float_t xMax)
voidSetRangeRefT0(Int_t nBins, Float_t xMin, Float_t xMax)
voidAliTPCCalibRawBase::SetRangeTime(Int_t firstTimeBin, Int_t lastTimeBin)
voidAliTPCCalibRawBase::SetRunNumber(UInt_t eventnumber)
voidSetSecRejectRatio(Float_t ratio)
voidAliTPCCalibRawBase::SetStreamLevel(Int_t streamLevel)
voidAliTPCCalibRawBase::SetTimeStampEvent(UInt_t timestamp)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
voidAliTPCCalibRawBase::SetUseL1Phase(Bool_t useL1Phase = kTRUE)
virtual voidShowMembers(TMemberInspector&)
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual Int_tUpdate(const Int_t isector, const Int_t iRow, const Int_t iPad, const Int_t iTimeBin, const Float_t signal)
virtual voidAliTPCCalibRawBase::UpdateDDL()
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
virtual voidEndEvent()
voidTObject::MakeZombie()
virtual voidResetEvent()
private:
voidAddCEtoIdeal(TObjArray* arr)
voidCalculateDV(TObjArray *const arrIdeal, TObjArray *const arrMeasured, Int_t burst)
voidCreateDVhist()
voidFindCESignal(TVectorD& param, Float_t& qSum, const TVectorF maxima)
voidFindLaserLayers()
voidFindLocalMaxima(TVectorF& maxima)
voidFindPedestal(Float_t part = .6)
AliTPCCalROC*GetCalRoc(Int_t sector, TObjArray* arr, Bool_t force) const
TH1S*GetHisto(Int_t sector, TObjArray* arr, const Char_t* type, Bool_t force)
TH2S*GetHisto(Int_t sector, TObjArray* arr, Int_t nbinsY, Float_t ymin, Float_t ymax, const Char_t* type, Bool_t force)
TVectorF*GetPadPedestalEvent(Int_t sector, Bool_t force = kFALSE)
TVectorF*GetPadQEvent(Int_t sector, Bool_t force = kFALSE)
TVectorF*GetPadRMSEvent(Int_t sector, Bool_t force = kFALSE)
TVectorF*GetPadTimesEvent(Int_t sector, Bool_t force = kFALSE)
TObjArray*GetParamArray(Int_t sector, TObjArray* arr, Bool_t force = kFALSE) const
TVectorF*GetVectSector(Int_t sector, TObjArray* arr, UInt_t size, Bool_t force = kFALSE) const
Bool_tIsPeak(Int_t pos, Int_t tminus, Int_t tplus) const
Bool_tIsPeakInRange(UShort_t timebin, Int_t roc) const
voidProcessPad()
voidResetMeasured(TObjArray *const arr)
voidResetPad()
Double_tSetBurstHnDrift()
TObjArray*SetupMeasured()
voidUpdateCETimeRef()

Data Members

protected:
Double_tAliTPCCalibRawBase::fAltroL1Phase! L1 Phase
Float_tAliTPCCalibRawBase::fAltroL1PhaseTB! L1 Phase in time bins
AliAltroRawStream*AliTPCCalibRawBase::fAltroRawStream! pointer to the altro object
Int_tAliTPCCalibRawBase::fCurrDDLNum! Current DDL number
Int_tAliTPCCalibRawBase::fCurrRCUId! Current RCU Id
Int_tAliTPCCalibRawBase::fDebugLevel! debug level
TTreeSRedirector*AliTPCCalibRawBase::fDebugStreamer! debug streamer
UInt_tAliTPCCalibRawBase::fEventType! current event Type from event header
Int_tAliTPCCalibRawBase::fFirstTimeBinFirst Time bin used for analysis
UInt_tAliTPCCalibRawBase::fFirstTimeStampFirst event time stamp
Int_tAliTPCCalibRawBase::fLastTimeBinLast Time bin used for analysis
UInt_tAliTPCCalibRawBase::fLastTimeStampLast event time stamp
AliTPCAltroMapping**AliTPCCalibRawBase::fMapping! Altro Mapping object
TStringTNamed::fNameobject identifier
Int_tAliTPCCalibRawBase::fNeventsNumber of processed events
Int_tAliTPCCalibRawBase::fPrevDDLNum! Current DDL number
Int_tAliTPCCalibRawBase::fPrevRCUId! Previous RCU Id
AliTPCROC*AliTPCCalibRawBase::fROC! ROC information
UInt_tAliTPCCalibRawBase::fRunNumbercurrent run number from event header
Int_tAliTPCCalibRawBase::fStreamLevel! level of streamer output
UInt_tAliTPCCalibRawBase::fTimeStamp! time stamp from event header
TStringTNamed::fTitleobject title
Bool_tAliTPCCalibRawBase::fUseL1Phaseuse L1 Phase information?
private:
Bool_tfAnalyseNew! Whether to analyse the new part of the algorithm.
TObjArray*fArrFitGraphsFit resut graphs for each parameter
TObjArrayfArrHnDriftarray of sparse histograms for each burst
UInt_tfBinsLastAna[100]number of bin in the THnSparse during the last analysis
TObjArrayfCalRocArrayOutliersArray of AliTPCCalROC class for signal outliers
TObjArrayfCalRocArrayQArray of AliTPCCalROC class for Charge calibration
TObjArrayfCalRocArrayRMSArray of AliTPCCalROC class for signal width calibration
TObjArrayfCalRocArrayT0Array of AliTPCCalROC class for Time0 calibration
TObjArrayfCalRocArrayT0ErrArray of AliTPCCalROC class for the error (rms) of Time0 calibration
Float_tfCurrentCETimeRef! Time refernce of the current sector
Int_tfCurrentChannel! current channel processed
Int_tfCurrentRow! current row processed
Int_tfCurrentSector! current sector processed
Double_tfEventId! Event Id of the current event
UInt_tfEventInBunch! event in current bunch
TObjArrayfHistoQArrayCalibration histograms for Charge distribution
TObjArrayfHistoRMSArrayCalibration histograms for signal width distribution
TObjArrayfHistoT0ArrayCalibration histograms for Time0 distribution
TObjArrayfHistoTmean! Calibration histograms of the mean CE position for all sectors
THnSparseI*fHnDrift! Histogram digits for each pad and timebin for several timestamps
Bool_tfIsZeroSuppressedIf data is Zero Suppressed -> Don't subtrakt pedestals!
Int_tfLastSector! Last sector processed
Float_tfMaxPadSignal! maximum bin of current pad
Int_tfMaxTimeBin! time bin with maximum value
Float_tfMeanQrmsmean of the rms of all pad Q fits, used as error estimation of Q results
Float_tfMeanRMSrmsmean of the rms of all pad TMS fits, used as error estimation of RMS results
Float_tfMeanT0rmsmean of the rms of all pad T0 fits, used as error estimation of T0 results
Int_tfNbinsQNumber of bins for T0 reference histogram
Int_tfNbinsRMSNumber of bins for T0 reference histogram
Int_tfNbinsT0Number of bins for T0 reference histogram
Float_tfNoiseThresholdMaxAnalysis Treshold for signal finding: Max>fNoiseThresholdMax*PadNoise
Float_tfNoiseThresholdSumAnalysis Treshold for signal finding: Sum>fNoiseThresholdSum*PadNoise
UInt_tfOldRunNumber! Old Run Number
Float_tfPadNoise! Noise Value of current pad
AliTPCCalROC*fPadNoiseROC! Pad noise Information for current ROC
AliTPCCalPad*fPadNoiseTPC! Pad noise Information whole TPC
Float_tfPadPedestal! Pedestal Value of current pad
TObjArrayfPadPedestalArrayEvent! Signal width for the event, only needed for debugging streamer
TObjArrayfPadQArrayEvent! Charge for the event, only needed for debugging streamer
TObjArrayfPadRMSArrayEvent! Signal width for the event, only needed for debugging streamer
Float_tfPadSignal[1024]! signal of current Pad
TObjArrayfPadTimesArrayEvent! Pad Times for the event, before mean Time0 corrections
AliTPCParam*fParam! TPC information
TObjArrayfParamArrayEventPol1Store mean arrival time parameters for each sector event by event from global plane fit
TObjArrayfParamArrayEventPol2Store mean arrival time parameters for each sector event by event from global parabola fit
Int_tfPeakDetMinusConsecutive timebins on rising edge to be regarded as a signal
Int_tfPeakDetPlusConsecutive timebins on falling edge to be regarded as a signal
Int_tfPeakIntMinusPeak integral range for COG determination. Bins used before max bin
Int_tfPeakIntPlusPeak integral range for COG determination. Bins used after max bin
UShort_tfPeakWidths[14]! Peak window widths
UShort_tfPeaks[14]! Peak position: 4 laser layers and CE
AliTPCCalROC*fPedestalROC! Pedestal Information for current ROC
AliTPCCalPad*fPedestalTPC! Pedestal Information whole TPC
Bool_tfProcessNewWhether to use the new algorithm
Bool_tfProcessOldWhether to use the old algorithm
TObjArrayfQMeanArrayEventStore mean arrival Charge for each sector event by event
Float_tfSecRejectRatio! Needed percentage of signals in one chamber. Below it will be rejected
TObjArrayfTMeanArrayEventStore mean arrival time for each sector event by event
TVectorDfTimeBurststime stamps of bursts
TVectorDfVEventNumberEventnumbers of the events
TVectorDfVEventTimeTimestamps of the events
TVectorDfVMeanQ! Mean Q for each sector;
TVectorDfVMeanQCounter! Mean Q counter for each sector;
TVectorDfVTime0Offset! Time0 Offset for each sector;
TVectorDfVTime0OffsetCounter! Time0 Offset counter for each sector;
TVectorFfVTime0SideAMean Time0 for side A for all events
TVectorFfVTime0SideCMean Time0 for side C for all events
Float_tfXmaxQxmax of T0 reference histogram
Float_tfXmaxRMSxmax of T0 reference histogram
Float_tfXmaxT0xmax of T0 reference histogram
Float_tfXminQxmin of T0 reference histogram
Float_tfXminRMSxmin of T0 reference histogram
Float_tfXminT0xmin of T0 reference histogram

Class Charts

Inheritance Chart:
TNamed
AliTPCCalibRawBase
AliTPCCalibCE

Function documentation

AliTPCCalibCE()
   fPadSignal(1024),

 AliTPCSignal default constructor

AliTPCCalibCE(const AliTPCCalibCE& sig)
   fPadSignal(1024),

 AliTPCSignal copy constructor

AliTPCCalibCE(const TMap* config)
   fPadSignal(1024),

 constructor which uses a tmap as input to set some specific parameters

~AliTPCCalibCE()
 destructor

Int_t Update(const Int_t isector, const Int_t iRow, const Int_t iPad, const Int_t iTimeBin, const Float_t signal)
 Signal filling methode on the fly pedestal and Time offset correction if necessary.
 no extra analysis necessary. Assumes knowledge of the signal shape!
 assumes that it is looped over consecutive time bins of one pad

void ProcessBunch(const Int_t sector, const Int_t row, const Int_t pad, const Int_t length, const UInt_t startTimeBin, const UShort_t* signal)
 new filling method to fill the THnSparse histogram

void FindLaserLayers()
 Find the laser layer positoins

void FindPedestal(Float_t part = .6)
 find pedestal and noise for the current pad. Use either database or
 truncated mean with part*100%

void UpdateCETimeRef()
 Find the time reference of the last valid CE signal in sector
 for irocs of the A-Side the reference of the corresponging OROC is returned
 the reason are the non reflective bands on the A-Side, which make the reference very uncertain
void FindCESignal(TVectorD& param, Float_t& qSum, const TVectorF maxima)
  Find position, signal width and height of the CE signal (last signal)
  param[0] = Qmax, param[1] = mean time, param[2] = rms;
  maxima: array of local maxima of the pad signal use the one closest to the mean CE position

Bool_t IsPeak(Int_t pos, Int_t tminus, Int_t tplus) const
 Check if 'pos' is a Maximum. Consider 'tminus' timebins before
 and 'tplus' timebins after 'pos'

void FindLocalMaxima(TVectorF& maxima)
 Find local maxima on the pad signal and Histogram them

void ProcessPad()
  Process data of current pad

void EndEvent()
  Process data of current pad
  The Functions 'SetTimeStamp' and 'SetRunNumber'  should be called
  before the EndEvent function to set the event timestamp and number!!!
  This is automatically done if the ProcessEvent(AliRawReader *rawReader)
  function was called
TH2S* GetHisto(Int_t sector, TObjArray* arr, Int_t nbinsY, Float_t ymin, Float_t ymax, const Char_t* type, Bool_t force)
 return pointer to TH2S histogram of 'type'
 if force is true create a new histogram if it doesn't exist allready

TH2S* GetHistoT0(Int_t sector, Bool_t force = kFALSE)
 return pointer to T0 histogram
 if force is true create a new histogram if it doesn't exist allready

TH2S* GetHistoQ(Int_t sector, Bool_t force = kFALSE)
 return pointer to Q histogram
 if force is true create a new histogram if it doesn't exist allready

TH2S* GetHistoRMS(Int_t sector, Bool_t force = kFALSE)
 return pointer to Q histogram
 if force is true create a new histogram if it doesn't exist allready

TH1S* GetHisto(Int_t sector, TObjArray* arr, const Char_t* type, Bool_t force)
 return pointer to TH1S histogram
 if force is true create a new histogram if it doesn't exist allready

TH1S* GetHistoTmean(Int_t sector, Bool_t force = kFALSE)
 return pointer to Q histogram
 if force is true create a new histogram if it doesn't exist allready

TVectorF* GetVectSector(Int_t sector, TObjArray* arr, UInt_t size, Bool_t force = kFALSE) const
 return pointer to Pad Info from 'arr' for the current event and sector
 if force is true create it if it doesn't exist allready

TVectorF* GetPadTimesEvent(Int_t sector, Bool_t force = kFALSE)
 return pointer to Pad Times Array for the current event and sector
 if force is true create it if it doesn't exist allready

TVectorF* GetPadQEvent(Int_t sector, Bool_t force = kFALSE)
 return pointer to Pad Q Array for the current event and sector
 if force is true create it if it doesn't exist allready
 for debugging purposes only

TVectorF* GetPadRMSEvent(Int_t sector, Bool_t force = kFALSE)
 return pointer to Pad RMS Array for the current event and sector
 if force is true create it if it doesn't exist allready
 for debugging purposes only

TVectorF* GetPadPedestalEvent(Int_t sector, Bool_t force = kFALSE)
 return pointer to Pad RMS Array for the current event and sector
 if force is true create it if it doesn't exist allready
 for debugging purposes only

TVectorF* GetTMeanEvents(Int_t sector, Bool_t force = kFALSE)
 return pointer to the EbyE info of the mean arrival time for 'sector'
 if force is true create it if it doesn't exist allready

TVectorF* GetQMeanEvents(Int_t sector, Bool_t force = kFALSE)
 return pointer to the EbyE info of the mean arrival time for 'sector'
 if force is true create it if it doesn't exist allready

AliTPCCalROC* GetCalRoc(Int_t sector, TObjArray* arr, Bool_t force) const
 return pointer to ROC Calibration
 if force is true create a new histogram if it doesn't exist allready

AliTPCCalROC* GetCalRocT0(Int_t sector, Bool_t force = kFALSE)
 return pointer to Time 0 ROC Calibration
 if force is true create a new histogram if it doesn't exist allready

AliTPCCalROC* GetCalRocT0Err(Int_t sector, Bool_t force = kFALSE)
 return pointer to the error of Time 0 ROC Calibration
 if force is true create a new histogram if it doesn't exist allready

AliTPCCalROC* GetCalRocQ(Int_t sector, Bool_t force = kFALSE)
 return pointer to T0 ROC Calibration
 if force is true create a new histogram if it doesn't exist allready

AliTPCCalROC* GetCalRocRMS(Int_t sector, Bool_t force = kFALSE)
 return pointer to signal width ROC Calibration
 if force is true create a new histogram if it doesn't exist allready

AliTPCCalROC* GetCalRocOutliers(Int_t sector, Bool_t force = kFALSE)
 return pointer to Outliers
 if force is true create a new histogram if it doesn't exist allready

TObjArray* GetParamArray(Int_t sector, TObjArray* arr, Bool_t force = kFALSE) const
 return pointer to TObjArray of fit parameters
 if force is true create a new histogram if it doesn't exist allready

TObjArray* GetParamArrayPol1(Int_t sector, Bool_t force = kFALSE)
 return pointer to TObjArray of fit parameters from plane fit
 if force is true create a new histogram if it doesn't exist allready

TObjArray* GetParamArrayPol2(Int_t sector, Bool_t force = kFALSE)
 return pointer to TObjArray of fit parameters from parabola fit
 if force is true create a new histogram if it doesn't exist allready

void CreateDVhist()
 Setup the THnSparse for the drift velocity determination

void ResetEvent()
  Reset global counters  -- Should be called before each event is processed

void ResetPad()
  Reset pad infos -- Should be called after a pad has been processed

void Merge(AliTPCCalibCE *const ce)
  Merge ce to the current AliTPCCalibCE

Long64_t Merge(TCollection *const list)
 Merge all objects of this type in list

TGraph * MakeGraphTimeCE(Int_t sector, Int_t xVariable = 0, Int_t fitType = 0, Int_t fitParameter = 0)
 Make graph from fit parameters of pol1 fit, pol2 fit, mean arrival time or mean Q for ROC 'sector'
 or side (-1: A-Side, -2: C-Side)
 xVariable:    0-event time, 1-event id, 2-internal event counter
 fitType:      0-pol1 fit, 1-pol2 fit, 2-mean time, 3-mean Q
 fitParameter: fit parameter ( 0-2 for pol1 ([0]+[1]*x+[2]*y),
                               0-5 for pol2 ([0]+[1]*x+[2]*y+[3]*x*x+[4]*y*y+[5]*x*y),
                               not used for mean time and mean Q )
 for an example see class description at the beginning

void Analyse()
  Calculate calibration constants

void FindLocalMaxima(TObjArray *const arrObj, Double_t timestamp, Int_t burst)
Find the local maximums for the projections to each axis

void AnalyseTrack()
  Analyse the tracks

Int_t FindLaserTrackID(Int_t sector, Int_t row, const Double_t* peakpos, Double_t& mindist, const Double_t* peakposloc, Int_t& itrackMin2)
  Find the tracks, which are closest to the ideal tracks, from clusters closest to the ideal tracks

Bool_t IsEdgePad(Int_t sector, Int_t row, Int_t pad) const
 return true if pad is on the edge of a row

TObjArray* SetupMeasured()
 setup array of measured laser tracks and CE

void ResetMeasured(TObjArray *const arr)
 reset array of measured laser tracks and CE

void AddCEtoIdeal(TObjArray* arr)
 Add ideal CE positions to the ideal track data

void CalculateDV(TObjArray *const arrIdeal, TObjArray *const arrMeasured, Int_t burst)
 calculate the drift velocity from the reconstructed clusters associated
 to the ideal laser tracks
 use two different fit scenarios: Separate fit for A- and C-Side
                                  Common fit for A- and C-Side

Double_t SetBurstHnDrift()
 Create a new THnSparse for the current burst
 return the time of the current burst

void DumpToFile(const Char_t* filename, const Char_t* dir = "", Bool_t append = kFALSE)
  Write class to file
  option can be specified in the dir option:
  options:
    name=<objname>: the name of the calibration object in file will be <objname>
    type=<type>:    the saving type:
                    0 - write the complte object
                    1 - Store the histogram arrays separately to make the streamed object smaller, Analyse to be called
                    2 - like 2, but in addition delete objects that will most probably not be used for calibration
                    3 - store only calibration output, don't store the reference histograms
                        and THnSparse (requires Analyse called before)

  NOTE: to read the object back, the ReadFromFile function should be used

AliTPCCalibCE* ReadFromFile(const Char_t* filename)
 Read object from file
 Handle properly if the histogram arrays were stored separately
 call Analyse to make sure to have the calibration relevant information in the object

Bool_t IsPeakInRange(UShort_t timebin, Int_t roc) const
Inline functions

const TObjArray* GetCalPadT0() const
{ return &fCalRocArrayT0; }
const TObjArray* GetCalPadT0Err() const
{ return &fCalRocArrayT0Err; }
const TObjArray* GetCalPadQ() const
{ return &fCalRocArrayQ; }
const TObjArray* GetCalPadRMS() const
{ return &fCalRocArrayRMS;}
const TObjArray* GetCalPadOutliers() const
Float_t GetMeanT0rms() const
{return fMeanT0rms;}
Float_t GetMeanQrms() const
{return fMeanQrms;}
Float_t GetMeanRMSrms() const
{return fMeanRMSrms;}
Int_t GetPeakDetectionMinus() const
{return fPeakDetMinus;}
Int_t GetPeakDetectionPlus() const
{return fPeakDetPlus;}
Int_t GetPeakIntRangeMinus() const
{return fPeakIntMinus;}
Int_t GetPeakIntRangePlus() const
{return fPeakIntPlus;}
Float_t GetNnoiseThresholdMax() const
Float_t GetNnoiseThresholdSum() const
const TVectorD* GetEventTimes() const
{ return &fVEventTime; }
const TVectorD* GetEventIds() const
{ return &fVEventNumber; }
void SetRangeRefQ(Int_t nBins, Float_t xMin, Float_t xMax)
{ fNbinsQ = nBins; fXminQ = xMin; fXmaxQ = xMax; }
void SetRangeRefT0(Int_t nBins, Float_t xMin, Float_t xMax)
{ fNbinsT0 = nBins; fXminT0 = xMin; fXmaxT0 = xMax; }
void SetRangeRefRMS(Int_t nBins, Float_t xMin, Float_t xMax)
{ fNbinsRMS = nBins; fXminRMS = xMin; fXmaxRMS = xMax; }
void SetRangePeakDetection(Int_t minus, Int_t plus)
{ fPeakDetMinus=minus; fPeakDetPlus=plus;}
void SetRangePeakIntegral(Int_t minus, Int_t plus)
{ fPeakIntMinus=minus; fPeakIntPlus=plus;}
void SetNnoiseThresholdMax(Float_t n)
void SetNnoiseThresholdSum(Float_t n)
void SetEventInfo(UInt_t runNumber, UInt_t timestamp, UInt_t eventId)
{ fRunNumber=runNumber; fTimeStamp=timestamp; fEventId=eventId;}
void SetPedestalDatabase(AliTPCCalPad *const pedestalTPC, AliTPCCalPad *const padNoiseTPC)
{fPedestalTPC = pedestalTPC; fPadNoiseTPC = padNoiseTPC;}
void SetIsZeroSuppressed(Bool_t zs = kTRUE)
void SetSecRejectRatio(Float_t ratio)
{ fSecRejectRatio=ratio; }
void SetProcessOld(Bool_t process = kTRUE)
{fProcessOld=process;}
void SetProcessNew(Bool_t process = kTRUE)
Getters
{fProcessNew=process; if (process&&!fHnDrift) CreateDVhist(); }
Int_t GetNeventsProcessed() const
{ return fNevents; }
Bool_t GetIsZeroSuppressed() const
{ return fIsZeroSuppressed; }
Float_t GetSecRejectRatio() const
{ return fSecRejectRatio; }
const TVectorF * GetTime0Side(Int_t side = 0) const
{return (side==0)?&fVTime0SideA:&fVTime0SideC;}
Float_t GetPeakIntegralMinus() const
{return fPeakIntMinus;}
Float_t GetPeakIntegralPlus() const
{return fPeakIntPlus;}
const THnSparseI * GetHnDrift() const
{return fHnDrift;}
const TObjArray& GetArrHnDrift() const
{return fArrHnDrift;}
const TVectorD& GetTimeBursts() const
{return fTimeBursts;}
const TObjArray * GetArrFitGraphs() const
{return fArrFitGraphs;}