BeAnalysis.cpp 4.45 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
/*
 * BeAnalysis.cpp
 *
 *  Created on: Jul 19, 2017
 *      Author: vratik
 */

#include "BeAnalysis.h"
#include "BeWork.h"

BeAnalysis::BeAnalysis() {
	// TODO Auto-generated constructor stub

}

BeAnalysis::~BeAnalysis() {
	// TODO Auto-generated destructor stub
}

void BeAnalysis::OpenSimChains() {

	const Int_t lowSimFile[6] = {0, 0, 0, 0, 0, 0};
	const Int_t upSimFile[6] = {14, 14, 14, 14, 14, 14};

	TString chainAl0name = "../../../be/rootdata/correlations/v5_6075/Sim_mix_br_al_0_50-85_";
	TString inputTreeAl0name = "../../../be/rootdata/correlations/v5_6075/Sim_mix_br_al_0_50-85_000.root";
	//isotropic, 0 degrees
	TString chainNoAl0name = "../../../be/rootdata/correlations/v5_6075/Sim_mix_br_noal_0_50-85_";
	TString inputTreeNoAl0name = "../../../be/rootdata/correlations/v5_6075/Sim_mix_br_noal_0_50-85_000.root";
	//aligned, 180 degrees
	TString chainAl180name = "../../../be/rootdata/correlations/v5_6075/Sim_mix_br_al_180_50-85_";
	TString inputTreeAl180name = "../../../be/rootdata/correlations/v5_6075/Sim_mix_br_al_180_50-85_000.root";
	//isotropic, 180 degrees
	TString chainNoAl180name = "../../../be/rootdata/correlations/v5_6075/Sim_mix_br_noal_180_50-85_";
	TString inputTreeNoAl180name = "../../../be/rootdata/correlations/v5_6075/Sim_mix_br_noal_180_50-85_000.root";
	//isotropic, 90 degrees
	TString chainAl90name = "../../../be/rootdata/correlations/v5_6075/Sim_mix_br_al_90_50-85_";
	TString inputTreeAl90name = "../../../be/rootdata/correlations/v5_6075/Sim_mix_br_al_90_50-85_000.root";
	//isotropic, 90 degrees
	TString chainNoAl90name = "../../../be/rootdata/correlations/v5_6075/Sim_mix_br_noal_90_50-85_";
	TString inputTreeNoAl90name = "../../../be/rootdata/correlations/v5_6075/Sim_mix_br_noal_90_50-85_000.root";

//	TChain *chsAl0 = BeWork::OpenChain(chainAl0name.Data(),
	chs[0] = BeWork::OpenChain(chainAl0name.Data(),
			lowSimFile[0], upSimFile[0], "simbe", 4, "sbeam");
	Info("statesRatioFitting.cxx", "%lld events in chain \"%s\" containing simulated data", chs[0]->GetEntries(), chs[0]->GetName());
	ti[0] = BeWork::OpenTree(inputTreeAl0name.Data(), "sbeam", 2);
	//	tiAl0->SetLineWidth(2);

//	TChain *chsNoAl0 = BeWork::OpenChain(chainNoAl0name.Data(),
	chs[1] = BeWork::OpenChain(chainNoAl0name.Data(),
			lowSimFile[1], upSimFile[1], "simbe", 4, "sbeam");
	Info("statesRatioFitting.cxx", "%lld events in chain \"%s\" containing simulated data", chs[1]->GetEntries(), chs[1]->GetName());
	ti[1] = BeWork::OpenTree(inputTreeNoAl0name.Data(), "sbeam", 2);
	//	tiNoAl0->SetLineWidth(2);
	//
//	TChain *chsAl180 = BeWork::OpenChain(chainAl180name.Data(),
	chs[2] = BeWork::OpenChain(chainAl180name.Data(),
			lowSimFile[2], upSimFile[2], "simbe", 4, "sbeam");
	Info("statesRatioFitting.cxx", "%lld events in chain \"%s\" containing simulated data", chs[2]->GetEntries(), chs[2]->GetName());
	ti[2] = BeWork::OpenTree(inputTreeAl180name.Data(), "sbeam", 2);
	//	tiAl180->SetLineWidth(2);

//	TChain *chsNoAl180 = BeWork::OpenChain(chainNoAl180name.Data(),
	chs[3] = BeWork::OpenChain(chainNoAl180name.Data(),
			lowSimFile[3], upSimFile[3], "simbe", 4, "sbeam");
	Info("statesRatioFitting.cxx", "%lld events in chain \"%s\" containing simulated data", chs[3]->GetEntries(), chs[3]->GetName());
	ti[3] = BeWork::OpenTree(inputTreeNoAl180name.Data(), "sbeam", 2);
	//	tiNoAl180->SetLineWidth(2);

//	TChain *chsAl90 = BeWork::OpenChain(chainAl90name.Data(),
	chs[4] = BeWork::OpenChain(chainAl90name.Data(),
			lowSimFile[4], upSimFile[4], "simbe", 4, "sbeam");
	Info("statesRatioFitting.cxx", "%lld events in chain \"%s\" containing simulated data", chs[4]->GetEntries(), chs[4]->GetName());
	ti[4] = BeWork::OpenTree(inputTreeAl90name.Data(), "sbeam", 2);
	//	tiAl90->SetLineWidth(2);

//	TChain *chsNoAl90 = BeWork::OpenChain(chainNoAl90name.Data(),
	chs[5] = BeWork::OpenChain(chainNoAl90name.Data(),
			lowSimFile[5], upSimFile[5], "simbe", 4, "sbeam");
	Info("statesRatioFitting.cxx", "%lld events in chain \"%s\" containing simulated data", chs[5]->GetEntries(), chs[5]->GetName());
	ti[5] = BeWork::OpenTree(inputTreeNoAl90name.Data(), "sbeam", 2);
	//	tiNoAl90->SetLineWidth(2);

}

void BeAnalysis::OpenExpChain() {

	Int_t lowExpFile = 0;
	Int_t upExpFile = 40;

//	cout << "aklsdjkajhsdkajshd" << endl;
	//experimental chain
	TChain *che = BeWork::OpenChain("../../../be/rootdata/correlations/Be.",
			lowExpFile, upExpFile, "beonly");										//original file
	Info("statesRatioFitting.cxx", "%lld events in chain \"%s\" containing experimental data",
			che->GetEntries(), che->GetName());

}