Commit e7924428 authored by Vratislav Chudoba's avatar Vratislav Chudoba

Function SetSimCuts() added.

parent 59525b13
......@@ -53,6 +53,7 @@ void BeAnalysis::OpenSimChains() {
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);
}
printf("\n");
}
......@@ -66,17 +67,18 @@ void BeAnalysis::OpenExpChain() {
}
void BeAnalysis::SetCuts() {
cBe20 = "fBeIM>0 && fBeIM<20";
cBe3 = "fBeIM>0 && fBeIM<3";
// cBe20 = "fBeIM>0 && fBeIM<20";
// cBe3 = "fBeIM>0 && fBeIM<3";
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.20";
cBe14_19 = "fBeIM>1.4 && fBeIM<1.9";
cBe19_25 = "fBeIM>1.9 && fBeIM<2.5";
cBe25_31 = "fBeIM>2.5 && fBeIM<3.1";
cBe31_37 = "fBeIM>3.1 && fBeIM<3.7";
TCut cBe14_19 = "fBeIM>1.4 && fBeIM<1.9";
// cBe14_19 = "fBeIM>1.4 && fBeIM<2.0";
TCut cBe19_25 = "fBeIM>1.9 && fBeIM<2.5";
TCut cBe25_31 = "fBeIM>2.5 && fBeIM<3.1";
TCut cBe31_37 = "fBeIM>3.1 && fBeIM<3.7";
//array:
cBeE[0] = cBe0_14;
cBeE[1] = cBe14_19;
......@@ -91,17 +93,18 @@ void BeAnalysis::SetCuts() {
//raw files
//energy cuts
crBe20 = "f6BeIM>0 && f6BeIM<20";
crBe3 = "f6BeIM>0 && f6BeIM<3";
// crBe20 = "f6BeIM>0 && f6BeIM<20";
// crBe3 = "f6BeIM>0 && f6BeIM<3";
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.5 && f6BeIM<1.20";
crBe14_19 = "f6BeIM>1.4 && f6BeIM<1.9";
crBe19_25 = "f6BeIM>1.9 && f6BeIM<2.5";
crBe25_31 = "f6BeIM>2.5 && f6BeIM<3.1";
crBe31_37 = "f6BeIM>3.1 && f6BeIM<3.7";
TCut crBe14_19 = "f6BeIM>1.4 && f6BeIM<1.9";
// TCut crBe14_19 = "f6BeIM>1.6 && f6BeIM<2.1";
TCut crBe19_25 = "f6BeIM>1.9 && f6BeIM<2.5";
TCut crBe25_31 = "f6BeIM>2.5 && f6BeIM<3.1";
TCut crBe31_37 = "f6BeIM>3.1 && f6BeIM<3.7";
//array:
crBeE[0] = crBe0_14;
crBeE[1] = crBe14_19;
......@@ -263,7 +266,7 @@ void BeAnalysis::Spectra() {
for (Int_t j = 0; j < 6; j++) { //different files
if (!kChains[j]) continue;
cout << kChains[j] << endl;
// cout << kChains[j] << endl;
cSpectra->cd(j+1);
chs[j]->SetLineColor(kBlue);
chs[j]->SetFillColor(kWhite);
......@@ -316,15 +319,27 @@ void BeAnalysis::Spectra() {
cSpectra->Update();
cout << endl;
Int_t intLowLimit, IntHighLimit;
const Double_t binToMeV = 10./(Double_t)noBinsSpectra;
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) );
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) );
intLowLimit = (Int_t)0./binToMeV;
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
SaveFigures(cSpectra, "Spectra", 0);
Info("sfAngInt_spectra.cxx", "Finished.");
printf("\n");
}
......@@ -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) {
c->Divide(2, 3, 0., 0.);
}
......@@ -42,7 +42,10 @@ public:
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);
private:
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);
private:
......@@ -129,14 +132,14 @@ private:
Double_t eTRange[5][6]; //!
//cuts
TCut cBe20;
TCut cBe3;
// TCut cBe20;
// TCut cBe3;
TCut cBeWork;
TCut cBe0_14;
TCut cBe14_19;
TCut cBe19_25;
TCut cBe25_31;
TCut cBe31_37;
// TCut cBe0_14;
// TCut cBe14_19;
// TCut cBe19_25;
// TCut cBe25_31;
// TCut cBe31_37;
TCut cBeE[5];
TCut cEpsilonT;
......@@ -144,14 +147,14 @@ private:
//raw files
//energy cuts
TCut crBe20;
TCut crBe3;
// TCut crBe20;
// TCut crBe3;
TCut crBeWork;
TCut crBe0_14;
TCut crBe14_19;
TCut crBe19_25;
TCut crBe25_31;
TCut crBe31_37;
// TCut crBe0_14;
// TCut crBe14_19;
// TCut crBe19_25;
// TCut crBe25_31;
// TCut crBe31_37;
TCut crBeE[5];
//angular cuts
......@@ -159,11 +162,6 @@ private:
TCut crEpsilonY;
//simulation input
// TCut ciBe0_14;
// TCut ciBe14_19;
// TCut ciBe19_25;
// TCut ciBe25_31;
// TCut ciBe31_37;
TCut ciBeE[5];
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