![]() |
Belle II Software
release-05-02-19
|
TOP reconstruction: this class provides interface to fortran code. More...
#include <TOPreco.h>
Public Types | |
| enum | PDFoption { c_Rough = 0, c_Fine, c_Optimal } |
| Options for PDF: rough: no dependence on y fine: y dependent PDF everywhere optimal: y dependent PDF only where necessary (default) | |
| enum | StoreOption { c_Reduced, c_Full } |
| Options for storing PDF parameters in Fortran common TOP_PIK reduced: only position, width, nphot and fic (default) full: also number of reflections etc. | |
Public Member Functions | |
| TOPreco (int NumHyp, double Masses[], int pdgCodes[], double BkgPerModule=0, double ScaleN0=1) | |
| Constructor. More... | |
| void | setMass (double mass, int pdg) |
| Set mass of the particle hypothesis (overrides settings in the constructor) More... | |
| void | setTimeWindow (double Tmin, double Tmax) |
| Set time window for photons. More... | |
| void | getTimeWindow (double &Tmin, double &Tmax) |
| Returns time window for photons. More... | |
| void | setPDFoption (PDFoption opt, int NP=0, int NC=0) |
| Sets PDF option. More... | |
| void | setStoreOption (StoreOption opt) |
| Sets option for storing PDF parameters in Fortran common TOP_PIK. More... | |
| void | clearData () |
| Clear data list. | |
| int | addData (int moduleID, int pixelID, double time, double timeError) |
| Add data. More... | |
| int | getDataSize () |
| Return size of data list. | |
| void | reconstruct (const TOPtrack &trk, int pdg=0) |
| Run reconstruction for a given track. More... | |
| int | getFlag () |
| Return status. More... | |
| double | getExpectedPhotons (int i=0) |
| Return expected number of photons (signal + background) for i-th mass hypothesis. More... | |
| double | getExpectedBG () |
| Return expected number of background photons. More... | |
| int | getNumOfPhotons () |
| Return number of measured photons. More... | |
| double | getLogL (int i=0) |
| Return log likelihood for i-th mass hypothesis. More... | |
| void | getLogL (int Size, double LogL[], double ExpNphot[], int &Nphot) |
| Get all reconstruction results at once. More... | |
| double | getLogL (double timeShift, double timeMin, double timeMax, double sigma=0.0) |
| Return log likelihood for the last mass hypothesis using time-shifted PDF If timeMax <= timeMin use those set by setTimeWindow(double Tmin, double Tmax) More... | |
| void | getLogL (double timeShift, double timeMin, double timeMax, double sigma, float *logL) |
| Return pixel log likelihoods for the last mass hypothesis using time-shifted PDF If timeMax <= timeMin use those set by setTimeWindow(double Tmin, double Tmax) More... | |
| void | getTrackHit (int LocGlob, double R[3], double Dir[3], double &Len, double &Tlen, double &Mom, int &moduleID) |
| Return track hit at the bar in Local or Global frame. More... | |
| void | dumpLogL (int NumHyp) |
| Print log likelihoods to std output. More... | |
| void | dumpTrackHit (int LocGlob) |
| Print track to std output. More... | |
| int | getPullSize () |
| Get pulls: size. More... | |
| void | getPull (int K, int &pixelID, float &T, float &T0, float &Wid, float &PhiCer, float &Wt) |
| Get pulls: K-th pull. More... | |
| double | getPDF (int pixelID, double t, double mass, int PDG, double jitter=0) |
| Return PDF for pixel pixelID at time t for mass hypothesis mass. More... | |
| void | setBeta (double beta) |
| Set track beta (for beta resolution studies) if beta>0 this value is used instead of beta from momentum and mass. More... | |
| double | getBeta () const |
| Return track beta. More... | |
| void | redoPDF (double mass, int PDG) |
| Re-calculate PDF for a given particle mass using option c_Fine. More... | |
| int | getNumofPDFPeaks (int pixelID) const |
| Returns number of peaks for given pixel describing signal PDF. More... | |
| void | getPDFPeak (int pixelID, int k, float &position, float &width, float &numPhotons) const |
| Returns k-th PDF peak for given pixel describing signal PDF. More... | |
| float | getBkgLevel (int pixelID) const |
| Returns estimated background level for given pixel. More... | |
| int | getPDFPeakType (int pixelID, int k) const |
| Returns type of the k-th PDF peak for given pixel. More... | |
| float | getPDFPeakFic (int pixelID, int k) const |
| Returns Cerenkov azimuthal angle of PDF peak. More... | |
| float | getPDFPeakE (int pixelID, int k) const |
| Returns photon energy of PDF peak. More... | |
| float | getPDFPeakSigE (int pixelID, int k) const |
| Returns photon energy spread of PDF peak. More... | |
| int | getPDFPeakNx (int pixelID, int k) const |
| Returns total number of reflections in x of PDF peak. More... | |
| int | getPDFPeakNy (int pixelID, int k) const |
| Returns total number of reflections in y of PDF peak. More... | |
| int | getPDFPeakNxm (int pixelID, int k) const |
| Returns number of reflections in x before mirror. More... | |
| int | getPDFPeakNym (int pixelID, int k) const |
| Returns number of reflections in y before mirror. More... | |
| int | getPDFPeakNxe (int pixelID, int k) const |
| Returns number of reflections in x in prism. More... | |
| int | getPDFPeakNye (int pixelID, int k) const |
| Returns number of reflections in y in prism. More... | |
| float | getPDFPeakXD (int pixelID, int k) const |
| Returns unfolded x position of pixel. More... | |
| float | getPDFPeakYD (int pixelID, int k) const |
| Returns unfolded y position of pixel. More... | |
| float | getPDFPeakKxe (int pixelID, int k) const |
| Returns photon reconstructed direction in x at emission. More... | |
| float | getPDFPeakKye (int pixelID, int k) const |
| Returns photon reconstructed direction in y at emission. More... | |
| float | getPDFPeakKze (int pixelID, int k) const |
| Returns photon reconstructed direction in z at emission. More... | |
| float | getPDFPeakKxd (int pixelID, int k) const |
| Returns photon reconstructed direction in x at detection. More... | |
| float | getPDFPeakKyd (int pixelID, int k) const |
| Returns photon reconstructed direction in y at detection. More... | |
| float | getPDFPeakKzd (int pixelID, int k) const |
| Returns photon reconstructed direction in z at detection. More... | |
Static Public Member Functions | |
| static void | setChannelMask (const DBObjPtr< TOPCalChannelMask > &mask, const TOPAsicMask &asicMask) |
| Set channel mask. More... | |
| static void | setUncalibratedChannelsOff (const DBObjPtr< TOPCalChannelT0 > &channelT0) |
| Set uncalibrated channels off. More... | |
| static void | setUncalibratedChannelsOff (const DBObjPtr< TOPCalTimebase > &timebase) |
| Set uncalibrated channels off. More... | |
| static void | printChannelMask () |
| Print channel mask. | |
| static void | setChannelEffi () |
| Set relative efficiencies of pixels. | |
Private Member Functions | |
| void | reconstruct (double X, double Y, double Z, double Tlen, double Px, double Py, double Pz, int Q, int pdg=0, int moduleID=0) |
| Run reconstruction. More... | |
Private Attributes | |
| int | m_hypID = 0 |
| true hypothesis ID | |
| double | m_beta = 0 |
| beta value, if set | |
TOP reconstruction: this class provides interface to fortran code.
| TOPreco | ( | int | NumHyp, |
| double | Masses[], | ||
| int | pdgCodes[], | ||
| double | BkgPerModule = 0, |
||
| double | ScaleN0 = 1 |
||
| ) |
Constructor.
| NumHyp | number of mass hypotheses |
| Masses | masses |
| pdgCodes | PDG codes |
| BkgPerModule | estimation for minimal number of background hits |
| ScaleN0 | scale factor to scale N0 |
Definition at line 65 of file TOPreco.cc.
| int addData | ( | int | moduleID, |
| int | pixelID, | ||
| double | time, | ||
| double | timeError | ||
| ) |
Add data.
| moduleID | module ID |
| pixelID | pixel ID (e.g. software channel, 1-based) |
| time | TBC and t0-corrected time in [ns] |
| timeError | time uncertainty in [ns] |
Definition at line 214 of file TOPreco.cc.
| void dumpLogL | ( | int | NumHyp | ) |
Print log likelihoods to std output.
| NumHyp | number of hypotheses |
Definition at line 356 of file TOPreco.cc.
| void dumpTrackHit | ( | int | LocGlob | ) |
Print track to std output.
| LocGlob | in Local or Global frame |
Definition at line 386 of file TOPreco.cc.
|
inline |
| float getBkgLevel | ( | int | pixelID | ) | const |
Returns estimated background level for given pixel.
| pixelID | pixel ID (1-based) |
Definition at line 464 of file TOPreco.cc.
| double getExpectedBG | ( | ) |
Return expected number of background photons.
Definition at line 291 of file TOPreco.cc.
| double getExpectedPhotons | ( | int | i = 0 | ) |
Return expected number of photons (signal + background) for i-th mass hypothesis.
| i | index of mass hypothesis |
Definition at line 284 of file TOPreco.cc.
| int getFlag | ( | ) |
Return status.
Definition at line 278 of file TOPreco.cc.
| void getLogL | ( | double | timeShift, |
| double | timeMin, | ||
| double | timeMax, | ||
| double | sigma, | ||
| float * | logL | ||
| ) |
Return pixel log likelihoods for the last mass hypothesis using time-shifted PDF If timeMax <= timeMin use those set by setTimeWindow(double Tmin, double Tmax)
| timeShift | time shift of PDF |
| timeMin | lower edge of time window within which the photons are accepted |
| timeMax | upper edge of time window within which the photons are accepted |
| sigma | additional time smearing sigma |
| logL | return array of pixel log likelihood values (must be zeroed on input) |
Definition at line 332 of file TOPreco.cc.
| double getLogL | ( | double | timeShift, |
| double | timeMin, | ||
| double | timeMax, | ||
| double | sigma = 0.0 |
||
| ) |
Return log likelihood for the last mass hypothesis using time-shifted PDF If timeMax <= timeMin use those set by setTimeWindow(double Tmin, double Tmax)
| timeShift | time shift of PDF |
| timeMin | lower edge of time window within which the photons are accepted |
| timeMax | upper edge of time window within which the photons are accepted |
| sigma | additional time smearing sigma |
Definition at line 322 of file TOPreco.cc.
| double getLogL | ( | int | i = 0 | ) |
Return log likelihood for i-th mass hypothesis.
| i | index of mass hypothesis |
Definition at line 303 of file TOPreco.cc.
| void getLogL | ( | int | Size, |
| double | LogL[], | ||
| double | ExpNphot[], | ||
| int & | Nphot | ||
| ) |
Get all reconstruction results at once.
| Size | size of arrays |
| LogL | log likelihoods for Masses[] |
| ExpNphot | expected number of photons for Masses[] |
| Nphot | measured number of photons |
Definition at line 310 of file TOPreco.cc.
| int getNumofPDFPeaks | ( | int | pixelID | ) | const |
Returns number of peaks for given pixel describing signal PDF.
| pixelID | pixel ID (1-based) |
Definition at line 450 of file TOPreco.cc.
| int getNumOfPhotons | ( | ) |
Return number of measured photons.
Definition at line 297 of file TOPreco.cc.
| double getPDF | ( | int | pixelID, |
| double | t, | ||
| double | mass, | ||
| int | PDG, | ||
| double | jitter = 0 |
||
| ) |
Return PDF for pixel pixelID at time t for mass hypothesis mass.
| pixelID | pixel ID (e.g. software channel, 1-based) |
| t | time |
| mass | particle mass |
| PDG | particle code |
| jitter | additional time jitter, like electronic jitter |
Definition at line 428 of file TOPreco.cc.
| void getPDFPeak | ( | int | pixelID, |
| int | k, | ||
| float & | position, | ||
| float & | width, | ||
| float & | numPhotons | ||
| ) | const |
Returns k-th PDF peak for given pixel describing signal PDF.
| pixelID | pixel ID (1-based) |
| k | peak counter (in C++ sense - starts with 0) |
Definition at line 456 of file TOPreco.cc.
| float getPDFPeakE | ( | int | pixelID, |
| int | k | ||
| ) | const |
Returns photon energy of PDF peak.
| pixelID | pixel ID (1-based) |
| k | peak counter (in C++ sense - starts with 0) |
Definition at line 484 of file TOPreco.cc.
| float getPDFPeakFic | ( | int | pixelID, |
| int | k | ||
| ) | const |
Returns Cerenkov azimuthal angle of PDF peak.
| pixelID | pixel ID (1-based) |
| k | peak counter (in C++ sense - starts with 0) |
Definition at line 477 of file TOPreco.cc.
| float getPDFPeakKxd | ( | int | pixelID, |
| int | k | ||
| ) | const |
Returns photon reconstructed direction in x at detection.
| pixelID | pixel ID (1-based) |
| k | peak counter (in C++ sense - starts with 0) |
Definition at line 575 of file TOPreco.cc.
| float getPDFPeakKxe | ( | int | pixelID, |
| int | k | ||
| ) | const |
Returns photon reconstructed direction in x at emission.
| pixelID | pixel ID (1-based) |
| k | peak counter (in C++ sense - starts with 0) |
Definition at line 554 of file TOPreco.cc.
| float getPDFPeakKyd | ( | int | pixelID, |
| int | k | ||
| ) | const |
Returns photon reconstructed direction in y at detection.
| pixelID | pixel ID (1-based) |
| k | peak counter (in C++ sense - starts with 0) |
Definition at line 582 of file TOPreco.cc.
| float getPDFPeakKye | ( | int | pixelID, |
| int | k | ||
| ) | const |
Returns photon reconstructed direction in y at emission.
| pixelID | pixel ID (1-based) |
| k | peak counter (in C++ sense - starts with 0) |
Definition at line 561 of file TOPreco.cc.
| float getPDFPeakKzd | ( | int | pixelID, |
| int | k | ||
| ) | const |
Returns photon reconstructed direction in z at detection.
| pixelID | pixel ID (1-based) |
| k | peak counter (in C++ sense - starts with 0) |
Definition at line 589 of file TOPreco.cc.
| float getPDFPeakKze | ( | int | pixelID, |
| int | k | ||
| ) | const |
Returns photon reconstructed direction in z at emission.
| pixelID | pixel ID (1-based) |
| k | peak counter (in C++ sense - starts with 0) |
Definition at line 568 of file TOPreco.cc.
| int getPDFPeakNx | ( | int | pixelID, |
| int | k | ||
| ) | const |
Returns total number of reflections in x of PDF peak.
| pixelID | pixel ID (1-based) |
| k | peak counter (in C++ sense - starts with 0) |
Definition at line 498 of file TOPreco.cc.
| int getPDFPeakNxe | ( | int | pixelID, |
| int | k | ||
| ) | const |
Returns number of reflections in x in prism.
| pixelID | pixel ID (1-based) |
| k | peak counter (in C++ sense - starts with 0) |
Definition at line 526 of file TOPreco.cc.
| int getPDFPeakNxm | ( | int | pixelID, |
| int | k | ||
| ) | const |
Returns number of reflections in x before mirror.
| pixelID | pixel ID (1-based) |
| k | peak counter (in C++ sense - starts with 0) |
Definition at line 512 of file TOPreco.cc.
| int getPDFPeakNy | ( | int | pixelID, |
| int | k | ||
| ) | const |
Returns total number of reflections in y of PDF peak.
| pixelID | pixel ID (1-based) |
| k | peak counter (in C++ sense - starts with 0) |
Definition at line 505 of file TOPreco.cc.
| int getPDFPeakNye | ( | int | pixelID, |
| int | k | ||
| ) | const |
Returns number of reflections in y in prism.
| pixelID | pixel ID (1-based) |
| k | peak counter (in C++ sense - starts with 0) |
Definition at line 533 of file TOPreco.cc.
| int getPDFPeakNym | ( | int | pixelID, |
| int | k | ||
| ) | const |
Returns number of reflections in y before mirror.
| pixelID | pixel ID (1-based) |
| k | peak counter (in C++ sense - starts with 0) |
Definition at line 519 of file TOPreco.cc.
| float getPDFPeakSigE | ( | int | pixelID, |
| int | k | ||
| ) | const |
Returns photon energy spread of PDF peak.
| pixelID | pixel ID (1-based) |
| k | peak counter (in C++ sense - starts with 0) |
Definition at line 491 of file TOPreco.cc.
| int getPDFPeakType | ( | int | pixelID, |
| int | k | ||
| ) | const |
Returns type of the k-th PDF peak for given pixel.
| pixelID | pixel ID (1-based) |
| k | peak counter (in C++ sense - starts with 0) |
Definition at line 470 of file TOPreco.cc.
| float getPDFPeakXD | ( | int | pixelID, |
| int | k | ||
| ) | const |
Returns unfolded x position of pixel.
| pixelID | pixel ID (1-based) |
| k | peak counter (in C++ sense - starts with 0) |
Definition at line 540 of file TOPreco.cc.
| float getPDFPeakYD | ( | int | pixelID, |
| int | k | ||
| ) | const |
Returns unfolded y position of pixel.
| pixelID | pixel ID (1-based) |
| k | peak counter (in C++ sense - starts with 0) |
Definition at line 547 of file TOPreco.cc.
| void getPull | ( | int | K, |
| int & | pixelID, | ||
| float & | T, | ||
| float & | T0, | ||
| float & | Wid, | ||
| float & | PhiCer, | ||
| float & | Wt | ||
| ) |
Get pulls: K-th pull.
| K | counter |
| pixelID | pixel ID (e.g. software channel, 1-based) |
| T | photon time |
| T0 | PDF mean time |
| Wid | PDF sigma |
| PhiCer | azimuthal Cerenkov angle |
| Wt | weight |
Definition at line 420 of file TOPreco.cc.
| int getPullSize | ( | ) |
| void getTimeWindow | ( | double & | Tmin, |
| double & | Tmax | ||
| ) |
Returns time window for photons.
| Tmin | minimum time [ns] |
| Tmax | maximum time [ns] |
Definition at line 187 of file TOPreco.cc.
| void getTrackHit | ( | int | LocGlob, |
| double | R[3], | ||
| double | Dir[3], | ||
| double & | Len, | ||
| double & | Tlen, | ||
| double & | Mom, | ||
| int & | moduleID | ||
| ) |
Return track hit at the bar in Local or Global frame.
| LocGlob | select Local or Global frame |
| R | track spatial position |
| Dir | track direction (unit vector) |
| Len | track length inside bar |
| Tlen | track length from IP |
| Mom | track momentum |
| moduleID | module ID if hit, else -1 |
Definition at line 342 of file TOPreco.cc.
| void reconstruct | ( | const TOPtrack & | trk, |
| int | pdg = 0 |
||
| ) |
Run reconstruction for a given track.
| trk | track |
| pdg | PDG code for which to compute pulls. If 0 use MC true PDG. |
Definition at line 268 of file TOPreco.cc.
|
private |
Run reconstruction.
| X | track spatial position x |
| Y | track spatial position y |
| Z | track spatial position z |
| Tlen | track length from IP |
| Px | track momentum component x |
| Py | track momentum component y |
| Pz | track momentum component z |
| Q | track charge |
| pdg | PDG code for which to compute pulls |
| moduleID | module ID (optional) |
Definition at line 250 of file TOPreco.cc.
| void redoPDF | ( | double | mass, |
| int | PDG | ||
| ) |
Re-calculate PDF for a given particle mass using option c_Fine.
| mass | particle mass |
| PDG | particle code |
Definition at line 444 of file TOPreco.cc.
| void setBeta | ( | double | beta | ) |
Set track beta (for beta resolution studies) if beta>0 this value is used instead of beta from momentum and mass.
| beta | beta value |
Definition at line 437 of file TOPreco.cc.
|
static |
Set channel mask.
| mask | channel mask |
| asicMask | masked asics |
Definition at line 88 of file TOPreco.cc.
| void setMass | ( | double | mass, |
| int | pdg | ||
| ) |
Set mass of the particle hypothesis (overrides settings in the constructor)
| mass | mass |
| pdg | PDG code |
Definition at line 172 of file TOPreco.cc.
| void setPDFoption | ( | PDFoption | opt, |
| int | NP = 0, |
||
| int | NC = 0 |
||
| ) |
Sets PDF option.
| opt | option - see definition of PDFoption |
| NP | number of emission positions along track segment (equidistant) |
| NC | number of Cerenkov angles (equdistant in photon energies) |
Definition at line 196 of file TOPreco.cc.
| void setStoreOption | ( | StoreOption | opt | ) |
Sets option for storing PDF parameters in Fortran common TOP_PIK.
| opt | option - see definition of StoreOption |
Definition at line 202 of file TOPreco.cc.
| void setTimeWindow | ( | double | Tmin, |
| double | Tmax | ||
| ) |
Set time window for photons.
Allows to set window different than that defined by parameters of TOPNominalTDC.
If Tmax <= Tmin the window is set to default from TOPNominalTDC.
Window edges must not exceed those used during data taking or in simulation
| Tmin | minimum time [ns] |
| Tmax | maximum time [ns] |
Definition at line 180 of file TOPreco.cc.
|
static |
Set uncalibrated channels off.
| channelT0 | channel T0 calibration |
Definition at line 107 of file TOPreco.cc.
|
static |
Set uncalibrated channels off.
| timebase | timebase calibration |
Definition at line 125 of file TOPreco.cc.