diff --git a/Be/Be.mk b/Be/Be.mk index cfb18519a3cfa007661456f5a0d1723ede6fbbd6..3e49f152d066803ce292e37fd58c5416c60b79b2 100644 --- a/Be/Be.mk +++ b/Be/Be.mk @@ -11,6 +11,7 @@ $(BE)/BePureEvent.h \ $(BE)/BeReaction.h \ $(BE)/BeWork.h \ $(BE)/BinaryReaction.h \ +$(BE)/BeAnalysis.h \ $(BE)/linkdef.h BECPP_SRCS += \ @@ -19,7 +20,8 @@ $(BE)/BeEvent.cpp \ $(BE)/BePureEvent.cpp \ $(BE)/BeReaction.cpp \ $(BE)/BeWork.cpp \ -$(BE)/BinaryReaction.cpp +$(BE)/BinaryReaction.cpp \ +$(BE)/BeAnalysis.cpp BEOBJS += \ $(BE)/BeCint.o \ @@ -27,7 +29,8 @@ $(BE)/BeEvent.o \ $(BE)/BePureEvent.o \ $(BE)/BeReaction.o \ $(BE)/BeWork.o \ -$(BE)/BinaryReaction.o +$(BE)/BinaryReaction.o \ +$(BE)/BeAnalysis.o BECPP_DEPS += \ $(BE)/BeCint.d \ @@ -35,4 +38,5 @@ $(BE)/BeEvent.d \ $(BE)/BePureEvent.d \ $(BE)/BeReaction.d \ $(BE)/BeWork.d \ -$(BE)/BinaryReaction.d +$(BE)/BinaryReaction.d \ +$(BE)/BeAnalysis.d diff --git a/Be/BeAnalysis.cpp b/Be/BeAnalysis.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7866354a512ee055f9fd94cf3d15f59e703c7288 --- /dev/null +++ b/Be/BeAnalysis.cpp @@ -0,0 +1,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()); + +} diff --git a/Be/BeAnalysis.h b/Be/BeAnalysis.h new file mode 100644 index 0000000000000000000000000000000000000000..ee610520d90a7a9ab95c2aced9bf57acf952147c --- /dev/null +++ b/Be/BeAnalysis.h @@ -0,0 +1,38 @@ +/* + * BeAnalysis.h + * + * Created on: Jul 19, 2017 + * Author: vratik + */ + +#ifndef BE_BEANALYSIS_H_ +#define BE_BEANALYSIS_H_ + +#include + +//#include +#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_ */ diff --git a/Be/linkdef.h b/Be/linkdef.h index d58054c79cc3eccf0dda2eac263fe6278f8f58a1..c1ca67e24520e07971a3ecc216eef45eef6a68d6 100644 --- a/Be/linkdef.h +++ b/Be/linkdef.h @@ -8,6 +8,7 @@ #pragma link C++ class BinaryReaction; #pragma link C++ class BeReaction; #pragma link C++ class BePureEvent; +#pragma link C++ class BeAnalysis; #endif