ES1_7590.cxx 10.3 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 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270
void ES1_7590()
{
	//open chain with Be events only and draw E_Be

	//order: al0, noal0, al180, noal180

	TStopwatch sw;
	sw.Start();

	BeAnalysis ana;

	ana.SetCMAngularRange(75, 90);

	ana.SetChainsToDraw(0, 1, 1, 0, 0, 0);

	ana.SetExpChain("../../../be/rootdata/correlations/v5_exp/Be.", 0, 40);

	const Long64_t eMaxEvents = 5000000;
	Long64_t eEvents[6] = {eMaxEvents, eMaxEvents, eMaxEvents, eMaxEvents, eMaxEvents, eMaxEvents};
	ana.SetNoExpEvents(eEvents);

	const Long64_t sMaxEvents = 3000000;
	Long64_t sEvents[6] = {2050000, 2050000, 2050000, 2050000, 1900000, 1950000};
	cout << sEvents << endl;
	ana.SetNoSimEvents(sEvents);

	const Int_t lowSimFile[6] = {0, 0, 0, 0, 0, 0};
//	const Int_t upSimFile[6] = {5, 5, 5, 5, 5, 5};
	const Int_t upSimFile[6] = {12, 12, 12, 12, 12, 12};
	ana.SetNoSimFiles(lowSimFile, upSimFile);
	ana.SetSimChains("../../../be/rootdata/correlations/v5_7590/Sim_mix_br_al_0_65-100_",
			"../../../be/rootdata/correlations/v5_7590/Sim_mix_br_noal_0_65-100_",
			"../../../be/rootdata/correlations/v5_7590/Sim_mix_br_al_180_65-100_",
			"../../../be/rootdata/correlations/v5_7590/Sim_mix_br_noal_180_65-100_",
			"../../../be/rootdata/correlations/v5_7590/Sim_mix_br_al_90_65-100_",
			"../../../be/rootdata/correlations/v5_7590/Sim_mix_br_noal_90_65-100_");

	ana.SetInputChains("../../../be/rootdata/correlations/v5_7590/Sim_mix_br_al_0_65-100_000.root",
			"../../../be/rootdata/correlations/v5_7590/Sim_mix_br_noal_0_65-100_000.root",
			"../../../be/rootdata/correlations/v5_7590/Sim_mix_br_al_180_65-100_000.root",
			"../../../be/rootdata/correlations/v5_7590/Sim_mix_br_noal_180_65-100_000.root",
			"../../../be/rootdata/correlations/v5_7590/Sim_mix_br_al_90_65-100_000.root",
			"../../../be/rootdata/correlations/v5_7590/Sim_mix_br_noal_90_65-100_000.root");


	ana.OpenExpChain();
	ana.OpenSimChains();


	ana.Spectra();

	ana.EpsilonT();

	sw.Print();
	sw.Continue();

	return;



//	const Int_t kMinAngle = 75;
//	const Int_t kMaxAngle = 90;
//
//	const Int_t lowfile = 0;
//	const Int_t upfile = 40;

//	const Int_t lowSimFile[6] = {0, 0, 0, 0, 0, 0};
////	const Int_t upSimFile[6] = {5, 5, 5, 5, 5, 5};
//	const Int_t upSimFile[6] = {12, 12, 12, 12, 12, 12};

	const Bool_t shapeFit = 0;

//	TCut cAngles = "fBeThetaCM1>75*TMath::DegToRad() && fBeThetaCM1<90*TMath::DegToRad()";
//	TCut crAngles = "f6BeThetaCM1>75*TMath::DegToRad() && f6BeThetaCM1<90*TMath::DegToRad()";

	//simulations
	//aligned, 0 degrees
////	TString chainAl0name = "/data2/be/rootdata/correlations/v5_7590/Sim_mix_br_al_0_65-100_";
//	TString inputTreeAl0name = "/data2/be/rootdata/correlations/v5_7590/Sim_mix_br_al_0_65-100_000.root";
//	//isotropic, 0 degrees
////	TString chainNoAl0name = "/data2/be/rootdata/correlations/v5_7590/Sim_mix_br_noal_0_65-100_";
//	TString inputTreeNoAl0name = "/data2/be/rootdata/correlations/v5_7590/Sim_mix_br_noal_0_65-100_000.root";
//	//aligned, 180 degrees
////	TString chainAl180name = "/data2/be/rootdata/correlations/v5_7590/Sim_mix_br_al_180_65-100_";
//	TString inputTreeAl180name = "/data2/be/rootdata/correlations/v5_7590/Sim_mix_br_al_180_65-100_000.root";
//	//isotropic, 180 degrees
////	TString chainNoAl180name = "/data2/be/rootdata/correlations/v5_7590/Sim_mix_br_noal_180_65-100_";
//	TString inputTreeNoAl180name = "/data2/be/rootdata/correlations/v5_7590/Sim_mix_br_noal_180_65-100_000.root";
//	//isotropic, 90 degrees
////	TString chainAl90name = "/data2/be/rootdata/correlations/v5_7590/Sim_mix_br_al_90_65-100_";
//	TString inputTreeAl90name = "/data2/be/rootdata/correlations/v5_7590/Sim_mix_br_al_90_65-100_000.root";
//	//isotropic, 90 degrees
////	TString chainNoAl90name = "/data2/be/rootdata/correlations/v5_7590/Sim_mix_br_noal_90_65-100_";
//	TString inputTreeNoAl90name = "/data2/be/rootdata/correlations/v5_7590/Sim_mix_br_noal_90_65-100_000.root";

	//open tree with MC simulations
//	gROOT->ProcessLine(".x corr_templates/sfAngInt_opensimtree.cxx");

//	TChain *che = BeWork::OpenChain("/data2/be/rootdata/correlations/v5_exp/Be.",
//			lowfile, upfile, "beonly");										//original file
//	Info("statesRatioFitting.cxx", "%d events in chain \"%s\" containing experimental data",
//			che->GetEntries(), che->GetName());

//	gROOT->ProcessLine(".x corr_templates/sfAngInt_cuts.cxx");

	//auxiliary strings
	TString drawCommand;
	TString hsName;
	TString heName;
	TString hiName;


	sw.Print();
	sw.Continue();

	const Bool_t savePictures = 0;
	TString ppath = "pictures/correlations/v5_7590/";
	TString configuration = "v5_7590";
//	TString pictFormat = ".ps";
//	gStyle->SetHistLineWidth(1);
	TString pictFormat = ".eps";
//	TString pictFormat = ".gif";
//	TString pictFormat = ".jpg";

	const Bool_t kVerbose = 1;
	const Bool_t kAutoRange = 1;
	//	const Float_t kRangeProportion = 1.2;
	const Float_t kRangeProportion = 1.1;
	//	const Float_t kRangeProportionIn = 1.1;
	const Float_t kRangeProportionIn = 2.0;

	const Bool_t kChains[6] = {0,0,0,1,0,1};
//	const Bool_t kChains[6] = {1,1,1,1,1,1};

	const Bool_t spectra = 0;

	const Int_t nointervals = 5;

//	const Bool_t cosThetaT[nointervals] = {1,1,1,1,1};
	const Bool_t cosThetaT[nointervals] = {0,0,0,0,0};
	const Bool_t epsilonT[nointervals] = {0,0,1,0,0};
//	const Bool_t epsilonT[nointervals] = {1,1,1,1,1};

	const Bool_t epsilonY[nointervals] = {0,0,0,0,0};
//	const Bool_t epsilonY[nointervals] = {1,1,1,1,1};
	const Bool_t cosThetaY[nointervals] = {0,0,0,0,0};
//	const Bool_t cosThetaY[nointervals] = {1,1,1,1,1};

	//quasibinary kinematics
	const Bool_t thetaAT[nointervals] = {0,0,0,0,0};
//	const Bool_t thetaAT[nointervals] = {1,1,1,1,1};
	const Bool_t thetaP1T[nointervals] = {0,0,0,0,0};
//	const Bool_t thetaP1T[nointervals] = {1,1,1,1,1};
	const Bool_t thetaP2Y[nointervals] = {0,0,0,0,0};
	
	//0-2 MeV, 2-3.1 MeV
	TCut sRatioAl0 = "sRatio>0.075 && sRatio<0.125";
	TCut sRatioNoAl0 = "sRatio>0.076 && sRatio<0.126";
	TCut sRatioAl180 = "sRatio>0.070 && sRatio<0.120";
//	TCut sRatioAl180 = "sRatio>0.050 && sRatio<0.100";
	TCut sRatioNoAl180 = "sRatio>0.070 && sRatio<0.120";
//	TCut sRatioNoAl180 = "sRatio>0.010 && sRatio<0.150";
	TCut sRatioAl90 = "sRatio>0.075 && sRatio<0.125";
	TCut sRatioNoAl90 = "sRatio>0.076 && sRatio<0.126";
	TCut sRatio[6] = {sRatioAl0, sRatioNoAl0, sRatioAl180, sRatioNoAl180, sRatioAl90, sRatioNoAl90};

	//integral fit
//	const Long64_t eMaxEvents = 5000000;
//	Long64_t eEventsAl0 = eMaxEvents;
//	Long64_t eEventsNoAl0 = eMaxEvents;
//	Long64_t eEventsAl180 = eMaxEvents;
//	Long64_t eEventsNoAl180 = eMaxEvents;
//	Long64_t eEventsAl90 = eMaxEvents;
//	Long64_t eEventsNoAl90 = eMaxEvents;

	Long64_t eEventsECuts[5][6] = {eMaxEvents, eMaxEvents, eMaxEvents, eMaxEvents, eMaxEvents, eMaxEvents,
									eMaxEvents, eMaxEvents, eMaxEvents, eMaxEvents, eMaxEvents, eMaxEvents,
									eMaxEvents, eMaxEvents, eMaxEvents, eMaxEvents, eMaxEvents, eMaxEvents,
									eMaxEvents, eMaxEvents, eMaxEvents, eMaxEvents, eMaxEvents, eMaxEvents,
									eMaxEvents, eMaxEvents, eMaxEvents, eMaxEvents, eMaxEvents, eMaxEvents};

//	const Long64_t eEvents[6] = {eEventsAl0, eEventsNoAl0, eEventsAl180, eEventsNoAl180, eEventsAl90, eEventsNoAl90};
//	const TChain *chs[6] = {chsAl0, chsNoAl0, chsAl180, chsNoAl180, chsAl90, chsNoAl90};
//	const TTree *ti[6] = {tiAl0, tiNoAl0, tiAl180, tiNoAl180, tiAl90, tiNoAl90};

//	const Long64_t sMaxEvents = 3000000;
//	Long64_t sEventsAl0 = 2050000;
//	Long64_t sEventsNoAl0 = 2050000;
//	Long64_t sEventsAl180 = 2050000;
//	Long64_t sEventsNoAl180 = 2050000;
//	Long64_t sEventsAl90 = 1900000;
//	Long64_t sEventsNoAl90 = 1950000;
//	const Long64_t sEvents[6] = {sEventsAl0, sEventsNoAl0, sEventsAl180, sEventsNoAl180, sEventsAl0, sEventsNoAl0};

	const Long64_t sMaxEvents = 3000000;
	Long64_t sEventsECuts[5][6] = {/*sMaxEvents, sMaxEvents, sMaxEvents, sMaxEvents, sMaxEvents, sMaxEvents,*/
									2020000, 2040000, 2130000, 2080000, 2060000, 2080000,
									2000000, 2020000, 2000000, 2010000, 1990000, 1970000,
									2320000, 2300000, 2340000, 2310000, 2300000, 2290000,
									2060000, 2070000, 2110000, 2110000, 2070000, 2060000,
									2050000, 2050000, 2110000, 2110000, 2050000, 2050000};

	TString canvasTitle;
	TString canvasName;

	//spectra
	const Double_t sRange[6] = {2000, 2000, 2000, 2000, 2000, 2000};
	if (spectra) {
		gROOT->ProcessLine(".x corr_templates/sfAngInt_spectra_v5.cxx");
	}

	// "T" system
	const Double_t eTRange[5][6] = {280, 280, 280, 280, 280, 280,
									350, 350, 350, 350, 350, 350,
									350, 350, 350, 350, 350, 350,
									630, 630, 630, 630, 630, 630,
									700, 700, 700, 700, 700, 700};
	gROOT->ProcessLine(".x corr_templates/sfAngInt_epsilonT.cxx");

	const Double_t coskTRange[5][6] = {300, 300, 300, 300, 300, 300,
										350, 350, 350, 350, 350, 350,
										350, 350, 350, 350, 350, 350,
										900, 900, 900, 900, 900, 900,
										1100, 1100, 1100, 1100, 1100, 1100};
	gROOT->ProcessLine(".x corr_templates/sfAngInt_cosThetaTk.cxx");

	// "Y" system
	const Double_t eYRange[5][6] = {350, 350, 350, 350, 350, 350,
									400, 400, 400, 400, 400, 400,
									450, 450, 450, 450, 450, 450,
									1000, 1000, 1000, 1000, 1000, 1000,
									1300, 1300, 1300, 1300, 1300, 1300};
	gROOT->ProcessLine(".x corr_templates/sfAngInt_epsilonY.cxx");

	const Double_t coskYRange[5][6] = {230, 230, 230, 230, 230, 230,
									350, 350, 350, 350, 350, 350,
									350, 350, 350, 350, 350, 350,
									600, 600, 600, 600, 600, 600,
									650, 650, 650, 650, 650, 650};
	gROOT->ProcessLine(".x corr_templates/sfAngInt_cosThetaYk.cxx");

	//quasibinary kinematics: diproton
	const Double_t tP1Range[5][6] = {80, 80, 80, 80, 80, 80,
									120, 120, 120, 120, 120, 120,
									160, 120, 160, 120, 160, 120,
									250, 200, 250, 200, 250, 200,
									240, 240, 240, 240, 240, 240};
	gROOT->ProcessLine(".x corr_templates/sfAngInt_thetaP1T.cxx");

	const Double_t tARange[5][6] = {80, 80, 80, 80, 80, 80,
									130, 130, 130, 130, 130, 130,
									200, 120, 200, 120, 200, 120,
									300, 200, 300, 200, 300, 200,
									270, 270, 270, 270, 270, 270};
	gROOT->ProcessLine(".x corr_templates/sfAngInt_thetaAT.cxx");

	//quasibinary kinematics: 5Li
	const Double_t tP2YRange[5][6] = {50, 50, 50, 50, 50, 50,
									75, 75, 75, 75, 75, 75,
									110, 70, 110, 70, 110, 70,
									300, 300, 300, 300, 300, 300,
									200, 200, 200, 200, 200, 200};
	gROOT->ProcessLine(".x corr_templates/sfAngInt_thetaP2Y.cxx");

	Info("correlations_v5_7590.cxx", "Finished.");


}