class HMdcDeDx2: 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 vers=2,Int_t mod=2, Bool_t useTruncMean=kTRUE, Float_t truncMeanWindow=-99.,Int_t inputselect)
 calculates dedx of a MDC (or 2) segment by doing normalization for
 impact angle and distance from wire for the fired cells of
 the segment. The measurements are sorted in decreasing 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 : Input filling from inner HMdcSeg
 vers==1 : Input filling from outer HMdcSeg
 vers==2 : Input filling from inner+outer HMdcSeg (default)
 mod==0  : calc dedx from 1st module in segment
 mod==1  : calc dedx from 2nd module in segment
 mod==2  : calc dedx from whole segment (default)
 useTruncMean: kTRUE (default) apply truncated Mean
 truncMeanWindow (unit: SIGMA RMS of mean TOT): -99 (default) use standard window
 inputselect==0 : fill from segment (default,wires rejected by fit are missing)
 inputselect==1 : fill from cluster
 returns -99 if nothing was calculated

 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:
HMdcDeDx2(const HMdcDeDx2&)
HMdcDeDx2(const Char_t* name = "MdcDeDx2", const Char_t* title = "Mdc lookup for MDC dEdX calculation", const Char_t* context = "MdcDeDx2Production")
virtual~HMdcDeDx2()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
Float_tcalcDeDx(HMdcSeg** seg, Float_t*, Float_t*, UChar_t*, Float_t*, UChar_t*, Int_t vers = 2, Int_t mod = 2, Bool_t useTruncMean = kTRUE, Float_t truncMeanWindow = -99., Int_t inputselect = 0)
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)
Bool_tcreateMaxPar(Bool_t print = kFALSE)
Double_tdEdXToToT(Int_t s, Int_t m, Double_t angle, Double_t mindist, Double_t dEdX)
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)
voidfindBin(Int_t m, Double_t* angle, Double_t* mindist, Int_t* abin, Int_t* dbin)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
Double_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()
voidgetFuncMaxPar(Double_t* p)
Double_tgetFuncMaxPar(Int_t s, Int_t m, Int_t abin, Int_t dbin)
voidgetFuncPar(Double_t* p)
Double_t*getFuncPar(Int_t s, Int_t m, Int_t abin, Int_t dbin)
voidgetFuncWidthPar(Double_t* p)
Double_t*getFuncWidthPar(Int_t s, Int_t m, Int_t abin, Int_t dbin)
Double_tgetHeFraction()
virtual const char*TObject::GetIconName() const
Int_tHParSet::getInputVersion(Int_t i)
Int_tgetMinimumWires()
Int_tgetN_Angle()
Int_tgetN_Dist()
Int_tgetN_Param()
Int_tgetN_Shift_Param()
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*)
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
Double_tnormalize(Int_t s, Int_t m, Double_t angle, Double_t mindist, Double_t ToT)
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)
HMdcDeDx2&operator=(const HMdcDeDx2&)
virtual voidTObject::Paint(Option_t* option = "")
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 = 0, Double_t p = -1, Float_t t1 = -999, Float_t t2 = -999, Float_t* t2err = 0, Int_t s = 0, Int_t m = 0, Double_t alpha = 0, Double_t mindist = 0)
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)
voidsetDebugMode(Bool_t dodebug)
voidHParSet::setDescription(const Char_t* s)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidsetFuncMaxPar(Double_t* p)
voidsetFuncMaxPar(Int_t s, Int_t m, Int_t abin, Int_t dbin, Double_t val)
voidsetFuncPar(Double_t* p)
voidsetFuncPar(Int_t s, Int_t m, Int_t abin, Int_t dbin, Double_t* p, Int_t size)
voidsetFuncWidthPar(Double_t* p)
voidsetFuncWidthPar(Int_t s, Int_t m, Int_t abin, Int_t dbin, Double_t* p, Int_t size)
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*)
voidHParSet::setStatic(Bool_t flag = kTRUE)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
voidsetUseCalibration(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
Double_ttoTSigma(Int_t s, Int_t m, Double_t angle, Double_t mindist, Int_t shift = 0)
Double_ttoTTodEdX(Int_t s, Int_t m, Double_t angle, Double_t mindist, Double_t ToT)
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:
voidcalcSegPoints(HMdcSeg*, Double_t&, Double_t&, Double_t&, Double_t&, Double_t&, Double_t&)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
UChar_tfillingInput(HMdcSeg** seg, Int_t inputselect = 0)
voidTObject::MakeZombie()
UChar_tselect(Float_t, Float_t, UChar_t, Float_t wind = -99.)
voidsort(Int_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:
Float_tAngleStepstep size for angle
static Float_tMaxMdcMinDist[4]max value for mindist
Float_tMinDistStep[4]step size for mindist
TStringHParSet::authorAuthor of parameters
HCategory*catcal! pointer to mdc cal1
HCategory*catclus! pointer to mdc clusinf
HCategory*catclusinf! pointer to mdc clusinf
HCategory*cathit! pointer to mdc hit
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
Bool_tdebug! kTRUE print infos of trun mean
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_tisInitialized! flag after init
HLocationloccal! location object of cal1
TArrayDmeasurements! 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
Double_tpar[6][4][18][40][4]fitparams for tot->dedx
Double_tparMax[6][4][18][40]max val for tot in tot->dEdx
TStringHParSet::paramContextContext/purpose for parameters and conditions
Double_tshiftpar[6][4][18][40][2]width of tot distribution
HMdcSizesCells*sizescells! pointer to HMdcSizesCells container
Bool_tHParSet::status! static flag
Bool_tuseCalibration! use/don't use normalization 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

HMdcDeDx2(const Char_t* name = "MdcDeDx2", const Char_t* title = "Mdc lookup for MDC dEdX calculation", const Char_t* context = "MdcDeDx2Production")
~HMdcDeDx2()
 destructor
void clear()
void printParam(TString opt = "all")
 prints the parameters of HMdcDeDx2 to the screen.
Bool_t init(HParIo* , Int_t* )
 intitializes the container from an input
Bool_t createMaxPar(Bool_t print = kFALSE)
 create the maximum allowed value of ToT to keep
 the numerical calulations inside the range of double.
 The procedure loops over all s,m,abin,dbin to set
 the boundary automatically. This function needs
 the parameter array for the fit functions to be initialized
 before. The boundary value are stored inside the container.
Bool_t initContainer()
Int_t write(HParIo* )
 writes the container to an output
void putParams(HParamList* )
 Puts all params of HMdcDeDx2 to the parameter list of
 HParamList (which ist used by the io);
Bool_t getParams(HParamList* )
void sort(Int_t )
 Puts the measurement values into decreasing order.
Float_t calcDeDx(HMdcSeg** seg, Float_t* , Float_t* , UChar_t* , Float_t* , UChar_t* , Int_t vers = 2, Int_t mod = 2, Bool_t useTruncMean = kTRUE, Float_t truncMeanWindow = -99., Int_t inputselect = 0)
 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 decreasing 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 inner HMdcSeg
 vers==1 : Input filling from outer HMdcSeg
 vers==2 : Input filling from inner+outer HMdcSeg (default)
 mod==0  : calc dedx from 1st module in segment
 mod==1  : calc dedx from 2nd module in segment
 mod==2  : calc dedx from whole segment (default)
 useTruncMean: kTRUE (default) apply truncated Mean
 truncMeanWindow (unit: SIGMA RMS of mean TOT): -99 (default) use standard window
 inputselect==0 : fill from segment (default, wires rejected by fit are missing)
 inputselect==1 : fill from cluster
 returns -99 if nothing was calculated
UChar_t fillingInput(HMdcSeg** seg, Int_t inputselect = 0)
 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
 wires < MAX_WIRES are accepted.
 inputselect==0 : fill from segment (default,wires rejected by fit are missing)
 inputselect==1 : fill from cluster
UChar_t select(Float_t , Float_t , UChar_t , Float_t wind = -99.)
 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 setFuncPar(Int_t s, Int_t m, Int_t abin, Int_t dbin, Double_t* p, Int_t size)
 set the values for the dedx functions by s, m, angle bin, dist bin. Needs pointer
 to parameter array[N_PARAM]
void setFuncPar(Double_t* p)
 set all values for the dedx functions. Needs pointer
 to parameter array[6][4][N_ANGLE][N_DIST][N_PARAM]
void getFuncPar(Double_t* p)
 set all values for the dedx functions. Needs pointer
 to parameter array[6][4][N_ANGLE][N_DIST][N_PARAM]
void setFuncMaxPar(Int_t s, Int_t m, Int_t abin, Int_t dbin, Double_t val)
 set the values for the dedx functions by s, m, angle bin, dist bin.
void setFuncMaxPar(Double_t* p)
 set all values for the dedx functions. Needs pointer
 to parameter array[6][4][N_ANGLE][N_DIST]
void getFuncMaxPar(Double_t* p)
 set all values for the dedx functions. Needs pointer
 to parameter array[6][4][N_ANGLE][N_DIST]
void setFuncWidthPar(Int_t s, Int_t m, Int_t abin, Int_t dbin, Double_t* p, Int_t size)
 set the values fpr the dedx width functions by s, m, angle bin, dist bin. Needs pointer
 to parameter array[N_SHIFT_PARAM]
void setFuncWidthPar(Double_t* p)
 set all values for the dedx width functions. Needs pointer
 to parameter array[6][4][N_ANGLE][N_DIST][N_SHIFT_PARAM]
void getFuncWidthPar(Double_t* p)
 set all values for the dedx width functions. Needs pointer
 to parameter array[6][4][N_ANGLE][N_DIST][N_SHIFT_PARAM]
void calcSegPoints(HMdcSeg* , Double_t& , Double_t& , Double_t& , Double_t& , Double_t& , Double_t& )
 calculates 2 coordinate points from segment
void findBin(Int_t m, Double_t* angle, Double_t* mindist, Int_t* abin, Int_t* dbin)
Double_t toTSigma(Int_t s, Int_t m, Double_t angle, Double_t mindist, Int_t shift = 0)
 returns asymmetric width of ToT for single drift cell
 shift == 0 (default) : returns 0
       ==-1           : low   bound width of ToT distribution (sigma)
       == 1           : upper bound width of ToT distribution (sigma)
Double_t toTTodEdX(Int_t s, Int_t m, Double_t angle, Double_t mindist, Double_t ToT)
 calculation of ToT -> dEdX for single drift cell
Double_t dEdXToToT(Int_t s, Int_t m, Double_t angle, Double_t mindist, Double_t dEdX)
 calculation of dEdX -> ToT for single drift cell
Double_t normalize(Int_t s, Int_t m, Double_t angle, Double_t mindist, Double_t ToT)
 calibrate ToT :
 dEdX=TotTodEdX(t2-t1) ----> dEdXToToT(dEdX) for reference module,angle,distbin
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 = 0, Double_t p = -1, Float_t t1 = -999, Float_t t2 = -999, Float_t* t2err = 0, Int_t s = 0, Int_t m = 0, Double_t alpha = 0, Double_t mindist = 0)
 calculated the t2 of drift cell measurent
 from dedx of a given particle with momentum p.
 The assumption is that all drift cell measurements
 belonging to one track can be treated independent.
 return t2 and smeared error to pointer t2err for an
 single measurement. If the result t2-t1 would
 be < 0 a random value for t2 0-20 ns larger than
 t1(already including error) will be created.
 The smeared error will be returned to the pointer t2err.
HMdcDeDx2(const Char_t* name = "MdcDeDx2", const Char_t* title = "Mdc lookup for MDC dEdX calculation", const Char_t* context = "MdcDeDx2Production")
Double_t* getFuncPar(Int_t s, Int_t m, Int_t abin, Int_t dbin)
{return &par[s][m][abin][dbin][0];}
Double_t getFuncMaxPar(Int_t s, Int_t m, Int_t abin, Int_t dbin)
{return parMax[s][m][abin][dbin];}
Double_t* getFuncWidthPar(Int_t s, Int_t m, Int_t abin, Int_t dbin)
{return &shiftpar[s][m][abin][dbin][0];}
Int_t getN_Param(void)
{return N_PARAM;}
Int_t getN_Shift_Param(void)
{return N_SHIFT_PARAM;}
Int_t getN_Angle(void)
{return N_ANGLE;}
Int_t getN_Dist(void)
{return N_DIST;}
Float_t getWindow()
set user values
{return window;}
void setWindow(Float_t win)
{window = win;}
Int_t getMinimumWires()
{return minimumWires;}
void setMinimumWires(Int_t minwires)
{minimumWires = minwires;}
void setDebugMode(Bool_t dodebug)
{debug = dodebug;}
void setUseCalibration(Bool_t ok)
{useCalibration = ok;}
Double_t* getArray(Int_t& size)
{size = MAX_WIRES; return measurements.GetArray();}
void setHeFraction(Double_t fr)
energy loss
{hefr = fr;}
Double_t getHeFraction()
{return hefr;}

Last change: Sat May 22 13:01:24 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.