Update 'MCtruthmatching.cpp'
							parent
							
								
									863a18e3ab
								
							
						
					
					
						commit
						4ad30a7574
					
				@ -4,18 +4,33 @@ The corresponding classes are defined in [[TMsource.cpp|TMsource]]. **TODO**
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Table of Contents
 | 
					## Table of Contents
 | 
				
			||||||
* [passGammas()](#passgammas)
 | 
					* Global variables
 | 
				
			||||||
* [passAllTM()](#passalltm)
 | 
					    * Double_t YieldBeforeTruthMatching
 | 
				
			||||||
* [MCtruth()](#mctruth)
 | 
					    * Double_t YieldAfterTruthMatching
 | 
				
			||||||
* [bool restore_from_backup](#bool-restore_from_backup)
 | 
					    * Double_t YieldBeforeTruthMatchingErr
 | 
				
			||||||
* [bool restore_allyears_from_backup](#bool-restore_allyears_from_backup)
 | 
					    * Double_t YieldAfterTruthMatchingErr
 | 
				
			||||||
* [bool restore_all_from_backup](#bool-restore_all_from_backup)
 | 
					* Functions
 | 
				
			||||||
* [Int_t TruthMatchAllBkg](#int_t-truthmatchallbkg)
 | 
					    * [passGammas()](#passgammas)
 | 
				
			||||||
* [Int_t TruthMatchAll](#int_t-truthmatchall)
 | 
					    * [passAllTM()](#passalltm)
 | 
				
			||||||
* [Int_t TruthMatchAllAll](#int_t-truthmatchallall)
 | 
					    * [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)
 | 
					Created by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Global variables
 | 
				
			||||||
 | 
					I would say they are pretty self-explanatory :)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* Double_t YieldBeforeTruthMatching
 | 
				
			||||||
 | 
					* Double_t YieldAfterTruthMatching
 | 
				
			||||||
 | 
					* Double_t YieldBeforeTruthMatchingErr
 | 
				
			||||||
 | 
					* Double_t YieldAfterTruthMatchingErr
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Functions
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
### 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.
 | 
				
			||||||
@ -68,8 +83,8 @@ Checks the TRUEID decay chain, fills some mass histograms and returns whether th
 | 
				
			|||||||
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()
 | 
					### Int_t MCtruth()
 | 
				
			||||||
The meaning of the parameters is in [[BDTSelection.cpp|BDTSelection]]
 | 
					Reads a tree, performs the truthmatching based on the settings in [[GlobalFunctions.hpp|GlobalFunctions.hpp]], creates, fills and saves a lot of mass and TRUEID histograms. Saves the truthmatching branch in a new tuple. The old tuple is backed up and overwritten by the new tuple. The meaning of the parameters is in [[BDTSelection.cpp|BDTSelection]]. 
 | 
				
			||||||
* **Parameters**
 | 
					* **Parameters**
 | 
				
			||||||
    * year
 | 
					    * year
 | 
				
			||||||
    * magnet
 | 
					    * magnet
 | 
				
			||||||
@ -82,6 +97,7 @@ The meaning of the parameters is in [[BDTSelection.cpp|BDTSelection]]
 | 
				
			|||||||
    * 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
 | 
				
			||||||
 | 
					Restores the backup file created by [Int_t MCtruth()](#int_t-mctruth). 
 | 
				
			||||||
* **Parameters**
 | 
					* **Parameters**
 | 
				
			||||||
    * string year = "2011"
 | 
					    * string year = "2011"
 | 
				
			||||||
    * string magnet = "down"
 | 
					    * string magnet = "down"
 | 
				
			||||||
@ -91,9 +107,10 @@ The meaning of the parameters is in [[BDTSelection.cpp|BDTSelection]]
 | 
				
			|||||||
    * bool K1 = false
 | 
					    * bool K1 = false
 | 
				
			||||||
    * bool Inc = false
 | 
					    * bool Inc = false
 | 
				
			||||||
* **Return**
 | 
					* **Return**
 | 
				
			||||||
    * 
 | 
					    * If everyhting is fine, returns 1, otherwise returns 0.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### bool restore_allyears_from_backup
 | 
					### bool restore_allyears_from_backup
 | 
				
			||||||
 | 
					Calls [bool restore_from_backup](#bool-restore_from_backup) for both polarities and years corresponding to the selected `Run`.
 | 
				
			||||||
* **Parameters**
 | 
					* **Parameters**
 | 
				
			||||||
    * int Run = 1
 | 
					    * int Run = 1
 | 
				
			||||||
    * bool Reference = false
 | 
					    * bool Reference = false
 | 
				
			||||||
@ -102,16 +119,16 @@ The meaning of the parameters is in [[BDTSelection.cpp|BDTSelection]]
 | 
				
			|||||||
    * bool K1 = false
 | 
					    * bool K1 = false
 | 
				
			||||||
    * bool Inc = false
 | 
					    * bool Inc = false
 | 
				
			||||||
* **Return**
 | 
					* **Return**
 | 
				
			||||||
    * 
 | 
					    * If everyhting is fine, returns 1, otherwise returns 0.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### bool restore_all_from_backup
 | 
					### bool restore_all_from_backup
 | 
				
			||||||
 | 
					Calls [bool restore_from_backup](#bool-restore_allyears_from_backup) for both Runs, Sig, Ref and PHSP MC. Does not restore the bkg samples (aka `B0` = `K1` = `Inc` = false)!
 | 
				
			||||||
* **Parameters**
 | 
					* **Parameters**
 | 
				
			||||||
    * 
 | 
					 | 
				
			||||||
* **Return**
 | 
					* **Return**
 | 
				
			||||||
    * 
 | 
					    * If everyhting is fine, returns 1, otherwise returns 0.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Int_t TruthMatchAllBkg
 | 
					### Int_t TruthMatchAllBkg
 | 
				
			||||||
 | 
					Runs [Int_t MCtruth()](#int_t-mctruth) for all years. Runs the selected bkg sample (either `B0`, `K1` or `Inc`).
 | 
				
			||||||
* **Parameters**
 | 
					* **Parameters**
 | 
				
			||||||
    * bool Reference = false
 | 
					    * bool Reference = false
 | 
				
			||||||
    * Int_t Run = 1
 | 
					    * Int_t Run = 1
 | 
				
			||||||
@ -119,20 +136,21 @@ The meaning of the parameters is in [[BDTSelection.cpp|BDTSelection]]
 | 
				
			|||||||
    * bool K1 = false
 | 
					    * bool K1 = false
 | 
				
			||||||
    * bool Inc = false
 | 
					    * bool Inc = false
 | 
				
			||||||
* **Return**   
 | 
					* **Return**   
 | 
				
			||||||
    * 
 | 
					    * If everyhting is fine, returns 1, otherwise returns 0.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Int_t TruthMatchAll
 | 
					### Int_t TruthMatchAll
 | 
				
			||||||
 | 
					Runs [Int_t MCtruth()](#int_t-mctruth) for all years. Runs the selected MC sample (either signal, reference or PHSP).
 | 
				
			||||||
* **Parameters**
 | 
					* **Parameters**
 | 
				
			||||||
    * bool Reference = false
 | 
					    * bool Reference = false
 | 
				
			||||||
    * bool PHSP = false
 | 
					    * bool PHSP = false
 | 
				
			||||||
    * Int_t Run = 1
 | 
					    * Int_t Run = 1
 | 
				
			||||||
* **Return**
 | 
					* **Return**
 | 
				
			||||||
    * 
 | 
					    * If everyhting is fine, returns 1, otherwise returns 0.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Int_t TruthMatchAllAll
 | 
					### Int_t TruthMatchAllAll
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Runs [Int_t MCtruth()](#int_t-mctruth) for all years. Runs over all MC samples for given `Run`.
 | 
				
			||||||
* **Parameters**
 | 
					* **Parameters**
 | 
				
			||||||
    * Int_t Run
 | 
					    * Int_t Run
 | 
				
			||||||
* **Return**
 | 
					* **Return**
 | 
				
			||||||
    * 
 | 
					    * If everyhting is fine, returns 1, otherwise returns 0.
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user