Commit 2a366fda authored by Vratislav Chudoba's avatar Vratislav Chudoba

Class BeAnalysis added; opening of input files implemented

parent d001eb0d
...@@ -11,6 +11,7 @@ $(BE)/BePureEvent.h \ ...@@ -11,6 +11,7 @@ $(BE)/BePureEvent.h \
$(BE)/BeReaction.h \ $(BE)/BeReaction.h \
$(BE)/BeWork.h \ $(BE)/BeWork.h \
$(BE)/BinaryReaction.h \ $(BE)/BinaryReaction.h \
$(BE)/BeAnalysis.h \
$(BE)/linkdef.h $(BE)/linkdef.h
BECPP_SRCS += \ BECPP_SRCS += \
...@@ -19,7 +20,8 @@ $(BE)/BeEvent.cpp \ ...@@ -19,7 +20,8 @@ $(BE)/BeEvent.cpp \
$(BE)/BePureEvent.cpp \ $(BE)/BePureEvent.cpp \
$(BE)/BeReaction.cpp \ $(BE)/BeReaction.cpp \
$(BE)/BeWork.cpp \ $(BE)/BeWork.cpp \
$(BE)/BinaryReaction.cpp $(BE)/BinaryReaction.cpp \
$(BE)/BeAnalysis.cpp
BEOBJS += \ BEOBJS += \
$(BE)/BeCint.o \ $(BE)/BeCint.o \
...@@ -27,7 +29,8 @@ $(BE)/BeEvent.o \ ...@@ -27,7 +29,8 @@ $(BE)/BeEvent.o \
$(BE)/BePureEvent.o \ $(BE)/BePureEvent.o \
$(BE)/BeReaction.o \ $(BE)/BeReaction.o \
$(BE)/BeWork.o \ $(BE)/BeWork.o \
$(BE)/BinaryReaction.o $(BE)/BinaryReaction.o \
$(BE)/BeAnalysis.o
BECPP_DEPS += \ BECPP_DEPS += \
$(BE)/BeCint.d \ $(BE)/BeCint.d \
...@@ -35,4 +38,5 @@ $(BE)/BeEvent.d \ ...@@ -35,4 +38,5 @@ $(BE)/BeEvent.d \
$(BE)/BePureEvent.d \ $(BE)/BePureEvent.d \
$(BE)/BeReaction.d \ $(BE)/BeReaction.d \
$(BE)/BeWork.d \ $(BE)/BeWork.d \
$(BE)/BinaryReaction.d $(BE)/BinaryReaction.d \
$(BE)/BeAnalysis.d
/*
* 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());
}
/*
* BeAnalysis.h
*
* Created on: Jul 19, 2017
* Author: vratik
*/
#ifndef BE_BEANALYSIS_H_
#define BE_BEANALYSIS_H_
#include <iostream>
//#include <TObject.h>
#include "TChain.h"
using std::cout;
using std::endl;
class BeAnalysis {
public:
BeAnalysis();
virtual ~BeAnalysis();
ClassDef(BeAnalysis, 1);
void OpenSimChains();
void OpenExpChain();
TChain* GetExpChain() {return che;};
TChain* GetSimChain(Int_t i) {return chs[i];};
//
private:
TChain *che; //chain with experimental trees
TChain *chs[6]; //array of chains with simulation trees
TTree *ti[6]; //array of chains with simulation input
};
#endif /* BE_BEANALYSIS_H_ */
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#pragma link C++ class BinaryReaction; #pragma link C++ class BinaryReaction;
#pragma link C++ class BeReaction; #pragma link C++ class BeReaction;
#pragma link C++ class BePureEvent; #pragma link C++ class BePureEvent;
#pragma link C++ class BeAnalysis;
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment