deadlayers.cxx 2.55 KB
Newer Older
Kostyleva D.A's avatar
Kostyleva D.A committed
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
{
	gSystem->Load("/home/dariak/AculUtils/libTELoss.so");

	TELoss	mSi;
//set parameters for Si and alpha
	mSi.SetEL(1, 2.321); // density in g/cm3
	mSi.AddEL(14., 28.086, 1);  //Z, mass
//	mSi.SetZP(1., 1.);		//protons
	mSi.SetZP(2., 4.);		//alphas, Z, A
	mSi.SetEtab(100000, 200.);	// ?, MeV calculate ranges
	mSi.SetDeltaEtab(300);        // calculate delta E

//	TCanvas *c1 = new TCanvas("name", "title which can consist more than one word.", 617, 0, 1058, 972);
//	cout << mSi.GetE(50, 1000) << endl;	//(input energy E0 in MeV, microns)  
//	cout << mSi.GetE0(9.04, 1000) << endl;	//(output energy E in MeV, microns) 

//calculated energies for run1 - run3 
/*
	Double_t deltaL1 = mSi.GetR(4.789, 4.623); //(doule E0, double E in MeV) calculates layer in mcm for averages 
	Double_t deltaL2 = mSi.GetR(5.5,5.355);  
	Double_t deltaL3 = mSi.GetR(6.017,5.880); 
	Double_t deltaL4 = mSi.GetR(7.693, 7.577); 
*/
//calculated energies for run4 - run5
/*
	Double_t deltaL1 = mSi.GetR(4.782,4.613); //(doule E0, double E in MeV) calculates layer in mcm for averages 
	Double_t deltaL2 = mSi.GetR(5.503,5.348);  
	Double_t deltaL3 = mSi.GetR(6.016,5.875); 
	Double_t deltaL4 = mSi.GetR(7.692,7.571); 
*/

//calculated energies for run6 - run7
/*
	Double_t deltaL1 = mSi.GetR(4.788,4.675); //(doule E0, double E in MeV) calculates layer in mcm for averages 
	Double_t deltaL2 = mSi.GetR(5.502,5.340);  
	Double_t deltaL3 = mSi.GetR(6.017,5.923); 
	Double_t deltaL4 = mSi.GetR(7.693,7.612); 
*/
//calculated energies for run8 - run9


	Double_t deltaL1 = mSi.GetR(4.78827875,4.626188125); //(doule E0, double E in MeV) calculates layer in mcm for averages 
	Double_t deltaL2 = mSi.GetR(5.501093125,5.3578121875);  
	Double_t deltaL3 = mSi.GetR(6.0182040625,5.88149375); 
	Double_t deltaL4 = mSi.GetR(7.69191375,7.5725915625); 

	cout << deltaL1 << " mcm" << endl;	//MeV, microns -  delta layer
	cout << deltaL2 << " mcm" << endl;	
	cout << deltaL3 << " mcm" << endl;	
	cout << deltaL4 << " mcm" << endl << endl;	

	cout << "dead layer 1 is: " << deltaL1/(TMath::Sqrt(2) - 1) << " mcm" << endl;	//MeV, microns
	cout << "dead layer 2 is: " <<deltaL2/(TMath::Sqrt(2) - 1) << " mcm" << endl;	//MeV, microns
	cout << "dead layer 3 is: " <<deltaL3/(TMath::Sqrt(2) - 1) << " mcm" << endl;	//MeV, microns
	cout << "dead layer 4 is: " <<deltaL4/(TMath::Sqrt(2) - 1) << " mcm" << endl << endl;	//MeV, microns

	cout << "Dead layer of Si detector is : " << ( deltaL1/(TMath::Sqrt(2) - 1) + deltaL2/(TMath::Sqrt(2) - 1)+ deltaL3/(TMath::Sqrt(2) - 1) + deltaL4/(TMath::Sqrt(2) - 1) )/4. << " mcm" << endl; //dead layer width

}