![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
17 int maxBin =
hist->FindBin(
max);
18 int targetBin = maxBin;
19 for(
int i=maxBin;
i<=
hist->GetNbinsX();
i++){
20 if(
hist->GetBinContent(
i)<targetVal){
30 int maxBin =
hist->FindBin(
max);
31 int targetBin = maxBin;
32 for(
int i=1;
i<=maxBin;
i++){
33 if(
hist->GetBinContent(
i)>=targetVal){
43 return dRmax_tau+0*Pvis*tau_type;
48 return acos((vec1.Px()*
vec2.Px()+vec1.Py()*
vec2.Py()+vec1.Pz()*
vec2.Pz())/(vec1.P()*
vec2.P()));
58 while (phiOut>TMath::Pi()) {
59 phiOut-=TMath::TwoPi();
64 while (phiOut<-TMath::Pi()) {
65 phiOut+=TMath::TwoPi();
76 const double fastB=4/TMath::Pi();
77 const double fastC=-4/(TMath::Pi()*TMath::Pi());
78 const double fastP=9./40.;
79 const double fastQ=31./40.;
95 const double y=
phi*(fastB+fastC*std::abs(
phi));
96 sinPhi=
y*(fastP*std::abs(
y)+fastQ);
102 if (std::abs(
phi)>TMath::PiOver2()) cosPhi=-cosPhi;
109 if (
out==in)
return true;
118 if(p1 ==
nullptr || p2 ==
nullptr) {
119 Info(
"DiTauMassTools",
"MissingMassTool::getLFVMode() got a nullptr - returning -1");
124 if (mmcType1 == -1) mmcType1 =
mmcType(p1);
125 if (mmcType1 < 0)
return -1;
127 if (mmcType2 == -1) mmcType2 =
mmcType(p2);
128 if (mmcType2 < 0)
return -1;
132 if(mmcType1 == 8 && mmcType2 == 8) {
134 if(p1->
pt() > p2->
pt() ) {
144 }
else if(mmcType2 == 8) {
148 Warning(
"DiTauMassTools",
"Trying to set LFV mode for 2 taus!");
158 Info(
"DiTauMassTools",
"Setting MMC to mu+tau mode");
163 Info(
"DiTauMassTools",
"Setting MMC to e+tau mode");
174 if(
part ==
nullptr) {
176 Info(
"DiTauMassTools",
"MissingMassTool::mmcType() got a nullptr - returning -1");
191 Warning(
"DiTauMassTools",
"MissingMassTool::mmcType() dynamic_cast of TauJet failed");
201 Warning(
"DiTauMassTools",
"MissingMassTool::mmcType() unrecognised particle type! Only Electron, Muon, TauJet allowed. If no mistake, please call MissingMassTool::calculate() directly.");
212 double cphi=1.0-
cos(dphi);
213 if(cphi>0.0) mt=sqrt(2.0*
vec.Pt()*met_vec.Mod()*cphi);
219 std::string paramcode;
222 Info(
"DiTauMassTools",
"The specified calibration version does not support root file parametrisations");
225 TIter
next(
dir->GetListOfKeys());
227 while ((
key = (TKey*)
next())) {
228 TClass *
cl = gROOT->GetClass(
key->GetClassName());
230 if (
cl->InheritsFrom(
"TDirectory")) {
236 else if (
cl->InheritsFrom(
"TF1") ||
cl->InheritsFrom(
"TGraph")) {
238 std::string total_path =
dir->GetPath();
239 if (total_path.find(paramcode) == std::string::npos)
continue;
240 TF1* func = (TF1*)
dir->Get( (
const char*)
key->GetName() );
241 TF1*
f =
new TF1(*func);
242 if (total_path.find(
"lep") != std::string::npos)
244 if (total_path.find(
"Angle") != std::string::npos){
245 lep_angle.push_back(
f);
247 else if (total_path.find(
"Ratio") != std::string::npos)
249 lep_ratio.push_back(
f);
251 else if (total_path.find(
"Mass") != std::string::npos)
253 lep_numass.push_back(
f);
257 Warning(
"DiTauMassTools",
"Undefined leptonic PDF term in input file.");
260 else if (total_path.find(
"had") != std::string::npos)
262 if (total_path.find(
"Angle") != std::string::npos){
263 had_angle.push_back(
f);
265 else if (total_path.find(
"Ratio") != std::string::npos)
267 had_ratio.push_back(
f);
271 Warning(
"DiTauMassTools",
"Undefined hadronic PDF term in input file.");
276 Warning(
"DiTauMassTools",
"Undefined decay channel in input file.");
280 Warning(
"DiTauMassTools",
"Class in input file not recognized.");
std::vector< D3PDTest::MyVec2 > vec2
Electron_v1 Electron
Definition of the current "egamma version".
Scalar phi() const
phi method
bool panTauDetail(TauJetParameters::PanTauDetails panTauDetail, int &value) const
Get and set values of pantau details variables via enum.
std::vector< size_t > vec
Class providing the definition of the 4-vector interface.
__HOSTDEV__ double Phi_mpi_pi(double)
Class describing a tau jet.
virtual double pt() const =0
The transverse momentum ( ) of the particle.
struct TBPatternUnitContext Muon
@ Tau
The object is a tau (jet)
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]