* Main logic broken up into subunits that aim to be self-contained. The entirety of the analysis is aimed to follow:
- find sx3 events, gainmatch them, calibrate, make a vector of these called SX3_Events - same step for QQQ, call it QQQ_Events - find anodeWire clusters, cathodeWire clusters, make vectors of these - make PC_Events from wire clusters, save 'anode only' and 'cathode only' cases just in case * since PC_Events, QQQ_Events, SX3_Events are all STL containers, we can pass them to functions that perform modular analyses * In this commit: - 4-wire offsets used, along with reliably figuring out phi-offset between QQQ/SX3/PC. We are close, except for some QQQ fine-tuning due to their angular extent not being 90 deg - the pczfix step now makes sense, 1-wire calculations also loosely match between guess and pcz - the nonlinearity correction/dynamic range fix is just adding to the resolution - p(a,a) data analysable by QQQ alphas show good kinematics, when doing the following gates: > A1C1 event pczs dithered, A1C2 events made into pczfix > phicut (45 deg) to gate out p+a correlations, SiE < 5 MeV && PCa > 6000 to select the alpha blob in p+a > Some selection on VertexReconXY so that the Perp() of the vertex is < 6mm > Selection on VertexReconZ so that z is in [-173.6, 100]. Fine alignment pending - Doing all the above gives reasonable p(a,a) kinematic curves with good statistics, Ex peaked at -0.7 MeV, close but not perfect - The above steps, when repeated with oneWire anode events stored in aClusters also yields a very reasonable kinematic locus, and Ex value, even more statistics - Not sure how much of this is autocorrelation stuff but > VertexReconZ vs Ef in QQQ (Ef is eloss-fixed alpha energy using path length) shows sensible trends. - Why Ex is not centered around zero might need more thought. - VertexReconXY is suspiciously well-centered, might need some more thought as well. * Some infrastructure that allows processing of 17F data is also in the pipeline now. * One fairly important bug got fixed which was ignoring qqq.id[0] when making QQQ_Events * Ideally, follow-ups to the above done on 27Al, 17F will make their own functions that are then called separately using booleans at the very top. * The fate of proton dE signals is out to jury.
This commit is contained in:
parent
7be45f35df
commit
2f43903269
|
|
@ -14,6 +14,7 @@ public:
|
|||
unsigned short ch[MAXMULTI];
|
||||
unsigned short e[MAXMULTI];
|
||||
unsigned long long t[MAXMULTI];
|
||||
unsigned long long tf[MAXMULTI];
|
||||
|
||||
unsigned short sn[MAXMULTI];
|
||||
unsigned short digiCh[MAXMULTI];
|
||||
|
|
@ -28,6 +29,7 @@ public:
|
|||
ch[i] = 0;
|
||||
e[i] = 0;
|
||||
t[i] = 0;
|
||||
tf[i] = 0;
|
||||
index[i] = 0;
|
||||
sn[i] = 0;
|
||||
digiCh[i] = 0;
|
||||
|
|
@ -38,7 +40,7 @@ public:
|
|||
void Print(){
|
||||
printf("=============================== multi : %u\n", multi);
|
||||
for( int i = 0; i < multi; i++) {
|
||||
printf(" %3d | %2d-%-2d(%5d) %5u %15llu \n", i, id[i], ch[i], index[i], e[i], t[i]);
|
||||
printf(" %3d | %2d-%-2d(%5d) %5u %15llu %15llu\n", i, id[i], ch[i], index[i], e[i], t[i], tf[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -85,13 +85,14 @@ public:
|
|||
TVector3 GetAnodneMid(short id) const { return (An[id].first + An[id].second) * 0.5; }
|
||||
double GetAnodeTheta(short id) const { return (An[id].first - An[id].second).Theta(); }
|
||||
double GetAnodePhi(short id) const { return (An[id].first - An[id].second).Phi(); }
|
||||
inline void PrintGeometry();
|
||||
|
||||
TVector3 GetCathodneMid(short id) const { return (Ca[id].first + Ca[id].second) * 0.5; }
|
||||
double GetCathodeTheta(short id) const { return (Ca[id].first - Ca[id].second).Theta(); }
|
||||
double GetCathodePhi(short id) const { return (Ca[id].first - Ca[id].second).Phi(); }
|
||||
|
||||
void ClearHitInfo();
|
||||
void ConstructGeo();
|
||||
void ConstructGeo(int, int);
|
||||
void FindWireID(TVector3 pos, TVector3 direction, bool verbose = false);
|
||||
void CalTrack(TVector3 sx3Pos, int anodeID, int cathodeID, bool verbose = false);
|
||||
void CalTrack2(TVector3 sx3Pos, TVector3 anodeInt, bool verbose = false);
|
||||
|
|
@ -144,7 +145,7 @@ inline void PW::ClearHitInfo()
|
|||
hitInfo.Clear();
|
||||
}
|
||||
|
||||
inline void PW::ConstructGeo()
|
||||
inline void PW::ConstructGeo(int aoffset=0, int coffset=0)
|
||||
{
|
||||
|
||||
An.clear();
|
||||
|
|
@ -154,8 +155,8 @@ inline void PW::ConstructGeo()
|
|||
std::pair<TVector3, TVector3> q1; // cathode
|
||||
|
||||
double k = TMath::TwoPi()/24.; //48 solder thru holes, wires in every other one
|
||||
double offset_a1 = -6*k-3*k;
|
||||
double offset_c1 = -4*k -2*k - TMath::TwoPi()/48; //correct for a half-turn
|
||||
double offset_a1 = -6*k-4*k;//-5*k-5*k;
|
||||
double offset_c1 = -6*k+k/2.; //correct for a half-turn, 48 holes out of which 24 are used, anodes and cathodes staggered by half a turn. //-5*k-TMath::TwoPi()/48;
|
||||
//std::cerr << "Here!" << std::endl;
|
||||
//#include "../scratch/testing.h"
|
||||
double offset_a2 = offset_a1+wireShift*k;
|
||||
|
|
@ -229,6 +230,36 @@ inline void PW::ConstructGeo()
|
|||
cathodeLength = TMath::Sqrt(zLen * zLen + TMath::Power(2 * radiusC * TMath::Sin(dAngle / 2), 2)); //chord length subtending an angle alpha is 2rsin(alpha/2)
|
||||
}
|
||||
|
||||
inline void PW::PrintGeometry() {
|
||||
for (size_t i = 0; i < An.size(); i++)
|
||||
{
|
||||
for (size_t j = 0; j < Ca.size(); j++) {
|
||||
if ( Crossover[i][j][0].z < -190 || Crossover[i][j][0].z > 190) {
|
||||
continue;
|
||||
}
|
||||
|
||||
std::cout << i << ", " << j << ", " << Crossover[i][j][0].x << ", " << Crossover[i][j][0].y << ", " << Crossover[i][j][0].z << ", " << Crossover[i][j][1].x << ", "
|
||||
<< An[i].first.X() << ", "
|
||||
<< An[i].first.Y() << ", "
|
||||
<< An[i].first.Z() << ", "
|
||||
|
||||
<< Ca[j].first.X() << ", "
|
||||
<< Ca[j].first.Y() << ", "
|
||||
<< Ca[j].first.Z() << ", "
|
||||
|
||||
<< An[i].second.X() << ", "
|
||||
<< An[i].second.Y() << ", "
|
||||
<< An[i].second.Z() << ", "
|
||||
|
||||
<< Ca[j].second.X() << ", "
|
||||
<< Ca[j].second.Y() << ", "
|
||||
<< Ca[j].second.Z()
|
||||
<< std::endl;
|
||||
}
|
||||
std::cout << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
inline TVector3 PW::getClosestWirePosAtWirePhi(std::pair<TVector3, TVector3> awire, double sx3phi_radian) {
|
||||
// 1. Get wire geometry
|
||||
TVector3 a1 = awire.first; // Top of the wire
|
||||
|
|
@ -249,8 +280,12 @@ inline TVector3 PW::getClosestWirePosAtWirePhi(std::pair<TVector3, TVector3> awi
|
|||
TVector3 test_pt = a1 + t_test * wireVec; // The 3D point at this step
|
||||
|
||||
// Calculate absolute Delta Phi between Si hit and this specific point on the wire
|
||||
if(TMath::IsNaN(sx3phi_radian-test_pt.Phi())) continue;
|
||||
if(TMath::IsNaN(sx3phi_radian-test_pt.Phi())) {
|
||||
//std::cout << "Moo" << std::endl;
|
||||
continue;
|
||||
}
|
||||
double dPhi = TMath::Abs(TVector2::Phi_mpi_pi(sx3phi_radian - test_pt.Phi())); //Phi_mpi_pi just puts the angle in the range -180 to 180
|
||||
//std::cout << "Yee" << std::endl;
|
||||
|
||||
// If this is the smallest Delta Phi we've seen so far, save it!
|
||||
if (dPhi < min_delta_phi)
|
||||
|
|
|
|||
|
|
@ -8,23 +8,12 @@
|
|||
else if(TMath::Abs(x[0]) < 85.2 ) result=x[0]*slope+TMath::Sign(1.0,x[0])*factor*2;
|
||||
else result=x[0]*slope+TMath::Sign(1.0,x[0])*factor*3;
|
||||
return result;
|
||||
}
|
||||
|
||||
double model_invert(double *y, double *q) {
|
||||
double result=y[0];
|
||||
double slope = 0.7;
|
||||
double factor = 0.0;
|
||||
if(TMath::Abs(y[0]) < 16.2/slope) result = y[0]/slope;
|
||||
else if(TMath::Abs(y[0]) < 49.8/slope ) result=y[0]/slope-TMath::Sign(1.0,y[0])*factor;
|
||||
else if(TMath::Abs(y[0]) < 85.2/slope ) result=y[0]/slope-TMath::Sign(1.0,y[0])*factor*2;
|
||||
else result=y[0]/slope-TMath::Sign(1.0,y[0])*factor*3;
|
||||
return result;
|
||||
}*/
|
||||
|
||||
double model_invert(double* y, double* p) {
|
||||
double result = y[0];
|
||||
double slope = 0.6;
|
||||
double z_grid[8] = {147.998,101.946,59.7634,19.6965,-19.6965,-59.7634,-101.946,-147.998};
|
||||
double slope = 0.56;
|
||||
double z_grid[8] = {147.998,101.946,59.7634,19.6965,-19.6965,-59.7634,-101.946,-147.998}; //crossover z values
|
||||
for(int i=0;i<7;i++) {
|
||||
if(y[0] <= z_grid[i] && y[0] > z_grid[i+1]) {
|
||||
double zavg = (z_grid[i] + z_grid[i+1])*0.5; //midpoint about which we pivot
|
||||
|
|
@ -32,7 +21,7 @@ double model_invert(double* y, double* p) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
return result+80;
|
||||
return result;
|
||||
}
|
||||
|
||||
double model_a1c1(double* x, double* p) {
|
||||
|
|
@ -48,12 +37,6 @@ double model_a1c1(double* x, double* p) {
|
|||
|
||||
double model_invert_a1c1(double *y, double *q) {
|
||||
double result=y[0];
|
||||
/* double slope = 1.0;
|
||||
double factor = 5.0;
|
||||
if(TMath::Abs(y[0]) < 16.2/slope) result = y[0]/slope;
|
||||
else if(TMath::Abs(y[0]) < 49.8/slope ) result=y[0]/slope-TMath::Sign(1.0,y[0])*factor;
|
||||
else if(TMath::Abs(y[0]) < 85.2/slope ) result=y[0]/slope-TMath::Sign(1.0,y[0])*factor*2;
|
||||
else result=y[0]/slope-TMath::Sign(1.0,y[0])*factor**/;
|
||||
return result+40;
|
||||
}
|
||||
|
||||
|
|
|
|||
1251
MakeVertex.C
1251
MakeVertex.C
File diff suppressed because it is too large
Load Diff
|
|
@ -124,11 +124,6 @@ void MakeVertex::Init(TTree *tree) {
|
|||
fChain->SetBranchAddress("pcCh", &pc.ch, &b_pcCh);
|
||||
fChain->SetBranchAddress("pcE", &pc.e, &b_pcE);
|
||||
fChain->SetBranchAddress("pcT", &pc.t, &b_pcT);
|
||||
/*fChain->SetBranchAddress("miscMulti", &misc.multi, &b_miscMulti);
|
||||
fChain->SetBranchAddress("miscID", &misc.id, &b_miscID);
|
||||
fChain->SetBranchAddress("miscCh", &misc.ch, &b_miscCh);
|
||||
fChain->SetBranchAddress("miscE", &misc.e, &b_miscE);
|
||||
fChain->SetBranchAddress("miscT", &misc.t, &b_miscT);*/
|
||||
}
|
||||
|
||||
Bool_t MakeVertex::Notify() {
|
||||
|
|
|
|||
4
cutlist.txt
Normal file
4
cutlist.txt
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
results/anode_strip_diagonalCut1.root anode_sx3_diag1
|
||||
results/anode_strip_diagonalCut2.root anode_sx3_diag2
|
||||
results/anode_wedge_diagonalCut1.root anode_qqq_diag1
|
||||
results/anode_wedge_diagonalCut2.root anode_qqq_diag2
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
//TFile fin("4He(pp)_candidate_kinematic_curve.root");
|
||||
//TH2F *h2 = (TH2F*)(fin.Get("Ef_thetaf_AnodeQQQR_TC1_PC1_pidlow0_1"));
|
||||
|
||||
// TFile fin("../results_run15.root");
|
||||
//TFile fin("../results_run017.root");
|
||||
TFile fin("out.root");
|
||||
//TH2F *h2 = (TH2F*)(fin.Get("Ef_thetaf_AnodeQQQR_TC1_PC1_pidlow0_1"));
|
||||
// TFile fin("run15_sx3_qqq_alphas_kinematic.root");
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
TGraph angles("a(p,p)a_kinematics_7MeV_p.txt","%lf %*lf %lf %*lf");
|
||||
TGraph angles2(angles.GetN(),angles.GetY(),angles.GetX());
|
||||
h2 = (TH2F*)(fin.Get("a(p,p)/ap_theta_vs_theta_qqq_sx3_a1c2"));
|
||||
h2->Draw();
|
||||
h2->Draw("colz");
|
||||
angles2.Draw("L SAME");
|
||||
gPad->Modified();
|
||||
gPad->Update();
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
//TFile fin("4He(pp)_candidate_kinematic_curve.root");
|
||||
//TH2F *h2 = (TH2F*)(fin.Get("Ef_thetaf_AnodeQQQR_TC1_PC1_pidlow0_1"));
|
||||
|
||||
// TFile fin("../results_run18.root");
|
||||
// TFile fin("out_zminus5_catima.root");
|
||||
TFile fin("out.root");
|
||||
//TH2F *h2 = (TH2F*)(fin.Get("Ef_thetaf_AnodeQQQR_TC1_PC1_pidlow0_1"));
|
||||
|
|
|
|||
26
results/compareE_pcalpha.C
Normal file
26
results/compareE_pcalpha.C
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
TCanvas c;
|
||||
//c.SetLogy(kTRUE);
|
||||
TGraph kinematics("a(p,p)a_kinematics_7MeV_p.txt","%*lf %*lf %lf %lf");
|
||||
kinematics.Scale(4.0);
|
||||
kinematics.SetLineColor(kBlue);
|
||||
kinematics.SetLineWidth(2.);
|
||||
//TFile fin("4He(pp)_candidate_kinematic_curve.root");
|
||||
//TH2F *h2 = (TH2F*)(fin.Get("Ef_thetaf_AnodeQQQR_TC1_PC1_pidlow0_1"));
|
||||
|
||||
// TFile fin("../results_run017.root");
|
||||
// TFile fin("out_zminus5_catima.root");
|
||||
TFile fin("out.root");
|
||||
//TH2F *h2 = (TH2F*)(fin.Get("Ef_thetaf_AnodeQQQR_TC1_PC1_pidlow0_1"));
|
||||
// TFile fin("run15_sx3_qqq_alphas_kinematic.root");
|
||||
TH2F *h2 = (TH2F*)(fin.Get("proton+misc_cathode_alphas/pmisc_Ef_vs_theta_qqq_cathode_alphas"));
|
||||
h2->Draw("col");
|
||||
h2->RebinY(8);
|
||||
kinematics.Draw("L SAME");
|
||||
gPad->Modified();
|
||||
gPad->Update();
|
||||
while(gPad->WaitPrimitive());
|
||||
|
||||
gPad->SaveAs("c1.png");
|
||||
|
||||
}
|
||||
26
results/compareE_pcalpha_ow.C
Normal file
26
results/compareE_pcalpha_ow.C
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
TCanvas c;
|
||||
//c.SetLogy(kTRUE);
|
||||
TGraph kinematics("a(p,p)a_kinematics_7MeV_p.txt","%*lf %*lf %lf %lf");
|
||||
kinematics.Scale(4.0);
|
||||
kinematics.SetLineColor(kBlue);
|
||||
kinematics.SetLineWidth(2.);
|
||||
//TFile fin("4He(pp)_candidate_kinematic_curve.root");
|
||||
//TH2F *h2 = (TH2F*)(fin.Get("Ef_thetaf_AnodeQQQR_TC1_PC1_pidlow0_1"));
|
||||
|
||||
// TFile fin("../results_run017.root");
|
||||
// TFile fin("out_zminus5_catima.root");
|
||||
TFile fin("out.root");
|
||||
//TH2F *h2 = (TH2F*)(fin.Get("Ef_thetaf_AnodeQQQR_TC1_PC1_pidlow0_1"));
|
||||
// TFile fin("run15_sx3_qqq_alphas_kinematic.root");
|
||||
TH2F *h2 = (TH2F*)(fin.Get("ainterp_noc/pmisc_ow_Ef_vs_theta_qqq"));
|
||||
h2->Draw("col");
|
||||
h2->RebinY(8);
|
||||
kinematics.Draw("L SAME");
|
||||
gPad->Modified();
|
||||
gPad->Update();
|
||||
while(gPad->WaitPrimitive());
|
||||
|
||||
gPad->SaveAs("c1.png");
|
||||
|
||||
}
|
||||
6
results/haddnow
Normal file
6
results/haddnow
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
rm out.root
|
||||
#hadd out.root ../results_run15.root ../results_run18.root ../results_run19.root ../results_run17.root ../results_run20.root ../results_run21.root ../results_run22.root
|
||||
#hadd out.root ../results_run015.root ../results_run018.root ../results_run019.root ../results_run017.root ../results_run020.root ../results_run021.root ../results_run022.root
|
||||
hadd out.root ../results_run018.root ../results_run019.root ../results_run017.root ../results_run020.root ../results_run021.root ../results_run022.root
|
||||
|
||||
#hadd out.root ../results_run18.root ../results_run19.root ../results_run17.root ../results_run20.root ../results_run21.root ../results_run22.root
|
||||
56
run_17F.sh
56
run_17F.sh
|
|
@ -1,46 +1,34 @@
|
|||
rm results_run*.root
|
||||
export DATASET="17F"
|
||||
export flip180="0"
|
||||
export flipa=0
|
||||
export anode_offset=0
|
||||
#root -q -l -b -x ../ANASEN_analysis/data/17F_Data/Source_005_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run05.root;
|
||||
#root -q -l -b -x ../ANASEN_analysis/data/17F_Data/Source_006_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run06.root;
|
||||
#root -q -l -b -x ../ANASEN_analysis/data/17F_Data/Source_007_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run07.root;
|
||||
#root -q -l -b -x ../ANASEN_analysis/data/17F_Data/Source_008_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run08.root;
|
||||
#root -q -l -b -x ../ANASEN_analysis/data/17F_Data/Source_009_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run09.root;
|
||||
#root -q -l -b -x ../ANASEN_analysis/data/17F_Data/Source_010_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run10.root;
|
||||
#root -q -l -b -x ../ANASEN_analysis/data/17F_Data/Source_011_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run11.root;
|
||||
#root -q -l -b -x ../ANASEN_analysis/data/17F_Data/Source_012_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run12.root;
|
||||
#root -q -l -b -x ../ANASEN_analysis/data/17F_Data/Source_013_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run13.root;
|
||||
#root -q -l -b -x ../ANASEN_analysis/data/17F_Data/Source_014_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run14.root;
|
||||
|
||||
#17F pulser runs
|
||||
#root -q -l -b -x ../ANASEN_analysis/data/17F_Data/PulserRun_015_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run15.root;
|
||||
#root -q -l -b -x ../ANASEN_analysis/data/17F_Data/PulserRun_016_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run16.root;
|
||||
#root -q -l -b -x ../ANASEN_analysis/data/17F_Data/PulserRun_017_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run17.root;
|
||||
|
||||
#17F alpha run with gas
|
||||
#root -q -l -b -x ../ANASEN_analysis/data/17F_Data/SourceRun_018_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run18.root;
|
||||
#root -q -l -b -x ../ANASEN_analysis/data/17F_Data/SourceRun_019_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run19.root;
|
||||
#root -q -l -b -x ../ANASEN_analysis/data/17F_Data/SourceRun_020_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run20.root;
|
||||
#root -q -l -b -x ../ANASEN_analysis/data/17F_Data/SourceRun_021_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run21.root;
|
||||
export reactiondata=1
|
||||
|
||||
#17F reaction data
|
||||
export flip180="0"
|
||||
declare -i run=231 #49
|
||||
while [[ $run -lt 258 ]]; do #392
|
||||
wrun=$(printf "%03d" $run)
|
||||
file_exists=$(test -f ../ANASEN_analysis/data/17F_Data/Run_"$wrun"_mapped.root)
|
||||
if [[ $file_exists -ne 0 ]]; then continue; fi
|
||||
root -q -l -b -x ../ANASEN_analysis/data/17F_Data/Run_"$wrun"_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run$wrun.root;
|
||||
run=run+1
|
||||
done
|
||||
#declare -i run=231 #49
|
||||
#while [[ $run -lt 258 ]]; do #392
|
||||
# wrun=$(printf "%03d" $run)
|
||||
# file_exists=$(test -f ../ANASEN_analysis/data/17F_Data/Run_"$wrun"_mapped.root)
|
||||
# if [[ $file_exists -ne 0 ]]; then continue; fi
|
||||
# root -q -l -b -x ../ANASEN_analysis/data/17F_Data/Run_"$wrun"_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run$wrun.root;
|
||||
# run=run+1
|
||||
#done
|
||||
|
||||
function run_once() {
|
||||
wrun=$(printf "%03d" $1)
|
||||
file_exists=$(test -f /home/sud/Desktop/Software2/ANASEN_analysis/data/17F_fsu_files/Run_"$wrun"_mapped.root)
|
||||
if [[ $file_exists -ne 0 ]]; then return; fi
|
||||
root -q -l -b -x /home/sud/Desktop/Software2/ANASEN_analysis/data/17F_fsu_files/Run_"$wrun"_mapped.root -e $(printf 'tree->Process("MakeVertex.C+O","analyzed_run%s.root")' "$wrun");
|
||||
mv analyzed_run$wrun.root results_run$wrun.root;
|
||||
}
|
||||
|
||||
export -f run_once
|
||||
#run_once 351
|
||||
parallel -j 6 --ctag run_once {1} ::: {350..400}
|
||||
rm output_17F.root
|
||||
hadd -j 4 -k output_17F.root results_run2*.root
|
||||
hadd -j 4 -k output_17F.root results_run3*.root
|
||||
|
||||
unset souce_vertex
|
||||
unset DATASET
|
||||
unset flip180
|
||||
unset flipa
|
||||
unset anode_offset
|
||||
unset reactiondata
|
||||
|
|
|
|||
27
run_27Al.sh
27
run_27Al.sh
|
|
@ -2,7 +2,10 @@
|
|||
export DATASET="27Al"
|
||||
export flip180="0"
|
||||
export flipa=0
|
||||
export reactiondata=1
|
||||
export anode_offset=0
|
||||
root -l -q -x -e ".L MakeVertex.C++"
|
||||
rm 27Al_output/*.root
|
||||
#declare -i run=28
|
||||
#while [[ $run -lt 34 ]]; do #runs 1 to 84
|
||||
# wrun=$(printf "%03d" $run)
|
||||
|
|
@ -10,21 +13,29 @@ export anode_offset=0
|
|||
# run=run+1
|
||||
#done
|
||||
|
||||
declare -i run=50
|
||||
while [[ $run -lt 59 ]]; do #runs 1 to 84
|
||||
declare -i run=78
|
||||
while [[ $run -lt 89 ]]; do #runs 1 to 84
|
||||
wrun=$(printf "%03d" $run)
|
||||
root -q -l -b -x ../ANASEN_analysis/data/27Al_Data/Run_"$wrun"_mapped.root -e 'tree->Process("MakeVertex.C+O","Analyzer_27Al.root")'; mv Analyzer_27Al.root 27Al_output/results_run$wrun.root;
|
||||
#root -q -l -b -x ../ANASEN_analysis/data/27Al_Data/Run_"$wrun"_mapped.root -e 'tree->Process("MakeVertex.C+O","Analyzer_27Al.root")'; mv Analyzer_27Al.root 27Al_output/results_run$wrun.root;
|
||||
run=run+1
|
||||
done
|
||||
|
||||
rm output.root
|
||||
function run_once() {
|
||||
wrun=$(printf "%02d" $1)
|
||||
file_exists=$(test -f ../ANASEN_analysis/data/27Al_Data/Run_0"$wrun"_mapped.root)
|
||||
if [[ $file_exists -ne 0 ]]; then return; fi
|
||||
root -q -l -b -x ../ANASEN_analysis/data/27Al_Data/Run_0"$wrun"_mapped.root -e $(printf 'tree->Process("MakeVertex.C+O","analyzed_run%s.root")' "$wrun");
|
||||
mv analyzed_run$wrun.root 27Al_output/results_run$wrun.root;
|
||||
}
|
||||
|
||||
export -f run_once
|
||||
time parallel -j 6 --ctag run_once {1} ::: {50..59}
|
||||
time parallel -j 2 --ctag run_once {1} ::: {78..89}
|
||||
|
||||
|
||||
hadd -k -j 4 output.root 27Al_output/results_run*.root
|
||||
mv output.root output_27Al.root
|
||||
|
||||
#root -q -l -b -x -e '.L MakeVertex.C+O';
|
||||
#halfproc=3
|
||||
#parallel --ctag --bar -j $halfproc ./run.sh ::: {028..034} ::: 27Al #color-tag, linebuffer, then run run.sh in parallel
|
||||
|
||||
unset souce_vertex
|
||||
unset DATASET
|
||||
unset flip180
|
||||
|
|
|
|||
32
run_sx3.sh
32
run_sx3.sh
|
|
@ -1,8 +1,9 @@
|
|||
#Alpha runs at different spacer positions
|
||||
#rm results_run*.root
|
||||
export flipa=0
|
||||
export anode_offset=0
|
||||
export cathode_offset=0
|
||||
export DATASET="27Al"
|
||||
root -l -q -x -e ".L MakeVertex.C++"
|
||||
if [[ 1 -eq 0 ]]; then
|
||||
#root -b -q -l -x ../ANASEN_analysis/data/27Al_Data/Run_009_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run09.root;
|
||||
root -b -q -l -x ../ANASEN_analysis/data/27Al_Data/Run_001_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run01.root;
|
||||
|
|
@ -18,9 +19,8 @@ fi
|
|||
#exit
|
||||
#alpha+gas 27Al
|
||||
export DATASET="27Al"
|
||||
export flip180="0"
|
||||
#root -q -b -x ../ANASEN_analysis/data/27Al_Data/Run_009_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run09.root;
|
||||
if [[ 1 -eq 1 ]]; then
|
||||
if [[ 1 -eq 0 ]]; then
|
||||
#export timecut_low=230.0;
|
||||
export timecut_low=400.0;
|
||||
#export timecut_high=400.0;
|
||||
|
|
@ -31,18 +31,15 @@ export timecut_low=400.0;
|
|||
export source_vertex=53.44; root -q -b -x ../ANASEN_analysis/data/27Al_Data/Run_012_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run12.root;
|
||||
#export source_vertex=53.44; root -q -b -x ../ANASEN_analysis/data/27Al_Data/Run_013_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run13.root;
|
||||
unset timecut_low
|
||||
#exit
|
||||
fi
|
||||
|
||||
#protons+gas, 27Al
|
||||
#export flip180="1"
|
||||
#export flip180="0"
|
||||
if [[ 1 -eq 0 ]] ; then
|
||||
#export flipa=0
|
||||
#export anode_offset=0
|
||||
#export source_vertex=-200.0; #put the 'source' on the entrance window
|
||||
#root -q -b -x ../ANASEN_analysis/data/27Al_Data/Run_015_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run15.root;
|
||||
root -q -b -x ../ANASEN_analysis/data/27Al_Data/Run_017_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run17.root;
|
||||
#export source_vertex=-57.28; root -q -b -x ../ANASEN_analysis/data/27Al_Data/Run_015_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run15.root;
|
||||
export source_vertex=-135.68; root -q -b -x ../ANASEN_analysis/data/27Al_Data/Run_017_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run17.root;
|
||||
exit
|
||||
root -q -b -x ../ANASEN_analysis/data/27Al_Data/Run_018_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run18.root;
|
||||
root -q -b -x ../ANASEN_analysis/data/27Al_Data/Run_019_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run19.root;
|
||||
root -q -b -x ../ANASEN_analysis/data/27Al_Data/Run_020_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run20.root;
|
||||
|
|
@ -51,6 +48,18 @@ root -q -b -x ../ANASEN_analysis/data/27Al_Data/Run_022_mapped.root -e 'tree->Pr
|
|||
exit
|
||||
fi
|
||||
|
||||
if [[ 1 -eq 1 ]]; then
|
||||
function run_once() {
|
||||
wrun=$(printf "%03d" $1)
|
||||
file_exists=$(test -f ../ANASEN_analysis/data/27Al_Data/Run_"$wrun"_mapped.root)
|
||||
if [[ $file_exists -ne 0 ]]; then return; fi
|
||||
root -q -l -b -x ../ANASEN_analysis/data/27Al_Data/Run_"$wrun"_mapped.root -e $(printf 'tree->Process("MakeVertex.C+O","analyzed_run%s.root")' "$wrun");
|
||||
mv analyzed_run$wrun.root results_run$wrun.root;
|
||||
}
|
||||
export -f run_once
|
||||
time parallel -j 4 --ctag run_once {1} ::: {16..22}
|
||||
exit
|
||||
fi
|
||||
#27Al reaction data
|
||||
#root -b -q -l -x ../ANASEN_analysis/data/27Al_Data/Run_051_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run51.root;
|
||||
#root -b -q -l -x ../ANASEN_analysis/data/27Al_Data/Run_078_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run78.root;
|
||||
|
|
@ -59,7 +68,6 @@ fi
|
|||
#root -l -x results_run19.root results_run12.root -e "new TBrowser"
|
||||
#exit
|
||||
export DATASET="17F"
|
||||
#export flip180="0"
|
||||
if [[ 1 -eq 0 ]]; then
|
||||
root -q -l -b -x ../ANASEN_analysis/data/17F_Data/Source_005_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run05.root;
|
||||
root -q -l -b -x ../ANASEN_analysis/data/17F_Data/Source_006_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run06.root;
|
||||
|
|
@ -86,7 +94,6 @@ export source_vertex=-73.96; root -q -l -b -x ../ANASEN_analysis/data/17F_Data/S
|
|||
exit
|
||||
fi
|
||||
#17F reaction data
|
||||
#export flip180="0"
|
||||
if [[ 1 -eq 0 ]]; then
|
||||
export source_vertex=-57.28; root -q -l -b -x ../ANASEN_analysis/data/17F_Data/ProtonRun_035_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run35.root;
|
||||
#export source_vertex=-8.28; root -q -l -b -x ../ANASEN_analysis/data/17F_Data/ProtonRun_036_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root resulrs_run36.root;
|
||||
|
|
@ -101,11 +108,8 @@ export source_vertex=-57.28; root -q -l -b -x ../ANASEN_analysis/data/17F_Data/P
|
|||
#root -q -l -b -x ../ANASEN_analysis/data/17F_Data/Run_104_mapped.root -e 'tree->Process("MakeVertex.C+O")'; mv Analyzer_SX3.root results_run104.root;
|
||||
#mv Analyzer_SX3.root results_run19.root;
|
||||
fi
|
||||
unset flipa
|
||||
unset flipc
|
||||
unset anode_offset
|
||||
unset cathode_offset
|
||||
unset souce_vertex
|
||||
unset DATASET
|
||||
unset flip180
|
||||
unset timecut_low, timecut_high
|
||||
|
|
|
|||
107
scratch/sx3z_vs_phiz/compare_wire_offsets.C
Normal file
107
scratch/sx3z_vs_phiz/compare_wire_offsets.C
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
#include "testmodel.h"
|
||||
|
||||
int quit=0;
|
||||
void handler(int){quit=0;}
|
||||
|
||||
int colors[] = {kSpring+3, kRed, kGreen+3, kBlue+3, kViolet, kOrange, kSpring-7, kAzure-5};
|
||||
void compare_wire_offsets(){
|
||||
signal(SIGINT,handler);
|
||||
TCanvas c("c1","c1",0,0,1600,800);
|
||||
c.Divide(2,1);
|
||||
|
||||
TF1 f1("model",model,-200,200,2);
|
||||
f1.SetNpx(10000);
|
||||
std::vector<double> pars = {0.0,1.};
|
||||
f1.SetParameters(pars.data());
|
||||
f1.SetLineColor(kGreen+2);
|
||||
f1.SetLineStyle(kLine);
|
||||
|
||||
|
||||
|
||||
|
||||
TFile* f=NULL;
|
||||
std::vector<TFile*> files;
|
||||
int ctr=0;
|
||||
for(int i=12; i<=21; i++) {
|
||||
auto c1=c.cd(1);
|
||||
c1->SetGrid(1,1);
|
||||
f = new TFile(Form("../../results_run%d.root",i));
|
||||
if(i==12) {
|
||||
//TH2F *h2 = (TH2F*)(f->Get("phicut/pczguess_vs_pc_int"));
|
||||
TH2F *h23 = (TH2F*)(f->Get("phicut/pczguess_vs_pc_int_A1C2"));
|
||||
std::cout << "aaa" << h23 << std::endl;
|
||||
h23->SetLineColorAlpha(kOrange,0.75);
|
||||
h23->Draw("box");
|
||||
//while(gPad->WaitPrimitive());
|
||||
} else {
|
||||
//TH2F *h2 = (TH2F*)(f->Get("phicut/pczguess_vs_pc_int"));
|
||||
//TH2F *h2 = (TH2F*)(f->Get("pcz_vs_sx3pczguess_A1C2_strip12"));
|
||||
TH2F *h2 = (TH2F*)(f->Get("pcz_vs_sx3pczguess_A1C2"));
|
||||
std::cout << h2 << std::endl;
|
||||
//TH2F *h2 = (TH2F*)(f->Get("hPCQQQ/PC_XY_Projection_QQQ2"));
|
||||
if(!h2) continue;
|
||||
h2->SetTitle(Form("case%d",i));
|
||||
//h2->Draw("colz same");
|
||||
h2->SetLineColorAlpha(colors[ctr],0.75);
|
||||
h2->Draw("box same");
|
||||
}
|
||||
TF1 eqline("x","x",-200,200);
|
||||
//eqline.Draw("SAME");
|
||||
//f1.Draw("same");
|
||||
|
||||
c1->Modified();
|
||||
c1->Update();
|
||||
|
||||
|
||||
auto c2=c.cd(2);
|
||||
c2->SetGrid(1,1);
|
||||
|
||||
/*TH2F *h3 = (TH2F*)(f->Get("sx3phi_vs_pcphi1"));
|
||||
if(!h3) continue;
|
||||
h3->SetTitle(Form("case%d",i));
|
||||
h3->Draw("colz");
|
||||
eqline.Draw("SAME");*/
|
||||
|
||||
if(i==12) {
|
||||
//TH2F *h2 = (TH2F*)(f->Get("phicut/pczguess_vs_pc_int"));
|
||||
TH2F *h23 = (TH2F*)(f->Get("pczfix_vs_qqqpczguess_A1C2"));
|
||||
std::cout << "aaa" << h23 << std::endl;
|
||||
h23->SetLineColorAlpha(kOrange,0.75);
|
||||
h23->Draw("box");
|
||||
while(gPad->WaitPrimitive());
|
||||
} else {
|
||||
//TH2F *h2 = (TH2F*)(f->Get("phicut/pczguess_vs_pc_int"));
|
||||
//TH2F *h2 = (TH2F*)(f->Get("pcz_vs_sx3pczguess_A1C2_strip12"));
|
||||
TH2F *h2 = (TH2F*)(f->Get("pczfix_vs_sx3pczguess_A1C2"));
|
||||
std::cout << h2 << std::endl;
|
||||
//TH2F *h2 = (TH2F*)(f->Get("hPCQQQ/PC_XY_Projection_QQQ2"));
|
||||
if(!h2) continue;
|
||||
h2->SetTitle(Form("case%d",i));
|
||||
//h2->Draw("colz same");
|
||||
h2->SetLineColorAlpha(colors[ctr],0.75);
|
||||
h2->Draw("box same");
|
||||
}
|
||||
|
||||
|
||||
c2->Modified();
|
||||
c2->Update();
|
||||
ctr+=1;
|
||||
|
||||
while(gPad->WaitPrimitive());
|
||||
|
||||
files.emplace_back(f);
|
||||
std::cout <<"Test" << std::endl;
|
||||
if(i==21) {
|
||||
i=11;
|
||||
c.Modified(); c.Update();
|
||||
c.SaveAs("test.png");
|
||||
c.Clear();
|
||||
c.Divide(2,1);
|
||||
ctr=0;
|
||||
}
|
||||
//if(quit) break;
|
||||
}
|
||||
for(auto file : files) {
|
||||
file->Close();
|
||||
}
|
||||
}
|
||||
88
scratch/sx3z_vs_phiz/compare_wire_offsets_c3.C
Normal file
88
scratch/sx3z_vs_phiz/compare_wire_offsets_c3.C
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
#include "testmodel.h"
|
||||
|
||||
int quit=0;
|
||||
void handler(int){quit=0;}
|
||||
|
||||
int colors[] = {kSpring+3, kRed, kGreen+3, kBlue+3, kViolet, kOrange, kSpring-7, kAzure-5};
|
||||
void compare_wire_offsets_c3(){
|
||||
signal(SIGINT,handler);
|
||||
TCanvas c("c1","c1",0,0,1600,800);
|
||||
c.Divide(2,1);
|
||||
|
||||
TF1 f1("model",model,-200,200,2);
|
||||
f1.SetNpx(10000);
|
||||
std::vector<double> pars = {0.0,1.};
|
||||
f1.SetParameters(pars.data());
|
||||
f1.SetLineColor(kGreen+2);
|
||||
f1.SetLineStyle(kLine);
|
||||
|
||||
|
||||
|
||||
|
||||
TFile* f=NULL;
|
||||
std::vector<TFile*> files;
|
||||
int ctr=0;
|
||||
for(int i=12; i<=21; i++) {
|
||||
auto c1=c.cd(1);
|
||||
c1->SetGrid(1,1);
|
||||
f = new TFile(Form("../../results_run%d.root",i));
|
||||
if(i==12) {
|
||||
//TH2F *h2 = (TH2F*)(f->Get("phicut/pczguess_vs_pc_int"));
|
||||
TH2F *h23 = (TH2F*)(f->Get("phicut/pczguess_vs_pc_int_A1C3"));
|
||||
if(h23) {
|
||||
std::cout << "aaa" << h23 << std::endl;
|
||||
h23->SetLineColorAlpha(kOrange,0.75);
|
||||
h23->Draw("box");
|
||||
}
|
||||
//while(gPad->WaitPrimitive());
|
||||
} else {
|
||||
//TH2F *h2 = (TH2F*)(f->Get("phicut/pczguess_vs_pc_int"));
|
||||
//TH2F *h2 = (TH2F*)(f->Get("pcz_vs_sx3pczguess_A1C2_strip12"));
|
||||
TH2F *h2 = (TH2F*)(f->Get("pcz_vs_sx3pczguess_A1C3"));
|
||||
//TH2F *h2 = (TH2F*)(f->Get("hPCQQQ/PC_XY_Projection_QQQ2"));
|
||||
if(h2) {
|
||||
h2->SetTitle(Form("case%d",i));
|
||||
//h2->Draw("colz same");
|
||||
h2->SetLineColorAlpha(colors[ctr],0.75);
|
||||
h2->Draw("box same");
|
||||
}
|
||||
}
|
||||
TF1 eqline("x","x",-200,200);
|
||||
//eqline.Draw("SAME");
|
||||
//f1.Draw("same");
|
||||
|
||||
c1->Modified();
|
||||
c1->Update();
|
||||
|
||||
|
||||
auto c2=c.cd(2);
|
||||
c2->SetGrid(1,1);
|
||||
|
||||
/*TH2F *h3 = (TH2F*)(f->Get("sx3phi_vs_pcphi1"));
|
||||
if(!h3) continue;
|
||||
h3->SetTitle(Form("case%d",i));
|
||||
h3->Draw("colz");
|
||||
eqline.Draw("SAME");*/
|
||||
|
||||
c2->Modified();
|
||||
c2->Update();
|
||||
ctr+=1;
|
||||
|
||||
while(gPad->WaitPrimitive());
|
||||
|
||||
files.emplace_back(f);
|
||||
std::cout <<"Test" << std::endl;
|
||||
if(i==21) {
|
||||
i=11;
|
||||
c.Modified(); c.Update();
|
||||
c.SaveAs("test.png");
|
||||
c.Clear();
|
||||
c.Divide(2,1);
|
||||
ctr=0;
|
||||
}
|
||||
//if(quit) break;
|
||||
}
|
||||
for(auto file : files) {
|
||||
file->Close();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,72 +1,93 @@
|
|||
#include "testmodel.h"
|
||||
|
||||
int quit=0;
|
||||
void handler(int){quit=0;}
|
||||
|
||||
int colors[] = {kSpring+3, kRed, kGreen+3, kBlue+3, kViolet, kOrange, kSpring-7, kAzure-5};
|
||||
void scan_offset(){
|
||||
signal(SIGINT,handler);
|
||||
TCanvas c("c1","c1",0,0,1600,800);
|
||||
c.Divide(2,1);
|
||||
|
||||
TF1 f1("model",model,-200,200,2);
|
||||
f1.SetNpx(10000);
|
||||
std::vector<double> pars = {0.0,1.};
|
||||
f1.SetParameters(pars.data());
|
||||
f1.SetLineColor(kGreen+2);
|
||||
f1.SetLineStyle(kLine);
|
||||
|
||||
|
||||
|
||||
c.Divide(2,2);
|
||||
|
||||
TFile* f=NULL;
|
||||
std::vector<TFile*> files;
|
||||
int ctr=0;
|
||||
for(int i=12; i<=21; i++) {
|
||||
if(i>=13 && i<=17) continue;
|
||||
auto c1=c.cd(1);
|
||||
c1->SetGrid(1,1);
|
||||
f = new TFile(Form("../../results_run%d.root",i));
|
||||
if(i==12) {
|
||||
//TH2F *h2 = (TH2F*)(f->Get("phicut/pczguess_vs_pc_int"));
|
||||
TH2F *h23 = (TH2F*)(f->Get("phicut/pczguess_vs_pc_int_A1C2"));
|
||||
TH2F *h23 = (TH2F*)(f->Get("phicut/pczguess_vs_pc_int"));
|
||||
//TH2F *h23 = (TH2F*)(f->Get("phicut/pczguess_vs_pc_int_self"));
|
||||
std::cout << "aaa" << h23 << std::endl;
|
||||
h23->SetLineColorAlpha(kOrange,0.75);
|
||||
h23->GetYaxis()->SetRangeUser(-200,200);
|
||||
h23->Draw("box");
|
||||
while(gPad->WaitPrimitive());
|
||||
} else {
|
||||
h23->Draw("col");
|
||||
} {
|
||||
//TH2F *h2 = (TH2F*)(f->Get("phicut/pczguess_vs_pc_int"));
|
||||
//TH2F *h2 = (TH2F*)(f->Get("pcz_vs_sx3pczguess_A1C2_strip12"));
|
||||
TH2F *h2 = (TH2F*)(f->Get("pcz_vs_sx3pczguess_A1C2"));
|
||||
//TH2F *h2 = (TH2F*)(f->Get("pcz_vs_sx3pczguess_self"));
|
||||
std::cout << h2 << std::endl;
|
||||
//TH2F *h2 = (TH2F*)(f->Get("hPCQQQ/PC_XY_Projection_QQQ2"));
|
||||
if(!h2) continue;
|
||||
h2->SetTitle(Form("case%d",i));
|
||||
//h2->Draw("colz same");
|
||||
h2->SetLineColorAlpha(colors[ctr],0.75);
|
||||
h2->Draw("box same");
|
||||
f1.Draw("same");
|
||||
if(h2) {
|
||||
h2->SetTitle(Form("case%d",i));
|
||||
//h2->Draw("colz same");
|
||||
h2->SetLineColorAlpha(colors[ctr],0.75);
|
||||
h2->Draw("col same");
|
||||
}
|
||||
}
|
||||
TF1 eqline("x","x",-200,200);
|
||||
eqline.Draw("SAME");
|
||||
|
||||
c1->Modified();
|
||||
c1->Update();
|
||||
ctr+=1;
|
||||
|
||||
auto c1a = c.cd(2);
|
||||
c1a->SetGrid(1,1);
|
||||
TH2F *h24 = (TH2F*)(f->Get("sx3phi_vs_pcphi1"));
|
||||
if(h24) {
|
||||
h24->Draw("box");
|
||||
h24->SetLineColor(kRed);
|
||||
}
|
||||
TH2F *h25 = (TH2F*)(f->Get("phiPC_vs_phiQQQ_TimeCut"));
|
||||
if(h25) {
|
||||
h25->SetLineColor(kBlue);
|
||||
h25->Draw("box same");
|
||||
}
|
||||
c1a->Modified();
|
||||
c1a->Update();
|
||||
|
||||
auto c2=c.cd(2);
|
||||
|
||||
auto c2=c.cd(3);
|
||||
c2->SetGrid(1,1);
|
||||
|
||||
TH2F *h3 = (TH2F*)(f->Get("sx3phi_vs_pcphi1"));
|
||||
TH2F *h3 = (TH2F*)(f->Get("d_sx3pczguess_minus_pcz_a1c2"));
|
||||
// TH2F *h2 = (TH2F*)(f->Get("hPCQQQ/PC_XY_Projection_QQQ2"));
|
||||
if(!h3) continue;
|
||||
h3->SetTitle(Form("case%d",i));
|
||||
h3->Draw("colz");
|
||||
eqline.Draw("SAME");
|
||||
if(h3) {
|
||||
h3->SetLineColor(kRed);
|
||||
h3->SetTitle(Form("z_vs_guess_run%d",i));
|
||||
h3->Draw("colz");
|
||||
}
|
||||
TH2F *h4 = (TH2F*)(f->Get("d_qqqpczguess_minus_pcz_a1c2"));
|
||||
//TH2F *h4 = (TH2F*)(f->Get("d_sx3pczguess_minus_pczfix_a1c2"));
|
||||
if(h4)
|
||||
h4->Draw("colz same");
|
||||
c2->Modified();
|
||||
c2->Update();
|
||||
|
||||
auto c23 = c.cd(4);
|
||||
c23->SetGrid(1,1);
|
||||
TH1F *hdiff2 = (TH1F*)(f->Get("d_sx3phi_minus_pcphi1"));
|
||||
if(hdiff2) {
|
||||
hdiff2->SetLineColor(kRed);
|
||||
hdiff2->Draw("");
|
||||
}
|
||||
TH1F *hdiff = (TH1F*)(f->Get("d_phiPC_phiQQQ_TimeCut"));
|
||||
if(hdiff) {
|
||||
hdiff->SetLineColor(kBlue);
|
||||
hdiff->Draw("SAME");
|
||||
}
|
||||
|
||||
c23->Modified();
|
||||
c23->Update();
|
||||
while(gPad->WaitPrimitive());
|
||||
|
||||
files.emplace_back(f);
|
||||
|
|
@ -74,7 +95,7 @@ void scan_offset(){
|
|||
if(i==21) {
|
||||
i=11;
|
||||
c.Clear();
|
||||
c.Divide(2,1);
|
||||
c.Divide(2,2);
|
||||
ctr=0;
|
||||
}
|
||||
//if(quit) break;
|
||||
|
|
|
|||
86
scratch/sx3z_vs_phiz/scan_offset_a2c1.C
Normal file
86
scratch/sx3z_vs_phiz/scan_offset_a2c1.C
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
#include "testmodel.h"
|
||||
|
||||
int quit=0;
|
||||
void handler(int){quit=0;}
|
||||
|
||||
int colors[] = {kSpring+3, kRed, kGreen+3, kBlue+3, kViolet, kOrange, kSpring-7, kAzure-5};
|
||||
void scan_offset_a2c1(){
|
||||
signal(SIGINT,handler);
|
||||
TCanvas c("c1","c1",0,0,1600,800);
|
||||
c.Divide(2,1);
|
||||
|
||||
TF1 f1("model",model,-200,200,2);
|
||||
f1.SetNpx(10000);
|
||||
std::vector<double> pars = {0.0,1.};
|
||||
f1.SetParameters(pars.data());
|
||||
f1.SetLineColor(kGreen+2);
|
||||
f1.SetLineStyle(kLine);
|
||||
|
||||
|
||||
|
||||
|
||||
TFile* f=NULL;
|
||||
std::vector<TFile*> files;
|
||||
int ctr=0;
|
||||
for(int i=12; i<=21; i++) {
|
||||
auto c1=c.cd(1);
|
||||
c1->SetGrid(1,1);
|
||||
f = new TFile(Form("../../results_run%d.root",i));
|
||||
if(i==12) {
|
||||
//TH2F *h2 = (TH2F*)(f->Get("phicut/pczguess_vs_pc_int"));
|
||||
TH2F *h23 = (TH2F*)(f->Get("pcz_vs_qqqpczguess_A2C1"));
|
||||
std::cout << "aaa" << h23 << std::endl;
|
||||
h23->SetLineColorAlpha(kOrange,0.75);
|
||||
h23->GetYaxis()->SetRangeUser(-200,200);
|
||||
h23->Draw("box");
|
||||
while(gPad->WaitPrimitive());
|
||||
}
|
||||
{
|
||||
//TH2F *h2 = (TH2F*)(f->Get("phicut/pczguess_vs_pc_int"));
|
||||
//TH2F *h2 = (TH2F*)(f->Get("pcz_vs_sx3pczguess_A1C2_strip12"));
|
||||
TH2F *h2 = (TH2F*)(f->Get("pcz_vs_sx3pczguess_A2C1"));
|
||||
std::cout << h2 << std::endl;
|
||||
//TH2F *h2 = (TH2F*)(f->Get("hPCQQQ/PC_XY_Projection_QQQ2"));
|
||||
if(!h2) continue;
|
||||
h2->SetTitle(Form("case%d",i));
|
||||
//h2->Draw("colz same");
|
||||
h2->SetLineColorAlpha(colors[ctr],0.75);
|
||||
h2->Draw("box same");
|
||||
f1.Draw("same");
|
||||
}
|
||||
TF1 eqline("x","x",-200,200);
|
||||
eqline.Draw("SAME");
|
||||
|
||||
c1->Modified();
|
||||
c1->Update();
|
||||
ctr+=1;
|
||||
|
||||
|
||||
auto c2=c.cd(2);
|
||||
c2->SetGrid(1,1);
|
||||
|
||||
TH2F *h3 = (TH2F*)(f->Get("sx3phi_vs_pcphi1"));
|
||||
// TH2F *h2 = (TH2F*)(f->Get("hPCQQQ/PC_XY_Projection_QQQ2"));
|
||||
if(!h3) continue;
|
||||
h3->SetTitle(Form("case%d",i));
|
||||
h3->Draw("colz");
|
||||
eqline.Draw("SAME");
|
||||
c2->Modified();
|
||||
c2->Update();
|
||||
|
||||
while(gPad->WaitPrimitive());
|
||||
|
||||
files.emplace_back(f);
|
||||
std::cout <<"Test" << std::endl;
|
||||
if(i==21) {
|
||||
i=11;
|
||||
c.Clear();
|
||||
c.Divide(2,1);
|
||||
ctr=0;
|
||||
}
|
||||
//if(quit) break;
|
||||
}
|
||||
for(auto file : files) {
|
||||
file->Close();
|
||||
}
|
||||
}
|
||||
109
scratch/sx3z_vs_phiz/scan_offset_ainterp.C
Normal file
109
scratch/sx3z_vs_phiz/scan_offset_ainterp.C
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
int quit=0;
|
||||
void handler(int){quit=0;}
|
||||
int colors[] = {kSpring+3, kRed, kGreen+3, kBlue+3, kViolet, kOrange, kSpring-7, kAzure-5};
|
||||
void scan_offset_ainterp(){
|
||||
signal(SIGINT,handler);
|
||||
TCanvas c("c1","c1",0,0,1600,800);
|
||||
c.Divide(2,2);
|
||||
|
||||
TFile* f=NULL;
|
||||
std::vector<TFile*> files;
|
||||
int ctr=0;
|
||||
for(int i=12; i<=21; i++) {
|
||||
if(i>=13 && i<=17) continue;
|
||||
auto c1=c.cd(1);
|
||||
c1->SetGrid(1,1);
|
||||
f = new TFile(Form("../../results_run%d.root",i));
|
||||
if(i==12) {
|
||||
//TH2F *h2 = (TH2F*)(f->Get("phicut/pczguess_vs_pc_int"));
|
||||
TH2F *h23 = (TH2F*)(f->Get("ainterp_noc/pcZ_ainterp_sx3pczguess_TC1_ignC2"));
|
||||
//TH2F *h23 = (TH2F*)(f->Get("phicut/pczguess_vs_pc_int_self"));
|
||||
std::cout << "aaa" << h23 << std::endl;
|
||||
if(h23) {
|
||||
h23->SetLineColorAlpha(kOrange,0.75);
|
||||
h23->GetYaxis()->SetRangeUser(-200,200);
|
||||
h23->Draw("col");
|
||||
}
|
||||
}
|
||||
{
|
||||
//TH2F *h2 = (TH2F*)(f->Get("phicut/pczguess_vs_pc_int"));
|
||||
//TH2F *h2 = (TH2F*)(f->Get("pcz_vs_sx3pczguess_A1C2_strip12"));
|
||||
TH2F *h2 = (TH2F*)(f->Get("ainterp_noc/pcZ_ainterp_sx3pczguess_TC1_ignC2"));
|
||||
//TH2F *h2 = (TH2F*)(f->Get("pcz_vs_sx3pczguess_self"));
|
||||
std::cout << h2 << std::endl;
|
||||
//TH2F *h2 = (TH2F*)(f->Get("hPCQQQ/PC_XY_Projection_QQQ2"));
|
||||
if(h2) {
|
||||
h2->SetTitle(Form("case%d",i));
|
||||
//h2->Draw("colz same");
|
||||
h2->SetLineColorAlpha(colors[ctr],0.75);
|
||||
h2->Draw("col same");
|
||||
}
|
||||
}
|
||||
c1->Modified();
|
||||
c1->Update();
|
||||
ctr+=1;
|
||||
|
||||
auto c1a = c.cd(2);
|
||||
c1a->SetGrid(1,1);
|
||||
TH2F *h24 = (TH2F*)(f->Get("sx3phi_vs_pcphi1"));
|
||||
if(h24) {
|
||||
h24->Draw("box");
|
||||
h24->SetLineColor(kRed);
|
||||
}
|
||||
TH2F *h25 = (TH2F*)(f->Get("phiPC_vs_phiQQQ_TimeCut"));
|
||||
if(h25) {
|
||||
h25->SetLineColor(kBlue);
|
||||
h25->Draw("box same");
|
||||
}
|
||||
c1a->Modified();
|
||||
c1a->Update();
|
||||
|
||||
|
||||
auto c2=c.cd(3);
|
||||
c2->SetGrid(1,1);
|
||||
|
||||
TH2F *h3 = (TH2F*)(f->Get("d_sx3pczguess_minus_pcz_a1c2"));
|
||||
// TH2F *h2 = (TH2F*)(f->Get("hPCQQQ/PC_XY_Projection_QQQ2"));
|
||||
if(h3) {
|
||||
h3->SetLineColor(kRed);
|
||||
h3->SetTitle(Form("z_vs_guess_run%d",i));
|
||||
h3->Draw("colz");
|
||||
}
|
||||
TH2F *h4 = (TH2F*)(f->Get("d_qqqpczguess_minus_pcz_a1c2"));
|
||||
//TH2F *h4 = (TH2F*)(f->Get("d_sx3pczguess_minus_pczfix_a1c2"));
|
||||
if(h4)
|
||||
h4->Draw("colz same");
|
||||
c2->Modified();
|
||||
c2->Update();
|
||||
|
||||
auto c23 = c.cd(4);
|
||||
c23->SetGrid(1,1);
|
||||
TH1F *hdiff2 = (TH1F*)(f->Get("d_sx3phi_minus_pcphi1"));
|
||||
if(hdiff2) {
|
||||
hdiff2->SetLineColor(kRed);
|
||||
hdiff2->Draw("");
|
||||
}
|
||||
TH1F *hdiff = (TH1F*)(f->Get("d_phiPC_phiQQQ_TimeCut"));
|
||||
if(hdiff) {
|
||||
hdiff->SetLineColor(kBlue);
|
||||
hdiff->Draw("SAME");
|
||||
}
|
||||
|
||||
c23->Modified();
|
||||
c23->Update();
|
||||
while(gPad->WaitPrimitive());
|
||||
|
||||
files.emplace_back(f);
|
||||
std::cout <<"Test" << std::endl;
|
||||
if(i==21) {
|
||||
i=11;
|
||||
c.Clear();
|
||||
c.Divide(2,2);
|
||||
ctr=0;
|
||||
}
|
||||
//if(quit) break;
|
||||
}
|
||||
for(auto file : files) {
|
||||
file->Close();
|
||||
}
|
||||
}
|
||||
|
|
@ -30,10 +30,13 @@ void scan_offset_fix(){
|
|||
if(i==12) {
|
||||
//TH2F *h2 = (TH2F*)(f->Get("phicut/pczguess_vs_pc_int"));
|
||||
TH2F *h23 = (TH2F*)(f->Get("pczfix_vs_qqqpczguess_A1C2"));
|
||||
h23->RebinX(2);
|
||||
h23->SetLineColorAlpha(kOrange,0.75);
|
||||
h23->Draw("box SAME");
|
||||
h23->GetYaxis()->SetRangeUser(-80,120);
|
||||
h23->GetXaxis()->SetRangeUser(-80,120);
|
||||
h23->Draw("col SAME");
|
||||
|
||||
} else {
|
||||
} {
|
||||
//TH2F *h2 = (TH2F*)(f->Get("phicut/pczguess_vs_pc_int"));
|
||||
//TH2F *h2 = (TH2F*)(f->Get("pcz_vs_sx3pczguess_A1C2_strip12"));
|
||||
TH2F *h2 = (TH2F*)(f->Get("pczfix_vs_sx3pczguess_A1C2"));
|
||||
|
|
@ -42,7 +45,7 @@ void scan_offset_fix(){
|
|||
h2->SetTitle(Form("case%d",i));
|
||||
//h2->Draw("colz same");
|
||||
h2->SetLineColorAlpha(colors[ctr],0.75);
|
||||
h2->Draw("box same");
|
||||
h2->Draw("col same");
|
||||
//f1.Draw("same");
|
||||
}
|
||||
TF1 eqline("x","x",-200,200);
|
||||
|
|
|
|||
105
scratch/sx3z_vs_phiz/scan_offset_fix_1d.C
Normal file
105
scratch/sx3z_vs_phiz/scan_offset_fix_1d.C
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
int quit=0;
|
||||
void handler(int){quit=0;}
|
||||
int colors[] = {kSpring+3, kRed, kGreen+3, kBlue+3, kViolet, kOrange, kSpring-7, kAzure-5};
|
||||
void scan_offset_fix_1d(){
|
||||
signal(SIGINT,handler);
|
||||
TCanvas c("c1","c1",0,0,1600,800);
|
||||
c.Divide(2,2);
|
||||
|
||||
TFile* f=NULL;
|
||||
std::vector<TFile*> files;
|
||||
int ctr=0;
|
||||
for(int i=12; i<=21; i++) {
|
||||
if(i>=13 && i<=17) continue;
|
||||
auto c1=c.cd(1);
|
||||
c1->SetGrid(1,1);
|
||||
f = new TFile(Form("../../results_run%d.root",i));
|
||||
if(i==12) {
|
||||
//TH2F *h2 = (TH2F*)(f->Get("phicut/pczguess_vs_pc_int"));
|
||||
TH2F *h23 = (TH2F*)(f->Get("pczfix_vs_qqqpczguess_A1C2"));
|
||||
//TH2F *h23 = (TH2F*)(f->Get("phicut/pczguess_vs_pc_int_self"));
|
||||
std::cout << "aaa" << h23 << std::endl;
|
||||
h23->SetLineColorAlpha(kOrange,0.75);
|
||||
h23->GetYaxis()->SetRangeUser(-200,200);
|
||||
h23->Draw("col");
|
||||
} {
|
||||
//TH2F *h2 = (TH2F*)(f->Get("phicut/pczguess_vs_pc_int"));
|
||||
//TH2F *h2 = (TH2F*)(f->Get("pcz_vs_sx3pczguess_A1C2_strip12"));
|
||||
TH2F *h2 = (TH2F*)(f->Get("pczfix_vs_sx3pczguess_A1C2"));
|
||||
//TH2F *h2 = (TH2F*)(f->Get("pcz_vs_sx3pczguess_self"));
|
||||
std::cout << h2 << std::endl;
|
||||
//TH2F *h2 = (TH2F*)(f->Get("hPCQQQ/PC_XY_Projection_QQQ2"));
|
||||
if(h2) {
|
||||
h2->SetTitle(Form("case%d",i));
|
||||
//h2->Draw("colz same");
|
||||
h2->SetLineColorAlpha(colors[ctr],0.75);
|
||||
h2->Draw("col same");
|
||||
}
|
||||
}
|
||||
c1->Modified();
|
||||
c1->Update();
|
||||
ctr+=1;
|
||||
|
||||
auto c1a = c.cd(2);
|
||||
c1a->SetGrid(1,1);
|
||||
TH2F *h24 = (TH2F*)(f->Get("sx3phi_vs_pcphi1"));
|
||||
if(h24) {
|
||||
h24->Draw("box");
|
||||
h24->SetLineColor(kRed);
|
||||
}
|
||||
TH2F *h25 = (TH2F*)(f->Get("phiPC_vs_phiQQQ_TimeCut"));
|
||||
if(h25) {
|
||||
h25->SetLineColor(kBlue);
|
||||
h25->Draw("box same");
|
||||
}
|
||||
c1a->Modified();
|
||||
c1a->Update();
|
||||
|
||||
|
||||
auto c2=c.cd(3);
|
||||
c2->SetGrid(1,1);
|
||||
|
||||
TH2F *h3 = (TH2F*)(f->Get("d_sx3pczguess_minus_pczfix_a1c2"));
|
||||
// TH2F *h2 = (TH2F*)(f->Get("hPCQQQ/PC_XY_Projection_QQQ2"));
|
||||
if(h3) {
|
||||
h3->SetLineColor(kRed);
|
||||
h3->SetTitle(Form("z_vs_guess_run%d",i));
|
||||
h3->Draw("colz");
|
||||
}
|
||||
TH2F *h4 = (TH2F*)(f->Get("d_qqqpczguess_minus_pczfix_a1c2"));
|
||||
if(h4)
|
||||
h4->Draw("colz same");
|
||||
c2->Modified();
|
||||
c2->Update();
|
||||
|
||||
auto c23 = c.cd(4);
|
||||
c23->SetGrid(1,1);
|
||||
TH1F *hdiff2 = (TH1F*)(f->Get("d_sx3phi_minus_pcphi1"));
|
||||
if(hdiff2) {
|
||||
hdiff2->SetLineColor(kRed);
|
||||
hdiff2->Draw("");
|
||||
}
|
||||
TH1F *hdiff = (TH1F*)(f->Get("d_phiPC_phiQQQ_TimeCut"));
|
||||
if(hdiff) {
|
||||
hdiff->SetLineColor(kBlue);
|
||||
hdiff->Draw("SAME");
|
||||
}
|
||||
|
||||
c23->Modified();
|
||||
c23->Update();
|
||||
while(gPad->WaitPrimitive());
|
||||
|
||||
files.emplace_back(f);
|
||||
std::cout <<"Test" << std::endl;
|
||||
if(i==21) {
|
||||
i=11;
|
||||
c.Clear();
|
||||
c.Divide(2,2);
|
||||
ctr=0;
|
||||
}
|
||||
//if(quit) break;
|
||||
}
|
||||
for(auto file : files) {
|
||||
file->Close();
|
||||
}
|
||||
}
|
||||
88
scratch/sx3z_vs_phiz/scan_offset_fix_witha1c1.C
Normal file
88
scratch/sx3z_vs_phiz/scan_offset_fix_witha1c1.C
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
#include "testmodel.h"
|
||||
|
||||
int quit=0;
|
||||
void handler(int){quit=1;}
|
||||
|
||||
int colors[] = {kSpring+3, kRed, kGreen+3, kBlue+3, kViolet, kOrange, kSpring-7, kAzure-5};
|
||||
void scan_offset_fix_witha1c1(){
|
||||
signal(SIGINT,handler);
|
||||
TCanvas c("c1","c1",0,0,1600,800);
|
||||
c.Divide(2,1);
|
||||
|
||||
TF1 f1("model",model,-200,200,2);
|
||||
f1.SetNpx(10000);
|
||||
std::vector<double> pars = {0.0,1.};
|
||||
f1.SetParameters(pars.data());
|
||||
f1.SetLineColor(kGreen+2);
|
||||
f1.SetLineStyle(kLine);
|
||||
|
||||
|
||||
|
||||
|
||||
TFile* f=NULL;
|
||||
std::vector<TFile*> files;
|
||||
int ctr=0;
|
||||
for(int i=12; i<=21; i++) {
|
||||
if(i==15) continue;
|
||||
auto c1=c.cd(1);
|
||||
c1->SetGrid(1,1);
|
||||
f = new TFile(Form("../../results_run%d.root",i));
|
||||
if(i==12) {
|
||||
//TH2F *h2 = (TH2F*)(f->Get("phicut/pczguess_vs_pc_int"));
|
||||
TH2F *h23 = (TH2F*)(f->Get("pczfix_vs_qqqpczguess_A1C2"));
|
||||
h23->SetLineColorAlpha(kOrange,0.75);
|
||||
h23->Draw("box SAME");
|
||||
|
||||
TH2F *h23a = (TH2F*)(f->Get("pczfix_vs_qqqpczguess_A1C1"));
|
||||
h23a->SetLineColorAlpha(kOrange,0.75);
|
||||
h23a->Draw("box SAME");
|
||||
|
||||
} else {
|
||||
//TH2F *h2 = (TH2F*)(f->Get("phicut/pczguess_vs_pc_int"));
|
||||
//TH2F *h2 = (TH2F*)(f->Get("pcz_vs_sx3pczguess_A1C2_strip12"));
|
||||
TH2F *h2 = (TH2F*)(f->Get("pczfix_vs_sx3pczguess_A1C2"));
|
||||
TH2F *h2a = (TH2F*)(f->Get("pczfix_vs_sx3pczguess_A1C1"));
|
||||
//TH2F *h2 = (TH2F*)(f->Get("hPCQQQ/PC_XY_Projection_QQQ2"));
|
||||
if(!h2 || !h2a) continue;
|
||||
h2->SetTitle(Form("case%d",i));
|
||||
//h2->Draw("colz same");
|
||||
h2->SetLineColorAlpha(colors[ctr],0.75);
|
||||
h2->Draw("box same");
|
||||
h2a->SetLineColorAlpha(colors[ctr],0.75);
|
||||
h2a->Draw("box same");
|
||||
//f1.Draw("same");
|
||||
}
|
||||
TF1 eqline("x","x",-200,200);
|
||||
eqline.Draw("SAME");
|
||||
c1->Modified();
|
||||
c1->Update();
|
||||
ctr+=1;
|
||||
|
||||
|
||||
auto c2=c.cd(2);
|
||||
c2->SetGrid(1,1);
|
||||
|
||||
TH2F *h3 = (TH2F*)(f->Get("sx3phi_vs_pcphi1"));
|
||||
// TH2F *h2 = (TH2F*)(f->Get("hPCQQQ/PC_XY_Projection_QQQ2"));
|
||||
if(!h3) continue;
|
||||
h3->SetTitle(Form("case%d",i));
|
||||
h3->Draw("colz");
|
||||
eqline.Draw("SAME");
|
||||
c2->Modified();
|
||||
c2->Update();
|
||||
|
||||
while(gPad->WaitPrimitive());
|
||||
|
||||
files.emplace_back(f);
|
||||
if(i==21) {
|
||||
i=11;
|
||||
c.Clear();
|
||||
c.Divide(2,1);
|
||||
ctr=0;
|
||||
}
|
||||
if(quit) break;
|
||||
}
|
||||
for(auto file : files) {
|
||||
file->Close();
|
||||
}
|
||||
}
|
||||
87
scratch/sx3z_vs_phiz/scan_offset_witha1c1.C
Normal file
87
scratch/sx3z_vs_phiz/scan_offset_witha1c1.C
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
#include "testmodel.h"
|
||||
|
||||
int quit=0;
|
||||
void handler(int){quit=1;}
|
||||
|
||||
int colors[] = {kSpring+3, kRed, kGreen+3, kBlue+3, kViolet, kOrange, kSpring-7, kAzure-5};
|
||||
void scan_offset_witha1c1(){
|
||||
signal(SIGINT,handler);
|
||||
TCanvas c("c1","c1",0,0,1600,800);
|
||||
c.Divide(2,1);
|
||||
|
||||
TF1 f1("model",model,-200,200,2);
|
||||
f1.SetNpx(10000);
|
||||
std::vector<double> pars = {0.0,1.};
|
||||
f1.SetParameters(pars.data());
|
||||
f1.SetLineColor(kGreen+2);
|
||||
f1.SetLineStyle(kLine);
|
||||
|
||||
|
||||
|
||||
|
||||
TFile* f=NULL;
|
||||
std::vector<TFile*> files;
|
||||
int ctr=0;
|
||||
for(int i=12; i<=21; i++) {
|
||||
auto c1=c.cd(1);
|
||||
c1->SetGrid(1,1);
|
||||
f = new TFile(Form("../../results_run%d.root",i));
|
||||
|
||||
if(i==12) {
|
||||
//TH2F *h2 = (TH2F*)(f->Get("phicut/pczguess_vs_pc_int"));
|
||||
TH2F *h23 = (TH2F*)(f->Get("phicut/pczguess_vs_pc_int_A1C2"));
|
||||
TH2F *h23a = (TH2F*)(f->Get("phicut/pczguess_vs_pc_int_A1C1"));
|
||||
h23->SetLineColorAlpha(kOrange,0.75);
|
||||
h23->Draw("box SAME");
|
||||
h23a->SetLineColorAlpha(kOrange,0.75);
|
||||
h23a->Draw("box SAME");
|
||||
|
||||
} else {
|
||||
//TH2F *h2 = (TH2F*)(f->Get("phicut/pczguess_vs_pc_int"));
|
||||
//TH2F *h2 = (TH2F*)(f->Get("pcz_vs_sx3pczguess_A1C2_strip12"));
|
||||
TH2F *h2 = (TH2F*)(f->Get("pcz_vs_sx3pczguess_A1C2"));
|
||||
TH2F *h2a = (TH2F*)(f->Get("pcz_vs_sx3pczguess_A1C1"));
|
||||
//TH2F *h2 = (TH2F*)(f->Get("hPCQQQ/PC_XY_Projection_QQQ2"));
|
||||
if(!h2 || !h2a) continue;
|
||||
h2->SetTitle(Form("case%d",i));
|
||||
//h2->Draw("colz same");
|
||||
h2->SetLineColorAlpha(colors[ctr],0.75);
|
||||
h2a->SetLineColorAlpha(colors[ctr],0.75);
|
||||
h2->Draw("box same");
|
||||
h2a->Draw("box same");
|
||||
f1.Draw("same");
|
||||
}
|
||||
TF1 eqline("x","x",-200,200);
|
||||
eqline.Draw("SAME");
|
||||
c1->Modified();
|
||||
c1->Update();
|
||||
ctr+=1;
|
||||
|
||||
|
||||
auto c2=c.cd(2);
|
||||
c2->SetGrid(1,1);
|
||||
|
||||
TH2F *h3 = (TH2F*)(f->Get("sx3phi_vs_pcphi1"));
|
||||
// TH2F *h2 = (TH2F*)(f->Get("hPCQQQ/PC_XY_Projection_QQQ2"));
|
||||
if(!h3) continue;
|
||||
h3->SetTitle(Form("case%d",i));
|
||||
h3->Draw("colz");
|
||||
eqline.Draw("SAME");
|
||||
c2->Modified();
|
||||
c2->Update();
|
||||
|
||||
while(gPad->WaitPrimitive());
|
||||
|
||||
files.emplace_back(f);
|
||||
if(i==21) {
|
||||
i=11;
|
||||
c.Clear();
|
||||
c.Divide(2,1);
|
||||
ctr=0;
|
||||
}
|
||||
if(quit) break;
|
||||
}
|
||||
for(auto file : files) {
|
||||
file->Close();
|
||||
}
|
||||
}
|
||||
|
|
@ -18,7 +18,7 @@ double model_invert(double *y, double *q) {
|
|||
else if(TMath::Abs(y[0]) < 49.8/slope ) result=y[0]/slope-TMath::Sign(1.0,y[0])*factor;
|
||||
else if(TMath::Abs(y[0]) < 85.2/slope ) result=y[0]/slope-TMath::Sign(1.0,y[0])*factor*2;
|
||||
else result=y[0]/slope-TMath::Sign(1.0,y[0])*factor*3;
|
||||
return result+40;
|
||||
return result;
|
||||
}
|
||||
|
||||
/*void testmodel() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user