14 map<string, double> Variables;
15 Variables[
"FoxWolfram0"] = -999.*1000.;
16 Variables[
"FoxWolfram1"] = -999.*1000.;
17 Variables[
"FoxWolfram2"] = -999.*1000.;
18 Variables[
"FoxWolfram3"] = -999.*1000.;
19 Variables[
"FoxWolfram4"] = -999.*1000.;
21 double FoxWolframMoments[5] = {0};
25 if(clusters.size() < 2)
return Variables;
27 for(
unsigned int i1=0; i1<clusters.size(); i1++) {
28 double p1 = sqrt(clusters.at(i1).px()*clusters.at(i1).px()
29 + clusters.at(i1).py()*clusters.at(i1).py()
30 + clusters.at(i1).pz()*clusters.at(i1).pz());
32 for(
unsigned int i2=i1+1; i2<clusters.size(); i2++) {
33 double p2 = sqrt(clusters.at(i2).px()*clusters.at(i2).px()
34 + clusters.at(i2).py()*clusters.at(i2).py()
35 + clusters.at(i2).pz()*clusters.at(i2).pz());
37 TVector3 cj(clusters[i2].px(), clusters[i2].py(), clusters[i2].pz());
38 TLorentzVector quadvec(clusters[i1].px(), clusters[i1].py(), clusters[i1].pz(), clusters[i1].e());
40 double CosTheta12 = TMath::Cos(quadvec.Angle(cj));
43 double P1 = CosTheta12;
44 double P2 = 0.5*(3.*CosTheta12*CosTheta12 - 1.);
45 double P3 = 0.5*(5.*CosTheta12*CosTheta12*CosTheta12 - 3.*CosTheta12);
46 double P4 = 0.125*(35.*CosTheta12*CosTheta12*CosTheta12*CosTheta12 - 30.*CosTheta12*CosTheta12 + 3.);
48 FoxWolframMoments[0] += p1*p2*P0;
49 FoxWolframMoments[1] += p1*p2*P1;
50 FoxWolframMoments[2] += p1*p2*P2;
51 FoxWolframMoments[3] += p1*p2*P3;
52 FoxWolframMoments[4] += p1*p2*P4;
55 ESum += clusters[i1].e();
61 const double inv_Esum2 = 1. / (ESum*ESum);
62 for(
int i=0; i<5; i++) {
63 FoxWolframMoments[i] *= inv_Esum2;
64 R.push_back(FoxWolframMoments[i]);
71 Variables[
"FoxWolfram0"] = R.at(0);
72 Variables[
"FoxWolfram1"] = R.at(1);
73 Variables[
"FoxWolfram2"] = R.at(2);
74 Variables[
"FoxWolfram3"] = R.at(3);
75 Variables[
"FoxWolfram4"] = R.at(4);