#include "hmdcslope.h"

HMdcSlope


class description - source file - inheritance tree (.pdf)

class HMdcSlope : public HReconstructor

Inheritance Chart:
TObject
<-
TNamed
<-
HTask
<-
HReconstructor
<-
HMdcSlope

    protected:
void calc(Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Float_t, Float_t*, Float_t*) void calc5(Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Float_t, Float_t*, Float_t*) void calcCHI(Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Float_t, Float_t*, Float_t*) void calcGraph(Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Float_t, Float_t*, Float_t*) void calcSlope(Int_t, Int_t, Int_t, Int_t, Int_t, Int_t, Float_t, Float_t*, Float_t*, Float_t*, Int_t, Int_t) void fitHistogramm(Float_t*, Float_t*, Int_t, Int_t, Int_t, Int_t, Int_t) void fitHistogrammMaxCondition(Float_t*, Float_t*, Int_t, Int_t, Int_t, Int_t) void fitHistogrammMeanCondition(Float_t*, Float_t*, Int_t, Int_t, Int_t, Int_t) public:
HMdcSlope() HMdcSlope(Text_t* name, Text_t* title) ~HMdcSlope() Int_t calcBinNr(Double_t, Double_t, Double_t, Int_t) static TClass* Class() virtual Int_t execute() virtual Bool_t finalize() virtual Bool_t init() virtual TClass* IsA() const void selectCalibrationAlgorithm(Int_t) void selectHistFitMethod(Int_t) void setBinError(Int_t) void setCreateNtupleActive(Bool_t) void setDebugActive(Int_t) void setGraphFitActive(Bool_t) void setHistFitActive(Bool_t) void setLinRegActive(Bool_t) void setMbSelector(Int_t) void setnTimeValues(Int_t) void setOutputNtuple(Char_t*) void setOutputRoot(Char_t*) void setSelectorActive(Bool_t) void setTdcSelector(Int_t) void setTrendCalculationActive(Bool_t) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members


    protected:
HCategory* rawCat ! pointer to the raw data HCategory* slopeCat ! pointer to the calibration's slope HIterator* iter ! iterator on raw data HMdcCalParRaw* calparraw ! calibration parameters on raw level Char_t* fNameRoot ! file name of root output file Char_t* fNameNtuple ! file name of ntuple output file float* avgSlope[6][4][16][96] float* avgSlopeErr[6][4][16][96] int* nEvt[6][4][16][96] int* errorTrend[16][96][600][6][4] Int_t slopeTrend[6][4][16][96][5000] Bool_t trendCalculationActive Int_t calibrationAlgorithm Int_t nTimeValues Int_t debugActive ! 0x00: off, 0x01: general, 0x02: init, 0x04: finalize, 0x08: execute, 0x10: calc, 0x20: fitHistogramm Int_t fitHistMethod Bool_t linRegActive Bool_t histFitActive Bool_t graphFitActive Int_t binError Bool_t selectorActive Int_t mbSelector Int_t tdcSelector Bool_t createNtupleActive TFile* ntupleOutputFile TNtuple* ntuple TFile* file TH1F* hSlope TH1F* hTime public:
static const HMdcSlope::calibrationMethod HMDC_SLOPE_LIN_REG_6 static const HMdcSlope::calibrationMethod HMDC_SLOPE_HIST_FIT_5 static const HMdcSlope::calibrationMethod HMDC_SLOPE_GRAPH_FIT_5 static const HMdcSlope::calibrationMethod HMDC_SLOPE_LIN_REG_5

Class Description


 HMdcSlope

 Calculates the Slope parameter for MDC calibration. Uses cal1 container
 as an input data



HMdcSlope()

HMdcSlope(Text_t* name,Text_t* title) : HReconstructor(name,title)

~HMdcSlope()
 destructor deletes the iterator

void setOutputRoot(Char_t *c)

void setMbSelector(Int_t i)

void selectCalibrationAlgorithm(Int_t i)

void selectHistFitMethod(Int_t i)

void setnTimeValues(Int_t i)

void setTrendCalculationActive(Bool_t b)

void setTdcSelector(Int_t i)

void setBinError(Int_t i)

void setSelectorActive(Bool_t b)

void setCreateNtupleActive(Bool_t b)

void setOutputNtuple(Char_t *c)

void setLinRegActive(Bool_t b)

void setHistFitActive(Bool_t b)

void setGraphFitActive(Bool_t b)

void setDebugActive(Int_t i)

void fitHistogramm(Float_t* slope, Float_t* sigma, Int_t sector, Int_t module, Int_t motherboard, Int_t tdc, Int_t method)

void fitHistogrammMaxCondition(Float_t* slope, Float_t* sigma, Int_t sector, Int_t module, Int_t motherboard, Int_t tdc)

void fitHistogrammMeanCondition(Float_t* slope, Float_t* sigma, Int_t sector, Int_t module, Int_t motherboard, Int_t tdc)

Bool_t init(void)
 creates the parameter containers MdcCalPar and MdcLookup if they do not
 exist and adds them to the list of parameter containers in the runtime
 database

Bool_t finalize(void)

void calcSlope(Int_t t0, Int_t t1, Int_t t2, Int_t t3, Int_t t4, Int_t t5, Float_t delta, Float_t* myslope, Float_t* myerror, Float_t* chiSquare, Int_t nvals, Int_t myAlgorithm)
 depending on the value of myAlgorithm
 calc
 calc5
 calcCHI
 calcGraph
 are called to caculate the values for the slopes

void calc(Int_t t0, Int_t t1, Int_t t2, Int_t t3, Int_t t4, Int_t t5, Float_t delta, Float_t *myslope, Float_t *myerror)
 Linear regression
 with 6 equal distanced base points, (t[i] = delta * i, i = 1...6)
 f(t) = a0 + a1 * t

 s2a1: (standard deviation)^2 of mya1
 slope = -1/mya1;
                                sqrt(s2a1)
 standard deviation of slope = --------------
                                  (mya1)^2


void calc5(Int_t t0, Int_t t1, Int_t t2, Int_t t3, Int_t t4, Int_t t5, Float_t delta, Float_t *myslope, Float_t *myerror)
 Linear regression
 with 5 equal distanced base points, (t[i] = delta * i, i = 1...5)
 f(t) = a0 + a1 * t

 s2a1: (standard deviation)^2 of mya1
 slope = -1/mya1;
                                sqrt(s2a1)
 standard deviation of slope = --------------
                                  (mya1)^2


void calcCHI(Int_t t0, Int_t t1, Int_t t2, Int_t t3, Int_t t4, Int_t t5, Float_t delta, Float_t *myslope, Float_t *myerror)
 calculate slopes using histogram based fit

void calcGraph(Int_t t0, Int_t t1, Int_t t2, Int_t t3, Int_t t4, Int_t t5, Float_t delta, Float_t *myslope, Float_t *myerror)
 calculate slopes using graph based fit

Int_t calcBinNr(Double_t value, Double_t min, Double_t max, Int_t nbins)
 calculate bin number for value in given binned ranged

Int_t execute(void)
 evaluates the calibration events in the data stream
 based on the input from HMdcRaw
 slopes are determined
 Two modes of slope evaluation do exist
 a) TrendCalculation (offline procedure)
 b) Online Calculation

  // a) TrendCalculation
  
  // the idea of this offline procedure is to first fill
  // the calculated slopes of the whole dataset into
  // a histogramm (SlopeTrend) and to derive the slope value
  // as the result of a Gaussian Fit in the finalize function.
  // Where the slope corresponds to the first moment
  // and the error to the sigma
  
  
  // b) Online Calculation
  
  // For each event the slope is calculated with the chosen algorithm
  // and its content is written to the calparraw container
  



Inline Functions


            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
               void StreamerNVirtual(TBuffer& b)


Last update: Fri Jan 26 12:15:43 2007


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.