#include #include #include "TFile.h" #include "TProfile.h" #include "TCanvas.h" #include "TH1.h" #include "TVector.h" #include "TObjArray.h" #include #include #include using namespace std; double CalculateLambdaAtExpectedCL(, TH1D* BackgroundEnergy, TH1D* SignalEnergy); void CLc_level_searching(){ double lumi = 500.0; double Pe = 0.0; double Pp = 0.0; char filename[256]; char _operator[20]; double _mass=102; double _spin=0.5; double _lambda =1580; double ExpCL = 0.9; //0.997 //sprintf(_operator,"Vector"); //sprintf(_operator,"Scalar,s-channel"); sprintf(_operator,"Axial-vector"); cout<<_operator<cd(); sprintf(filename,"M%.0f_S%.1f_%s_Lambda%.0f",_mass,_spin,_operator,_lambda); TH1D* sh=(TH1D*)infile_sig->Get(filename); //sprintf(filename,"/afs/desy.de/group/flc/pool/achaus/WIMPs/data/Templates_Andrii/Data_Background_Pe%.1f_Pp%.1f_Lumi%.0f.root",Pe,Pp,lumi); //TFile * infile_bg = new TFile(filename,"READ"); //infile_bg->cd(); sprintf(filename,"Background_Pe%.1f_Pp%.1f_Lumi%.0f",Pe,Pp,lumi); TH1D* bh=(TH1D*)infile_sig->Get(filename); cout<Fill(_mass,k); infile_sig->Close(); //infile_bg->Close(); } f->cd(); Sensitivity->Write(); cout<<"END LOOP"<Close(); cout<<"SAVE FILE"<AddLast(&name1); names->AddLast(&name2); errorb[0]=0.003; // error source 1: 0.3% errors[0]=0.0; // error source 1: 0% // errorb[1]=0.0; // error source 2: 0% // errors[1]=0.0; // error source 2: 0% TLimitDataSource *infile = new TLimitDataSource(SignalEnergy,BackgroundEnergy,BackgroundEnergy,&errors,&errorb,names); TConfidenceLevel *confidence = TLimit::ComputeLimit(infile,10000); CLs = confidence->GetExpectedCLs_b(); cout<