Finds and applies trigger prescales on Single Photon data. More...
#include <PhotonPrescales.h>
Public Member Functions | |
PhotonPrescales (Dataset &dataset, Options const &options) | |
Constructor. | |
std::vector< double > | GetThresholdsBinning () const |
Gets vector of pT thresholds bin boundaries for the weights histograms. | |
int | GetPhotonPrescale (double photonPt) const |
Gets the prescale for a given run and lumi, from the prescale map. | |
Private Member Functions | |
const PhotonTrigger * | FindTrigger (double photonPt) const |
Internal, find the trigger object by the photon Pt. | |
Static Private Member Functions | |
static std::vector< PhotonTrigger > | GetTriggers (Dataset &dataset, Options const &options) |
Gets the triggers from the config file. | |
Private Attributes | |
std::vector< PhotonTrigger > | photonTriggers_ |
Collection of all possible photon triggers. | |
bool | isSim_ |
Indicates if the event is simulation or data. | |
TTreeReaderValue< UInt_t > | run_ |
For determining the prescale, work around for const object. | |
TTreeReaderValue< UInt_t > | luminosityBlock_ |
Finds and applies trigger prescales on Single Photon data.
The names of the triggers used, prescales and thresholds are located in the config file.
Performs also a cleaning based on the reconstructed photon pT: if the event does not fire the trigger with the pT threshold just below the photon pT, the event is rejected. This cleaning is performed both on data and MC, while the prescales are applied only on data.
Constructor.
[in] | dataset | Dataset that will be processed. |
[in] | options | Configuration options. |
int PhotonPrescales::GetPhotonPrescale | ( | double | photonPt | ) | const |
Gets the prescale for a given run and lumi, from the prescale map.
If the event is from a MC file, the function will only return 0 or 1.
Returns 0 if the event fails the check based on the trigger threshold.
[in] | photonPt | p_T of the (first) photon in the event. |
[in] | run | the run number of the event |
[in] | lumi | the luminosity block of the event |
std::vector<double> PhotonPrescales::GetThresholdsBinning | ( | ) | const |
Gets vector of pT thresholds bin boundaries for the weights histograms.
By construction, first bin starts at 0 and last bin ends at 1500 GeV (unless the last threshold is above 1500).
static std::vector<PhotonTrigger> PhotonPrescales::GetTriggers | ( | Dataset & | dataset, | |
Options const & | options | |||
) | [static, private] |
Gets the triggers from the config file.
Also orders the triggers by increasing pT thresholds (mandatory for GetWeight).