17 return dRmax_tau+0*Pvis*tau_type;
26 while (phiOut>TMath::Pi()) {
27 phiOut-=TMath::TwoPi();
32 while (phiOut<-TMath::Pi()) {
33 phiOut+=TMath::TwoPi();
44 const double fastB=4/TMath::Pi();
45 const double fastC=-4/(TMath::Pi()*TMath::Pi());
46 const double fastP=9./40.;
47 const double fastQ=31./40.;
63 const double y=
phi*(fastB+fastC*std::abs(
phi));
64 sinPhi=
y*(fastP*std::abs(
y)+fastQ);
69 cosPhi=sqrt(1-std::pow(sinPhi,2));
70 if (std::abs(
phi)>TMath::PiOver2()) cosPhi=-cosPhi;
77 if (out==in)
return true;
86 if(p1 ==
nullptr || p2 ==
nullptr) {
87 Info(
"DiTauMassTools",
"MissingMassTool::getLFVMode() got a nullptr - returning -1");
92 if (mmcType1 == -1) mmcType1 =
mmcType(p1);
93 if (mmcType1 < 0)
return -1;
95 if (mmcType2 == -1) mmcType2 =
mmcType(p2);
96 if (mmcType2 < 0)
return -1;
100 if(mmcType1 == 8 && mmcType2 == 8) {
102 if(p1->pt() > p2->pt() ) {
112 }
else if(mmcType2 == 8) {
116 Warning(
"DiTauMassTools",
"Trying to set LFV mode for 2 taus!");
138 if(part ==
nullptr) {
140 Info(
"DiTauMassTools",
"MissingMassTool::mmcType() got a nullptr - returning -1");
155 Warning(
"DiTauMassTools",
"MissingMassTool::mmcType() dynamic_cast of TauJet failed");
165 Warning(
"DiTauMassTools",
"MissingMassTool::mmcType() unrecognised particle type! Only Electron, Muon, TauJet allowed. If no mistake, please call MissingMassTool::calculate() directly.");
174 std::string paramcode;
178 Info(
"DiTauMassTools",
"The specified calibration version does not support root file parametrisations");
181 TIter next(dir->GetListOfKeys());
183 while ((key = (TKey*)next())) {
184 TClass *cl = gROOT->GetClass(key->GetClassName());
186 if (cl->InheritsFrom(
"TDirectory")) {
187 dir->cd(key->GetName());
188 TDirectory *subdir = gDirectory;
189 readInParams(subdir, aset, lep_numass, lep_angle, lep_ratio, had_angle, had_ratio);
192 else if (cl->InheritsFrom(
"TF1") || cl->InheritsFrom(
"TGraph")) {
194 std::string total_path = dir->GetPath();
195 if (total_path.find(paramcode) == std::string::npos)
continue;
196 TF1* func = (TF1*)dir->Get( (
const char*) key->GetName() );
197 TF1* f =
new TF1(*func);
198 if (total_path.find(
"lep") != std::string::npos)
200 if (total_path.find(
"Angle") != std::string::npos){
201 lep_angle.push_back(f);
203 else if (total_path.find(
"Ratio") != std::string::npos)
205 lep_ratio.push_back(f);
207 else if (total_path.find(
"Mass") != std::string::npos)
209 lep_numass.push_back(f);
213 Warning(
"DiTauMassTools",
"Undefined leptonic PDF term in input file.");
216 else if (total_path.find(
"had") != std::string::npos)
218 if (total_path.find(
"Angle") != std::string::npos){
219 had_angle.push_back(f);
221 else if (total_path.find(
"Ratio") != std::string::npos)
223 had_ratio.push_back(f);
227 Warning(
"DiTauMassTools",
"Undefined hadronic PDF term in input file.");
232 Warning(
"DiTauMassTools",
"Undefined decay channel in input file.");
236 Warning(
"DiTauMassTools",
"Class in input file not recognized.");
Scalar phi() const
phi method
Class providing the definition of the 4-vector interface.
bool panTauDetail(TauJetParameters::PanTauDetails panTauDetail, int &value) const
Get and set values of pantau details variables via enum.
ObjectType
Type of objects that have a representation in the xAOD EDM.
@ Muon
The object is a muon.
@ Electron
The object is an electron.
@ Tau
The object is a tau (jet)
TauJet_v3 TauJet
Definition of the current "tau version".