#include "hmdcgarsignalreader.h"

HMdcGarSignalReader


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

class HMdcGarSignalReader : public TNamed

Inheritance Chart:
TObject
<-
TNamed
<-
HMdcGarSignalReader

    protected:
Bool_t check(Int_t, Int_t, Int_t, Int_t, TH1F*) void createChargeHists() void createHistArrays(Int_t, Int_t, Int_t, Int_t) void createHists(Int_t, Int_t, Int_t, TH1F**, TH1F**, TH1F**, TH1F**) void deleteChargeHists() void deleteHistArrays(Int_t type) void fillChargeHists(Int_t, Int_t, Int_t, Int_t, Int_t, TH1F*, TH1F*) void fillDriftTimeVersusDistance(Int_t, Int_t, Int_t) void findThresholds(Int_t, TH1F*) void initHistArrays() void initVariables() void integrateHists(Int_t, Int_t, Int_t, Int_t, TH1F*, TH1F*) void readInput(Int_t, Int_t) void response(Float_t mean, Float_t scale) void simulateResponse(TH1F*, TH1F*) void writeChargeHists() void writeHist(TH1F* h, Int_t i) void writeHistArrays(Int_t type) public:
HMdcGarSignalReader(const char* name, const char* title) HMdcGarSignalReader(const HMdcGarSignalReader&) ~HMdcGarSignalReader() static TClass* Class() void closeOutput() Float_t getBinSizeDist() Float_t getMinSignal(Int_t i) Int_t getNBinDist() Int_t getNBinSignal() Int_t getNSignals() Int_t getNStep() Float_t getRangeSignal() Float_t getSigma1() Float_t getSigma2() Float_t getStepSize() virtual TClass* IsA() const void make(Int_t, Int_t, TString) HMdcGarSignalReader& operator=(const HMdcGarSignalReader&) void printStatus() void setBinSizeDist(Float_t i) void setFileNameIn(TString) void setFileNameOut(TString) void setMinSignal(Float_t i, Float_t j, Float_t k, Float_t l) void setNBinDist(Int_t i) void setNBinSignal(Int_t i) void setNSignals(Int_t i) void setNStep(Int_t i) void setRangeSignal(Float_t i) void setSigma1(Float_t sig) void setSigma2(Float_t sig) void setSimResponse(Bool_t sim) void setStepSize(Float_t i) void setVersion(Int_t vers) void setWriteHists(Bool_t signal, Bool_t signalint, Bool_t sum, Bool_t dist, Bool_t timedistance, Bool_t mincharge) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members


    protected:
FILE* inputAscii ! file pointer to input TString fNameAsciiIn ! file name of root input file TFile* outputRoot ! root file pointer TString fNameRootOut ! root file pointer Int_t nSignals ! number of signals per sample point Int_t nBinSignal ! number of bins of signal hist Float_t rangeSignal ! upperrange signal hist Int_t nBinDist ! number of bins of hist drift time vs distance Float_t binSizeDist ! size of bin hist drift time vs distance (mm) Int_t nStep ! number of threshold steps Float_t stepsize ! size of threshold step Float_t minSignal[4] maximum charge per module type Int_t version ! read different GARFIELD versions (704,708 (skip)) TH1F* hdist_1[10] ! distribution of time1 per threshold step TH1F* hdist_2[10] ! distribution of time2 per threshold step TH1F* htime1[10] ! hist for time1 vs distance per threshold step TH1F* htime2[10] ! hist for time2 vs distance per threshold step TH1F* hminCharge[4] ! hist for minimum charge per mdc type TH1F* hminChargeSum[4] ! hist for minimum charge from sum hist per mdc type TPaveText* myconfig ! configuration discription Int_t nmake ! counter for calling make TH1F* hresponse ! response hist Bool_t simResponse ! switch simulate response of adc / simple integration Float_t sigma1 ! sigma 1 of reponse function of adc Float_t sigma2 ! sigma 2 of reponse function of adc Bool_t writehists[6] ! switch write on/off for signal

Class Description

 HMdcGarSignalReader
 Reads Ascii files containing signals produced by GARFIELD.
 Hists for Signal, integrated Signal,ditribution of Time1 and Time2,
 summed signals per sample point and summed integrated signals per sample point
 can be filled and written to the output file. Hists for maximum charge per
 mdc (angle,sample) or (angle,sample,signal) are filled to define the max value
 for the threshold calulations. The main output hists for time1 and time2 as function
 of distance from wire including the errors are filled from the distribtution hists
 for time1 and time2 (mean+RMS) for different threshold values. Those hists are input
 to HMdcGarCal2Maker and HMdcGarEffMaker to produce the CAL2 and efficiency
 parameters for MDC.


HMdcGarSignalReader(const char* name,const char* title) : TNamed(name,title)
 constructor for HMdcGarSignalReader

~HMdcGarSignalReader()
 destructor of HMdcGarSignalReader

void setFileNameOut(TString myfile)
 Sets root output of HMdcGarSignalReader

void setFileNameIn(TString myfile)
 Sets root input of HMdcGarSignalReader

void initVariables()
 inits all variables

void response(Float_t mean,Float_t scale)

void simulateResponse(TH1F* hsignal,TH1F* hint_diff)

void createChargeHists()
 creates hists for maximum charge per mdc,angle,sample,signal (per signal)
 or mdc,angle,sample (per summed signal)

void fillChargeHists(Int_t mdc,Int_t angle,Int_t sample,Int_t signal,Int_t type,TH1F* hsignal,TH1F* hsum)
 fills hists for maximum charge per mdc,angle,sample,signal (per signal)
 or mdc,angle,sample (per summed signal)

void writeChargeHists()
 writes hists for charge to file

void deleteChargeHists()
 delete charge hists

void printStatus(void)
 prints the parameters to the screen

void make(Int_t mdc,Int_t angle,TString inputfile)
 function to be called from macro.
 opens input and output file, loops over input

void readInput(Int_t mdc,Int_t angle)
 reads from ascii file containing signals produced by GARFIELD
 Creates subdirectory structure in output file, fills and writes hists for
 signals, time1 and time2 and max charge

void fillDriftTimeVersusDistance(Int_t mdc,Int_t angle,Int_t sample)
 fills main hist for time1 and time2 including errors by mean and RMS of the distribution
 signals of time1 and time2.

Bool_t check(Int_t mdc,Int_t angle,Int_t sample,Int_t step,TH1F* hdist)
 checks if hist is not empty

void findThresholds(Int_t mdc,TH1F* hint_diff)
 loops over signals hist to find the time value at threshold
 for different thresholds

void createHists(Int_t sample,Int_t signal,Int_t type, TH1F** hsignal,TH1F** hint_diff,TH1F** hsum,TH1F** hsumint)
 create hists for signal/integrated signal (type==0 per signal)
 or sum/integrated sum(type==1 per sample)

void createHistArrays(Int_t mdc,Int_t angle,Int_t sample,Int_t type)
 creates his arrays for time1 and time2 as function of distance to wire
 for different thresholds (type==1 per angle)
 or hists for distribution of time1 and time2 (type==2 per sample)
--------------------------------- create hists per sample point ----------------

void integrateHists(Int_t mdc,Int_t angle,Int_t sample,Int_t signal,TH1F* hsignal,TH1F* hint_diff)
 ingetrate signal hist

void closeOutput()
 writes charge hist and closes output file



Inline Functions


                        void initHistArrays()
                        void writeHistArrays(Int_t type)
                        void deleteHistArrays(Int_t type)
                        void writeHist(TH1F* h, Int_t i)
                        void setVersion(Int_t vers)
                        void setSigma1(Float_t sig)
                        void setSigma2(Float_t sig)
                        void setSimResponse(Bool_t sim)
                     Float_t getSigma1()
                     Float_t getSigma2()
                        void setNSignals(Int_t i)
                       Int_t getNSignals()
                        void setNBinSignal(Int_t i)
                       Int_t getNBinSignal()
                        void setRangeSignal(Float_t i)
                     Float_t getRangeSignal()
                        void setNBinDist(Int_t i)
                       Int_t getNBinDist()
                        void setBinSizeDist(Float_t i)
                     Float_t getBinSizeDist()
                        void setNStep(Int_t i)
                       Int_t getNStep()
                        void setStepSize(Float_t i)
                     Float_t getStepSize()
                        void setMinSignal(Float_t i, Float_t j, Float_t k, Float_t l)
                     Float_t getMinSignal(Int_t i)
                        void setWriteHists(Bool_t signal, Bool_t signalint, Bool_t sum, Bool_t dist, Bool_t timedistance, Bool_t mincharge)
                     TClass* Class()
                     TClass* IsA() const
                        void ShowMembers(TMemberInspector& insp, char* parent)
                        void Streamer(TBuffer& b)
                        void StreamerNVirtual(TBuffer& b)
         HMdcGarSignalReader HMdcGarSignalReader(const HMdcGarSignalReader&)
        HMdcGarSignalReader& operator=(const HMdcGarSignalReader&)


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