ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Public Attributes | Private Attributes | Static Private Attributes | List of all members
DiTauMassTools::MissingMassProb Class Reference

#include <MissingMassProb.h>

Collaboration diagram for DiTauMassTools::MissingMassProb:

Public Member Functions

 MissingMassProb (MMCCalibrationSetV2::e aset, std::string m_paramFilePath)
 
 ~MissingMassProb ()
 
double apply (MissingMassInput &preparedInput, const int &tau_type1, const int &tau_type2, const TLorentzVector &tauvec1, const TLorentzVector &tauvec2, const TLorentzVector nuvec1, const TLorentzVector &nuvec2, bool constant=false, bool oneTau=false, bool twoTau=false)
 
void setParamAngle (const TLorentzVector &tauvec, int tau, int tautype)
 
void setParamRatio (int tau, int tautype)
 
void setParamNuMass ()
 
TF1 * GetFormulaAngle1 ()
 
TF1 * GetFormulaAngle2 ()
 
TF1 * GetFormulaRatio1 ()
 
TF1 * GetFormulaRatio2 ()
 
TF1 * GetFormulaNuMass ()
 
void SetAllowUseHT (bool allowUseHT)
 
bool GetAllowUseHT ()
 
void SetUseHT (bool val)
 
bool GetUseHT ()
 
void SetUseTauProbability (bool val)
 
bool GetUseTauProbability ()
 
void SetUseMnuProbability (bool val)
 
bool GetUseMnuProbability ()
 
void SetUseDphiLL (bool val)
 
bool GetUseDphiLL ()
 
double MetProbability (MissingMassInput &preparedInput, const double &met1, const double &met2, const double &MetSigma1, const double &MetSigma2)
 
double dTheta3Dparam (const int &parInd, const int &tau_type, const double &P_tau, const double *par)
 
double dTheta3d_probabilityFast (MissingMassInput &preparedInput, const int &tau_type, const double &dTheta3d, const double &P_tau)
 
double myDelThetaHadFunc (double *x, double *par)
 
double myDelThetaLepFunc (double *x, double *par)
 
double MHtProbability (MissingMassInput &preparedInput, const double &d_mhtX, const double &d_mhtY, const double &mht, const double &trueMetGuess, const double &mht_offset)
 
double MHtProbabilityHH (MissingMassInput &preparedInput, const double &d_mhtX, const double &d_mhtY, const double &mht, const double &trueMetGuess, const double &mht_offset)
 
void MET (MissingMassInput &preparedInput)
 
double mEtAndTauProbability (MissingMassInput &preparedInput)
 
double MnuProbability (MissingMassInput &preparedInput, double mnu, double binsize)
 
double MnuProbability (MissingMassInput &preparedInput, double mnu)
 
double TauProbability (MissingMassInput &preparedInput, const int &type1, const TLorentzVector &vis1, const TLorentzVector &nu1, const int &type2, const TLorentzVector &vis2, const TLorentzVector &nu2)
 
double TauProbability (MissingMassInput &preparedInput, const int &type1, const TLorentzVector &vis1, const TLorentzVector &nu1, const int &type2, const TLorentzVector &vis2, const TLorentzVector &nu2, const double &detmet)
 
double TauProbabilityLFV (MissingMassInput &preparedInput, const int &type1, const TLorentzVector &vis1, const TLorentzVector &nu1)
 

Static Public Member Functions

static double MetProbabilityWrapper (MissingMassProb *prob, MissingMassInput &preparedInput, const int &tau_type1, const int &tau_type2, const TLorentzVector &tauvec1, const TLorentzVector &tauvec2, const TLorentzVector nuvec1, const TLorentzVector &nuvec2)
 
static double mEtAndTauProbabilityWrapper (MissingMassProb *prob, MissingMassInput &preparedInput, const int &tau_type1, const int &tau_type2, const TLorentzVector &tauvec1, const TLorentzVector &tauvec2, const TLorentzVector nuvec1, const TLorentzVector &nuvec2)
 
static double dTheta3d_probabilityFastWrapper (MissingMassProb *prob, MissingMassInput &preparedInput, const int &tau_type1, const int &tau_type2, const TLorentzVector &tauvec1, const TLorentzVector &tauvec2, const TLorentzVector nuvec1, const TLorentzVector &nuvec2)
 
static double TauProbabilityWrapper (MissingMassProb *prob, MissingMassInput &preparedInput, const int &tau_type1, const int &tau_type2, const TLorentzVector &tauvec1, const TLorentzVector &tauvec2, const TLorentzVector nuvec1, const TLorentzVector &nuvec2)
 
static double MnuProbabilityWrapper (MissingMassProb *prob, MissingMassInput &preparedInput, const int &tau_type1, const int &tau_type2, const TLorentzVector &tauvec1, const TLorentzVector &tauvec2, const TLorentzVector nuvec1, const TLorentzVector &nuvec2)
 
static double MnuProbabilityNewWrapper (MissingMassProb *prob, MissingMassInput &preparedInput, const int &tau_type1, const int &tau_type2, const TLorentzVector &tauvec1, const TLorentzVector &tauvec2, const TLorentzVector nuvec1, const TLorentzVector &nuvec2)
 
static double dTheta3d_probabilityNewWrapper (MissingMassProb *prob, MissingMassInput &preparedInput, const int &tau_type1, const int &tau_type2, const TLorentzVector &tauvec1, const TLorentzVector &tauvec2, const TLorentzVector nuvec1, const TLorentzVector &nuvec2)
 
static double TauProbabilityNewWrapper (MissingMassProb *prob, MissingMassInput &preparedInput, const int &tau_type1, const int &tau_type2, const TLorentzVector &tauvec1, const TLorentzVector &tauvec2, const TLorentzVector nuvec1, const TLorentzVector &nuvec2)
 

Public Attributes

std::list< std::function< double(MissingMassInput &preparedInput, const int &tau_type1, const int &tau_type2, const TLorentzVector &tauvec1, const TLorentzVector &tauvec2, const TLorentzVector nuvec1, const TLorentzVector &nuvec2)> > m_probListConstant
 
std::list< std::function< double(MissingMassInput &preparedInput, const int &tau_type1, const int &tau_type2, const TLorentzVector &tauvec1, const TLorentzVector &tauvec2, const TLorentzVector nuvec1, const TLorentzVector &nuvec2)> > m_probListOneTau
 
std::list< std::function< double(MissingMassInput &preparedInput, const int &tau_type1, const int &tau_type2, const TLorentzVector &tauvec1, const TLorentzVector &tauvec2, const TLorentzVector nuvec1, const TLorentzVector &nuvec2)> > m_probListTwoTau
 

Private Attributes

TF1 * m_formulaAngle1 = new TF1("formulaAngle1", "[0]*exp(-[2]*(log((x+[3])/[1]))**2)")
 
TF1 * m_formulaAngle2 = new TF1("formulaAngle2", "[0]*exp(-[2]*(log((x+[3])/[1]))**2)")
 
TF1 * m_formulaRatio1
 
TF1 * m_formulaRatio2
 
TF1 * m_formulaRatioLep1 = new TF1("formulaRatio1", "gaus(0)+expo(3)")
 
TF1 * m_formulaRatioLep2 = new TF1("formulaRatio2", "gaus(0)+expo(3)")
 
TF1 * m_formulaRatioHad1 = new TF1("formulaRatio1", "gaus(0)")
 
TF1 * m_formulaRatioHad2 = new TF1("formulaRatio2", "gaus(0)")
 
TF1 * m_formulaNuMass = new TF1("formulaNuMass", "pol6")
 
std::vector< TF1 * > m_paramVectorAngle
 
std::vector< TF1 * > m_paramVectorAngleLep
 
std::vector< TF1 * > m_paramVectorRatio
 
std::vector< TF1 * > m_paramVectorRatioLep
 
std::vector< TF1 * > m_paramVectorNuMass
 
std::string m_paramFilePath
 
TFile * m_fParams
 
MMCCalibrationSetV2::e m_mmcCalibrationSet
 
bool m_allowUseHT
 
bool m_UseHT
 
bool m_fUseTauProbability
 
bool m_fUseMnuProbability
 
bool m_fUseDphiLL
 

Static Private Attributes

static thread_local double s_fit_param [2][3][6][5]
 
static thread_local double s_ter_sigma_par [2][10][3]
 

Detailed Description

Definition at line 27 of file MissingMassProb.h.

Constructor & Destructor Documentation

◆ MissingMassProb()

MissingMassProb::MissingMassProb ( MMCCalibrationSetV2::e  aset,
std::string  m_paramFilePath 
)

MMC2011 parameterisation

MMC2012 parameterisation

Definition at line 213 of file MissingMassProb.cxx.

213  {
214  m_mmcCalibrationSet = aset;
215  m_allowUseHT = false;
216  m_UseHT = false;
217 
218  m_fParams = NULL;
219  if (!m_paramFilePath.empty()){
220  std::string total_path = "DiTauMassTools/"+m_paramFilePath;
221  m_fParams = TFile::Open( (const char*) PathResolverFindCalibFile(total_path).c_str() ,"READ");
222  }
223  if (aset == MMCCalibrationSetV2::MMC2019) {
224  m_probListConstant.push_back( std::bind(&mEtAndTauProbabilityWrapper, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4, std::placeholders::_5, std::placeholders::_6, std::placeholders::_7) );
225  m_probListOneTau.push_back( std::bind(&dTheta3d_probabilityNewWrapper, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4, std::placeholders::_5, std::placeholders::_6, std::placeholders::_7) );
226  m_probListTwoTau.push_back( std::bind(&TauProbabilityNewWrapper, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4, std::placeholders::_5, std::placeholders::_6, std::placeholders::_7) );
227  m_probListTwoTau.push_back( std::bind(&MnuProbabilityNewWrapper, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4, std::placeholders::_5, std::placeholders::_6, std::placeholders::_7) );
228  if (m_fParams){
230  }
231  }
232  else {
233  m_probListConstant.push_back( std::bind(&mEtAndTauProbabilityWrapper, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4, std::placeholders::_5, std::placeholders::_6, std::placeholders::_7) );
234  m_probListOneTau.push_back( std::bind(&dTheta3d_probabilityFastWrapper, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4, std::placeholders::_5, std::placeholders::_6, std::placeholders::_7) );
235  m_probListTwoTau.push_back( std::bind(&TauProbabilityWrapper, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4, std::placeholders::_5, std::placeholders::_6, std::placeholders::_7) );
236  m_probListTwoTau.push_back( std::bind(&MnuProbabilityWrapper, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4, std::placeholders::_5, std::placeholders::_6, std::placeholders::_7) );
237  }
238 
239  if (m_fParams) if (m_fParams->IsOpen()) m_fParams->Close();
240 
242  // [tau_type][parLG][par]
243  // leptonic tau
244  //-par[0]
245  s_fit_param[0][0][0][0]=-9.82013E-1;
246  s_fit_param[0][0][0][1]=9.09874E-1;
247  s_fit_param[0][0][0][2]=0.0;
248  s_fit_param[0][0][0][3]=0.0;
249  //-par[1]
250  s_fit_param[0][0][1][0]=9.96303E1;
251  s_fit_param[0][0][1][1]=1.68873E1;
252  s_fit_param[0][0][1][2]=3.23798E-2;
253  s_fit_param[0][0][1][3]=0.0;
254  //-par[2]
255  s_fit_param[0][0][2][0]=0.0;
256  s_fit_param[0][0][2][1]=0.0;
257  s_fit_param[0][0][2][2]=0.0;
258  s_fit_param[0][0][2][3]=0.3; // fit value is 2.8898E-1, I use 0.3
259  //-par[3]
260  s_fit_param[0][0][3][0]=9.70055E1;
261  s_fit_param[0][0][3][1]=6.46175E1;
262  s_fit_param[0][0][3][2]=3.20679E-2;
263  s_fit_param[0][0][3][3]=0.0;
264  //-par[4]
265  s_fit_param[0][0][4][0]=1.56865;
266  s_fit_param[0][0][4][1]=2.28336E-1;
267  s_fit_param[0][0][4][2]=1.09396E-1;
268  s_fit_param[0][0][4][3]=1.99975E-3;
269  //-par[5]
270  s_fit_param[0][0][5][0]=0.0;
271  s_fit_param[0][0][5][1]=0.0;
272  s_fit_param[0][0][5][2]=0.0;
273  s_fit_param[0][0][5][3]=0.66;
274  //-----------------------------------------------------------------
275  // 1-prong hadronic tau
276  //-par[0]
277  s_fit_param[0][1][0][0]=-2.42674;
278  s_fit_param[0][1][0][1]=7.69124E-1;
279  s_fit_param[0][1][0][2]=0.0;
280  s_fit_param[0][1][0][3]=0.0;
281  //-par[1]
282  s_fit_param[0][1][1][0]=9.52747E1;
283  s_fit_param[0][1][1][1]=1.26319E1;
284  s_fit_param[0][1][1][2]=3.09643E-2;
285  s_fit_param[0][1][1][3]=0.0;
286  //-par[2]
287  s_fit_param[0][1][2][0]=1.71302E1;
288  s_fit_param[0][1][2][1]=3.00455E1;
289  s_fit_param[0][1][2][2]=7.49445E-2;
290  s_fit_param[0][1][2][3]=0.0;
291  //-par[3]
292  s_fit_param[0][1][3][0]=1.06137E2;
293  s_fit_param[0][1][3][1]=6.01548E1;
294  s_fit_param[0][1][3][2]=3.50867E-2;
295  s_fit_param[0][1][3][3]=0.0;
296  //-par[4]
297  s_fit_param[0][1][4][0]=4.26079E-1;
298  s_fit_param[0][1][4][1]=1.76978E-1;
299  s_fit_param[0][1][4][2]=1.43419;
300  s_fit_param[0][1][4][3]=0.0;
301  //-par[5]
302  s_fit_param[0][1][5][0]=0.0;
303  s_fit_param[0][1][5][1]=0.0;
304  s_fit_param[0][1][5][2]=0.0;
305  s_fit_param[0][1][5][3]=0.4;
306  //-----------------------------------------------------------------
307  // 3-prong hadronic tau
308  //-par[0]
309  s_fit_param[0][2][0][0]=-2.43533;
310  s_fit_param[0][2][0][1]=6.12947E-1;
311  s_fit_param[0][2][0][2]=0.0;
312  s_fit_param[0][2][0][3]=0.0;
313  //-par[1]
314  s_fit_param[0][2][1][0]=9.54202;
315  s_fit_param[0][2][1][1]=2.80011E-1;
316  s_fit_param[0][2][1][2]=2.49782E-1;
317  s_fit_param[0][2][1][3]=0.0;
318  //-par[2]
319  s_fit_param[0][2][2][0]=1.61325E1;
320  s_fit_param[0][2][2][1]=1.74892E1;
321  s_fit_param[0][2][2][2]=7.05797E-2;
322  s_fit_param[0][2][2][3]=0.0;
323  //-par[3]
324  s_fit_param[0][2][3][0]=1.17093E2;
325  s_fit_param[0][2][3][1]=4.70000E1;
326  s_fit_param[0][2][3][2]=3.87085E-2;
327  s_fit_param[0][2][3][3]=0.0;
328  //-par[4]
329  s_fit_param[0][2][4][0]=4.16557E-1;
330  s_fit_param[0][2][4][1]=1.58902E-1;
331  s_fit_param[0][2][4][2]=1.53516;
332  s_fit_param[0][2][4][3]=0.0;
333  //-par[5]
334  s_fit_param[0][2][5][0]=0.0;
335  s_fit_param[0][2][5][1]=0.0;
336  s_fit_param[0][2][5][2]=0.0;
337  s_fit_param[0][2][5][3]=0.95;
338 
339 
341  // [tau_type][parLG][par]
342  // leptonic tau
343  //-par[0]
344  s_fit_param[1][0][0][0]=-9.82013E-1;
345  s_fit_param[1][0][0][1]=9.09874E-1;
346  s_fit_param[1][0][0][2]=0.0;
347  s_fit_param[1][0][0][3]=0.0;
348  s_fit_param[1][0][0][4]=0.0;
349  //-par[1]
350  s_fit_param[1][0][1][0]=9.96303E1;
351  s_fit_param[1][0][1][1]=1.68873E1;
352  s_fit_param[1][0][1][2]=3.23798E-2;
353  s_fit_param[1][0][1][3]=0.0;
354  s_fit_param[1][0][1][4]=0.0;
355  //-par[2]
356  s_fit_param[1][0][2][0]=0.0;
357  s_fit_param[1][0][2][1]=0.0;
358  s_fit_param[1][0][2][2]=0.0;
359  s_fit_param[1][0][2][3]=0.3; // fit value is 2.8898E-1, I use 0.3
360  s_fit_param[1][0][2][4]=0.0;
361  //-par[3]
362  s_fit_param[1][0][3][0]=9.70055E1;
363  s_fit_param[1][0][3][1]=6.46175E1;
364  s_fit_param[1][0][3][2]=3.20679E-2;
365  s_fit_param[1][0][3][3]=0.0;
366  s_fit_param[1][0][3][4]=0.0;
367  //-par[4]
368  s_fit_param[1][0][4][0]=1.56865;
369  s_fit_param[1][0][4][1]=2.28336E-1;
370  s_fit_param[1][0][4][2]=1.09396E-1;
371  s_fit_param[1][0][4][3]=1.99975E-3;
372  s_fit_param[1][0][4][4]=0.0;
373  //-par[5]
374  s_fit_param[1][0][5][0]=0.0;
375  s_fit_param[1][0][5][1]=0.0;
376  s_fit_param[1][0][5][2]=0.0;
377  s_fit_param[1][0][5][3]=0.66;
378  s_fit_param[1][0][5][4]=0.0;
379  //-----------------------------------------------------------------
380  //-----------------------
381  // Only hadronic tau's were re-parametrized in MC12. The parameterization now
382  // goes to P(tau)=1 TeV.
383  //-----------------------------------------------------------------
384  // 1-prong hadronic tau
385  //---par[0]
386  s_fit_param[1][1][0][0]=0.7568;
387  s_fit_param[1][1][0][1]=-0.0001469;
388  s_fit_param[1][1][0][2]=5.413E-7;
389  s_fit_param[1][1][0][3]=-6.754E-10;
390  s_fit_param[1][1][0][4]=2.269E-13;
391  //---par[1]
392  s_fit_param[1][1][1][0]=-0.0288208;
393  s_fit_param[1][1][1][1]=0.134174;
394  s_fit_param[1][1][1][2]=-142.588;
395  s_fit_param[1][1][1][3]=-0.00035606;
396  s_fit_param[1][1][1][4]=-6.94567E-20;
397  //---par[2]
398  s_fit_param[1][1][2][0]=-0.00468927;
399  s_fit_param[1][1][2][1]=0.0378737;
400  s_fit_param[1][1][2][2]=-260.284;
401  s_fit_param[1][1][2][3]=0.00241158;
402  s_fit_param[1][1][2][4]=-6.01766E-7;
403  //---par[3]
404  s_fit_param[1][1][3][0]=-0.170424;
405  s_fit_param[1][1][3][1]=0.135764;
406  s_fit_param[1][1][3][2]=-50.2361;
407  s_fit_param[1][1][3][3]=0.00735544;
408  s_fit_param[1][1][3][4]=-7.34073E-6;
409  //---par[4]
410  s_fit_param[1][1][4][0]=-0.0081364;
411  s_fit_param[1][1][4][1]=0.0391428;
412  s_fit_param[1][1][4][2]=-141.936;
413  s_fit_param[1][1][4][3]=0.0035034;
414  s_fit_param[1][1][4][4]=-1.21956E-6;
415  //-par[5]
416  s_fit_param[1][1][5][0]=0.0;
417  s_fit_param[1][1][5][1]=0.0;
418  s_fit_param[1][1][5][2]=0.0;
419  s_fit_param[1][1][5][3]=0.624*0.00125; // multiplied by a bin size
420  s_fit_param[1][1][5][4]=0.0;
421  //-----------------------------------------------------------------
422  // 3-prong hadronic tau
423  //---par[0]
424  s_fit_param[1][2][0][0]=0.7562;
425  s_fit_param[1][2][0][1]=-1.168E-5;
426  s_fit_param[1][2][0][2]=0.0;
427  s_fit_param[1][2][0][3]=0.0;
428  s_fit_param[1][2][0][4]=0.0;
429  //---par[1]
430  s_fit_param[1][2][1][0]=-0.0420458;
431  s_fit_param[1][2][1][1]=0.15917;
432  s_fit_param[1][2][1][2]=-80.3259;
433  s_fit_param[1][2][1][3]=0.000125729;
434  s_fit_param[1][2][1][4]=-2.43945E-18;
435  //---par[2]
436  s_fit_param[1][2][2][0]=-0.0216898;
437  s_fit_param[1][2][2][1]=0.0243497;
438  s_fit_param[1][2][2][2]=-63.8273;
439  s_fit_param[1][2][2][3]=0.0148339;
440  s_fit_param[1][2][2][4]=-4.45351E-6;
441  //---par[3]
442  s_fit_param[1][2][3][0]=-0.0879411;
443  s_fit_param[1][2][3][1]=0.110092;
444  s_fit_param[1][2][3][2]=-75.4901;
445  s_fit_param[1][2][3][3]=0.0116915;
446  s_fit_param[1][2][3][4]=-1E-5;
447  //---par[4]
448  s_fit_param[1][2][4][0]=-0.0118324;
449  s_fit_param[1][2][4][1]=0.0280538;
450  s_fit_param[1][2][4][2]=-85.127;
451  s_fit_param[1][2][4][3]=0.00724948;
452  s_fit_param[1][2][4][4]=-2.38792E-6;
453  //-par[5]
454  s_fit_param[1][2][5][0]=0.0;
455  s_fit_param[1][2][5][1]=0.0;
456  s_fit_param[1][2][5][2]=0.0;
457  s_fit_param[1][2][5][3]=0.6167*0.00125; // multiplied by a bin size
458  s_fit_param[1][2][5][4]=0.0;
459 
460  // TER parameterization, for now based on p1130, to be checked and updated with new tag
461  // [tau_type][eta_bin][parameter]
462  // for 1-prongs
463  s_ter_sigma_par[0][0][0]=0.311717;
464  s_ter_sigma_par[0][0][1]=0.0221615;
465  s_ter_sigma_par[0][0][2]=0.859698;
466  s_ter_sigma_par[0][1][0]=0.290019;
467  s_ter_sigma_par[0][1][1]=0.0225794;
468  s_ter_sigma_par[0][1][2]=0.883407;
469  s_ter_sigma_par[0][2][0]=0.352312;
470  s_ter_sigma_par[0][2][1]=0.0196381;
471  s_ter_sigma_par[0][2][2]=0.629708;
472  s_ter_sigma_par[0][3][0]=0.342059;
473  s_ter_sigma_par[0][3][1]=0.0275107;
474  s_ter_sigma_par[0][3][2]=0.48065;
475  s_ter_sigma_par[0][4][0]=0.481564;
476  s_ter_sigma_par[0][4][1]=0.0197219;
477  s_ter_sigma_par[0][4][2]=0.0571714;
478  s_ter_sigma_par[0][5][0]=0.41264;
479  s_ter_sigma_par[0][5][1]=0.0233964;
480  s_ter_sigma_par[0][5][2]=0.515674;
481  s_ter_sigma_par[0][6][0]=0.20112;
482  s_ter_sigma_par[0][6][1]=0.0339914;
483  s_ter_sigma_par[0][6][2]=0.944524;
484  s_ter_sigma_par[0][7][0]=0.0892094;
485  s_ter_sigma_par[0][7][1]=0.0210225;
486  s_ter_sigma_par[0][7][2]=1.34014;
487  s_ter_sigma_par[0][8][0]=0.175554;
488  s_ter_sigma_par[0][8][1]=0.0210968;
489  s_ter_sigma_par[0][8][2]=0.813925;
490  s_ter_sigma_par[0][9][0]=0.0;
491  s_ter_sigma_par[0][9][1]=0.0340279;
492  s_ter_sigma_par[0][9][2]=1.30856;
493  // for 3-prongs
494  s_ter_sigma_par[1][0][0]=0.303356;
495  s_ter_sigma_par[1][0][1]=0.0299807;
496  s_ter_sigma_par[1][0][2]=1.25388;
497  s_ter_sigma_par[1][1][0]=0.358106;
498  s_ter_sigma_par[1][1][1]=0.0229604;
499  s_ter_sigma_par[1][1][2]=1.02222;
500  s_ter_sigma_par[1][2][0]=0.328643;
501  s_ter_sigma_par[1][2][1]=0.025684;
502  s_ter_sigma_par[1][2][2]=1.02594;
503  s_ter_sigma_par[1][3][0]=0.497332;
504  s_ter_sigma_par[1][3][1]=0.0215113;
505  s_ter_sigma_par[1][3][2]=0.30055;
506  s_ter_sigma_par[1][4][0]=0.4493;
507  s_ter_sigma_par[1][4][1]=0.0280311;
508  s_ter_sigma_par[1][4][2]=0.285793;
509  s_ter_sigma_par[1][5][0]=0.427811;
510  s_ter_sigma_par[1][5][1]=0.0316536;
511  s_ter_sigma_par[1][5][2]=0.457286;
512  s_ter_sigma_par[1][6][0]=0.165288;
513  s_ter_sigma_par[1][6][1]=0.0376361;
514  s_ter_sigma_par[1][6][2]=1.3913;
515  s_ter_sigma_par[1][7][0]=0.289798;
516  s_ter_sigma_par[1][7][1]=0.0140801;
517  s_ter_sigma_par[1][7][2]=0.83603;
518  s_ter_sigma_par[1][8][0]=0.186823;
519  s_ter_sigma_par[1][8][1]=0.0213053;
520  s_ter_sigma_par[1][8][2]=0.968934;
521  s_ter_sigma_par[1][9][0]=0.301673;
522  s_ter_sigma_par[1][9][1]=0.0145606;
523  s_ter_sigma_par[1][9][2]=0.514022;
524 
525 }
526 

◆ ~MissingMassProb()

MissingMassProb::~MissingMassProb ( )

Definition at line 529 of file MissingMassProb.cxx.

Member Function Documentation

◆ apply()

double MissingMassProb::apply ( MissingMassInput preparedInput,
const int &  tau_type1,
const int &  tau_type2,
const TLorentzVector &  tauvec1,
const TLorentzVector &  tauvec2,
const TLorentzVector  nuvec1,
const TLorentzVector &  nuvec2,
bool  constant = false,
bool  oneTau = false,
bool  twoTau = false 
)

Definition at line 532 of file MissingMassProb.cxx.

533  {
534  for (auto& f: m_probListConstant) {
535  prob*=f(preparedInput, tau_type1, tau_type2, tauvec1, tauvec2, nuvec1, nuvec2);
536  }
537  } else if (oneTau == true) {
538  for (auto& f: m_probListOneTau) {
539  prob*=f(preparedInput, tau_type1, tau_type2, tauvec1, tauvec2, nuvec1, nuvec2);
540  }
541  } else if (twoTau == true) {
542  for (auto& f: m_probListTwoTau) {
543  prob*=f(preparedInput, tau_type1, tau_type2, tauvec1, tauvec2, nuvec1, nuvec2);
544  }
545  }
546  return prob;
547 }
548 

◆ dTheta3d_probabilityFast()

double MissingMassProb::dTheta3d_probabilityFast ( MissingMassInput preparedInput,
const int &  tau_type,
const double &  dTheta3d,
const double &  P_tau 
)

Definition at line 1034 of file MissingMassProb.cxx.

1040  {
1041  Warning("DiTauMassTools", "---- WARNING in MissingMassCalculator::dTheta3d_probabilityFast() ----");
1042  Warning("DiTauMassTools", "%s", ("..... wrong tau_type="+std::to_string(tau_type)).c_str());
1043  Warning("DiTauMassTools", "%s", ("..... returning prob="+std::to_string(prob)).c_str());
1044  Warning("DiTauMassTools", "____________________________________________________________");
1045  return prob;
1046  }
1047 
1048 
1049  double myDelThetaParam[6];
1050 
1051  for (int i=0;i<6;++i)
1052  {
1057  myDelThetaParam[i]=dTheta3Dparam(i,tau_code,P_tau,s_fit_param[1][tau_code][i]);
1058  }
1059  double dTheta3dVal=dTheta3d;
1060 
1061  if (tau_type==8) prob=myDelThetaLepFunc(&dTheta3dVal, myDelThetaParam);
1062  else prob=myDelThetaHadFunc(&dTheta3dVal, myDelThetaParam);
1063 
1064  if (false)
1065  {
1066 
1067  if( preparedInput.m_fUseVerbose==1 && (prob>1.0 || prob<0.0))
1068  {
1069  Warning("DiTauMassTools", "---- WARNING in MissingMassCalculator::dTheta3d_probabilityFast() ----");
1070  Warning("DiTauMassTools", "%s", ("..... wrong probability="+std::to_string(prob)).c_str());
1071  Warning("DiTauMassTools", "%s", ("..... debugging: tau_type="+std::to_string(tau_type)+"dTheta3d="+std::to_string(dTheta3d)+" P_tau="+std::to_string(P_tau)).c_str());
1072  Warning("DiTauMassTools", "____________________________________________________________");
1073  prob=1.0E-10;
1074  }
1075  }
1076 
1077  return prob;
1078 }
1079 

◆ dTheta3d_probabilityFastWrapper()

double MissingMassProb::dTheta3d_probabilityFastWrapper ( MissingMassProb prob,
MissingMassInput preparedInput,
const int &  tau_type1,
const int &  tau_type2,
const TLorentzVector &  tauvec1,
const TLorentzVector &  tauvec2,
const TLorentzVector  nuvec1,
const TLorentzVector &  nuvec2 
)
static

Definition at line 41 of file MissingMassProb.cxx.

41  {
42  double Prob = 1.;
43  if (tau_type1>=0) {
44  TLorentzVector totalTau1;
45  totalTau1+=tauvec1;
46  totalTau1+=nuvec1;
47  const double tau1_tmpp = totalTau1.P();
48  const double angle1 = Angle(nuvec1,tauvec1);
49  Prob*=prob->dTheta3d_probabilityFast(preparedInput, tau_type1, angle1, tau1_tmpp);
50  }
51  if (tau_type2>=0) {
52  TLorentzVector totalTau2;
53  totalTau2+=tauvec2;
54  totalTau2+=nuvec2;
55  const double tau2_tmpp = totalTau2.P();
56  const double angle2 = Angle(nuvec2,tauvec2);
57  Prob*=prob->dTheta3d_probabilityFast(preparedInput, tau_type2, angle2, tau2_tmpp);
58  }
59  return Prob;
60 }

◆ dTheta3d_probabilityNewWrapper()

double MissingMassProb::dTheta3d_probabilityNewWrapper ( MissingMassProb prob,
MissingMassInput preparedInput,
const int &  tau_type1,
const int &  tau_type2,
const TLorentzVector &  tauvec1,
const TLorentzVector &  tauvec2,
const TLorentzVector  nuvec1,
const TLorentzVector &  nuvec2 
)
static

Definition at line 86 of file MissingMassProb.cxx.

86  {
87  ignore(preparedInput);
88  double Prob = 1.;
89  if (tau_type1>=0) {
90  TLorentzVector totalTau1;
91  totalTau1+=tauvec1;
92  totalTau1+=nuvec1;
93  const double angle1 = Angle(nuvec1,tauvec1);
94  double prob_tmp = 1e-10;
95  if (angle1!=0.) prob_tmp=prob->GetFormulaAngle1()->Eval(angle1);
96  if (prob_tmp<=0.) prob_tmp=1e-10;
97  Prob*=prob_tmp;
98  }
99  if (tau_type2>=0) {
100  TLorentzVector totalTau2;
101  totalTau2+=tauvec2;
102  totalTau2+=nuvec2;
103  const double angle2 = Angle(nuvec2,tauvec2);
104  double prob_tmp = 1e-10;
105  if (angle2!=0.) prob_tmp=prob->GetFormulaAngle2()->Eval(angle2);
106  if (prob_tmp<=0.) prob_tmp=1e-10;
107  Prob*=prob_tmp;
108  }
109  // very rare cases where parametrisation flips
110  if (std::isnan(Prob)) Prob = 0.;
111  return Prob;
112 }

◆ dTheta3Dparam()

double MissingMassProb::dTheta3Dparam ( const int &  parInd,
const int &  tau_type,
const double &  P_tau,
const double *  par 
)

Definition at line 1132 of file MissingMassProb.cxx.

1136  {
1141  return (par[0]+par[1]*P_tau+par[2]*pow(P_tau,2)+par[3]*pow(P_tau,3)+par[4]*pow(P_tau,4))*0.00125;
1142  }
1143  }
1144  else { // parInd==0
1149  if(tau_type==0) return par[0]*(exp(-par[1]*P_tau)+par[2]/P_tau)+par[3]+par[4]*P_tau;
1150  else return par[0]*(exp(-par[1]*sqrt(P_tau))+par[2]/P_tau)+par[3]+par[4]*P_tau;
1151  }
1152  }
1153  return 0.;
1154 }
1155 

◆ GetAllowUseHT()

bool DiTauMassTools::MissingMassProb::GetAllowUseHT ( )
inline

Definition at line 45 of file MissingMassProb.h.

45 { return m_allowUseHT;}

◆ GetFormulaAngle1()

TF1* DiTauMassTools::MissingMassProb::GetFormulaAngle1 ( )
inline

Definition at line 38 of file MissingMassProb.h.

38 {return m_formulaAngle1;}

◆ GetFormulaAngle2()

TF1* DiTauMassTools::MissingMassProb::GetFormulaAngle2 ( )
inline

Definition at line 39 of file MissingMassProb.h.

39 {return m_formulaAngle2;}

◆ GetFormulaNuMass()

TF1* DiTauMassTools::MissingMassProb::GetFormulaNuMass ( )
inline

Definition at line 42 of file MissingMassProb.h.

42 {return m_formulaNuMass;}

◆ GetFormulaRatio1()

TF1* DiTauMassTools::MissingMassProb::GetFormulaRatio1 ( )
inline

Definition at line 40 of file MissingMassProb.h.

40 {return m_formulaRatio1;}

◆ GetFormulaRatio2()

TF1* DiTauMassTools::MissingMassProb::GetFormulaRatio2 ( )
inline

Definition at line 41 of file MissingMassProb.h.

41 {return m_formulaRatio2;}

◆ GetUseDphiLL()

bool DiTauMassTools::MissingMassProb::GetUseDphiLL ( )
inline

Definition at line 57 of file MissingMassProb.h.

57 { return m_fUseDphiLL; }

◆ GetUseHT()

bool DiTauMassTools::MissingMassProb::GetUseHT ( )
inline

Definition at line 48 of file MissingMassProb.h.

48 { return m_UseHT; } // if use HT

◆ GetUseMnuProbability()

bool DiTauMassTools::MissingMassProb::GetUseMnuProbability ( )
inline

Definition at line 54 of file MissingMassProb.h.

54 { return m_fUseMnuProbability; }

◆ GetUseTauProbability()

bool DiTauMassTools::MissingMassProb::GetUseTauProbability ( )
inline

Definition at line 51 of file MissingMassProb.h.

51 { return m_fUseTauProbability; }

◆ MET()

void MissingMassProb::MET ( MissingMassInput preparedInput)

Definition at line 1247 of file MissingMassProb.cxx.

1249  {
1251  {
1252  if(preparedInput.m_fUseVerbose==1) { Info("DiTauMassTools", "Attempting to set LFV MMC settings"); }
1253  double mT1 = mT(preparedInput.m_vistau1,preparedInput.m_MetVec);
1254  double mT2 = mT(preparedInput.m_vistau2,preparedInput.m_MetVec);
1255  int sr_switch = 0;
1256  if(preparedInput.m_vistau1.M()<0.12 && preparedInput.m_vistau2.M()<0.12) // lep-lep case
1257  {
1258  if(preparedInput.m_LFVmode==0) // e+tau(->mu) case
1259  {
1260  if(preparedInput.m_vistau1.M()<0.05 && preparedInput.m_vistau2.M()>0.05)
1261  {
1262  if(mT1>mT2) sr_switch = 0; // SR1
1263  else sr_switch = 1; // SR2
1264  }
1265  else
1266  {
1267  if(mT1>mT2) sr_switch = 1; // SR2
1268  else sr_switch = 0; // SR1
1269  }
1270  }
1271  if(preparedInput.m_LFVmode==1) // mu+tau(->e) case
1272  {
1273  if(preparedInput.m_vistau1.M()>0.05 && preparedInput.m_vistau2.M()<0.05)
1274  {
1275  if(mT1>mT2) sr_switch = 0; // SR1
1276  else sr_switch = 1; // SR2
1277  }
1278  else
1279  {
1280  if(mT1>mT2) sr_switch = 1; // SR2
1281  else sr_switch = 0; // SR1
1282  }
1283  }
1284  }
1285  if((preparedInput.m_vistau1.M()<0.12 && preparedInput.m_vistau2.M()>0.12) || (preparedInput.m_vistau2.M()<0.12 && preparedInput.m_vistau1.M()>0.12)) // lep-had case
1286  {
1287  if(preparedInput.m_vistau1.M()<0.12 && preparedInput.m_vistau2.M()>0.12)
1288  {
1289  if(mT1>mT2) sr_switch = 0; // SR1
1290  else sr_switch = 1; // SR2
1291  }
1292  else
1293  {
1294  if(mT1>mT2) sr_switch = 1; // SR2
1295  else sr_switch = 0; // SR1
1296  }
1297  }
1298 
1299  m_UseHT = false;
1300  if(preparedInput.m_Njet25==0) // 0-jet
1301  {
1302  double sigmaSyst = 0.10; // 10% systematics for now (be conservative)
1303  double METresScale;
1304  double METoffset;
1305  if(sr_switch==0)
1306  {
1307  METresScale = 0.41*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1308  METoffset = 7.36*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1309  }
1310  else
1311  {
1312  METresScale = 0.34*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1313  METoffset = 6.61*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1314  }
1315  if(preparedInput.m_fUseVerbose==1) {
1316  Info("DiTauMassTools", "%s", ("SumEt = "+std::to_string(preparedInput.m_SumEt)).c_str());
1317  Info("DiTauMassTools", "%s", ("METoffset = "+std::to_string(METoffset)).c_str());
1318  Info("DiTauMassTools", "%s", ("METresScale = "+std::to_string(METresScale)).c_str());
1319  }
1320 
1321  double sigma = preparedInput.m_SumEt>0.0 ? METoffset+METresScale*sqrt(preparedInput.m_SumEt) : METoffset;
1322  preparedInput.m_METsigmaP = sigma;
1323  preparedInput.m_METsigmaL = sigma;
1324  if(preparedInput.m_fUseVerbose==1) {
1325  Info("DiTauMassTools", "%s", ("=> METsigmaP = "+std::to_string(preparedInput.m_METsigmaP)).c_str());
1326  Info("DiTauMassTools", "%s", ("=> METsigmaL = "+std::to_string(preparedInput.m_METsigmaL)).c_str());
1327  }
1328  }
1329  if(preparedInput.m_Njet25>0) // Inclusive 1-jet
1330  {
1331  double sigmaSyst = 0.10; // 10% systematics for now (be conservative)
1332  double sigma = 0.;
1333  double METresScale;
1334  double METoffset;
1335  if(sr_switch==0)
1336  {
1337  METresScale = 0.38*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1338  METoffset = 7.96*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1339  }
1340  else
1341  {
1342  METresScale = 0.39*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1343  METoffset = 6.61*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1344  }
1345 
1346  // MET resolution can't be perfect in presence of other objects (i.e., electrons, jets, taus), so assume minSumEt = 5.0 for now
1347  sigma = preparedInput.m_SumEt>0.0 ? METoffset+METresScale*sqrt(preparedInput.m_SumEt) : METoffset;
1348  preparedInput.m_METsigmaP = sigma;
1349  preparedInput.m_METsigmaL = sigma;
1350  } // Njet25>0
1351  }
1352  else //LFV
1353  {
1354  //DRDRMERGE end addition
1355 
1356  if(preparedInput.m_METScanScheme==1) // default for Winter 2012 and further
1357  {
1358  //LEP-HAD
1359  if ( preparedInput.m_tauTypes==TauTypes::lh ) // lephad case
1360  {
1361  //0-jet
1362  if(preparedInput.m_Njet25==0)//0-jet
1363  {
1364  // placeholder for 2019 tune
1367  if(preparedInput.m_MetVec.Mod()<20.0) // 0-jet low MET case
1368  {
1369  if(std::abs(preparedInput.m_DelPhiTT)>2.95 && m_allowUseHT) // use mHt only if dPhi(lep-tau)>2.95
1370  {
1371  m_UseHT = true;
1372  // giving priority to external settings
1373  if(preparedInput.m_MHtSigma1<0.0) preparedInput.m_MHtSigma1 = 4.822;
1374  if(preparedInput.m_MHtSigma2<0.0) preparedInput.m_MHtSigma2 = 10.31;
1375  if(preparedInput.m_MHtGaussFr<0.0) preparedInput.m_MHtGaussFr = 6.34E-5;
1376  }
1377  else
1378  {
1379  m_UseHT = false;
1380  double sigmaSyst = 0.10; // 10% systematics for now (be conservative)
1381  double METresScale = 0.32*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1382  double METoffset = 5.38*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1383  double sigma = preparedInput.m_SumEt>0.0 ? METoffset+METresScale*sqrt(preparedInput.m_SumEt) : METoffset;
1384  preparedInput.m_METsigmaP = sigma;
1385  preparedInput.m_METsigmaL = sigma;
1386  }
1387  }
1388  else // 0-jet high MET case
1389  {
1390  if(std::abs(preparedInput.m_DelPhiTT)>2.8 && m_allowUseHT) // use mHt only if dPhi(lep-tau)>2.8
1391  {
1392  m_UseHT = true;
1393  // giving priority to external settings
1394  if(preparedInput.m_MHtSigma1<0.0) preparedInput.m_MHtSigma1 = 7.5;
1395  if(preparedInput.m_MHtSigma2<0.0) preparedInput.m_MHtSigma2 = 13.51;
1396  if(preparedInput.m_MHtGaussFr<0.0) preparedInput.m_MHtGaussFr = 6.81E-4;
1397  preparedInput.m_METsigmaP = preparedInput.m_MHtSigma2; // sigma of 2nd Gaussian for missing Ht resolution
1398  preparedInput.m_METsigmaL = preparedInput.m_MHtSigma2;
1399  }
1400  else
1401  {
1402  m_UseHT = false;
1403  double sigmaSyst = 0.10; // 10% systematics for now (be conservative)
1404  double METresScale = 0.87*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1405  double METoffset = 4.16*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1406  double sigma = preparedInput.m_SumEt>0.0 ? METoffset+METresScale*sqrt(preparedInput.m_SumEt) : METoffset;
1407  preparedInput.m_METsigmaP = sigma;
1408  preparedInput.m_METsigmaL = sigma;
1409  }
1410  } // high MET
1411  } // MMC2016MC15C or MMC2019
1412  // 2015 high-mass tune; avergare MET resolution for Mh=600,1000 mass points
1414  {
1415  m_UseHT = false;
1416  double sigmaSyst = 0.10; // 10% systematics for now (be conservative)
1417  double METresScale = 0.65*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1418  double METoffset = 5.0*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1419  double sigma = preparedInput.m_SumEt>0.0 ? METoffset+METresScale*sqrt(preparedInput.m_SumEt) : METoffset;
1420  preparedInput.m_METsigmaP = sigma;
1421  preparedInput.m_METsigmaL = sigma;
1422  } // MMC2015HIGHMASS
1423  } // 0 jet
1424  //1-jet
1425  else if(preparedInput.m_Njet25>0) // Inclusive 1-jet and VBF lep-had categories for Winter 2012
1426  {
1427  double sigmaSyst=0.10; // 10% systematics for now (be conservative)
1428  double sigma=0.;
1429  // 2015 high-mass tune; average MET resolution for Mh=400,600 mass points (they look consistent);
1431  {
1432  double METresScale=0.86*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1433  double METoffset=3.0*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1434  // MET resolution can't be perfect in presence of other objects (i.e., electrons, jets, taus), so assume minSumEt=5.0 for now
1435  sigma= preparedInput.m_SumEt>0.0 ? METoffset+METresScale*sqrt(preparedInput.m_SumEt) : METoffset;
1436  }
1437  //2016 mc15c or 2019
1440  {
1441  double x = preparedInput.m_DelPhiTT;
1442  double dphi_scale = x > 0.3 ? 0.9429 - 0.059*x + 0.054*x*x : 0.728;
1443  double METoffset = 1.875*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1444  double METresScale1 = 8.914*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1445  double METresScale2 = -8.53*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1446 
1447 
1448  sigma = preparedInput.m_SumEt > 80.0 ? METoffset + METresScale1*TMath::Log(sqrt(preparedInput.m_SumEt)+METresScale2) : 5.0;
1449  sigma = sigma * dphi_scale;
1450  }
1451  //
1452 
1453  preparedInput.m_METsigmaP=sigma;
1454  preparedInput.m_METsigmaL=sigma;
1455  } // Njet25>0
1456 
1457  } // lep-had
1458 
1459  //HAD-HAD
1460  else if(preparedInput.m_tauTypes==TauTypes::hh) // had-had events
1461  {
1462  if(preparedInput.m_Njet25==0 && m_mmcCalibrationSet==MMCCalibrationSetV2::MMC2015HIGHMASS) //0-jet high mass hadhad
1463  {
1464  // 2015 high-mass tune; average of all mass points
1465  // double METresScale=-1.;
1466  // double METoffset=-1.;
1467  double sigmaSyst=0.10; // 10% systematics for now (be conservative)
1468 
1469  double METresScale=0.9*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1470  double METoffset=-1.8*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1471  double sigma= preparedInput.m_SumEt>0.0 ? METoffset+METresScale*sqrt(preparedInput.m_SumEt) : std::abs(METoffset);
1472  preparedInput.m_METsigmaP=sigma;
1473  preparedInput.m_METsigmaL=sigma;
1474 
1475  }
1476  else if(preparedInput.m_Njet25==0 &&
1479  {
1480  double sigmaSyst=0.10; // 10% systematics for now (be conservative)
1481  double x = preparedInput.m_DelPhiTT;
1482  double dphi_scale = x > 2.5 ? 11.0796 - 4.61236*x + 0.423617*x*x : 2.;
1483  double METoffset = -8.51013*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1484  double METresScale1 = 8.54378*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1485  double METresScale2 = -3.97146*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1486  double sigma= preparedInput.m_SumEt>80.0 ? METoffset+METresScale1*TMath::Log(sqrt(preparedInput.m_SumEt)+METresScale2) : 5.;
1487  sigma = sigma*dphi_scale;
1488 
1489  preparedInput.m_METsigmaP=sigma;
1490  preparedInput.m_METsigmaL=sigma;
1491 
1492  }
1493  else if(preparedInput.m_Njet25==0 && m_allowUseHT) // 0-jet high MET had-had category for Winter 2012
1494  {
1495 
1496  m_UseHT=true; // uncomment this line to enable HT also for HH (crucial)
1497  // updated for final cuts, may 21 2012
1498  if(preparedInput.m_MHtSigma1<0.0) preparedInput.m_MHtSigma1=5.972;
1499  if(preparedInput.m_MHtSigma2<0.0) preparedInput.m_MHtSigma2=13.85;
1500  // if(MHtGaussFr<0.0) MHtGaussFr=0.4767; // don't directly use 2nd fraction
1501  }
1502  //1-jet
1503  else // Inclusive 1-jet and VBF categories
1504  {
1505  double METresScale=-1.;
1506  double METoffset=-1.;
1507  double sigmaSyst=0.10; // 10% systematics for now (be conservative)
1508 
1509  // previous value in trunk
1511  // 2015 high-mass tune; average of all mass points
1512  METresScale = 1.1*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1513  METoffset = -5.0*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1514  }
1515  // MET resolution can't be perfect in presence of other objects (i.e., electrons, jets, taus), so assume minSumEt=5.0 for now
1516  double sigma = preparedInput.m_SumEt>0.0 ? METoffset+METresScale*sqrt(preparedInput.m_SumEt) : std::abs(METoffset);
1517 
1520  double x = preparedInput.m_DelPhiTT;
1521  double dphi_scale = x > 0.6 ? 1.42047 - 0.666644*x + 0.199986*x*x : 1.02;
1522  METoffset = 1.19769*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1523  double METresScale1 = 5.61687*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1524  double METresScale2 = -4.2076*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1525  sigma= preparedInput.m_SumEt>115.0 ? METoffset+METresScale1*TMath::Log(sqrt(preparedInput.m_SumEt)+METresScale2) : 12.1;
1526  sigma = sigma*dphi_scale;
1527  } //for hh 2016 mc15c
1528 
1529  preparedInput.m_METsigmaP = sigma;
1530  preparedInput.m_METsigmaL = sigma;
1531 
1532  }// 1 jet
1533  } // had-had
1534  //LEP-LEP
1535  else if(preparedInput.m_tauTypes==TauTypes::ll) // setup for LEP-LEP channel
1536  {
1537  if(m_mmcCalibrationSet==MMCCalibrationSetV2::MMC2015HIGHMASS) // placeholder for 2015 high-mass tune; for now it is the same as 2012
1538  {
1539  m_UseHT = false;
1540  double sigmaSyst = 0.10; // 10% systematics for now (be conservative)
1541  double METresScale = -1.0;
1542  double METoffset = -1.0;
1543  double sigma = 5.0;
1544  // tune is based on cuts for Run-1 paper analysis
1545  if(preparedInput.m_Njet25==0)
1546  {
1547  // use tune for emebedding
1548  METresScale=-0.4307*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1549  METoffset=7.06*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1550  double METresScale2=0.07693*(1.0+preparedInput.m_METresSyst*sigmaSyst); // quadratic term
1551  // this is a tune for Higgs125
1552  // METresScale=-0.5355*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1553  // METoffset=11.5*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1554  // double METresScale2=0.07196*(1.0+preparedInput.m_METresSyst*sigmaSyst); // quadratic term
1555  sigma= preparedInput.m_SumEt>0.0 ? METoffset+METresScale*sqrt(preparedInput.m_SumEt)+METresScale2*preparedInput.m_SumEt : METoffset;
1556  }
1557  if(preparedInput.m_Njet25>0)
1558  {
1559  // use tune for embedding
1560  METresScale=0.8149*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1561  METoffset=5.343*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1562  // this is a tune for Higgs125
1563  // METresScale=0.599*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1564  // METoffset=8.223*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1565  sigma= preparedInput.m_SumEt>0.0 ? METoffset+METresScale*sqrt(preparedInput.m_SumEt) : METoffset;
1566  }
1567  preparedInput.m_METsigmaP = sigma;
1568  preparedInput.m_METsigmaL = sigma;
1569  } // end of MMC2015HIGHMASS
1570 
1573  // 2016 MC15c + 2019 leplep
1574  {
1575  m_UseHT=false;
1576  double sigmaSyst=0.10; // 10% systematics for now (be conservative)
1577  double METresScale=-1.0;
1578  double METoffset=-1.0;
1579  double sigma=5.0;
1580  double min_sigma = 2.0;
1581  // tune is based on cuts for Run-1 paper analysis
1582  if(preparedInput.m_Njet25==0)
1583  {
1584  // Madgraph Ztautau MET param
1585  METoffset = 4.22581*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1586  METresScale = 0.03818*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1587  double METresScale2= 0.12623;
1588  sigma= preparedInput.m_SumEt>0.0 ? METoffset+METresScale*sqrt(preparedInput.m_SumEt)+METresScale2*preparedInput.m_SumEt : min_sigma;
1589  if (m_fUseDphiLL) {
1590  double p0 = 2.60131;
1591  double p1const = 1.22427;
1592  double p2quad = -1.71261;
1593  double DphiLL = std::abs(TVector2::Phi_mpi_pi(preparedInput.m_vistau1.Phi()-preparedInput.m_vistau2.Phi()));
1594  sigma *= (DphiLL < p0) ? p1const : p1const+
1595  p2quad*p0*p0 - 2*p2quad*p0*DphiLL+p2quad*DphiLL*DphiLL;
1596  }
1597  if (sigma < min_sigma) sigma = min_sigma;
1598  }
1599  if(preparedInput.m_Njet25>0)
1600  {
1601  // Madgraph Ztautau MET param
1602  METoffset = 5.42506*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1603  METresScale = 5.36760*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1604  double METoffset2 = -4.86808*(1.0+preparedInput.m_METresSyst*sigmaSyst);
1605  if (preparedInput.m_SumEt > 0.0) {
1606  double x = sqrt(preparedInput.m_SumEt);
1607  sigma = (x+METoffset2 > 1) ? METoffset+METresScale*log(x+METoffset2) : METoffset;
1608  } else {
1609  sigma = METoffset;
1610  }
1611  if (m_fUseDphiLL) {
1612  double p0 = 2.24786;
1613  double p1const = 0.908597;
1614  double p2quad = 0.544577;
1615  double DphiLL = std::abs(TVector2::Phi_mpi_pi(preparedInput.m_vistau1.Phi()-preparedInput.m_vistau2.Phi()));
1616  sigma *= (DphiLL < p0) ? p1const : p1const+
1617  p2quad*p0*p0 - 2*p2quad*p0*DphiLL+p2quad*DphiLL*DphiLL;
1618  }
1619  if (sigma < min_sigma) sigma = min_sigma;
1620  }
1621  preparedInput.m_METsigmaP=sigma;
1622  preparedInput.m_METsigmaL=sigma;
1623  }//2016 mc15c
1624 
1625  } // lep-lep
1626 
1627  } //preparedInput.METScanScheme
1628 
1629  if(preparedInput.m_METScanScheme==0) // old scheme with JER
1630  {
1631  if(preparedInput.m_dataType==0 || preparedInput.m_dataType==1) preparedInput.SetMetScanParamsUE(preparedInput.m_SumEt,preparedInput.m_METcovphi,preparedInput.m_dataType);
1632  else preparedInput.SetMetScanParamsUE(preparedInput.m_SumEt,preparedInput.m_METcovphi,0);
1633  }
1634  }
1635  } // end else LFV
1636 
1637  return;
1638 }

◆ mEtAndTauProbability()

double MissingMassProb::mEtAndTauProbability ( MissingMassInput preparedInput)

Definition at line 572 of file MissingMassProb.cxx.

572 {
573  double proba=1.;
574  double metprob;
575 
576  // deltaMEt is the difference between the neutrino sum and the MEt (or -HT if useHT),
577  //corrected possibly from tau E scanning
578 
579  double deltaMetX=preparedInput.m_metVec.X()-preparedInput.m_inputMEtX;
580  double deltaMetY=preparedInput.m_metVec.Y()-preparedInput.m_inputMEtY;
581 
582  // possibly correct for subtract tau scanning here
583  // const double met_smearL=(deltaMetVec.X()*m_metCovPhiCos+deltaMetVec.Y()*m_metCovPhiSin;
584  // const double met_smearP=-deltaMetVec.X()*m_metCovPhiSin+deltaMetVec.Y()*m_metCovPhiCos;
585 
586  // rotate into error ellipse axis
587  const double met_smearL=deltaMetX*cos(preparedInput.m_METcovphi)+deltaMetY*sin(preparedInput.m_METcovphi);
588  const double met_smearP=-deltaMetX*sin(preparedInput.m_METcovphi)+deltaMetY*cos(preparedInput.m_METcovphi);
589 
590 
591  if (m_UseHT)
592  {
593  if ( preparedInput.m_tauTypes==TauTypes::hh ) {
594 
595  metprob=MHtProbabilityHH(preparedInput, met_smearL,met_smearP,preparedInput.m_inputMEtT,preparedInput.m_MEtT,preparedInput.m_htOffset); // for had-had
596  }
597  else {
598  metprob=MHtProbability(preparedInput, met_smearL,met_smearP,preparedInput.m_inputMEtT,preparedInput.m_MEtT,preparedInput.m_htOffset); // for lep-had Winter 2012 analysis
599  }
600  }
601  else {
602  metprob=MetProbability(preparedInput, met_smearL,met_smearP,preparedInput.m_METsigmaL,preparedInput.m_METsigmaP);
603  }
604 
605  proba=metprob;
606 
607  return proba;
608 }
609 

◆ mEtAndTauProbabilityWrapper()

double MissingMassProb::mEtAndTauProbabilityWrapper ( MissingMassProb prob,
MissingMassInput preparedInput,
const int &  tau_type1,
const int &  tau_type2,
const TLorentzVector &  tauvec1,
const TLorentzVector &  tauvec2,
const TLorentzVector  nuvec1,
const TLorentzVector &  nuvec2 
)
static

Definition at line 31 of file MissingMassProb.cxx.

31  {
32  ignore(tau_type1);
33  ignore(tau_type2);
34  ignore(tauvec1);
35  ignore(tauvec2);
36  ignore(nuvec1);
37  ignore(nuvec2);
38  return prob->mEtAndTauProbability(preparedInput);
39 }

◆ MetProbability()

double MissingMassProb::MetProbability ( MissingMassInput preparedInput,
const double &  met1,
const double &  met2,
const double &  MetSigma1,
const double &  MetSigma2 
)

Definition at line 551 of file MissingMassProb.cxx.

555  {
556  //SpeedUp
557  metprob=exp(-0.5*(met1*met1/(MetSigma1*MetSigma1)+met2*met2/(MetSigma2*MetSigma2)))/(MetSigma1*MetSigma2*2*TMath::Pi());
558  }
559  else
560  {
561  if(preparedInput.m_fUseVerbose==1) Warning("DiTauMassTools", "MissingMassCalculator::MetProbability: either MetSigma1 or MetSigma2 are <1 GeV--- too low, returning prob=1");
562  metprob=1.;
563  }
564 
565 
566  return metprob;
567 
568 
569 }
570 

◆ MetProbabilityWrapper()

double MissingMassProb::MetProbabilityWrapper ( MissingMassProb prob,
MissingMassInput preparedInput,
const int &  tau_type1,
const int &  tau_type2,
const TLorentzVector &  tauvec1,
const TLorentzVector &  tauvec2,
const TLorentzVector  nuvec1,
const TLorentzVector &  nuvec2 
)
static

Definition at line 21 of file MissingMassProb.cxx.

21  {
22  ignore(tau_type1);
23  ignore(tau_type2);
24  ignore(tauvec1);
25  ignore(tauvec2);
26  ignore(nuvec1);
27  ignore(nuvec2);
28  return prob->MetProbability(preparedInput, 1.,1.,1.,1.);
29 }

◆ MHtProbability()

double MissingMassProb::MHtProbability ( MissingMassInput preparedInput,
const double &  d_mhtX,
const double &  d_mhtY,
const double &  mht,
const double &  trueMetGuess,
const double &  mht_offset 
)

Definition at line 995 of file MissingMassProb.cxx.

995  {
996  // all param except trueMetguess unchanged in one event. So can cache agaisnt this one.
997  //disable cache if (trueMetGuess==trueMetGuesscache) return mhtprobcache;
998  double mhtprob;
999  // if(MHtSigma1>0.0 && MHtSigma2>0.0 && MHtGaussFr>0.0)
1000 
1001  // if RANDOMNONUNIF MET already follow the double gaussian parameterisation. So weight should not include it to avoid double counting
1002  // formula to be checked IMHO the two gaussian should be correlated
1003  mhtprob=exp(-0.5*pow(d_mhtX/preparedInput.m_MHtSigma1,2))+preparedInput.m_MHtGaussFr*exp(-0.5*pow(d_mhtX/preparedInput.m_MHtSigma2,2));
1004  mhtprob*=(exp(-0.5*pow(d_mhtY/preparedInput.m_MHtSigma1,2))+preparedInput.m_MHtGaussFr*exp(-0.5*pow(d_mhtY/preparedInput.m_MHtSigma2,2)));
1005 
1006  const double n_arg=(mht-trueMetGuess-mht_offset)/preparedInput.m_MHtSigma1;
1007  mhtprob*=exp(-0.25*pow(n_arg,2)); // assuming sqrt(2)*sigma
1008  return mhtprob;
1009 }
1010 

◆ MHtProbabilityHH()

double MissingMassProb::MHtProbabilityHH ( MissingMassInput preparedInput,
const double &  d_mhtX,
const double &  d_mhtY,
const double &  mht,
const double &  trueMetGuess,
const double &  mht_offset 
)

Definition at line 1012 of file MissingMassProb.cxx.

1012  {
1013  double prob=1.0;
1014 
1015  // updated for final cuts, May 21 2012
1016  // should be merged
1017  prob=prob*(0.0256*TMath::Gaus(d_mhtX,0.0,preparedInput.m_MHtSigma1)+0.01754*TMath::Gaus(d_mhtX,0.0,preparedInput.m_MHtSigma2));
1018  prob=prob*(0.0256*TMath::Gaus(d_mhtY,0.0,preparedInput.m_MHtSigma1)+0.01754*TMath::Gaus(d_mhtY,0.0,preparedInput.m_MHtSigma2));
1019  const double n_arg=(mht-trueMetGuess-mht_offset)/5.7; // this sigma is different from MHtSigma1; actually it depends on dPhi
1020  prob=prob*exp(-0.5*pow(n_arg,2))/(5.7*sqrt(2.0*TMath::Pi())); // assuming sigma from above line
1021 
1022  return prob;
1023 }
1024 

◆ MnuProbability() [1/2]

double MissingMassProb::MnuProbability ( MissingMassInput preparedInput,
double  mnu 
)

Definition at line 968 of file MissingMassProb.cxx.

968 {
969  if(m_fUseMnuProbability==0) return 1.0;
970  double prob=1.0;
971  const double norm=4851900.0;
972  double p[7];
973  p[0]=-288.6; p[1]=6.217E4; p[2]=2.122E4; p[3]=-9.067E4;
974  p[4]=1.433E5; p[5]=-1.229E5; p[6]=3.434E4;
975  double int1=0.0;
976  for(int i=0; i<7; i++)
977  {
978  int1+=p[i]*pow(mnu,i);
979  }
980  prob=int1/norm;
981  if(prob<0.0)
982  {
983  if(preparedInput.m_fUseVerbose==1) Warning("DiTauMassTools", "Warning in MissingMassCalculator::MnuProbability: negative probability!!! ");
984  return 0.0;
985  }
986  if(prob>1.0)
987  {
988  if(preparedInput.m_fUseVerbose==1) Warning("DiTauMassTools", "Warning in MissingMassCalculator::MnuProbability: probability > 1!!! ");
989  return 1.0;
990  }
991  return prob;
992 }
993 

◆ MnuProbability() [2/2]

double MissingMassProb::MnuProbability ( MissingMassInput preparedInput,
double  mnu,
double  binsize 
)

Definition at line 937 of file MissingMassProb.cxx.

937 {
938  double prob=1.0;
939  double norm=4851900.0;
940  double p[7];
941  p[0]=-288.6/norm; p[1]=6.217E4/(2.0*norm); p[2]=2.122E4/(3.0*norm); p[3]=-9.067E4/(4.0*norm);
942  p[4]=1.433E5/(5.0*norm); p[5]=-1.229E5/(6.0*norm); p[6]=3.434E4/(7.0*norm);
943  double int1=0.0;
944  double int2=0.0;
945  double x1= mnu+0.5*binsize < 1.777-0.113 ? mnu+0.5*binsize : 1.777-0.113;
946  double x2= mnu-0.5*binsize > 0.0 ? mnu-0.5*binsize : 0.0;
947  for(int i=0; i<7; i++)
948  {
949  int1=p[i]*pow(x1,i+1)+int1;
950  int2=p[i]*pow(x2,i+1)+int2;
951  }
952  prob=int1-int2;
953  if(prob<0.0)
954  {
955  if(preparedInput.m_fUseVerbose==1) Warning("DiTauMassTools", "Warning in MissingMassCalculator::MnuProbability: negative probability!!! ");
956  return 0.0;
957  }
958  if(prob>1.0)
959  {
960  if(preparedInput.m_fUseVerbose==1) Warning("DiTauMassTools", "Warning in MissingMassCalculator::MnuProbability: probability > 1!!! ");
961  return 1.0;
962  }
963  return prob;
964 }
965 

◆ MnuProbabilityNewWrapper()

double MissingMassProb::MnuProbabilityNewWrapper ( MissingMassProb prob,
MissingMassInput preparedInput,
const int &  tau_type1,
const int &  tau_type2,
const TLorentzVector &  tauvec1,
const TLorentzVector &  tauvec2,
const TLorentzVector  nuvec1,
const TLorentzVector &  nuvec2 
)
static

Definition at line 128 of file MissingMassProb.cxx.

128  {
129  ignore(tauvec1);
130  ignore(tauvec2);
131  double Prob = 1.;
132  if(prob->GetUseMnuProbability()==1){
133  if(preparedInput.m_tauTypes==TauTypes::ll) Prob*=(prob->GetFormulaNuMass()->Eval(nuvec1.M())*prob->GetFormulaNuMass()->Eval(nuvec2.M()));
134  else if(tau_type1==8 && (tau_type2>=0 && tau_type2<=5)) Prob*=prob->GetFormulaNuMass()->Eval(nuvec1.M());
135  else if((tau_type1>=0 && tau_type1<=5) && tau_type2==8) Prob*=prob->GetFormulaNuMass()->Eval(nuvec2.M());
136  else {
137  Warning("DiTauMassTools", "something went really wrong in MNuProb...");
138  }
139  }
140  // not observed, just a protection
141  if (std::isnan(Prob)) Prob = 0.;
142  return Prob;
143 }

◆ MnuProbabilityWrapper()

double MissingMassProb::MnuProbabilityWrapper ( MissingMassProb prob,
MissingMassInput preparedInput,
const int &  tau_type1,
const int &  tau_type2,
const TLorentzVector &  tauvec1,
const TLorentzVector &  tauvec2,
const TLorentzVector  nuvec1,
const TLorentzVector &  nuvec2 
)
static

Definition at line 70 of file MissingMassProb.cxx.

70  {
71  ignore(tauvec1);
72  ignore(tauvec2);
73  if(prob->GetUseMnuProbability()==1){
74  if(preparedInput.m_tauTypes==TauTypes::ll) return prob->MnuProbability(preparedInput, nuvec1.M())*prob->MnuProbability(preparedInput, nuvec2.M()); // lep-lep
75  else if(tau_type1==8 && (tau_type2>=0 && tau_type2<=5)) return prob->MnuProbability(preparedInput, nuvec1.M()); // lep-had: tau1==lepton
76  else if((tau_type1>=0 && tau_type1<=5) && tau_type2==8) return prob->MnuProbability(preparedInput, nuvec2.M()); // lep-had: tau2==lepton
77  else {
78  Warning("DiTauMassTools", "something went really wrong in MNuProb...");
79  return 1.;
80  }
81  } else {
82  return 1.;
83  }
84 }

◆ myDelThetaHadFunc()

double MissingMassProb::myDelThetaHadFunc ( double *  x,
double *  par 
)

Definition at line 1082 of file MissingMassProb.cxx.

1082 {
1083  double fitval=1.0E-10;
1084  if(x[0]>TMath::Pi() || x[0]<0.0) return fitval;
1085  const double arg=x[0];
1086  const double arg_L=arg;
1087  const double mean=par[1];
1088  const double sigmaG=par[2];
1089  const double mpv=par[3];
1090  const double sigmaL=par[4];
1091 
1096  const double norm=sqrt(2.0*TMath::Pi());
1097  const double g1=TMath::Gaus(arg,mean,sigmaG)/norm;
1098  const double g2=TMath::Landau(arg_L,mpv,sigmaL)/norm;
1099  fitval=par[0]*g1/sigmaG+par[5]*g2/sigmaL;
1100  }
1101 
1102  if(fitval<0.0) return 0.0;
1103  return fitval;
1104 }
1105 

◆ myDelThetaLepFunc()

double MissingMassProb::myDelThetaLepFunc ( double *  x,
double *  par 
)

Definition at line 1108 of file MissingMassProb.cxx.

1108 {
1109  double fitval=1.0E-10;
1110  if(x[0]>TMath::Pi() || x[0]<0.0) return fitval;
1111  double arg=x[0]/par[1];
1112 
1113  double normL=par[5];
1114  if(normL<0.0) normL=0.0;
1115 
1116  if(arg<1) arg=sqrt(std::abs(arg));
1117  else arg=arg*arg;
1118  const double arg_L=x[0];
1119  const double mean=1.0;
1120  const double sigmaG=par[2];
1121  const double mpv=par[3];
1122  const double sigmaL=par[4];
1123  const double g1=normL*TMath::Gaus(arg,mean,sigmaG);
1124  const double g2=TMath::Landau(arg_L,mpv,sigmaL);
1125  fitval=par[0]*(g1+g2)/(1.0+normL);
1126  if(fitval<0.0) return 0.0;
1127  return fitval;
1128 }
1129 

◆ SetAllowUseHT()

void DiTauMassTools::MissingMassProb::SetAllowUseHT ( bool  allowUseHT)
inline

Definition at line 44 of file MissingMassProb.h.

44 { m_allowUseHT=allowUseHT;}

◆ setParamAngle()

void MissingMassProb::setParamAngle ( const TLorentzVector &  tauvec,
int  tau,
int  tautype 
)

Definition at line 153 of file MissingMassProb.cxx.

153  {
154  double Pt_tau = tauvec.Pt();
155  int type = tautype;
156  if (tautype > 4 && tautype < 8) type = 4;
157  if (tautype <= 5){
158  if (m_paramVectorAngle.size() > 0){
159  for(int i=0; i<=3; i++){
160  double par = m_paramVectorAngle[i+(type)*4]->Eval(Pt_tau);
161  if (tau==1){
162  m_formulaAngle1->SetParameter(i, par);
163  } else {
164  m_formulaAngle2->SetParameter(i, par);
165  }
166  }
167  }
168  } else {
169  if (m_paramVectorAngleLep.size() > 0){
170  for(int i=0; i<=3; i++){
171  double par = m_paramVectorAngleLep[i]->Eval(Pt_tau);
172  if (tau==1){
173  m_formulaAngle1->SetParameter(i, par);
174  } else {
175  m_formulaAngle2->SetParameter(i, par);
176  }
177  }
178  }
179  }
180 }

◆ setParamNuMass()

void MissingMassProb::setParamNuMass ( )

Definition at line 145 of file MissingMassProb.cxx.

145  {
146  if (m_paramVectorNuMass.size() > 0){
147  for(int i=0; i<m_formulaNuMass->GetNpar(); i++){
148  m_formulaNuMass->SetParameter(i, m_paramVectorNuMass[0]->GetParameter(i));
149  }
150  }
151 }

◆ setParamRatio()

void MissingMassProb::setParamRatio ( int  tau,
int  tautype 
)

Definition at line 182 of file MissingMassProb.cxx.

182  {
183  int type = tautype;
184  if(tautype > 4 && tautype < 8) type = 4;
185  if (tautype <= 5){
186  if(tau==1){
188  for(int i=0; i<m_formulaRatio1->GetNpar(); i++){
189  m_formulaRatio1->SetParameter(i, m_paramVectorRatio[5*(tau-1)+type]->GetParameter(i));
190  }
191  } else {
193  for(int i=0; i<m_formulaRatio2->GetNpar(); i++){
194  m_formulaRatio2->SetParameter(i, m_paramVectorRatio[5*(tau-1)+type]->GetParameter(i));
195  }
196  }
197  } else {
198  if(tau==1){
200  for(int i=0; i<m_formulaRatio1->GetNpar(); i++){
201  m_formulaRatio1->SetParameter(i, m_paramVectorRatioLep[0]->GetParameter(i));
202  }
203  } else {
205  for(int i=0; i<m_formulaRatio2->GetNpar(); i++){
206  m_formulaRatio2->SetParameter(i, m_paramVectorRatioLep[0]->GetParameter(i));
207  }
208  }
209  }
210 }

◆ SetUseDphiLL()

void DiTauMassTools::MissingMassProb::SetUseDphiLL ( bool  val)
inline

Definition at line 56 of file MissingMassProb.h.

56 {m_fUseDphiLL = val;}

◆ SetUseHT()

void DiTauMassTools::MissingMassProb::SetUseHT ( bool  val)
inline

Definition at line 47 of file MissingMassProb.h.

47 { m_UseHT=val; }

◆ SetUseMnuProbability()

void DiTauMassTools::MissingMassProb::SetUseMnuProbability ( bool  val)
inline

Definition at line 53 of file MissingMassProb.h.

◆ SetUseTauProbability()

void DiTauMassTools::MissingMassProb::SetUseTauProbability ( bool  val)
inline

Definition at line 50 of file MissingMassProb.h.

◆ TauProbability() [1/2]

double MissingMassProb::TauProbability ( MissingMassInput preparedInput,
const int &  type1,
const TLorentzVector &  vis1,
const TLorentzVector &  nu1,
const int &  type2,
const TLorentzVector &  vis2,
const TLorentzVector &  nu2 
)

Definition at line 649 of file MissingMassProb.cxx.

650 {
651  double prob=1.0;
652  if(m_fUseTauProbability==0) return prob; // don't apply TauProbability
653  double prob1=1.0;
654  double prob2=1.0;
655  const double mtau=1.777;
656  const double R1=nu1.E()/vis1.E();
657  const double R2=nu2.E()/vis2.E();
658  //--- dealing with 1st tau
659  double m1=nu1.M();
660  double m2=vis1.M();
661  double E1=0.5*(mtau*mtau+m1*m1-m2*m2)/mtau;
662  double E2=mtau-E1;
663  if(E1<=m1 || E1>=mtau)
664  {
665  if(preparedInput.m_fUseVerbose==1) Warning("DiTauMassTools", "Warning in MissingMassCalculator::TauProbability: bad E1, returning 0 ");
666  return 0.0;
667  }
668  if(E2<=m2 || E2>=mtau)
669  {
670  if(preparedInput.m_fUseVerbose==1) Warning("DiTauMassTools", "Warning in MissingMassCalculator::TauProbability: bad E2, returning 0 ");
671  return 0.0;
672  }
673  preparedInput.m_tlv_tmp.SetPxPyPzE(0.,0.,0.,0.);
674  preparedInput.m_tlv_tmp+=nu1;
675  preparedInput.m_tlv_tmp+=vis1;
676  // double p=(nu1+vis1).P();
677  double p=preparedInput.m_tlv_tmp.P();
678  double V=p/sqrt(p*p+mtau*mtau);
679  double p0;
680  if(type1==8) p0=sqrt(E2*E2-m2*m2); // leptonic tau
681  else p0=E1; // hadronic tau
682  prob1=0.5*mtau/(p0*V*pow(R1+1.0,2));
683  // avoid too large values
684  prob1=std::min(prob1,1.);
685 
686 
687  //--- dealing with 2nd tau
688  m1=nu2.M();
689  m2=vis2.M();
690  E1=0.5*(mtau*mtau+m1*m1-m2*m2)/mtau;
691  E2=mtau-E1;
692  if(E1<=m1 || E1>=mtau)
693  {
694  if(preparedInput.m_fUseVerbose==1) Warning("DiTauMassTools", "Warning in MissingMassCalculator::TauProbability: bad E1, returning 0 ");
695  return 0.0;
696  }
697  if(E2<=m2 || E2>=mtau)
698  {
699  if(preparedInput.m_fUseVerbose==1) Warning("DiTauMassTools", "Warning in MissingMassCalculator::TauProbability: bad E2, returning 0 ");
700  return 0.0;
701  }
702  preparedInput.m_tlv_tmp.SetPxPyPzE(0.,0.,0.,0.);
703  preparedInput.m_tlv_tmp+=nu2;
704  preparedInput.m_tlv_tmp+=vis2;
705  // p=(nu2+vis2).P();
706  p=preparedInput.m_tlv_tmp.P();
707 
708 
709  V=p/sqrt(p*p+mtau*mtau);
710  if(type2==8) p0=sqrt(E2*E2-m2*m2); // leptonic tau
711  else p0=E1; // hadronic tau
712  prob2=0.5*mtau/(p0*V*pow(R2+1.0,2));
713  // avoid too large values
714  prob2=std::min(prob2,1.);
715  prob=prob1*prob2;
716  return prob;
717 }
718 

◆ TauProbability() [2/2]

double MissingMassProb::TauProbability ( MissingMassInput preparedInput,
const int &  type1,
const TLorentzVector &  vis1,
const TLorentzVector &  nu1,
const int &  type2,
const TLorentzVector &  vis2,
const TLorentzVector &  nu2,
const double &  detmet 
)

Definition at line 722 of file MissingMassProb.cxx.

722  {
723  double prob=1.0;
724 
725  if(m_fUseTauProbability==0) return prob; // don't apply TauProbability
726 
727  if(m_UseHT)
728  {
729  if(detmet<20.0) // low MET Njet=0 category
730  {
731  const double R1=nu1.P()/vis1.P();
732  const double R2=nu2.P()/vis2.P();
733  const double lep_p1[4]={0.417,0.64,0.52,0.678};
734  const double lep_p2[4]={0.23,0.17,0.315,0.319};
735  const double lep_p3[4]={0.18,0.33,0.41,0.299};
736  const double lep_p4[4]={0.033,0.109,0.129,0.096};
737  const double lep_p5[4]={0.145,0.107,0.259,0.304};
738  int ind=3;
739  int indT=3;
740  const double n_1pr[4]={-0.15,-0.13,-0.25,-0.114};
741  const double s_1pr[4]={0.40,0.54,0.62,0.57};
742  const double n_3pr[4]={-1.08,-1.57,-0.46,-0.39};
743  const double s_3pr[4]={0.53,0.85,0.61,0.53};
744  double Ptau=0.0;
745  double Plep=0.0;
746  if(type1>=0 && type1<=5)
747  {
748  Ptau=(nu1+vis1).P();
749  Plep=(nu2+vis2).P();
750  }
751  if(type2>=0 && type2<=5)
752  {
753  Ptau=(nu2+vis2).P();
754  Plep=(nu1+vis1).P();
755  }
756  if(Plep<50.0 && Plep>=45.0) ind=2;
757  if(Plep<45.0 && Plep>=40.0) ind=1;
758  if(Plep<40.0) ind=0;
759  if(Ptau<50.0 && Ptau>=45.0) indT=2;
760  if(Ptau<45.0 && Ptau>=40.0) indT=1;
761  if(Ptau<40.0) indT=0;
762  if(type1==8) prob=prob*(lep_p5[ind]*TMath::Gaus(R1,lep_p1[ind],lep_p2[ind])+TMath::Landau(R1,lep_p3[ind],lep_p4[ind]))/(1+lep_p5[ind]);
763  if(type2==8) prob=prob*(lep_p5[ind]*TMath::Gaus(R2,lep_p1[ind],lep_p2[ind])+TMath::Landau(R2,lep_p3[ind],lep_p4[ind]))/(1+lep_p5[ind]);
764 
765  if(type1>=0 && type1<=2) prob=prob*TMath::Gaus(R1,n_1pr[indT],s_1pr[indT]);
766  if(type2>=0 && type2<=2) prob=prob*TMath::Gaus(R2,n_1pr[indT],s_1pr[indT]);
767  if(type1>=3 && type1<=5) prob=prob*TMath::Gaus(R1,n_3pr[indT],s_3pr[indT]);
768  if(type2>=3 && type2<=5) prob=prob*TMath::Gaus(R2,n_3pr[indT],s_3pr[indT]);
769 
770  }
771  else // high MET Njet=0 category
772  {
773  const double R1=nu1.P()/vis1.P();
774  const double R2=nu2.P()/vis2.P();
775  const double lep_p1[4]={0.441,0.64,0.79,0.8692};
776  const double lep_p2[4]={0.218,0.28,0.29,0.3304};
777  const double lep_p3[4]={0.256,0.33,0.395,0.4105};
778  const double lep_p4[4]={0.048,0.072,0.148,0.1335};
779  const double lep_p5[4]={0.25,0.68,0.10,0.2872};
780  int ind=3;
781  const double p_1prong=-3.706;
782  const double p_3prong=-5.845;
783  double Ptau=0.0;
784  double Plep=0.0;
785  if(type1>=0 && type1<=5)
786  {
787  Ptau=(nu1+vis1).P();
788  Plep=(nu2+vis2).P();
789  }
790  if(type2>=0 && type2<=5)
791  {
792  Ptau=(nu2+vis2).P();
793  Plep=(nu1+vis1).P();
794  }
795  if(Plep<50.0 && Plep>=45.0) ind=2;
796  if(Plep<45.0 && Plep>=40.0) ind=1;
797  if(Plep<40.0) ind=0;
798  const double scale1prong=Ptau>45.0 ? 1.0 : -1.019/((Ptau*0.0074-0.059)*p_1prong);
799  const double scale3prong=Ptau>40.0 ? 1.0 : -1.24/((Ptau*0.0062-0.033)*p_3prong);
800  if(type1==8) prob=prob*(lep_p5[ind]*TMath::Gaus(R1,lep_p1[ind],lep_p2[ind])+TMath::Landau(R1,lep_p3[ind],lep_p4[ind]))/(1+lep_p5[ind]);
801  if(type2==8) prob=prob*(lep_p5[ind]*TMath::Gaus(R2,lep_p1[ind],lep_p2[ind])+TMath::Landau(R2,lep_p3[ind],lep_p4[ind]))/(1+lep_p5[ind]);
802 
803  if(type1>=0 && type1<=2) prob=prob*exp(p_1prong*R1*scale1prong)*std::abs(p_1prong*scale1prong)*0.02; // introduced normalization to account for sharpening of probability at low E(tau)
804  if(type2>=0 && type2<=2) prob=prob*exp(p_1prong*R2*scale1prong)*std::abs(p_1prong*scale1prong)*0.02;
805  if(type1>=3 && type1<=5) prob=prob*exp(p_3prong*R1*scale3prong)*std::abs(p_3prong*scale3prong)*0.02;
806  if(type2>=3 && type2<=5) prob=prob*exp(p_3prong*R2*scale3prong)*std::abs(p_3prong*scale3prong)*0.02;
807  }
808  }
809  //----------------- had-had channel ---------------------------------------
810  if( preparedInput.m_tauTypes==TauTypes::hh )
811  {
812 
813  if(m_UseHT) // Events with no jets
814  {
815 
816  const double R[2]={nu1.P()/vis1.P(),nu2.P()/vis2.P()};
817  const double E[2]={(nu1+vis1).E(),(nu2+vis2).E()};
818  const int tau_type[2]={type1,type2};
819  int order1= vis1.Pt()>vis2.Pt() ? 0 : 1;
820  int order2= vis1.Pt()>vis2.Pt() ? 1 : 0;
821 
822  double par_1p[2][6]; // P(tau)-scaling; lead, sub-lead
823  double par_3p[2][6]; // P(tau)-scaling; lead, sub-lead
824 
825  par_1p[0][0]=0.1273; par_1p[0][1]=-0.2479; par_1p[0][2]=1.0; par_1p[0][3]=-43.16; par_1p[0][4]=0.0; par_1p[0][5]=0.0;
826  par_1p[1][0]=0.3736; par_1p[1][1]=-1.441; par_1p[1][2]=1.0; par_1p[1][3]=-29.82; par_1p[1][4]=0.0; par_1p[1][5]=0.0;
827  par_3p[0][0]=0.1167; par_3p[0][1]=-0.1388; par_3p[0][2]=1.0; par_3p[0][3]=-44.77; par_3p[0][4]=0.0; par_3p[0][5]=0.0;
828  par_3p[1][0]=0.3056; par_3p[1][1]=-2.18; par_3p[1][2]=1.0; par_3p[1][3]=-19.09; par_3p[1][4]=0.0; par_3p[1][5]=0.0;
829  // parameters for sub-leading tau
830  const double C1p=0.062;
831  const double C3p=0.052;
832  const double G1p=1.055;
833  const double G3p=1.093;
834  // Probability for leading tau
835 
836  if( tau_type[order1]>=0 && tau_type[order1]<=2 ) // 1-prong
837  {
838  //double x=std::min(300.,std::max(E[order1],45.0));
839  // 50 to be safe. TO be finalised.
840  // double x=std::min(300.,std::max(E[order1],50.0));
841  double x=std::min(E[order1],300.0);
842  const double slope=par_1p[0][0]+par_1p[0][1]/(par_1p[0][2]*x+par_1p[0][3])+par_1p[0][4]*x > 0.01 ?
843  par_1p[0][0]+par_1p[0][1]/(par_1p[0][2]*x+par_1p[0][3])+par_1p[0][4]*x : 0.01;
844  prob=prob*exp(-R[order1]/slope)*0.04/std::abs(slope);
845  }
846  if( tau_type[order1]>=3 && tau_type[order1]<=5 ) // 3-prong
847  {
848  //double x=std::min(300.,std::max(E[order1],45.0));
849  // double x=std::min(300.,std::max(E[order1],50.0));
850  double x=std::min(E[order1],300.0);
851  const double slope=par_3p[0][0]+par_3p[0][1]/(par_3p[0][2]*x+par_3p[0][3])+par_3p[0][4]*x > 0.01 ?
852  par_3p[0][0]+par_3p[0][1]/(par_3p[0][2]*x+par_3p[0][3])+par_3p[0][4]*x : 0.01;
853  prob=prob*exp(-R[order1]/slope)*0.04/std::abs(slope);
854  }
855  // Probability for sub-leading tau
856  if( tau_type[order2]>=0 && tau_type[order2]<=2 ) // 1-prong
857  {
858  const double par[4]={0.1147,-0.09675,-35.0,3.711E-11};
859  double x=std::min(300.,std::max(E[order2],30.0));
860  // double x=std::min(300.,std::max(E[order2],50.0));
861  const double sigma=G1p*(par_1p[1][0]+par_1p[1][1]/(par_1p[1][2]*x+par_1p[1][3])+par_1p[1][4]*x+par_1p[1][5]*x*x) > 0.01 ?
862  G1p*(par_1p[1][0]+par_1p[1][1]/(par_1p[1][2]*x+par_1p[1][3])+par_1p[1][4]*x+par_1p[1][5]*x*x) : 0.01;
863  if(x<36.0) x=36.0;
864  const double mean=par[0]+par[1]/(x+par[2])+par[3]*pow(x,4);
865  prob=prob*C1p*TMath::Gaus(R[order2],mean,sigma);
866  }
867  if( tau_type[order2]>=3 && tau_type[order2]<=5 ) // 3-prong
868  {
869  double x=std::min(300.,std::max(E[order2],20.0));
870  // double x=std::min(300.,std::max(E[order2],50.0));
871  const double sigma=G3p*(par_3p[1][0]+par_3p[1][1]/(par_3p[1][2]*x+par_3p[1][3])+par_3p[1][4]*x+par_3p[1][5]*x*x) > 0.01 ?
872  G3p*(par_3p[1][0]+par_3p[1][1]/(par_3p[1][2]*x+par_3p[1][3])+par_3p[1][4]*x+par_3p[1][5]*x*x) : 0.01;
873  const double par[4]={0.2302,-2.012,-36.08,-0.000373};
874  if(x<37.0) x=37.0;
875  const double mean=par[0]+par[1]/(x+par[2])+par[3]*x;
876  prob=prob*C3p*TMath::Gaus(R[order2],mean,sigma);
877  }
878  }
879  if(!m_UseHT) // Events with jets
880  {
881  const double R1=nu1.P()/vis1.P();
882  const double R2=nu2.P()/vis2.P();
883  const double E1=(nu1+vis1).E();
884  const double E2=(nu2+vis2).E();
885  int order1= vis1.Pt()>vis2.Pt() ? 0 : 1;
886  int order2= vis1.Pt()>vis2.Pt() ? 1 : 0;
887  const double slope_1p[2]={-3.185,-2.052}; // lead, sub-lead
888  const double slope_3p[2]={-3.876,-2.853}; // lead, sub-lead
889  double par_1p[2][3]; // scaling below 100 GeV; lead, sub-lead
890  double par_3p[2][3]; // scaling below 100 GeV; lead, sub-lead
891  par_1p[0][0]=-0.3745; par_1p[0][1]=0.01417; par_1p[0][2]=-7.285E-5; // [0][i] is always adjusted to match slope at 100 GeV
892  par_1p[1][0]=-0.3683; par_1p[1][1]=0.01807; par_1p[1][2]=-9.514E-5;
893  par_3p[0][0]=-0.3055; par_3p[0][1]=0.01149; par_3p[0][2]=-5.855E-5;
894  par_3p[1][0]=-0.3410; par_3p[1][1]=0.01638; par_3p[1][2]=-9.465E-5;
895  double scale1;
896  double scale2;
897  if(type1>=0 && type1<=2) // 1-prong
898  {
899  scale1=E1>100.0 ? 1.0 : 1.0/std::abs((par_1p[order1][0]+par_1p[order1][1]*E1+par_1p[order1][2]*E1*E1)*slope_1p[order1]);
900  if(scale1<1.0) scale1=1.0;
901  if(scale1>100.0) scale1=100.0;
902  prob=prob*std::abs(slope_1p[order1])*scale1*exp(slope_1p[order1]*scale1*R1)*0.04;
903  }
904  if(type1>=3 && type1<=5) // 3-prong
905  {
906  scale1=E1>100.0 ? 1.0 : 1.0/std::abs((par_3p[order1][0]+par_3p[order1][1]*E1+par_3p[order1][2]*E1*E1)*slope_3p[order1]);
907  if(scale1<1.0) scale1=1.0;
908  if(scale1>100.0) scale1=100.0;
909  prob=prob*std::abs(slope_3p[order1])*scale1*exp(slope_3p[order1]*scale1*R1)*0.04;
910  }
911  if(type2>=0 && type2<=2) // 1-prong
912  {
913  scale2=E2>100.0 ? 1.0 : 1.0/std::abs((par_1p[order2][0]+par_1p[order2][1]*E2+par_1p[order2][2]*E2*E2)*slope_1p[order2]);
914  if(scale2<1.0) scale2=1.0;
915  if(scale2>100.0) scale2=100.0;
916  prob=prob*std::abs(slope_1p[order2])*scale2*exp(slope_1p[order2]*scale2*R2)*0.04;
917  }
918  if(type2>=3 && type2<=5) // 3-prong
919  {
920  scale2=E2>100.0 ? 1.0 : 1.0/std::abs((par_3p[order2][0]+par_3p[order2][1]*E2+par_3p[order2][2]*E2*E2)*slope_3p[order2]);
921  if(scale2<1.0) scale2=1.0;
922  if(scale2>100.0) scale2=100.0;
923  prob=prob*std::abs(slope_3p[order2])*scale2*exp(slope_3p[order2]*scale2*R2)*0.04;
924 
925  }
926  }
927 
928  }
929  // prob=std::min(prob,1.); // Sasha commented out this line, it was introduced by David. Have to ask about its purpose.
930 
931  return prob;
932 }
933 

◆ TauProbabilityLFV()

double MissingMassProb::TauProbabilityLFV ( MissingMassInput preparedInput,
const int &  type1,
const TLorentzVector &  vis1,
const TLorentzVector &  nu1 
)

Definition at line 612 of file MissingMassProb.cxx.

612 {
613  double prob=1.0;
614  if(m_fUseTauProbability==0) return prob; // don't apply TauProbability
615  double prob1=1.0;
616  const double mtau=1.777;
617  const double R1=nu1.E()/vis1.E();
618  //--- dealing with 1st tau
619  double m1=nu1.M();
620  double m2=vis1.M();
621  double E1=0.5*(mtau*mtau+m1*m1-m2*m2)/mtau;
622  double E2=mtau-E1;
623  if(E1<=m1 || E1>=mtau)
624  {
625  if(preparedInput.m_fUseVerbose==1) Warning("DiTauMassTools", "Warning in MissingMassCalculator::TauProbability: bad E1, returning 0 ");
626  return 0.0;
627  }
628  if(E2<=m2 || E2>=mtau)
629  {
630  if(preparedInput.m_fUseVerbose==1) Warning("DiTauMassTools", "Warning in MissingMassCalculator::TauProbability: bad E2, returning 0 ");
631  return 0.0;
632  }
633  preparedInput.m_tlv_tmp.SetPxPyPzE(0.,0.,0.,0.);
634  preparedInput.m_tlv_tmp+=nu1;
635  preparedInput.m_tlv_tmp+=vis1;
636  // double p=(nu1+vis1).P();
637  double p=preparedInput.m_tlv_tmp.P();
638  double V=p/sqrt(p*p+mtau*mtau);
639  double p0;
640  if(type1==8) p0=sqrt(E2*E2-m2*m2); // leptonic tau
641  else p0=E1; // hadronic tau
642  prob1=0.5*mtau/(p0*V*pow(R1+1.0,2));
643  // avoid too large values
644  prob=std::min(prob1,1.);
645  return prob;
646 }
647 

◆ TauProbabilityNewWrapper()

double MissingMassProb::TauProbabilityNewWrapper ( MissingMassProb prob,
MissingMassInput preparedInput,
const int &  tau_type1,
const int &  tau_type2,
const TLorentzVector &  tauvec1,
const TLorentzVector &  tauvec2,
const TLorentzVector  nuvec1,
const TLorentzVector &  nuvec2 
)
static

Definition at line 114 of file MissingMassProb.cxx.

114  {
115  ignore(preparedInput);
116  ignore(tau_type1);
117  ignore(tau_type2);
118  double Prob = 1.;
119  double R1 = nuvec1.P()/tauvec1.P();
120  double R2 = nuvec2.P()/tauvec2.P();
121  Prob*=prob->GetFormulaRatio1()->Eval(R1);
122  Prob*=prob->GetFormulaRatio2()->Eval(R2);
123  // not observed, just a protection
124  if (std::isnan(Prob)) Prob = 0.;
125  return Prob;
126 }

◆ TauProbabilityWrapper()

double MissingMassProb::TauProbabilityWrapper ( MissingMassProb prob,
MissingMassInput preparedInput,
const int &  tau_type1,
const int &  tau_type2,
const TLorentzVector &  tauvec1,
const TLorentzVector &  tauvec2,
const TLorentzVector  nuvec1,
const TLorentzVector &  nuvec2 
)
static

Definition at line 62 of file MissingMassProb.cxx.

62  {
63  if( prob->GetUseHT() || (preparedInput.m_tauTypes==TauTypes::hh) ) {
64  return prob->TauProbability(preparedInput, tau_type1, tauvec1, nuvec1, tau_type2, tauvec2, nuvec2, preparedInput.m_MetVec.Mod()); // customized prob for Njet25=0
65  } else {
66  return prob->TauProbability(preparedInput, tau_type1, tauvec1, nuvec1, tau_type2, tauvec2, nuvec2);
67  }
68 }

Member Data Documentation

◆ m_allowUseHT

bool DiTauMassTools::MissingMassProb::m_allowUseHT
private

Definition at line 119 of file MissingMassProb.h.

◆ m_formulaAngle1

TF1* DiTauMassTools::MissingMassProb::m_formulaAngle1 = new TF1("formulaAngle1", "[0]*exp(-[2]*(log((x+[3])/[1]))**2)")
private

Definition at line 100 of file MissingMassProb.h.

◆ m_formulaAngle2

TF1* DiTauMassTools::MissingMassProb::m_formulaAngle2 = new TF1("formulaAngle2", "[0]*exp(-[2]*(log((x+[3])/[1]))**2)")
private

Definition at line 101 of file MissingMassProb.h.

◆ m_formulaNuMass

TF1* DiTauMassTools::MissingMassProb::m_formulaNuMass = new TF1("formulaNuMass", "pol6")
private

Definition at line 108 of file MissingMassProb.h.

◆ m_formulaRatio1

TF1* DiTauMassTools::MissingMassProb::m_formulaRatio1
private

Definition at line 102 of file MissingMassProb.h.

◆ m_formulaRatio2

TF1* DiTauMassTools::MissingMassProb::m_formulaRatio2
private

Definition at line 103 of file MissingMassProb.h.

◆ m_formulaRatioHad1

TF1* DiTauMassTools::MissingMassProb::m_formulaRatioHad1 = new TF1("formulaRatio1", "gaus(0)")
private

Definition at line 106 of file MissingMassProb.h.

◆ m_formulaRatioHad2

TF1* DiTauMassTools::MissingMassProb::m_formulaRatioHad2 = new TF1("formulaRatio2", "gaus(0)")
private

Definition at line 107 of file MissingMassProb.h.

◆ m_formulaRatioLep1

TF1* DiTauMassTools::MissingMassProb::m_formulaRatioLep1 = new TF1("formulaRatio1", "gaus(0)+expo(3)")
private

Definition at line 104 of file MissingMassProb.h.

◆ m_formulaRatioLep2

TF1* DiTauMassTools::MissingMassProb::m_formulaRatioLep2 = new TF1("formulaRatio2", "gaus(0)+expo(3)")
private

Definition at line 105 of file MissingMassProb.h.

◆ m_fParams

TFile* DiTauMassTools::MissingMassProb::m_fParams
private

Definition at line 116 of file MissingMassProb.h.

◆ m_fUseDphiLL

bool DiTauMassTools::MissingMassProb::m_fUseDphiLL
private

Definition at line 123 of file MissingMassProb.h.

◆ m_fUseMnuProbability

bool DiTauMassTools::MissingMassProb::m_fUseMnuProbability
private

Definition at line 122 of file MissingMassProb.h.

◆ m_fUseTauProbability

bool DiTauMassTools::MissingMassProb::m_fUseTauProbability
private

Definition at line 121 of file MissingMassProb.h.

◆ m_mmcCalibrationSet

MMCCalibrationSetV2::e DiTauMassTools::MissingMassProb::m_mmcCalibrationSet
private

Definition at line 117 of file MissingMassProb.h.

◆ m_paramFilePath

std::string DiTauMassTools::MissingMassProb::m_paramFilePath
private

Definition at line 115 of file MissingMassProb.h.

◆ m_paramVectorAngle

std::vector<TF1*> DiTauMassTools::MissingMassProb::m_paramVectorAngle
private

Definition at line 109 of file MissingMassProb.h.

◆ m_paramVectorAngleLep

std::vector<TF1*> DiTauMassTools::MissingMassProb::m_paramVectorAngleLep
private

Definition at line 110 of file MissingMassProb.h.

◆ m_paramVectorNuMass

std::vector<TF1*> DiTauMassTools::MissingMassProb::m_paramVectorNuMass
private

Definition at line 113 of file MissingMassProb.h.

◆ m_paramVectorRatio

std::vector<TF1*> DiTauMassTools::MissingMassProb::m_paramVectorRatio
private

Definition at line 111 of file MissingMassProb.h.

◆ m_paramVectorRatioLep

std::vector<TF1*> DiTauMassTools::MissingMassProb::m_paramVectorRatioLep
private

Definition at line 112 of file MissingMassProb.h.

◆ m_probListConstant

std::list<std::function<double(MissingMassInput& preparedInput, const int & tau_type1, const int & tau_type2, const TLorentzVector & tauvec1, const TLorentzVector & tauvec2, const TLorentzVector nuvec1, const TLorentzVector & nuvec2)> > DiTauMassTools::MissingMassProb::m_probListConstant

Definition at line 91 of file MissingMassProb.h.

◆ m_probListOneTau

std::list<std::function<double(MissingMassInput& preparedInput, const int & tau_type1, const int & tau_type2, const TLorentzVector & tauvec1, const TLorentzVector & tauvec2, const TLorentzVector nuvec1, const TLorentzVector & nuvec2)> > DiTauMassTools::MissingMassProb::m_probListOneTau

Definition at line 92 of file MissingMassProb.h.

◆ m_probListTwoTau

std::list<std::function<double(MissingMassInput& preparedInput, const int & tau_type1, const int & tau_type2, const TLorentzVector & tauvec1, const TLorentzVector & tauvec2, const TLorentzVector nuvec1, const TLorentzVector & nuvec2)> > DiTauMassTools::MissingMassProb::m_probListTwoTau

Definition at line 93 of file MissingMassProb.h.

◆ m_UseHT

bool DiTauMassTools::MissingMassProb::m_UseHT
private

Definition at line 120 of file MissingMassProb.h.

◆ s_fit_param

thread_local double MissingMassProb::s_fit_param
staticprivate

Definition at line 96 of file MissingMassProb.h.

◆ s_ter_sigma_par

thread_local double MissingMassProb::s_ter_sigma_par
staticprivate

Definition at line 97 of file MissingMassProb.h.


The documentation for this class was generated from the following files:
DiTauMassTools::MissingMassProb::m_paramVectorAngle
std::vector< TF1 * > m_paramVectorAngle
Definition: MissingMassProb.h:109
DiTauMassTools::Angle
double Angle(const TLorentzVector &vec1, const TLorentzVector &vec2)
Definition: PhysicsAnalysis/TauID/DiTauMassTools/Root/HelperFunctions.cxx:46
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
PlotCalibFromCool.norm
norm
Definition: PlotCalibFromCool.py:100
DiTauMassTools::TauTypes::lh
@ lh
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:49
DiTauMassTools::MissingMassProb::MnuProbabilityNewWrapper
static double MnuProbabilityNewWrapper(MissingMassProb *prob, MissingMassInput &preparedInput, const int &tau_type1, const int &tau_type2, const TLorentzVector &tauvec1, const TLorentzVector &tauvec2, const TLorentzVector nuvec1, const TLorentzVector &nuvec2)
Definition: MissingMassProb.cxx:128
DiTauMassTools::MissingMassProb::m_allowUseHT
bool m_allowUseHT
Definition: MissingMassProb.h:119
pdg_comparison.sigma
sigma
Definition: pdg_comparison.py:324
DiTauMassTools::MissingMassInput::m_metVec
TVector2 m_metVec
Definition: MissingMassInput.h:77
mean
void mean(std::vector< double > &bins, std::vector< double > &values, const std::vector< std::string > &files, const std::string &histname, const std::string &tplotname, const std::string &label="")
Definition: dependence.cxx:254
scale2
#define scale2
Definition: JetAttributeHisto.cxx:42
DiTauMassTools::MissingMassProb::dTheta3d_probabilityFastWrapper
static double dTheta3d_probabilityFastWrapper(MissingMassProb *prob, MissingMassInput &preparedInput, const int &tau_type1, const int &tau_type2, const TLorentzVector &tauvec1, const TLorentzVector &tauvec2, const TLorentzVector nuvec1, const TLorentzVector &nuvec2)
Definition: MissingMassProb.cxx:41
python.SystemOfUnits.m2
int m2
Definition: SystemOfUnits.py:92
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
max
#define max(a, b)
Definition: cfImp.cxx:41
DiTauMassTools::MissingMassProb::MnuProbabilityWrapper
static double MnuProbabilityWrapper(MissingMassProb *prob, MissingMassInput &preparedInput, const int &tau_type1, const int &tau_type2, const TLorentzVector &tauvec1, const TLorentzVector &tauvec2, const TLorentzVector nuvec1, const TLorentzVector &nuvec2)
Definition: MissingMassProb.cxx:70
DiTauMassTools::mT
double mT(const TLorentzVector &vec, const TVector2 &met_vec)
Definition: PhysicsAnalysis/TauID/DiTauMassTools/Root/HelperFunctions.cxx:209
IDTPM::R
float R(const U &p)
Definition: TrackParametersHelper.h:101
DiTauMassTools::TauTypes::hh
@ hh
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:49
DiTauMassTools::MissingMassProb::m_fUseTauProbability
bool m_fUseTauProbability
Definition: MissingMassProb.h:121
DiTauMassTools::readInParams
void readInParams(TDirectory *dir, MMCCalibrationSetV2::e aset, std::vector< TF1 * > &lep_numass, std::vector< TF1 * > &lep_angle, std::vector< TF1 * > &lep_ratio, std::vector< TF1 * > &had_angle, std::vector< TF1 * > &had_ratio)
Definition: PhysicsAnalysis/TauID/DiTauMassTools/Root/HelperFunctions.cxx:218
DiTauMassTools::MissingMassInput::m_METsigmaP
double m_METsigmaP
Definition: MissingMassInput.h:60
DiTauMassTools::MissingMassProb::m_formulaAngle1
TF1 * m_formulaAngle1
Definition: MissingMassProb.h:100
DiTauMassTools::MissingMassInput::m_METScanScheme
int m_METScanScheme
Definition: MissingMassInput.h:72
DiTauMassTools::MissingMassProb::m_formulaAngle2
TF1 * m_formulaAngle2
Definition: MissingMassProb.h:101
DiTauMassTools::MissingMassInput::SetMetScanParamsUE
void SetMetScanParamsUE(double sumEt, double phi_scan=0.0, int data_code=0)
Definition: MissingMassInput.cxx:87
DiTauMassTools::MissingMassInput::m_MHtGaussFr
double m_MHtGaussFr
Definition: MissingMassInput.h:68
DiTauMassTools::MissingMassProb::m_probListTwoTau
std::list< std::function< double(MissingMassInput &preparedInput, const int &tau_type1, const int &tau_type2, const TLorentzVector &tauvec1, const TLorentzVector &tauvec2, const TLorentzVector nuvec1, const TLorentzVector &nuvec2)> > m_probListTwoTau
Definition: MissingMassProb.h:93
plotBeamSpotCompare.x2
x2
Definition: plotBeamSpotCompare.py:218
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
DiTauMassTools::MissingMassInput::m_inputMEtT
double m_inputMEtT
Definition: MissingMassInput.h:79
DiTauMassTools::MissingMassInput::m_MHtSigma1
double m_MHtSigma1
Definition: MissingMassInput.h:66
DiTauMassTools::MissingMassInput::m_METsigmaL
double m_METsigmaL
Definition: MissingMassInput.h:61
DiTauMassTools::MissingMassInput::m_tlv_tmp
TLorentzVector m_tlv_tmp
Definition: MissingMassInput.h:78
DiTauMassTools::MissingMassProb::m_fUseDphiLL
bool m_fUseDphiLL
Definition: MissingMassProb.h:123
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
DiTauMassTools::MissingMassProb::m_UseHT
bool m_UseHT
Definition: MissingMassProb.h:120
DiTauMassTools::MissingMassProb::m_fParams
TFile * m_fParams
Definition: MissingMassProb.h:116
DiTauMassTools::MissingMassProb::m_formulaNuMass
TF1 * m_formulaNuMass
Definition: MissingMassProb.h:108
drawFromPickle.exp
exp
Definition: drawFromPickle.py:36
covarianceTool.prob
prob
Definition: covarianceTool.py:678
ZDCMsg::Info
@ Info
Definition: ZDCMsg.h:20
Phi_mpi_pi
__HOSTDEV__ double Phi_mpi_pi(double)
Definition: GeoRegion.cxx:7
DiTauMassTools::MissingMassProb::s_fit_param
static thread_local double s_fit_param[2][3][6][5]
Definition: MissingMassProb.h:96
x
#define x
DiTauMassTools::MissingMassProb::dTheta3Dparam
double dTheta3Dparam(const int &parInd, const int &tau_type, const double &P_tau, const double *par)
Definition: MissingMassProb.cxx:1132
DiTauMassTools::MissingMassInput::m_METcovphi
double m_METcovphi
Definition: MissingMassInput.h:59
DiTauMassTools::MissingMassProb::TauProbabilityWrapper
static double TauProbabilityWrapper(MissingMassProb *prob, MissingMassInput &preparedInput, const int &tau_type1, const int &tau_type2, const TLorentzVector &tauvec1, const TLorentzVector &tauvec2, const TLorentzVector nuvec1, const TLorentzVector &nuvec2)
Definition: MissingMassProb.cxx:62
DiTauMassTools::MissingMassProb::s_ter_sigma_par
static thread_local double s_ter_sigma_par[2][10][3]
Definition: MissingMassProb.h:97
DiTauMassTools::MissingMassInput::m_tauTypes
TauTypes::e m_tauTypes
Definition: MissingMassInput.h:83
DiTauMassTools::MissingMassInput::m_Njet25
int m_Njet25
Definition: MissingMassInput.h:64
DiTauMassTools::ignore
void ignore(T &&)
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:54
DiTauMassTools::MissingMassProb::myDelThetaHadFunc
double myDelThetaHadFunc(double *x, double *par)
Definition: MissingMassProb.cxx:1082
python.changerun.m1
m1
Definition: changerun.py:32
DiTauMassTools::MissingMassProb::TauProbabilityNewWrapper
static double TauProbabilityNewWrapper(MissingMassProb *prob, MissingMassInput &preparedInput, const int &tau_type1, const int &tau_type2, const TLorentzVector &tauvec1, const TLorentzVector &tauvec2, const TLorentzVector nuvec1, const TLorentzVector &nuvec2)
Definition: MissingMassProb.cxx:114
DiTauMassTools::MissingMassInput::m_htOffset
double m_htOffset
Definition: MissingMassInput.h:81
DiTauMassTools::MissingMassInput::m_SumEt
double m_SumEt
Definition: MissingMassInput.h:62
fitman.g1
g1
Definition: fitman.py:619
lumiFormat.i
int i
Definition: lumiFormat.py:92
DiTauMassTools::MissingMassInput::m_MHtSigma2
double m_MHtSigma2
Definition: MissingMassInput.h:67
DiTauMassTools::MMCCalibrationSetV2::MMC2015HIGHMASS
@ MMC2015HIGHMASS
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:36
DiTauMassTools::MMCCalibrationSetV2::LFVMMC2012
@ LFVMMC2012
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:36
DiTauMassTools::MissingMassProb::m_mmcCalibrationSet
MMCCalibrationSetV2::e m_mmcCalibrationSet
Definition: MissingMassProb.h:117
DiTauMassTools::MissingMassProb::m_formulaRatioHad1
TF1 * m_formulaRatioHad1
Definition: MissingMassProb.h:106
DiTauMassTools::MissingMassInput::m_MEtT
double m_MEtT
Definition: MissingMassInput.h:80
DiTauMassTools::MissingMassInput::m_vistau1
TLorentzVector m_vistau1
Definition: MissingMassInput.h:52
DiTauMassTools::MissingMassProb::mEtAndTauProbabilityWrapper
static double mEtAndTauProbabilityWrapper(MissingMassProb *prob, MissingMassInput &preparedInput, const int &tau_type1, const int &tau_type2, const TLorentzVector &tauvec1, const TLorentzVector &tauvec2, const TLorentzVector nuvec1, const TLorentzVector &nuvec2)
Definition: MissingMassProb.cxx:31
DiTauMassTools::MissingMassProb::m_formulaRatioLep2
TF1 * m_formulaRatioLep2
Definition: MissingMassProb.h:105
DiTauMassTools::MMCCalibrationSetV2::MMC2016MC15C
@ MMC2016MC15C
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:36
DiTauMassTools::MissingMassInput::m_dataType
int m_dataType
Definition: MissingMassInput.h:58
DiTauMassTools::MMCCalibrationSetV2::UPGRADE
@ UPGRADE
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:36
DiTauMassTools::MissingMassInput::m_fUseVerbose
bool m_fUseVerbose
Definition: MissingMassInput.h:76
min
#define min(a, b)
Definition: cfImp.cxx:40
create_dcsc_inputs_sqlite.arg
list arg
Definition: create_dcsc_inputs_sqlite.py:48
DiTauMassTools::MissingMassProb::m_paramVectorRatio
std::vector< TF1 * > m_paramVectorRatio
Definition: MissingMassProb.h:111
DiTauMassTools::MissingMassProb::m_paramVectorRatioLep
std::vector< TF1 * > m_paramVectorRatioLep
Definition: MissingMassProb.h:112
fitman.g2
g2
Definition: fitman.py:624
DiTauMassTools::MissingMassProb::m_formulaRatioLep1
TF1 * m_formulaRatioLep1
Definition: MissingMassProb.h:104
DiTauMassTools::MissingMassProb::MetProbability
double MetProbability(MissingMassInput &preparedInput, const double &met1, const double &met2, const double &MetSigma1, const double &MetSigma2)
Definition: MissingMassProb.cxx:551
DiTauMassTools::MissingMassInput::m_DelPhiTT
double m_DelPhiTT
Definition: MissingMassInput.h:65
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
VP1PartSpect::E
@ E
Definition: VP1PartSpectFlags.h:21
DiTauMassTools::MissingMassProb::MHtProbabilityHH
double MHtProbabilityHH(MissingMassInput &preparedInput, const double &d_mhtX, const double &d_mhtY, const double &mht, const double &trueMetGuess, const double &mht_offset)
Definition: MissingMassProb.cxx:1012
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
DiTauMassTools::MissingMassInput::m_MetVec
TVector2 m_MetVec
Definition: MissingMassInput.h:51
DiTauMassTools::MissingMassProb::m_formulaRatio1
TF1 * m_formulaRatio1
Definition: MissingMassProb.h:102
PathResolverFindCalibFile
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Definition: PathResolver.cxx:431
DiTauMassTools::MissingMassProb::m_formulaRatioHad2
TF1 * m_formulaRatioHad2
Definition: MissingMassProb.h:107
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
DiTauMassTools::MissingMassProb::m_fUseMnuProbability
bool m_fUseMnuProbability
Definition: MissingMassProb.h:122
DiTauMassTools::MissingMassProb::myDelThetaLepFunc
double myDelThetaLepFunc(double *x, double *par)
Definition: MissingMassProb.cxx:1108
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DiTauMassTools::MissingMassProb::m_probListConstant
std::list< std::function< double(MissingMassInput &preparedInput, const int &tau_type1, const int &tau_type2, const TLorentzVector &tauvec1, const TLorentzVector &tauvec2, const TLorentzVector nuvec1, const TLorentzVector &nuvec2)> > m_probListConstant
Definition: MissingMassProb.h:91
DiTauMassTools::MissingMassInput::m_inputMEtX
double m_inputMEtX
Definition: MissingMassInput.h:79
DiTauMassTools::MissingMassInput::m_vistau2
TLorentzVector m_vistau2
Definition: MissingMassInput.h:53
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
DiTauMassTools::MMCCalibrationSetV2::MMC2019
@ MMC2019
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:36
DiTauMassTools::MissingMassProb::m_paramVectorAngleLep
std::vector< TF1 * > m_paramVectorAngleLep
Definition: MissingMassProb.h:110
DiTauMassTools::MissingMassInput::m_METresSyst
int m_METresSyst
Definition: MissingMassInput.h:73
scale1
#define scale1
Definition: JetAttributeHisto.cxx:41
DiTauMassTools::MissingMassProb::MHtProbability
double MHtProbability(MissingMassInput &preparedInput, const double &d_mhtX, const double &d_mhtY, const double &mht, const double &trueMetGuess, const double &mht_offset)
Definition: MissingMassProb.cxx:995
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
DiTauMassTools::MissingMassInput::m_inputMEtY
double m_inputMEtY
Definition: MissingMassInput.h:79
DiTauMassTools::MissingMassProb::m_formulaRatio2
TF1 * m_formulaRatio2
Definition: MissingMassProb.h:103
DiTauMassTools::MissingMassInput::m_LFVmode
int m_LFVmode
Definition: MissingMassInput.h:82
DiTauMassTools::MissingMassProb::dTheta3d_probabilityNewWrapper
static double dTheta3d_probabilityNewWrapper(MissingMassProb *prob, MissingMassInput &preparedInput, const int &tau_type1, const int &tau_type2, const TLorentzVector &tauvec1, const TLorentzVector &tauvec2, const TLorentzVector nuvec1, const TLorentzVector &nuvec2)
Definition: MissingMassProb.cxx:86
checkFileSG.ind
list ind
Definition: checkFileSG.py:118
DiTauMassTools::MissingMassProb::m_paramFilePath
std::string m_paramFilePath
Definition: MissingMassProb.h:115
DiTauMassTools::MissingMassProb::m_probListOneTau
std::list< std::function< double(MissingMassInput &preparedInput, const int &tau_type1, const int &tau_type2, const TLorentzVector &tauvec1, const TLorentzVector &tauvec2, const TLorentzVector nuvec1, const TLorentzVector &nuvec2)> > m_probListOneTau
Definition: MissingMassProb.h:92
DiTauMassTools::MissingMassProb::m_paramVectorNuMass
std::vector< TF1 * > m_paramVectorNuMass
Definition: MissingMassProb.h:113
DiTauMassTools::TauTypes::ll
@ ll
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:49