class HMdcDeDx: public HParCond

_HADES_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.

Function Members (Methods)

public:
HMdcDeDx(const HMdcDeDx&)
HMdcDeDx(const Char_t* name = "MdcDeDx", const Char_t* title = "Mdc lookup table for wire stat", const Char_t* context = "MdcDeDxProduction")
virtual~HMdcDeDx()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
Float_tcalcDeDx(HMdcSeg*, Float_t*, Float_t*, UChar_t*, Float_t*, UChar_t*, Int_t vers = 0, Int_t mod = 2)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidclear()
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
voidHParSet::copyComment(HParSet& r)
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
static Double_tenergyLoss(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)
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)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
Float_t*getArray(Int_t& size)
const Char_t*HParSet::getAuthor() const
const Char_t*HParSet::getDescription() const
const Text_t*HParSet::getDetectorName()
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
Double_tgetHeFraction()
virtual const char*TObject::GetIconName() const
Int_tHParSet::getInputVersion(Int_t i)
Int_tgetMinimumWires()
virtual const char*TNamed::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
const Char_t*HParSet::getParamContext() const
virtual Bool_tgetParams(HParamList*)
Double_tgetRefEnergyLoss()
Double_tgetScaleEnergyLoss(Int_t s, Int_t m)
Float_tgetShift(Int_t, Int_t, Int_t, Int_t)
Double_tgetShiftEnergyLoss(Int_t s, Int_t m)
Float_tgetShiftSegment(Int_t, Int_t, Float_t, Float_t)
Float_tgetShiftSigma(Int_t, Int_t, Int_t, Int_t)
Float_tgetShiftSigmaSegment(Int_t, Int_t, Float_t, Float_t)
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
Float_tgetWindow()
virtual Bool_tTObject::HandleTimer(TTimer* timer)
Bool_tHParSet::hasChanged()
virtual ULong_tTNamed::Hash() const
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 Bool_tinit(HParIo*, Int_t*)
Bool_tinitContainer()
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
Bool_tHParSet::isStatic()
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
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)
HMdcDeDx&operator=(const HMdcDeDx&)
virtual voidTObject::Paint(Option_t* option = "")
TCanvas*plotShift(Int_t, Int_t)
virtual voidTObject::Pop()
virtual voidHParSet::print()
virtual voidTNamed::Print(Option_t* option = "") const
voidprintParam(TString opt = "all")
virtual voidHParCond::printParams()
virtual voidputParams(HParamList*)
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
voidHParSet::resetInputVersions()
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
Double_tscaledTimeAboveThreshold(HGeantKine* kine, Double_t p, Int_t s, Int_t m, Float_t alpha, Float_t mindist)
voidHParSet::setAuthor(const Char_t* s)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidHParSet::setChanged(Bool_t flag = kTRUE)
voidHParSet::setDescription(const Char_t* s)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidsetHeFraction(Double_t fr)
voidHParSet::setInputVersion(Int_t v = -1, Int_t i = 0)
voidsetMinimumWires(Int_t minwires)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
voidHParSet::setParamContext(const Char_t*)
voidsetRefEnergyLoss(Double_t r)
voidsetScaleEnergyLoss(Int_t s, Int_t m, Double_t sc)
voidsetShift(Int_t, Int_t, Int_t, Int_t, Float_t)
voidsetShiftEnergyLoss(Int_t s, Int_t m, Double_t sh)
voidsetShiftSigma(Int_t, Int_t, Int_t, Int_t, Float_t)
voidHParSet::setStatic(Bool_t flag = kTRUE)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
voidsetUseShifts(Bool_t ok)
voidsetWindow(Float_t win)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& 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 voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_twrite(HParIo*)
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:
Float_tcalcMean(Float_t*, UChar_t)
voidcalcSegPoints(HMdcSeg*, Double_t&, Double_t&, Double_t&, Double_t&, Double_t&, Double_t&)
Float_tcalcSigma(Float_t*, UChar_t, Float_t)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
UChar_tfillingInput(HMdcSeg* seg, Float_t*)
UChar_tfillingInputClusFit(HMdcSeg* seg, Float_t*)
voidinitArray()
voidTObject::MakeZombie()
UChar_tselect(Float_t*, Float_t, Float_t, UChar_t)
voidsort(Int_t, Float_t*)

Data Members

public:
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
TStringHParSet::authorAuthor of parameters
HCategory*catcal! pointer to mdc cal1
HCategory*catclusfit! pointer to mdc clusfit
HCategory*catclusinf! pointer to mdc clusinf
HCategory*cathit! pointer to mdc hit
HCategory*catwirefit! pointer to mdc wirefit
Bool_tHParSet::changed! flag is kTRUE if parameters have changed
Int_tctskipmod0! counter for wires skipped with t2<=-998 in mod0 of seg
Int_tctskipmod1! counter for wires skipped with t2<=-998 in mod1 of seg
TStringHParSet::descriptionDescription of parameters
Text_tHParSet::detName[10]! name of the detector the container belongs to
TStringTNamed::fNameobject identifier
TStringTNamed::fTitleobject title
Double_thefrfraction of helium of the gas mix
Bool_tisInitializedflag after init
HLocationloccal! location object of cal1
Float_tmeasurements[50]! array of measurements
Int_tmethod! method switch for filling input
Int_tminimumWiresminimum required wires
Int_tmodule! method switch for filling input for module 1/2 of segment
TStringHParSet::paramContextContext/purpose for parameters and conditions
Double_tref_dedxreference value for electrons (for scaling)
Double_tscale_dedx[6][4]scale theoretical dedx (in dedx axis)
Float_tshift[6][4][18][100]sector,module,angle,distance
Double_tshift_dedx[6][4]shift theoretical dedx (in betagamma axis)
Float_tshiftsigma[6][4][18][100]sector,module,angle,distance
HMdcSizesCells*sizescells! pointer to HMdcSizesCells container
Bool_tHParSet::status! static flag
Bool_tuseShifts! use/don't use normaization table
Int_tHParSet::versions[3]! versions of container in the 2 possible inputs
Float_twindowwindow for truncating arround mean (units of sigma)

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

HMdcDeDx(const Char_t* name = "MdcDeDx", const Char_t* title = "Mdc lookup table for wire stat", const Char_t* context = "MdcDeDxProduction")
~HMdcDeDx()
 destructor
void clear()
void printParam(TString opt = "all")
 prints the parameters of HMdcDeDx to the screen.
Bool_t init(HParIo* , Int_t* )
 intitializes the container from an input
Bool_t initContainer()
Int_t write(HParIo* )
 writes the container to an output
void putParams(HParamList* )
 Puts all params of HMdcDeDx to the parameter list of
 HParamList (which ist used by the io);
Bool_t getParams(HParamList* )
Float_t getShiftSegment(Int_t , Int_t , Float_t , Float_t )
 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 , Int_t , Float_t , Float_t )
 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 , Int_t , Int_t , Int_t )
 returns the shift in ns for sector,module,impact angle bin (0-17)
 and distance from wire bin (0-99).
void setShift(Int_t , Int_t , Int_t , Int_t , Float_t )
 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 , Int_t , Int_t , Int_t )
 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 , Int_t , Int_t , Int_t , Float_t )
 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 , Int_t )
void sort(Int_t , Float_t* )
 Puts the measurement values into increasing order.
Float_t calcDeDx(HMdcSeg* , Float_t* , Float_t* , UChar_t* , Float_t* , UChar_t* , Int_t vers = 0, Int_t mod = 2)
 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* )
 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* )
 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* , UChar_t , Float_t )
 returns sigma from the Float_t array of nWire measurements with a mean value mean.
 Values equal to -99 are ignored.
Float_t calcMean(Float_t* , UChar_t )
 returns the mean value from the Float_t array of nWire measurements.
 Values equal to -99 are ignored.
UChar_t select(Float_t* , Float_t , Float_t , UChar_t )
 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* , Double_t& , Double_t& , Double_t& , Double_t& , Double_t& , Double_t& )
 calculates 2 coordinate points from segment
Double_t energyLoss(Int_t id, Double_t p, Double_t hefr = 0.6)
 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 = 0.6, TString opt = "p", Bool_t exchange = kFALSE, Int_t markerstyle = 8, Int_t markercolor = 2, Float_t markersize = 0.7)
 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)
void initArray()
HMdcDeDx(const Char_t* name = "MdcDeDx", const Char_t* title = "Mdc lookup table for wire stat", const Char_t* context = "MdcDeDxProduction")
Float_t getWindow()
{return window;}
void setWindow(Float_t win)
{window=win;}
Int_t getMinimumWires()
{return minimumWires;}
void setMinimumWires(Int_t minwires)
{minimumWires=minwires;}
void setUseShifts(Bool_t ok)
{useShifts=ok;}
Float_t* getArray(Int_t& size)
{size=sizeof(measurements)/sizeof(Float_t);return &measurements[0];}
void setRefEnergyLoss(Double_t r)
energy loss
{ref_dedx=r;}
Double_t getRefEnergyLoss()
{return ref_dedx;}
void setShiftEnergyLoss(Int_t s, Int_t m, Double_t sh)
{shift_dedx[s][m]=sh;}
Double_t getShiftEnergyLoss(Int_t s, Int_t m)
{return shift_dedx[s][m];}
void setScaleEnergyLoss(Int_t s, Int_t m, Double_t sc)
{scale_dedx[s][m]=sc;}
Double_t getScaleEnergyLoss(Int_t s, Int_t m)
{return scale_dedx[s][m];}
void setHeFraction(Double_t fr)
{hefr=fr;}
Double_t getHeFraction()
{return hefr;}

Last change: Sat May 22 13:01:23 2010
Last generated: 2010-05-22 13:01

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.