ATLAS Offline Software
PhysicsAnalysis
HiggsPhys
Run2
HZZ
Tools
ZMassConstraint
Root
ConstraintFitOutput.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// A C++ implementation of Mass constraint fitting
7
// 23/09/2006
8
// K. Nikolopoulos
9
// --- * --- * --- * --- * ---* --- * --- * --- * ---
10
//
11
//
12
//
13
//
14
// #include "ZMassConstraint/ConstraintFitOutput.h"
15
// #include <iostream>
16
17
// void ZMassConstraint::ConstraintFitOutput::setFitOutput(const std::vector<TLorentzVector>& particleList, const Amg::MatrixX& covariance)
18
// {
19
// m_particleList = particleList;
20
// m_covariance = covariance;
21
// covariancePxPyPzToPhiThetaP();
22
// }
23
24
// void
25
// ZMassConstraint::ConstraintFitOutput::getCompositeFourVector(TLorentzVector& lv) const
26
// {
27
// lv = TLorentzVector();
28
// for( auto lv1 : m_particleList ) lv += lv1;
29
// }
30
31
// void ZMassConstraint::ConstraintFitOutput::covariancePxPyPzToPhiThetaP()
32
// {
33
// Amg::MatrixX Jacobian(5*m_particleList.size(),5*m_particleList.size());
34
// Jacobian.setZero();
35
// /// build the Jacobian of the phi,theta,P --> px,py,pz
36
// for(unsigned int ii=0;ii<m_particleList.size();ii++)
37
// {
38
// double phi = m_particleList.at(ii).Phi();
39
// double theta = m_particleList.at(ii).Theta();
40
// double P = m_particleList.at(ii).P();
41
// Jacobian( 5*ii, 5*ii) = 1.;
42
// Jacobian(1 + 5*ii, 1 + 5*ii) = 1.;
43
44
// Jacobian(2 + 5*ii, 2 + 5*ii) = -P * TMath::Sin(theta) * TMath::Sin(phi);
45
// Jacobian(2 + 5*ii, 3 + 5*ii) = P * TMath::Sin(theta) * TMath::Cos(phi);
46
// Jacobian(3 + 5*ii, 2 + 5*ii) = P * TMath::Cos(theta) * TMath::Cos(phi);
47
// Jacobian(3 + 5*ii, 3 + 5*ii) = P * TMath::Cos(theta) * TMath::Sin(phi);
48
// Jacobian(3 + 5*ii, 4 + 5*ii) = -P * TMath::Sin(theta);
49
// Jacobian(4 + 5*ii, 2 + 5*ii) = TMath::Sin(theta) * TMath::Cos(phi);
50
// Jacobian(4 + 5*ii, 3 + 5*ii) = TMath::Sin(theta) * TMath::Sin(phi);
51
// Jacobian(4 + 5*ii, 4 + 5*ii) = TMath::Cos(theta);
52
// }
53
54
// Amg::MatrixX Jacobianinverse(5*m_particleList.size(),5*m_particleList.size());
55
56
// //bool invertible;
57
// //Jacobian.computeInverseWithCheck(Jacobianinverse,invertible);
58
// //if(!invertible) std::cout << "matrix inversion failed " <<std::endl;
59
// Jacobianinverse=Jacobian.inverse();
60
// m_covariancePhiThetaP = Jacobianinverse.transpose() * m_covariance * Jacobianinverse;
61
62
63
// // std::cout << "ZMassConstraint::ConstraintFitOutput::covariancePxPyPzToPhiThetaP\n"
64
// // << m_covariance << "\n" << m_covariancePhiThetaP
65
// // << std::endl;
66
67
// }
68
69
Generated on Thu Nov 7 2024 21:12:28 for ATLAS Offline Software by
1.8.18