Commit e7924428 authored by Vratislav Chudoba's avatar Vratislav Chudoba

Function SetSimCuts() added.

parent 59525b13
...@@ -53,6 +53,7 @@ void BeAnalysis::OpenSimChains() { ...@@ -53,6 +53,7 @@ void BeAnalysis::OpenSimChains() {
Info("statesRatioFitting.cxx", "%lld events in chain \"%s\" containing simulated data", chs[i]->GetEntries(), chs[i]->GetName()); Info("statesRatioFitting.cxx", "%lld events in chain \"%s\" containing simulated data", chs[i]->GetEntries(), chs[i]->GetName());
ti[i] = BeWork::OpenTree(inputFiles[i].Data(), "sbeam", 2); ti[i] = BeWork::OpenTree(inputFiles[i].Data(), "sbeam", 2);
} }
printf("\n");
} }
...@@ -66,17 +67,18 @@ void BeAnalysis::OpenExpChain() { ...@@ -66,17 +67,18 @@ void BeAnalysis::OpenExpChain() {
} }
void BeAnalysis::SetCuts() { void BeAnalysis::SetCuts() {
cBe20 = "fBeIM>0 && fBeIM<20"; // cBe20 = "fBeIM>0 && fBeIM<20";
cBe3 = "fBeIM>0 && fBeIM<3"; // cBe3 = "fBeIM>0 && fBeIM<3";
cBeWork = "fBeIM>0 && fBeIM<10"; cBeWork = "fBeIM>0 && fBeIM<10";
/*TCut */cBe0_14 = "fBeIM>0 && fBeIM<1.4"; TCut cBe0_14 = "fBeIM>0 && fBeIM<1.4";
//cBe0_14 = "fBeIM>0 && fBeIM<1.6"; //cBe0_14 = "fBeIM>0 && fBeIM<1.6";
//cBe0_14 = "fBeIM>0 && fBeIM<1.20"; //cBe0_14 = "fBeIM>0 && fBeIM<1.20";
cBe14_19 = "fBeIM>1.4 && fBeIM<1.9"; TCut cBe14_19 = "fBeIM>1.4 && fBeIM<1.9";
cBe19_25 = "fBeIM>1.9 && fBeIM<2.5"; // cBe14_19 = "fBeIM>1.4 && fBeIM<2.0";
cBe25_31 = "fBeIM>2.5 && fBeIM<3.1"; TCut cBe19_25 = "fBeIM>1.9 && fBeIM<2.5";
cBe31_37 = "fBeIM>3.1 && fBeIM<3.7"; TCut cBe25_31 = "fBeIM>2.5 && fBeIM<3.1";
TCut cBe31_37 = "fBeIM>3.1 && fBeIM<3.7";
//array: //array:
cBeE[0] = cBe0_14; cBeE[0] = cBe0_14;
cBeE[1] = cBe14_19; cBeE[1] = cBe14_19;
...@@ -91,17 +93,18 @@ void BeAnalysis::SetCuts() { ...@@ -91,17 +93,18 @@ void BeAnalysis::SetCuts() {
//raw files //raw files
//energy cuts //energy cuts
crBe20 = "f6BeIM>0 && f6BeIM<20"; // crBe20 = "f6BeIM>0 && f6BeIM<20";
crBe3 = "f6BeIM>0 && f6BeIM<3"; // crBe3 = "f6BeIM>0 && f6BeIM<3";
crBeWork = "f6BeIM>0 && f6BeIM<10"; crBeWork = "f6BeIM>0 && f6BeIM<10";
crBe0_14 = "f6BeIM>0 && f6BeIM<1.4"; TCut crBe0_14 = "f6BeIM>0 && f6BeIM<1.4";
//crBe0_14 = "f6BeIM>0 && f6BeIM<1.6"; //crBe0_14 = "f6BeIM>0 && f6BeIM<1.6";
//crBe0_14 = "f6BeIM>0.5 && f6BeIM<1.20"; //crBe0_14 = "f6BeIM>0.5 && f6BeIM<1.20";
crBe14_19 = "f6BeIM>1.4 && f6BeIM<1.9"; TCut crBe14_19 = "f6BeIM>1.4 && f6BeIM<1.9";
crBe19_25 = "f6BeIM>1.9 && f6BeIM<2.5"; // TCut crBe14_19 = "f6BeIM>1.6 && f6BeIM<2.1";
crBe25_31 = "f6BeIM>2.5 && f6BeIM<3.1"; TCut crBe19_25 = "f6BeIM>1.9 && f6BeIM<2.5";
crBe31_37 = "f6BeIM>3.1 && f6BeIM<3.7"; TCut crBe25_31 = "f6BeIM>2.5 && f6BeIM<3.1";
TCut crBe31_37 = "f6BeIM>3.1 && f6BeIM<3.7";
//array: //array:
crBeE[0] = crBe0_14; crBeE[0] = crBe0_14;
crBeE[1] = crBe14_19; crBeE[1] = crBe14_19;
...@@ -263,7 +266,7 @@ void BeAnalysis::Spectra() { ...@@ -263,7 +266,7 @@ void BeAnalysis::Spectra() {
for (Int_t j = 0; j < 6; j++) { //different files for (Int_t j = 0; j < 6; j++) { //different files
if (!kChains[j]) continue; if (!kChains[j]) continue;
cout << kChains[j] << endl; // cout << kChains[j] << endl;
cSpectra->cd(j+1); cSpectra->cd(j+1);
chs[j]->SetLineColor(kBlue); chs[j]->SetLineColor(kBlue);
chs[j]->SetFillColor(kWhite); chs[j]->SetFillColor(kWhite);
...@@ -316,15 +319,27 @@ void BeAnalysis::Spectra() { ...@@ -316,15 +319,27 @@ void BeAnalysis::Spectra() {
cSpectra->Update(); cSpectra->Update();
cout << endl; Int_t intLowLimit, IntHighLimit;
const Double_t binToMeV = 10./(Double_t)noBinsSpectra;
Info("statesRatioFitting", "MC %d", j+1); Info("statesRatioFitting", "MC %d", j+1);
Info("statesRatioFitting", "ground state: %3.1f (sim)/ %3.1f (exp) = %3.3f", hsSpectra[j]->Integral(0,40), heSpectra[j]->Integral(0,40), hsSpectra[j]->Integral(0,40)/heSpectra[j]->Integral(0,40) ); intLowLimit = (Int_t)0./binToMeV;
Info("statesRatioFitting", "left slope: %3.1f (sim)/ %3.1f (exp) = %3.3f\n", hsSpectra[j]->Integral(50,70), heSpectra[j]->Integral(50,70), hsSpectra[j]->Integral(50,70)/heSpectra[j]->Integral(50,70) ); IntHighLimit = (Int_t)2./binToMeV;
Info("statesRatioFitting", "ground state: %3.1f (sim)/ %3.1f (exp) = %3.3f",
hsSpectra[j]->Integral(intLowLimit, IntHighLimit), heSpectra[j]->Integral(intLowLimit, IntHighLimit),
hsSpectra[j]->Integral(intLowLimit, IntHighLimit)/heSpectra[j]->Integral(intLowLimit, IntHighLimit) );
intLowLimit = (Int_t)2.5/binToMeV;
IntHighLimit = (Int_t)3.2/binToMeV;
Info("statesRatioFitting", "left slope: %3.1f (sim)/ %3.1f (exp) = %3.3f\n",
hsSpectra[j]->Integral(intLowLimit, IntHighLimit), heSpectra[j]->Integral(intLowLimit, IntHighLimit),
hsSpectra[j]->Integral(intLowLimit, IntHighLimit)/heSpectra[j]->Integral(intLowLimit, IntHighLimit) );
}//for j }//for j
SaveFigures(cSpectra, "Spectra", 0); SaveFigures(cSpectra, "Spectra", 0);
Info("sfAngInt_spectra.cxx", "Finished."); Info("sfAngInt_spectra.cxx", "Finished.");
printf("\n");
} }
...@@ -1100,6 +1115,23 @@ void BeAnalysis::SaveFigures(TCanvas *canvas, TString variable, Int_t interval) ...@@ -1100,6 +1115,23 @@ void BeAnalysis::SaveFigures(TCanvas *canvas, TString variable, Int_t interval)
} }
void BeAnalysis::SetSimCuts(TString sEt[5]/*, TString sET0, TString sET1, TString sET2, TString sET3, TString sET4*/) {
// if (sEt == 0) {
// Error("BeAnalysis::SetSimCuts", "String array empty, no effect.");
// return;
// }
for (Int_t i = 0; i < 5; i++) {
// cout << sEt[i].Sizeof() << endl;
if (sEt[i].Sizeof() <= 1) continue;
crBeE[i] = sEt[i];
Info("BeAnalysis::SetSimCuts", "crBeE[%d] was changed to \'%s\'.", i, sEt[i].Data());
// cout << crBeE[i] << endl;
}
}
void BeAnalysis::CanvasDivision(TCanvas* c) { void BeAnalysis::CanvasDivision(TCanvas* c) {
c->Divide(2, 3, 0., 0.); c->Divide(2, 3, 0., 0.);
} }
...@@ -42,7 +42,10 @@ public: ...@@ -42,7 +42,10 @@ public:
TChain* GetSimChain(Int_t i) {return chs[i];}; TChain* GetSimChain(Int_t i) {return chs[i];};
void SetChainsToDraw(Bool_t ch0 = 1, Bool_t ch1 = 1, Bool_t ch2 = 1, Bool_t ch3 = 1, Bool_t ch4 = 1, Bool_t ch5 = 1); void SetChainsToDraw(Bool_t ch0 = 1, Bool_t ch1 = 1, Bool_t ch2 = 1, Bool_t ch3 = 1, Bool_t ch4 = 1, Bool_t ch5 = 1);
private:
void SetCuts(); void SetCuts();
public:
void SetSimCuts(TString sEt[5]/*, TString sET0 = "", TString sET1 = "", TString sET2 = "", TString sET3 = "", TString sET4 = ""*/);
void SetCMAngularRange(Int_t minAngle, Int_t maxAngle); void SetCMAngularRange(Int_t minAngle, Int_t maxAngle);
private: private:
...@@ -129,14 +132,14 @@ private: ...@@ -129,14 +132,14 @@ private:
Double_t eTRange[5][6]; //! Double_t eTRange[5][6]; //!
//cuts //cuts
TCut cBe20; // TCut cBe20;
TCut cBe3; // TCut cBe3;
TCut cBeWork; TCut cBeWork;
TCut cBe0_14; // TCut cBe0_14;
TCut cBe14_19; // TCut cBe14_19;
TCut cBe19_25; // TCut cBe19_25;
TCut cBe25_31; // TCut cBe25_31;
TCut cBe31_37; // TCut cBe31_37;
TCut cBeE[5]; TCut cBeE[5];
TCut cEpsilonT; TCut cEpsilonT;
...@@ -144,14 +147,14 @@ private: ...@@ -144,14 +147,14 @@ private:
//raw files //raw files
//energy cuts //energy cuts
TCut crBe20; // TCut crBe20;
TCut crBe3; // TCut crBe3;
TCut crBeWork; TCut crBeWork;
TCut crBe0_14; // TCut crBe0_14;
TCut crBe14_19; // TCut crBe14_19;
TCut crBe19_25; // TCut crBe19_25;
TCut crBe25_31; // TCut crBe25_31;
TCut crBe31_37; // TCut crBe31_37;
TCut crBeE[5]; TCut crBeE[5];
//angular cuts //angular cuts
...@@ -159,11 +162,6 @@ private: ...@@ -159,11 +162,6 @@ private:
TCut crEpsilonY; TCut crEpsilonY;
//simulation input //simulation input
// TCut ciBe0_14;
// TCut ciBe14_19;
// TCut ciBe19_25;
// TCut ciBe25_31;
// TCut ciBe31_37;
TCut ciBeE[5]; TCut ciBeE[5];
TCut ciEpsilon; TCut ciEpsilon;
......
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