FEDRA emulsion software from the OPERA Collaboration
|
universal basic alignment class More...
#include <EdbAlignmentV.h>
Public Member Functions | |
void | AddSegCouple (EdbSegP *s1, EdbSegP *s2) |
void | ApplyLimitsOffset (float &xmin1, float &xmax1, float &xmin2, float &xmax2, float offsetMax) |
Int_t | CalcAffFull () |
Int_t | CalcApplyFractMeanDiff () |
Int_t | CalcApplyMeanDiff () |
Float_t | CalcFractMeanDiff (int ivar, float fraction) |
Float_t | CalcMeanDiff (int ivar) |
Float_t | CalcMeanDZ (float tmin=0.1, float tmax=2.) |
Float_t | CalcMeanShr (float tmin=0.1, float tmax=2.) |
Int_t | CalculateAffTXTY (EdbAffine2D &aff) |
Int_t | CalculateAffTXTY (TObjArray &arr1, TObjArray &arr2, EdbAffine2D &aff) |
Int_t | CalculateAffTXTYTurn (TObjArray &arr1, TObjArray &arr2, EdbAffine2D &aff) |
Int_t | CalculateAffXY (EdbAffine2D &aff) |
Int_t | CalculateAffXY (TObjArray &arr1, TObjArray &arr2, EdbAffine2D &aff) |
Int_t | CalculateAffXYTurn (EdbAffine2D &aff) |
Int_t | CalculateAffXYTurn (TObjArray &arr1, TObjArray &arr2, EdbAffine2D &aff) |
void | CloseOutputFile () |
void | Corr2Aff (EdbLayer &layer) |
void | Corr2Aff (EdbSegCorr &corr, EdbLayer &layer) |
void | CorrToCoG (int side, EdbPattern &p) |
functions alpplied to the individual patterns More... | |
void | CorrToCoG (int side, TObjArray &p) |
float | CoupleQuality (EdbSegP &s1, EdbSegP &s2) |
void | DefineGuessCell (float xmin1, float xmax1, float ymin1, float ymax1, float xmin2, float xmax2, float ymin2, float ymax2, int np1, int np2, float binOK) |
Selector functions. More... | |
int | DoubletsFilterOut (int checkview, TH2F *hxy=0, TH2F *htxty=0) |
EdbAlignmentV () | |
void | FillCell (int side, EdbPattern &pat) |
void | FillCell (int side, TObjArray &pat) |
int | FillCombinations () |
int | FillCombinations (float dv[4], float dxMax, float dyMax, bool doFill) |
void | FillGuessCell (EdbPattern &p1, EdbPattern &p2, float binOK=1., float offsetMax=2000.) |
void | FillGuessCell (TObjArray &p1, TObjArray &p2, float binOK=1., float offsetMax=2000.) |
void | FillThetaHist (int side, EdbH2 &htxy) |
Int_t | FindCorrDiff (float dvsame[4], int side=0, int nlim=10) |
Float_t | FindDensityPeak (TArrayF &arr, float fraction) |
Int_t | FindDiff (TObjArray &arr1, TObjArray &arr2, float dvlim[4], float dvfound[4]) |
float | FineCorrPhi (TObjArray &sel1, TObjArray &sel2) |
float | FineCorrZ () |
float | FineCorrZ (TObjArray &sel1, TObjArray &sel2) |
void | HDistance (EdbPattern &p1, EdbPattern &p2, float dxMax, float dyMax) |
void | InitHphi (int n, float min, float max) |
void | InitHshr0 (int n, float min, float max) |
void | InitHshr1 (int n, float min, float max) |
void | InitHx (int n, float min, float max) |
void | InitHy (int n, float min, float max) |
void | InitHz (int n, float min, float max) |
void | InitOutputFile (const char *file="report_al.root", const char *option="RECREATE") |
IO, initialization and finalization functions. More... | |
void | InitPatCellBin (int side, EdbPattern &pat, float binx, float biny) |
void | InitPatCellN (EdbCell2 &cell, EdbPattern &pat, int nx, int ny) |
Bool_t | IsInsideDVsame (EdbSegP &s1, EdbSegP &s2) |
Int_t | Ncoins (float dvlim[4], EdbH2 *hdxy=0, EdbH2 *hdtxty=0, TObjArray *sel1=0, TObjArray *sel2=0) |
Int_t | Ncp () |
Functions applied to the selected parallel arrays. More... | |
int | OptimiseVar1 (int side, int ivar, EdbH2 *hdxy=0, EdbH2 *hdtxy=0) |
void | OptimiseVar2 (int side1, int ivar1, int side2, int ivar2, EdbH2 &h12, EdbH2 *hdxy=0, EdbH2 *hdtxty=0) |
int | SelectBestCouple () |
int | SelectIsolated () |
Bool_t | SideOK (int side) |
char * | StrDVsame () const |
float | TX (int side, EdbSegP &s) |
float | TY (int side, EdbSegP &s) |
Bool_t | ValidCoinsidence (EdbSegP &s1, EdbSegP &s2, float dvlim[4], float dvfound[4]) |
float | Var (int side, EdbSegP &s, int ivar) |
float | Var (int side, int iseg, int ivar) |
float | X (int side, EdbSegP &s) |
Correction parameters handling. More... | |
float | Xmax (int side, EdbPattern &p) |
float | Xmax (int side, TObjArray &p) |
float | Xmin (int side, EdbPattern &p) |
float | Xmin (int side, TObjArray &p) |
float | Y (int side, EdbSegP &s) |
float | Ymax (int side, EdbPattern &p) |
float | Ymax (int side, TObjArray &p) |
float | Ymin (int side, EdbPattern &p) |
float | Ymin (int side, TObjArray &p) |
virtual | ~EdbAlignmentV () |
Static Public Member Functions | |
static Int_t | CheckEqualArr (TObjArray &arr1, TObjArray &arr2) |
Public Attributes | |
EdbSegCorr | eCorr [2] |
corrections for side 1 and 2 (v[7]) - the result of the alignment More... | |
EdbLayer | eCorrL [2] |
corrections in form of affine transformations - the final output More... | |
TH1I * | eDoubletsRate |
can be filled in FillCombinations() More... | |
Float_t | eDVsame [4] |
(dx,dy,dtx,dty) condition for the coinsidence More... | |
EdbH1 | eH [2][7] |
EdbH2 | eHxy |
position 2d histo to be used in OptimiseVar2 More... | |
TFile * | eOutputFile |
EdbCell2 | ePC [2] |
2-d position cells with patterns segments More... | |
TObjArray | eS [2] |
"parallel" arrays with the selected combinations of segments More... | |
Bool_t | eUseAffCorr |
if "true" - use eCorrL for corrections More... | |
Float_t | eXmarg |
Float_t | eYmarg |
margins for the cell definition More... | |
universal basic alignment class
EdbAlignmentV::EdbAlignmentV | ( | ) |
margins for the cell definition
by default use eCorr (separated corrections)
|
virtual |
void EdbAlignmentV::ApplyLimitsOffset | ( | float & | xmin1, |
float & | xmax1, | ||
float & | xmin2, | ||
float & | xmax2, | ||
float | offsetMax | ||
) |
Int_t EdbAlignmentV::CalcAffFull | ( | ) |
Int_t EdbAlignmentV::CalcApplyFractMeanDiff | ( | ) |
by default apply it to side 0
Int_t EdbAlignmentV::CalcApplyMeanDiff | ( | ) |
by default apply it to side 0
Float_t EdbAlignmentV::CalcFractMeanDiff | ( | int | ivar, |
float | fraction | ||
) |
Calculate mean difference for the highest density region
Float_t EdbAlignmentV::CalcMeanDiff | ( | int | ivar | ) |
Calculate mean difference for the given variable taking into account corrections
Float_t EdbAlignmentV::CalcMeanDZ | ( | float | tmin = 0.1 , |
float | tmax = 2. |
||
) |
Calculate mean shrinkage (to be applied to side 0 to get side 1)
Float_t EdbAlignmentV::CalcMeanShr | ( | float | tmin = 0.1 , |
float | tmax = 2. |
||
) |
Calculate mean shrinkage (to be applied to side 0 to get side 1)
|
inline |
Int_t EdbAlignmentV::CalculateAffTXTY | ( | TObjArray & | arr1, |
TObjArray & | arr2, | ||
EdbAffine2D & | aff | ||
) |
Int_t EdbAlignmentV::CalculateAffTXTYTurn | ( | TObjArray & | arr1, |
TObjArray & | arr2, | ||
EdbAffine2D & | aff | ||
) |
|
inline |
Int_t EdbAlignmentV::CalculateAffXY | ( | TObjArray & | arr1, |
TObjArray & | arr2, | ||
EdbAffine2D & | aff | ||
) |
|
inline |
Int_t EdbAlignmentV::CalculateAffXYTurn | ( | TObjArray & | arr1, |
TObjArray & | arr2, | ||
EdbAffine2D & | aff | ||
) |
|
static |
void EdbAlignmentV::CloseOutputFile | ( | ) |
void EdbAlignmentV::Corr2Aff | ( | EdbSegCorr & | corr, |
EdbLayer & | layer | ||
) |
void EdbAlignmentV::CorrToCoG | ( | int | side, |
EdbPattern & | p | ||
) |
functions alpplied to the individual patterns
void EdbAlignmentV::CorrToCoG | ( | int | side, |
TObjArray & | p | ||
) |
void EdbAlignmentV::DefineGuessCell | ( | float | xmin1, |
float | xmax1, | ||
float | ymin1, | ||
float | ymax1, | ||
float | xmin2, | ||
float | xmax2, | ||
float | ymin2, | ||
float | ymax2, | ||
int | np1, | ||
int | np2, | ||
float | binOK | ||
) |
Selector functions.
int EdbAlignmentV::DoubletsFilterOut | ( | int | checkview, |
TH2F * | hxy = 0 , |
||
TH2F * | htxty = 0 |
||
) |
assumed the same pattern's segments in eS[0] and eS[1]
checkview = 0 do not check if close tracks belongs to different views
checkview = 1 check views, select best and cancel the worst candidate
checkview = 2 check views but do not cancell worst candidate (debug option)
void EdbAlignmentV::FillCell | ( | int | side, |
EdbPattern & | pat | ||
) |
assume that the cell is already initialized
void EdbAlignmentV::FillCell | ( | int | side, |
TObjArray & | pat | ||
) |
int EdbAlignmentV::FillCombinations | ( | ) |
int EdbAlignmentV::FillCombinations | ( | float | dv[4], |
float | dxMax, | ||
float | dyMax, | ||
bool | doFill | ||
) |
input: dv = coinsidence condition (dx,dy,dtx,dty)
dxMax, dyMax - the area around each segment for the combinations
selection, it can be selected bigger then coinsidence condition due to
corrections displacements
the cells must be already filled
void EdbAlignmentV::FillGuessCell | ( | EdbPattern & | p1, |
EdbPattern & | p2, | ||
float | binOK = 1. , |
||
float | offsetMax = 2000. |
||
) |
binOK - is the mean number of entries requested per bin
void EdbAlignmentV::FillGuessCell | ( | TObjArray & | p1, |
TObjArray & | p2, | ||
float | binOK = 1. , |
||
float | offsetMax = 2000. |
||
) |
binOK - is the mean number of entries requested per bin
Int_t EdbAlignmentV::FindCorrDiff | ( | float | dvsame[4], |
int | side = 0 , |
||
int | nlim = 10 |
||
) |
find diffs with the default settings and correct requested side
Float_t EdbAlignmentV::FindDensityPeak | ( | TArrayF & | arr, |
float | fraction | ||
) |
Int_t EdbAlignmentV::FindDiff | ( | TObjArray & | arr1, |
TObjArray & | arr2, | ||
float | dvlim[4], | ||
float | dvfound[4] | ||
) |
Float_t EdbAlignmentV::FineCorrPhi | ( | TObjArray & | sel1, |
TObjArray & | sel2 | ||
) |
for the correct answer the O,O should be in the CoG of the second pattern
Float_t EdbAlignmentV::FineCorrZ | ( | TObjArray & | sel1, |
TObjArray & | sel2 | ||
) |
void EdbAlignmentV::HDistance | ( | EdbPattern & | p1, |
EdbPattern & | p2, | ||
float | dxMax, | ||
float | dyMax | ||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void EdbAlignmentV::InitOutputFile | ( | const char * | file = "report_al.root" , |
const char * | option = "RECREATE" |
||
) |
IO, initialization and finalization functions.
void EdbAlignmentV::InitPatCellBin | ( | int | side, |
EdbPattern & | pat, | ||
float | binx, | ||
float | biny | ||
) |
void EdbAlignmentV::InitPatCellN | ( | EdbCell2 & | cell, |
EdbPattern & | pat, | ||
int | nx, | ||
int | ny | ||
) |
note: no correction (do we need tis function?)
Int_t EdbAlignmentV::Ncoins | ( | float | dvlim[4], |
EdbH2 * | hdxy = 0 , |
||
EdbH2 * | hdtxty = 0 , |
||
TObjArray * | sel1 = 0 , |
||
TObjArray * | sel2 = 0 |
||
) |
calculate all coinsidences inside dv:(dx,dy, dtx,dty)
fill position and angular 2-d plots if requested
fill arrays with selected segments sel1, sel2 if requested
|
inline |
Functions applied to the selected parallel arrays.
use already preselected "couples" - useful to test small variations of parameters
void EdbAlignmentV::OptimiseVar2 | ( | int | side1, |
int | ivar1, | ||
int | side2, | ||
int | ivar2, | ||
EdbH2 & | h12, | ||
EdbH2 * | hdxy = 0 , |
||
EdbH2 * | hdtxty = 0 |
||
) |
use already preselected "couples" - useful to test small variations of parameters
especially after Hdistance preselection
Input: 2 variables defoned as side1/ivar1 and side1/ivar1
Output: h12 - filled selections histo
Optional: hdxy, hdtxy - 2d- histograms defined outside and used for the peak selection
int EdbAlignmentV::SelectBestCouple | ( | ) |
assume the different pattern's segments in eS[0] and eS[1]
assume that the selection method in FillCombinations - "first s1 then s2"
int EdbAlignmentV::SelectIsolated | ( | ) |
assume the different pattern's segments in eS[0] and eS[1]
assume that the selection method in FillCombinations - "first s1 then s2"
remove all duplicated combs
bool EdbAlignmentV::SideOK | ( | int | side | ) |
|
inline |
|
inline |
|
inline |
Bool_t EdbAlignmentV::ValidCoinsidence | ( | EdbSegP & | s1, |
EdbSegP & | s2, | ||
float | dvlim[4], | ||
float | dvfound[4] | ||
) |
|
inline |
|
inline |
|
inline |
Correction parameters handling.
float EdbAlignmentV::Xmax | ( | int | side, |
EdbPattern & | p | ||
) |
float EdbAlignmentV::Xmax | ( | int | side, |
TObjArray & | p | ||
) |
float EdbAlignmentV::Xmin | ( | int | side, |
EdbPattern & | p | ||
) |
float EdbAlignmentV::Xmin | ( | int | side, |
TObjArray & | p | ||
) |
|
inline |
float EdbAlignmentV::Ymax | ( | int | side, |
EdbPattern & | p | ||
) |
float EdbAlignmentV::Ymax | ( | int | side, |
TObjArray & | p | ||
) |
float EdbAlignmentV::Ymin | ( | int | side, |
EdbPattern & | p | ||
) |
float EdbAlignmentV::Ymin | ( | int | side, |
TObjArray & | p | ||
) |
EdbSegCorr EdbAlignmentV::eCorr[2] |
corrections for side 1 and 2 (v[7]) - the result of the alignment
EdbLayer EdbAlignmentV::eCorrL[2] |
corrections in form of affine transformations - the final output
TH1I* EdbAlignmentV::eDoubletsRate |
can be filled in FillCombinations()
Float_t EdbAlignmentV::eDVsame[4] |
(dx,dy,dtx,dty) condition for the coinsidence
EdbH1 EdbAlignmentV::eH[2][7] |
conditions for the selection procedure for each var of each side variables: dx,dy,dz, dtx,dty, shr, phi 0 1 2 3 4 5 6
EdbH2 EdbAlignmentV::eHxy |
position 2d histo to be used in OptimiseVar2
TFile* EdbAlignmentV::eOutputFile |
EdbCell2 EdbAlignmentV::ePC[2] |
2-d position cells with patterns segments
TObjArray EdbAlignmentV::eS[2] |
"parallel" arrays with the selected combinations of segments
Bool_t EdbAlignmentV::eUseAffCorr |
if "true" - use eCorrL for corrections
Float_t EdbAlignmentV::eXmarg |
Float_t EdbAlignmentV::eYmarg |
margins for the cell definition