#ifndef HMDCDEDX_H
#define HMDCDEDX_H
#include "TArrayF.h"
#include "TH2.h"
#include "TCanvas.h"
#include "TGraph.h"
#include "hparcond.h"
#include "hlocation.h"
class HParamList;
class HLocation;
class HCategory;
class HMdcSeg;
class HMdcSizesCells;
class HGeantKine;
class HMdcDeDx : public HParCond {
protected:
HMdcSizesCells *sizescells;
Float_t shift[6][4][18][100];
Float_t shiftsigma[6][4][18][100];
Double_t ref_dedx;
Double_t shift_dedx[6][4];
Double_t scale_dedx[6][4];
Double_t hefr;
HCategory* catcal ;
HCategory* cathit ;
HCategory* catclusinf;
HCategory* catclusfit;
HCategory* catwirefit;
HLocation loccal;
Int_t minimumWires;
Float_t window;
Bool_t isInitialized;
Int_t method;
Int_t module;
Float_t measurements[50];
Bool_t useShifts;
Int_t ctskipmod0;
Int_t ctskipmod1;
void sort(Int_t,Float_t*);
UChar_t fillingInput(HMdcSeg* seg,Float_t* );
UChar_t fillingInputClusFit(HMdcSeg* seg,Float_t* );
Float_t calcMean(Float_t*,UChar_t);
Float_t calcSigma(Float_t*,UChar_t,Float_t);
UChar_t select(Float_t*,Float_t,Float_t,UChar_t);
void calcSegPoints(HMdcSeg *,Double_t&,Double_t&,Double_t&,Double_t&,Double_t&,Double_t&);
void initArray(){for(UInt_t i=0;i<sizeof(measurements)/sizeof(Float_t);i++){measurements[i]=-99.;}}
public:
HMdcDeDx(const Char_t* name ="MdcDeDx",
const Char_t* title ="Mdc lookup table for wire stat",
const Char_t* context="MdcDeDxProduction");
~HMdcDeDx();
Bool_t init(HParIo*, Int_t*);
Bool_t initContainer();
Int_t write(HParIo*);
void putParams(HParamList*);
Bool_t getParams(HParamList*);
void clear();
void printParam(TString opt="all");
Float_t getShiftSegment (Int_t,Int_t,Float_t,Float_t);
Float_t getShiftSigmaSegment(Int_t,Int_t,Float_t,Float_t);
Float_t getShift (Int_t,Int_t,Int_t,Int_t);
void setShift (Int_t,Int_t,Int_t,Int_t,Float_t);
Float_t getShiftSigma (Int_t,Int_t,Int_t,Int_t);
void setShiftSigma (Int_t,Int_t,Int_t,Int_t,Float_t);
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];}
TCanvas* plotShift(Int_t,Int_t);
Float_t calcDeDx(HMdcSeg*,Float_t*,Float_t*,UChar_t*,Float_t*,UChar_t*,Int_t vers=0,Int_t mod=2 );
void setRefEnergyLoss(Double_t r) {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;}
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);
Double_t scaledTimeAboveThreshold(HGeantKine* kine,Double_t p,Int_t s,Int_t m,Float_t alpha,Float_t mindist);
ClassDef(HMdcDeDx,1)
};
#endif /*!HMDCDEDX_H*/
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.