// --------------------------------------------------------------------- // ----- Target header file ----- // ----- Created 10/11/13 by J. Lukasik ----- // --------------------------------------------------------------------- #ifndef __CINT__ #include #include "TBox.h" #include "TCanvas.h" #include "TFile.h" #include "TH1F.h" #include "TH1D.h" #include "TH2F.h" #include "TNtuple.h" #include "TProfile.h" #include "TRandom.h" #include "TSystem.h" #include "TTree.h" #include "TVector3.h" #include "TSystem.h" #endif #include "TBox.h" #include "TCanvas.h" #include "TH1F.h" #include "TPaveLabel.h" #include "TROOT.h" #include "TMath.h" #include "TRandom3.h" #include "TGraph2D.h" #include "TH3D.h" #include "KRATTAtgt.hxx" ClassImp(Target) //______________________________________________________________________ Target::Target() { sprintf(dat[0].Name,"EMPTY"); sprintf(dat[0].Material,"Au"); dat[0].A = 0.; // dat[0].Thickness = 0.; //[um] dat[0].Density = 0.; //[g/cm3] dat[0].Diameter = 0.; //[mm] dat[0].Weight = 0.; //[mg] sprintf(dat[1].Name,"Au1"); sprintf(dat[1].Material,"Au"); dat[1].A = 197.; // dat[1].Thickness = 250; //[um] dat[1].Density = 19.32; //[g/cm3] dat[1].Diameter = 42; //[mm] dat[1].Weight = 6691.7; //[mg] sprintf(dat[2].Name,"Au2"); sprintf(dat[2].Material,"Au"); dat[2].A = 197.; // dat[2].Thickness = 500; //[um] dat[2].Density = 19.32; //[g/cm3] dat[2].Diameter = 42; //[mm] dat[2].Weight = 13383.4;//[mg] sprintf(dat[3].Name, "Ru"); sprintf(dat[3].Material,"Ru"); dat[3].A = 96.; // dat[3].Thickness = 355; //[um] dat[3].Density = 12.41; //[g/cm3] dat[3].Diameter = 9; //[mm] dat[3].Weight = 280.5; //[mg] sprintf(dat[4].Name,"ZrO2"); sprintf(dat[4].Material,"ZrO2"); dat[4].A = 96.; // dat[4].Thickness = 1056; //[um] dat[4].Density = 5.68; //[g/cm3] dat[4].Diameter = 10; //[mm] dat[4].Weight = 470.9; //[mg] sprintf(dat[5].Name,"H3BO3"); sprintf(dat[5].Material,"H3BO3"); dat[5].A = 16.; // dat[5].Thickness = 1159; //[um] dat[5].Density = 1.851; //[g/cm3] dat[5].Diameter = 10; //[mm] dat[5].Weight = 168.5; //[mg] printf("[Target:] Target constructed\n"); } //______________________________________________________________________ Target::~Target(){} //______________________________________________________________________ void Target::Printf(){ printf("[Target:] No Symbol thck[um] dens[g/cm3] diam[mm] weight[mg]\n"); for(int it=0;it<6;it++){ printf( "%d %10s %4.0f um %6.3f g/cm3 %2.0f mm %9.1f mg\n", it, dat[it].Name, dat[it].Thickness, dat[it].Density, dat[it].Diameter, dat[it].Weight); } } //______________________________________________________________________ Int_t Target::No(Int_t run) { int no=0; if(run<=17) {no=0;}//EMPTY else if(run<=1127) {no=1;}//Au1 else if(run<=1149) {no=0;}//EMPTY else if(run<=1188) {no=2;}//Au2 else if(run<=1209) {no=0;}//EMPTY else if(run<=1340) {no=2;}//Au2 else if(run<=1374) {no=1;}//Au1 else if(run<=1391) {no=0;}//EMPTY else if(run<=1424) {no=1;}//Au1 else if(run<=1429) {no=0;}//EMPTY else if(run<=1651) {no=2;}//Au2 else if(run<=1660) {no=0;}//EMPTY else if(run<=1755) {no=2;}//Au2 else if(run<=1768) {no=0;}//EMPTY else if(run<=1844) {no=2;}//Au2 else if(run<=1854) {no=3;}//Ru else if(run<=1858) {no=0;}//EMPTY else if(run<=1929) {no=3;}//Ru else if(run<=1931) {no=0;}//EMPTY else if(run<=1959) {no=3;}//Ru else if(run<=1963) {no=0;}//EMPTY else if(run<=1974) {no=3;}//Ru else if(run<=2025) {no=0;}//EMPTY else if(run<=2112) {no=4;}//ZrO2 else if(run<=2128) {no=5;}//H3BO3 else if(run<=2157) {no=4;}//ZrO2 else if(run<=2168) {no=5;}//H3BO3 else if(run<=2177) {no=0;}//EMPTY else if(run<=2227) {no=4;}//ZrO2 else {no=0;}//EMPTY return no; } //______________________________________________________________________ void KRATTAtgt(Int_t run=1356){ printf("[Target:] run %d\n",run); Target *tgt = new Target(); tgt->Printf(); // printf("No Symbol thck[um] dens[g/cm3] diam[mm] weight[mg]\n"); // for(int it=0;it<6;it++){ // printf("%d %10s %4.0f um %6.3f g/cm3 %2.0f mm %9.1f mg\n", // it, // tgt->dat[it].Name, // tgt->dat[it].Thickness, // tgt->dat[it].Density, // tgt->dat[it].Diameter, // tgt->dat[it].Weight); // } // // for(int irun=1333;irun<1335;irun++){ // printf("%4d %10s %4.0f um %6.3f g/cm3 %2.0f mm %9.1f mg\n", // irun, // tgt->Name(irun), // tgt->Thickness(irun), // tgt->Density(irun), // tgt->Diameter(irun), // tgt->Weight(irun)); // } }