12 std::vector<T>().
swap(v);
18 float dPhi = phi1 - phi2;
19 if (dPhi > TMath::Pi())
20 dPhi -= 2. * TMath::Pi();
21 if (dPhi < -TMath::Pi())
22 dPhi += 2. * TMath::Pi();
26 float deltaR(
float eta1,
float phi1,
float eta2,
float phi2)
31 return sqrt(dEta * dEta + dPhi * dPhi);
40 param_ = std::abs(param_);
43 std::size_t found = str.find(
'.');
44 if (found == std::string::npos)
46 str.replace(found, 1,
"p");
47 while (*(str.end() - 1) ==
'0' && *(str.end() - 2) !=
'p' && !str.empty())
48 str.erase(str.end() - 1);
49 if (*(str.end() - 1) ==
'0' && *(str.end() - 2) ==
'p')
50 str.erase(str.size() - 2, 2);
57 vector<tuple<float, float, float, float>>
v;
58 TFile *
f =
new TFile(
"./MVTX_geo.root",
"READ");
60 TTree *
t = (TTree *)f->Get(
"tree");
62 t->SetBranchAddress(
"x1", &x1);
63 t->SetBranchAddress(
"y1", &y1);
64 t->SetBranchAddress(
"x2", &x2);
65 t->SetBranchAddress(
"y2", &y2);
67 for (
int i = 0;
i < t->GetEntries();
i++)