Update 'MCtruthmatching.cpp'

Renata Kopecná 2022-01-27 10:11:12 +01:00
parent fe111ea8a0
commit d10b27df57

@ -2,10 +2,23 @@ In this script, the MC truthmatching is executed. The script can check both the
The corresponding classes are defined in [[TMsource.cpp|TMsource]]. **TODO** The corresponding classes are defined in [[TMsource.cpp|TMsource]]. **TODO**
## Table of Contents
* [passGammas()](#passgammas)
* [passAllTM()](#passalltm)
* [MCtruth()](#mctruth)
* [bool restore_from_backup](#bool-restore_from_backup)
* [bool restore_allyears_from_backup](#bool-restore_allyears_from_backup)
* [bool restore_all_from_backup](#bool-restore_all_from_backup)
* [Int_t TruthMatchAllBkg](#int_t-truthmatchallbkg)
* [Int_t TruthMatchAll](#int_t-truthmatchall)
* [Int_t TruthMatchAllAll](#int_t-truthmatchallall)
Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc)
### passGammas() ### passGammas()
Checks the TRUEIDs of the gammas, including the (grand(grand))mother IDs. Checks the TRUEIDs of the gammas, including the (grand(grand))mother IDs.
* **Parameters** * **Parameters**
* gamma1: gamma_IDs class of the first gamma * gamma1: gamma_IDs class of the first gamma
* gamma2: gamma_IDs class of the second gamma * gamma2: gamma_IDs class of the second gamma
@ -15,8 +28,7 @@ Checks the TRUEIDs of the gammas, including the (grand(grand))mother IDs.
* pi_zero_TM: Check whether the gamma TRUEID chain originates from a pi0? * pi_zero_TM: Check whether the gamma TRUEID chain originates from a pi0?
* gamma_TM: Check gamma TRUEID? * gamma_TM: Check gamma TRUEID?
* gamma_TM_full: if true, don't check the gamma TRUEID chain, just return true * gamma_TM_full: if true, don't check the gamma TRUEID chain, just return true
* **Result**
* **Result**\
Returns a number from 1 to 6: Returns a number from 1 to 6:
* 1: Both gammas are actually gammas * 1: Both gammas are actually gammas
* 2: One gamma is gamma, one is converted * 2: One gamma is gamma, one is converted
@ -26,9 +38,7 @@ Returns a number from 1 to 6:
* 6: Both gammas are random * 6: Both gammas are random
### passAllTM() ### passAllTM()
Checks the TRUEID decay chain, fills some mass histograms and returns whether the event is sucessfully truthmatched or not. Checks the TRUEID decay chain, fills some mass histograms and returns whether the event is sucessfully truthmatched or not.
* **Parameters** * **Parameters**
* B_plus: Bplus_IDs class of the Bplus * B_plus: Bplus_IDs class of the Bplus
* K_star: K_star_IDs class of the Kstar * K_star: K_star_IDs class of the Kstar
@ -56,15 +66,12 @@ Checks the TRUEID decay chain, fills some mass histograms and returns whether th
* pi_zero_full_TM: Check whether the TRUEID of pi0? * pi_zero_full_TM: Check whether the TRUEID of pi0?
* mu_TM: Check whether the TRUEID of muons is correct? * mu_TM: Check whether the TRUEID of muons is correct?
* J_psi_TM: Check whether the TRUEID chain originates from a Jpsi? * J_psi_TM: Check whether the TRUEID chain originates from a Jpsi?
* **Result**\ * **Result**\
Returns a boolean: passed (event is TMed) or not passed (event is not TMed) Returns a boolean: passed (event is TMed) or not passed (event is not TMed)
### MCtruth() ### MCtruth()
The meaning of the parameters is in [[BDTSelection.cpp|BDTSelection]] The meaning of the parameters is in [[BDTSelection.cpp|BDTSelection]]
* **Parameters** * **Parameters**
* year * year
* magnet * magnet
@ -73,11 +80,10 @@ The meaning of the parameters is in [[BDTSelection.cpp|BDTSelection]]
* B0 * B0
* K1 * K1
* Inc * Inc
* **Result**\ * **Result**\
* If everyhting is fine, returns 1, otherwise returns 0. * If everyhting is fine, returns 1, otherwise returns 0.
### bool restore_from_backup
### bool restore_from_backup
* **Parameters** * **Parameters**
* string year = "2011" * string year = "2011"
* string magnet = "down" * string magnet = "down"
@ -87,9 +93,9 @@ The meaning of the parameters is in [[BDTSelection.cpp|BDTSelection]]
* bool K1 = false * bool K1 = false
* bool Inc = false * bool Inc = false
* **Return** * **Return**
*
### bool restore_allyears_from_backup ### bool restore_allyears_from_backup
* **Parameters** * **Parameters**
* int Run = 1 * int Run = 1
* bool Reference = false * bool Reference = false
@ -98,12 +104,13 @@ The meaning of the parameters is in [[BDTSelection.cpp|BDTSelection]]
* bool K1 = false * bool K1 = false
* bool Inc = false * bool Inc = false
* **Return** * **Return**
*
### bool restore_all_from_backup ### bool restore_all_from_backup
* **Parameters** * **Parameters**
* *
* **Return** * **Return**
*
### Int_t TruthMatchAllBkg ### Int_t TruthMatchAllBkg
@ -114,6 +121,7 @@ The meaning of the parameters is in [[BDTSelection.cpp|BDTSelection]]
* bool K1 = false * bool K1 = false
* bool Inc = false * bool Inc = false
* **Return** * **Return**
*
### Int_t TruthMatchAll ### Int_t TruthMatchAll
@ -122,9 +130,11 @@ The meaning of the parameters is in [[BDTSelection.cpp|BDTSelection]]
* bool PHSP = false * bool PHSP = false
* Int_t Run = 1 * Int_t Run = 1
* **Return** * **Return**
*
### Int_t TruthMatchAllAll ### Int_t TruthMatchAllAll
* **Parameters** * **Parameters**
* Int_t Run * Int_t Run
* **Return** * **Return**
*