HMdcHitF
class description - source file - inheritance tree (.pdf)
protected:
virtual void buildList()
Int_t calculateCell(Int_t sector, Int_t module, Int_t layer, Float_t coordinate)
Float_t calculatePosPartner(HMdcCal3* hit)
Bool_t checkCommon(HMdcHitAux* segment)
Bool_t checkFit(HMdcHitAux* segment)
void fillHitCat()
Int_t find(Int_t* listPlanes, Int_t nWantedHits, Int_t segPos)
Bool_t firstCheck(TMatrix param)
void fit(HMdcHitAux* seg)
virtual Text_t* getCalHitClassName()
void makeSlopeCorrection()
void markHits(Int_t first, Int_t last)
public:
HMdcHitF()
HMdcHitF(Text_t* name, Text_t* title)
HMdcHitF(HMatrixCategory* data, HMdcModuleGeometry* mdcGeo, HCategory* seg)
HMdcHitF(HCategory* data, HMdcModuleGeometry* mdcGeo, HCategory* seg)
~HMdcHitF()
static TClass* Class()
virtual Int_t execute()
virtual Bool_t finalize()
HMdcHitFPar* getParContainer()
virtual Bool_t init()
virtual TClass* IsA() const
void printCalHitCat(ofstream& file)
void printSegments(ofstream& file)
void setLoc(HLocation& location)
void setNoTarget()
void setParContainer()
void setSlopeCorrection()
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
protected:
HMdcHitFPar* parContainer !parameter container
HMdcTargetGeometry* targetGeo !target geometry
HCategory* mdcCal !calibrated data to be fitted
HMdcModuleGeometry* geo !geometry data
HCategory* fCalCat ! category of cal2 data
HCategory* mdcSegments !segments produced after fitting
HCategory* fHitCat ! category of reconstructed hits
HMdcCalLinkList** fList ! lists of cal hits (internal use only)
HLocation fLoc !location of the reconstructor
Int_t fEventId
Bool_t target ! target = kFALSE==>rec. without target
Bool_t slopeCorrection ! slopeCorrection = kTRUE==>rec. with makeSlopeCorrection
HMdcHitF is the reconstructor that transforms the calibrated
hits in one mdc module (HMdcCal3) in segments (HMdcHitAux).
It contains the parameter of the fit (maximum chi2 allowed, minimum
number of hits required in a segment...), a pointer to the calibrated
data to be fitted, to the corresponding geometry, and the collection
of segments obtained from the fit.
It contains the following functions:
- a default constructor: initializes minNumHits = 4, maxChi = 1,
maxNumCommonHits = 3
- HMdcHitF(HMatrixCategory* data, HMdcModuleGeometry* mdcGeo):
Constructor:
- sets the minimum number of hits to 4
- sets the maximum chi2 to 1.
- mdcCal points to the data passed as argument, and the
appropiate setup is done
- geo points to mdcGeo, the geometry passed as argument
- HMdcHitF(HCategory* data,HMdcModuleGeometry* mdcGeo,HCategory* seg)
Constructor:
- sets the minimum number of hits to 4
- sets the maximum chi2 to 1.
- mdcCal points to the data passed as argument, and the
appropiate setup is done
- geo points to mdcGeo, the geometry passed as argument
- mdcSegments points to seg, the segments category
- a default destructor
- setMinNumHits(int min): sets minimum number of hits to min.
If min < 4, sets minimum number of hits to 4, and an error
message is printed
- fit(HMdcCal3* listCal[6], int listPlanes[6], int numHits):
General Least Squares fit to get slopes and intercepts in 2
projections plus their variances. It is based on the FORTRAN
subroutine STFIT1.
Fits the calibrated data of listCal and stores the result of
the fit in a segment.
- checkFit(HMdcHitAux* segment): Checks the fit: returns TRUE if
* the number of hits in the segment is greater or equal than
minNumHits.
and
* the chi2 of the fit is not greater than maxChi.
- find(int listPlanes[6], Int_t nWantedHits, Int_t seg):
Finds segments with hits belonging to the planes listed in the
nWantedHits first elements of listPlanes. The segments, once
they pass several checks, are stored in the collection of
segments, starting in the position given by seg.
The basic procedure is the following:
* find hits in planes listPlanes[0] .. listPlanes[3].
* calculate the parameters of the straight line defined by
these hits
* looks for hits Int_t listPlanes[4] and/or listPlanes[5]
(depending on nWantedHits), that are close to the
intersection of that line with these planes.
* call the fit function with this collection of hits.
* if the segment passes checkFit and checkCommon then it is
added to the collection of segments in the position
indicated by seg, and seg is incremented.
- markHits(Int_t first, Int_t last): mark used-hits in segments
in the positions between first and last in the collection of
segments.
- checkCommon(HMdcHitAux* thissegment): check if thissegment
has common hits with other segments in the collection of
segments. If some other segment (let's call it oldsegment) is
found with at least maxNumCommonHits in common with
thissegment, then the chi-square of the segments are compared,
and the one with lower chi-square is keeped in the collection
of segments :
* if the lower chi-square belongs to thissegment, then
oldsegment is marked to be deleted and then the function
returns FALSE. After that, in find function, thissegment
will be added to the collection of segments
* if the lower chi-square corresponds to oldsegment, then
the function returns TRUE, and thissegment will not be
added to the collection of segments in the find function
- printSegments(ofstream& file): print information about the
segments in the segments collection to file
- execute(void):finds combination of planes where to search for
hits, and calls the function find with this combination.
- plotResid (Int_t plane, Text_t* filename= "res1.root",
Text_t* hisname="hres", Int_t nbinsx =100,
Axis_t xlow = -0.05, Axis_t xup=0.05):
Calculates residues (fitted coordinate - measured coordinate)
in the plane number "plane". These residues fill an histogram,
and the histogram is stored as "hisname"(default:"hres") in
file "filename"(default:"res1.root"). The histogram will have
"nbinsx" bins in x axis (default: 100), and the range of x
coordinate is (xlow,xup) (default: (-0.05,0.05)
Bool_t checkCommon(HMdcHitAux* thissegment)
check if thissegment has common hits with other segments
in the segments collection. If some other segment (let's
call it oldsegment) is found
with at least maxNumCommonHits in common with thissegment, then
the chi-square of the segments are compared, and the one with
lower chi-square is keeped in the collection of segments :
- if the lower chi-square belongs to thissegment, then oldsegment
is marked to be deleted and then the
function returns FALSE. After that, in find function, thissegment
will be added to the collection of segments
- if the lower chi-square corresponds to oldsegment, then the
function returns TRUE, and thissegment will not be added to
the collection of segments in the find function
Inline Functions
void ~HMdcHitF()
void buildList()
Float_t calculatePosPartner(HMdcCal3* hit)
Int_t calculateCell(Int_t sector, Int_t module, Int_t layer, Float_t coordinate)
void fit(HMdcHitAux* seg)
void makeSlopeCorrection()
Int_t find(Int_t* listPlanes, Int_t nWantedHits, Int_t segPos)
void markHits(Int_t first, Int_t last)
Bool_t firstCheck(TMatrix param)
Bool_t checkFit(HMdcHitAux* segment)
void fillHitCat()
Text_t* getCalHitClassName()
HMdcHitF HMdcHitF()
HMdcHitF HMdcHitF(Text_t* name, Text_t* title)
HMdcHitF HMdcHitF(HMatrixCategory* data, HMdcModuleGeometry* mdcGeo, HCategory* seg)
HMdcHitF HMdcHitF(HCategory* data, HMdcModuleGeometry* mdcGeo, HCategory* seg)
void setNoTarget()
void setSlopeCorrection()
void setLoc(HLocation& location)
void setParContainer()
HMdcHitFPar* getParContainer()
Int_t execute()
Bool_t init()
Bool_t finalize()
void printSegments(ofstream& file)
void printCalHitCat(ofstream& file)
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
Author: Beatriz Fuentes Arenaz
Last update: Fri Jan 26 12:10:06 2007
Copyright GENP (Univ. Santiago de Compostela)
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.