59 lines
1.4 KiB
C++
59 lines
1.4 KiB
C++
#include "TH1D.h"
|
|
#include "TH2D.h"
|
|
#include "THStack.h"
|
|
#include "TGraph.h"
|
|
#include "TTree.h"
|
|
#include "TChain.h"
|
|
#include "TFile.h"
|
|
#include "TCanvas.h"
|
|
#include "TROOT.h"
|
|
#include "TStyle.h"
|
|
#include "TColor.h"
|
|
#include "TLorentzVector.h"
|
|
#include "TRandom3.h"
|
|
#include "TLorentzVector.h"
|
|
#include "TMVA/Factory.h"
|
|
#include "TMVA/DataLoader.h"
|
|
|
|
#include <string>
|
|
#include <iostream>
|
|
#include <cmath>
|
|
|
|
int inspect_tree() {
|
|
auto file = TFile::Open("/auto/data/pfeiffer/inclusive_detached_dilepton/MC/BuToKpMuMu_rd_btoxll_simulation_12143001_MagDown_v0r0p6316987.root", "READ");
|
|
auto tree = file->Get<TTree>("BuToKpMuMu23_noPID/DecayTree");
|
|
auto branches = tree->GetListOfBranches();
|
|
|
|
// /*Lesen*/
|
|
// Double_t Bu_M;
|
|
|
|
// tree->SetBranchAddress("Bu_M", &Bu_M);
|
|
|
|
// for (size_t i = 0; i < tree->GetEntries(); i++)
|
|
// {
|
|
// tree->GetEntry(i);
|
|
// // Bu_M verwenden
|
|
// }
|
|
|
|
// /*Schreiben*/
|
|
// Double_t B_Theta, B_Blubb;
|
|
|
|
// tree->Branch("B_Theta", &B_Theta, "B_Theta/D");
|
|
// tree->Branch("B_Blubb", &B_Blubb, "B_Blubb/D");
|
|
|
|
// for (size_t i = 0; i < 1000; i++)
|
|
// {
|
|
// B_Theta = 345435; // ....
|
|
// B_Blubb = 348535435435579; // ....
|
|
// tree->Fill();
|
|
// }
|
|
|
|
for (size_t i = 0; i < branches->GetSize(); i++)
|
|
{
|
|
TBranch* b = (TBranch*) branches->At(i);
|
|
std::cout << b->GetName() << std::endl;
|
|
}
|
|
|
|
file->Close();
|
|
return 0;
|
|
} |