25 double px = ptEtaPhiE[0] *
cos(ptEtaPhiE[2]);
26 double py = ptEtaPhiE[0] *
sin(ptEtaPhiE[2]);
27 double tmp = 2 * atan(
exp(-ptEtaPhiE[1]));
36 std::cout <<
"Please provide the name of the file and if there is generator information (0 is false)" << std::endl;
44 std::cout <<
"Reading tree dump with genInfo = " << genInfo << std::endl;
47 gSystem->Load(
"libFWCoreFWLite");
51 std::vector<MuonPair> pairVector;
52 std::vector<GenMuonPair> genPairVector;
68 std::stringstream
ss(
line);
69 for (
int i = 0;
i < 6; ++
i) {
76 for (
int i = 0;
i < 6; ++
i) {
86 if ((pairVector.size() != genPairVector.size()) && genInfo) {
87 std::cout <<
"Error: the size of pairVector and genPairVector is different" << std::endl;
91 treeHandler.
writeTree(
"TreeFromDump.root", &pairVector, 0, &genPairVector);
92 std::cout <<
"Filling tree with genInfo" << std::endl;
94 treeHandler.
writeTree(
"TreeFromDump.root", &pairVector);
Sin< T >::type sin(const T &t)
static double constexpr muMass
Muon mass [GeV].
reco::Particle::LorentzVector lorentzVector
void writeTree(const TString &fileName, const std::vector< MuonPair > *savedPair, const int muonType=0, const std::vector< GenMuonPair > *genPair=nullptr, const bool saveAll=false)
Cos< T >::type cos(const T &t)
static void enable()
enable automatic library loading
int main(int argc, char *argv[])
lorentzVector fromPtEtaPhiToPxPyPz(const double *ptEtaPhiE)