#include "hmdcdedx.h"

HMdcDeDx


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

class HMdcDeDx : public HParCond

Inheritance Chart:
TObject
<-
TNamed
<-
HParSet
<-
HParCond
<-
HMdcDeDx

    protected:
Float_t calcMean(Float_t*, UChar_t) void calcSegPoints(HMdcSeg*, Double_t&, Double_t&, Double_t&, Double_t&, Double_t&, Double_t&) Float_t calcSigma(Float_t*, UChar_t, Float_t) UChar_t fillingInput(HMdcSeg* seg, Float_t*) UChar_t fillingInputClusFit(HMdcSeg* seg, Float_t*) void initArray() UChar_t select(Float_t*, Float_t, Float_t, UChar_t) void sort(Int_t, Float_t*) public:
HMdcDeDx(const char* name = "MdcDeDx", const char* title = "Mdc lookup table for wire stat", const char* context = "MdcDeDxProduction") HMdcDeDx(const HMdcDeDx&) ~HMdcDeDx() Float_t calcDeDx(HMdcSeg*, Float_t*, Float_t*, UChar_t*, Float_t*, UChar_t*, Int_t vers = 0, Int_t mod = 2) static TClass* Class() virtual void clear() static Double_t energyLoss(Int_t id, Double_t p, Double_t hefr = 0.6) static TGraph* energyLossGraph(Int_t id, Double_t hefr = 0.6, TString opt = p, Bool_t exchange = kFALSE, Int_t markerstyle = 8, Int_t markercolor = 2, Float_t markersize = 0.7) Float_t* getArray(Int_t& size) Double_t getHeFraction() Int_t getMinimumWires() virtual Bool_t getParams(HParamList*) Double_t getRefEnergyLoss() Double_t getScaleEnergyLoss(Int_t s, Int_t m) Float_t getShift(Int_t, Int_t, Int_t, Int_t) Double_t getShiftEnergyLoss(Int_t s, Int_t m) Float_t getShiftSegment(Int_t, Int_t, Float_t, Float_t) Float_t getShiftSigma(Int_t, Int_t, Int_t, Int_t) Float_t getShiftSigmaSegment(Int_t, Int_t, Float_t, Float_t) Float_t getWindow() virtual Bool_t init(HParIo*, Int_t*) Bool_t initContainer() virtual TClass* IsA() const HMdcDeDx& operator=(const HMdcDeDx&) TCanvas* plotShift(Int_t, Int_t) void printParam(TString opt = all) virtual void putParams(HParamList*) Double_t scaledTimeAboveThreshold(HGeantKine* kine, Double_t p, Int_t s, Int_t m, Float_t alpha, Float_t mindist) void setHeFraction(Double_t fr) void setMinimumWires(Int_t minwires) void setRefEnergyLoss(Double_t r) void setScaleEnergyLoss(Int_t s, Int_t m, Double_t sc) void setShift(Int_t, Int_t, Int_t, Int_t, Float_t) void setShiftEnergyLoss(Int_t s, Int_t m, Double_t sh) void setShiftSigma(Int_t, Int_t, Int_t, Int_t, Float_t) void setUseShifts(Bool_t ok) void setWindow(Float_t win) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) virtual Int_t write(HParIo*)

Data Members


    protected:
HMdcSizesCells* sizescells ! pointer to HMdcSizesCells container Float_t shift[6][4][18][100] sector,module,angle,distance Float_t shiftsigma[6][4][18][100] sector,module,angle,distance Double_t ref_dedx reference value for electrons (for scaling) Double_t shift_dedx[6][4] shift theoretical dedx (in betagamma axis) Double_t scale_dedx[6][4] scale theoretical dedx (in dedx axis) Double_t hefr fraction of helium of the gas mix HCategory* catcal ! pointer to mdc cal1 HCategory* cathit ! pointer to mdc hit HCategory* catclusinf ! pointer to mdc clusinf HCategory* catclusfit ! pointer to mdc clusfit HCategory* catwirefit ! pointer to mdc wirefit HLocation loccal ! location object of cal1 Int_t minimumWires minimum required wires Float_t window window for truncating arround mean (units of sigma) Bool_t isInitialized flag after init Int_t method ! method switch for filling input Int_t module ! method switch for filling input for module 1/2 of segment Float_t measurements[50] ! array of measurements Bool_t useShifts ! use/don't use normaization table Int_t ctskipmod0 ! counter for wires skipped with t2<=-998 in mod0 of seg Int_t ctskipmod1 ! counter for wires skipped with t2<=-998 in mod1 of seg

Class Description

*-- AUTHOR : J. Markert

 HMdcDeDx

 This transformation class calculates the "pseudo dEdx" from t2-t1 (time above threshold)
 of all fired drift cells included in one HMdcSeg. The transformation is performed doing a
 normalization of the measured t2-t1 with impact angle and minimum distance to wire
 (MDCCAL2 parametrization) and the algorithm to normalize the single measurements and
 average over all cells included in the segment.
-------------------------------------------------------------------------
 Calculation of dEdx:
 Float_t calcDeDx(HMdcSeg*,Float_t*,Float_t*,UChar_t*,Float_t*,UChar_t*,Int_t,Int_t)
 calculates dedx of a MDC segment by doing normalization for
 impact angle and distance from wire for the fired cells of
 the segment. The measurements are sorted in increasing order,
 the mean and sigma is calculated. Afterwards the truncated mean
 is calculated and returned as dedx. Mean,sigma,number of wires before
 truncating,truncated mean,truncated mean sigma and number of wires
 after truncating can be obtained by the returned pointers.
 Different methods can be selected:
 vers==0 (default): Input filling from HMdcSeg
                    (wires, thrown out by the fitter are ignored)
 vers==1          : Input filling from HMdcClusFit
                    (wires, thrown out by the fitter are taken into account)
                    If the fit has failed (chi2=-1), vers 0 is used
 mod==0           : calc dedx from 1st module in segment
 mod==1           : calc dedx from 2st module in segment
 mod==2 (default) : calc dedx from whole segment
-------------------------------------------------------------------------
 Settings of the truncated Mean method:
 The truncated mean is calculated according to the set window (in sigma units)
 (setWindow(Float_t window)) arround the mean. For the calculation of the truncated
 mean only drift cells with a dEdx inside the window arround the mean (calculated from
 all drift cells of the segment) will be taken into account.
 With setMinimumWires(Int_t minwires) the algorithm can be forced to keep
 a minimum number of wires. The method will stop removing drift cells from the active
 sample if the minimum number is reached.


HMdcDeDx(const char* name,const char* title, const char* context) : HParCond(name,title,context)

~HMdcDeDx()
 destructor

void clear()

void printParam(TString opt)
 prints the parameters of HMdcDeDx to the screen.

Bool_t init(HParIo* inp,Int_t* set)
 intitializes the container from an input

Bool_t initContainer()

Int_t write(HParIo* output)
 writes the container to an output

void putParams(HParamList* l)
 Puts all params of HMdcDeDx to the parameter list of
 HParamList (which ist used by the io);

Bool_t getParams(HParamList* l)

Float_t getShiftSegment(Int_t s,Int_t m,Float_t angle,Float_t dist)
 returns the shift in ns for sector,module,impact angle (0-90)
 and distance from wire (mm). For distances larger 10 mm 0
 is returned.

Float_t getShiftSigmaSegment(Int_t s,Int_t m,Float_t angle,Float_t dist)
 returns the shift sigma in ns for sector,module,impact angle (0-90)
 and distance from wire (mm). For distances larger 10 mm 0
 is returned.

Float_t getShift(Int_t s,Int_t m,Int_t anglebin,Int_t distbin)
 returns the shift in ns for sector,module,impact angle bin (0-17)
 and distance from wire bin (0-99).

void setShift(Int_t s,Int_t m,Int_t anglebin,Int_t distbin,Float_t sh)
 sets the shift in ns for sector,module,impact angle bin (0-17)
 and distance from wire bin (0-99).

Float_t getShiftSigma(Int_t s,Int_t m,Int_t anglebin,Int_t distbin)
 returns the shift sigma in ns for sector,module,impact angle bin (0-17)
 and distance from wire bin (0-99).

void setShiftSigma(Int_t s,Int_t m,Int_t anglebin,Int_t distbin,Float_t sh)
 sets the shift sigma in ns for sector,module,impact angle bin (0-17)
 and distance from wire bin (0-99).

TCanvas* plotShift(Int_t sec,Int_t mod)

void sort(Int_t nHits,Float_t* measurements)
 Puts the measurement values into increasing order.

Float_t calcDeDx(HMdcSeg* seg,Float_t* meanold,Float_t* sigmaold,UChar_t* nwire,Float_t* sigmanew,UChar_t* nwiretrunc,Int_t vers,Int_t mod)
 calculates dedx of a MDC segment by doing normalization for
 impact angle and distance from wire for the fired cells of
 the segment. The measurements are sorted in increasing order,
 the mean and sigma is calculated. Afterwards the truncated mean
 according to the set window (in sigma units) arround the mean
 is calculated and returned as dedx. Mean,sigma,number of wires before
 truncating,truncated mean,truncated mean sigma and number of wires
 after truncating can be obtained by the returned pointers.
 Different methods can be selected:
 vers==0 : Input filling from HMdcSeg (wires, thrown out by the fitter are ignored)
 vers==1 : Input filling from HMdcClusFit (wires, thrown out by the fitter are taken into account)
 mod==0  : calc dedx from 1st module in segment
 mod==1  : calc dedx from 2st module in segment
 mod==2  : calc dedx from whole segment (default)
 returns -99 if nothing was calculated

UChar_t fillingInput(HMdcSeg* seg,Float_t* measurements)
 Fills array of measurements from HMdcSeg and returns the number of fired wires in Segment
 The single measurements are normalized by impact angle and distance from wire. Only the first
 50 wires in one segment are accepted. Corresponds to method 0 in calcDeDx(......, version)

UChar_t fillingInputClusFit(HMdcSeg* seg,Float_t* measurements)
 Fills array of measurements from HMdcSeg and returns the number of fired wires in Segment
 The single measurements are normalized by impact angle and distance from wire. Only the first
 50 wires in one segment are accepted. The input is filled via the HMdcClusFit container,
 which contains all wires in a Segment before the Segment fitter starts. The wire objects
 are stored in HMdcWireFit objects. Wires thrown out by the fitter will have weight==0.
 These wires will not be filled into the output HMdcSeg. In this method all wires will be used
 to calculated the dEdx as difference to fillingInput(HMdcSeg* seg,Float_t* measurements).
 As this method uses data container of mdctrackD which are not created by default, the user
 has to make shure this containers exists and are filled.
 Corresponds to method 1 in calcDeDx(......, version)

Float_t calcSigma(Float_t* measurements,UChar_t nWire,Float_t mean)
 returns sigma from the float array of nWire measurements with a mean value mean.
 Values equal to -99 are ignored.

Float_t calcMean(Float_t* measurements,UChar_t nWire)
 returns the mean value from the float array of nWire measurements.
 Values equal to -99 are ignored.

UChar_t select(Float_t* measurements,Float_t mean,Float_t sigma,UChar_t nWire)
 loops over the measurement array with nWire values and puts values to
 -99 if the measurements are outside the wanted window arround the mean value mean
 (set with setWindow() (sigma units)).
 The procedure keeps at least a number of minimum wires set with setMinimumWires().

void calcSegPoints(HMdcSeg * seg,Double_t& x1, Double_t& y1, Double_t& z1, Double_t& x2, Double_t& y2, Double_t& z2)
 calculates 2 coordinate points from segment

Double_t energyLoss(Int_t id,Double_t p,Double_t hefr)
 Calculates the dEdx (MeV 1/g cm2) of an particle with GEANT ID id
 and momentum p (MeV) for He/i-butan gas mixture with He fraction hefr
 (He (hefr) / i-butan (1-hefr)). The fomular is taken from PDG and doesn't
 include the density correction term. The values for the mean excitation
 energy are taken from Sauli.

TGraph* energyLossGraph(Int_t id,Double_t hefr,TString opt,Bool_t exchange,Int_t markerstyle,Int_t markercolor,Float_t markersize)
 creates a TGraph for particle with GEANT ID id and
 and He/i-butan gas mixture with He fraction hefr
 (He (hefr) / i-butan (1-hefr) dEdx vs p,beta,1/beta2 or betagamma
 depending on opt (p,beta,1/beta2,betagamma). exchange=kTRUE
 will exchange x-axis and y-axis.

Double_t scaledTimeAboveThreshold(HGeantKine* kine,Double_t p,Int_t s,Int_t m,Float_t alpha,Float_t mindist)



Inline Functions


               void initArray()
            Float_t getWindow()
               void setWindow(Float_t win)
              Int_t getMinimumWires()
               void setMinimumWires(Int_t minwires)
               void setUseShifts(Bool_t ok)
           Float_t* getArray(Int_t& size)
               void setRefEnergyLoss(Double_t r)
           Double_t getRefEnergyLoss()
               void setShiftEnergyLoss(Int_t s, Int_t m, Double_t sh)
           Double_t getShiftEnergyLoss(Int_t s, Int_t m)
               void setScaleEnergyLoss(Int_t s, Int_t m, Double_t sc)
           Double_t getScaleEnergyLoss(Int_t s, Int_t m)
               void setHeFraction(Double_t fr)
           Double_t getHeFraction()
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
               void StreamerNVirtual(TBuffer& b)
           HMdcDeDx HMdcDeDx(const HMdcDeDx&)
          HMdcDeDx& operator=(const HMdcDeDx&)


Last update: Fri Jan 26 12:05:33 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.