modified: Calibration.C
modified: GainMatchQQQ.C modified: QQQ_Calcheck.C modified: makeplots.C
This commit is contained in:
parent
c32215e293
commit
aee3a2467d
|
|
@ -134,6 +134,11 @@ Bool_t Calibration::Process(Long64_t entry)
|
|||
|
||||
// hist2d->Fill(eWedge, eRing);
|
||||
// if (cut && cut->IsInside(eWedge, eRing))
|
||||
const double MIN_ADC = 1500.0;
|
||||
const double MAX_ADC = 3000.0;
|
||||
|
||||
if (eWedge >= MIN_ADC && eWedge <= MAX_ADC &&
|
||||
eRing >= MIN_ADC && eRing <= MAX_ADC)
|
||||
{
|
||||
// Accumulate data for gain matching
|
||||
dataPoints[{qqq.id[i], chRing, chWedge}].emplace_back(eWedge, eRing);
|
||||
|
|
@ -248,7 +253,7 @@ void Calibration::Terminate()
|
|||
double eRkeV = eRGM * slope / 1000;
|
||||
|
||||
hCal->Fill(eWkeV, eRkeV);
|
||||
plotter->Fill2D("hCalQQQ", 4000, 0, 100, 4000, 0, 100, eWkeV, eRkeV);
|
||||
plotter->Fill2D("hCalQQQ", 4000, 0, 10, 4000, 0, 10, eWkeV, eRkeV);
|
||||
plotter->Fill2D(Form("hRCal_qqq%d", det), 16, 0, 15, 400, 0, 24, ring, eRkeV, "RingCal");
|
||||
plotter->Fill2D(Form("hWCal_qqq%d", det), 16, 0, 15, 400, 0, 24, wedge, eWkeV, "WedgeCal");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,7 +128,6 @@ Bool_t GainMatchQQQ::Process(Long64_t entry)
|
|||
plotter->Fill2D("hAll_in", 4000, 0, 16000, 4000, 0, 16000, ew, er);
|
||||
validPoint = true;
|
||||
}
|
||||
|
||||
if (!validPoint)
|
||||
{
|
||||
plotter->Fill2D("hAll_out", 4000, 0, 16000, 4000, 0, 16000, ew, er);
|
||||
|
|
@ -174,6 +173,7 @@ void GainMatchQQQ::Terminate()
|
|||
bool solved = false;
|
||||
double final_gW = 0.0;
|
||||
double final_gR = 0.0;
|
||||
// make a vector of ring wedge as I go through all points and fit a tgraph on the fly
|
||||
|
||||
// Iterative sigma-clipping loop
|
||||
for (int iter = 0; iter < MAX_ITER; ++iter)
|
||||
|
|
|
|||
|
|
@ -142,14 +142,17 @@ Bool_t QQQ_Calcheck::Process(Long64_t entry)
|
|||
continue;
|
||||
|
||||
// hQQQFVB->Fill(eWedge, eRing);
|
||||
plotter->Fill2D(Form("hRaw_qqq%d_ring%d_wedge%d", qqq.id[i], chRing, chWedge), 400, 0, 16000, 400, 0, 16000, eWedgeRaw, eRingRaw, "ERaw");
|
||||
plotter->Fill2D(Form("hRaw_qqq%d_ring%d_wedge%d", qqq.id[i], chRing, chWedge), 400, 0, 8000, 400, 0, 8000, eWedgeRaw, eRingRaw, "ERaw");
|
||||
plotter->Fill2D(Form("hGM_qqq%d_ring%d_wedge%d", qqq.id[i], chRing, chWedge), 400, 0, 16000, 400, 0, 16000, eWedge, eRing, "EGM");
|
||||
plotter->Fill2D(Form("hCal_qqq%d_ring%d_wedge%d", qqq.id[i], chRing, chWedge), 400, 0, 24, 400, 0, 24, eWedgeMeV, eRingMeV, "ECal");
|
||||
plotter->Fill2D(Form("hCal_qqq%d_ring%d_wedge%d", qqq.id[i], chRing, chWedge), 400, 0, 10, 400, 0, 10, eWedgeMeV, eRingMeV, "ECal");
|
||||
if(eWedgeRaw >1500 && eRingRaw>1500 )
|
||||
plotter->Fill2D(Form("hCal_cut_qqq%d_ring%d_wedge%d", qqq.id[i], chRing, chWedge), 400, 0, 10, 400, 0, 10, eWedgeMeV, eRingMeV, "ECal_cut");
|
||||
|
||||
plotter->Fill2D(Form("hRCal_qqq%d", qqq.id[i]), 16, 0, 15, 1000, 0, 30, chRing, eRingMeV, "RingCal");
|
||||
plotter->Fill2D(Form("hWCal_qqq%d", qqq.id[i]), 16, 0, 15, 1000, 0, 30, chWedge, eWedgeMeV, "WedgeCal");
|
||||
plotter->Fill2D("hRawQQQ", 4000, 0, 16000, 4000, 0, 16000, eWedgeRaw, eRingRaw);
|
||||
plotter->Fill2D("hRawQQQ", 4000, 0, 8000, 4000, 0, 8000, eWedgeRaw, eRingRaw);
|
||||
plotter->Fill2D("hGMQQQ", 4000, 0, 16000, 4000, 0, 16000, eWedge, eRing);
|
||||
plotter->Fill2D("hCalQQQ", 4000, 0, 24, 4000, 0, 24, eWedgeMeV, eRingMeV);
|
||||
plotter->Fill2D("hCalQQQ", 4000, 0, 10, 4000, 0, 10, eWedgeMeV, eRingMeV);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
70
makeplots.C
70
makeplots.C
|
|
@ -13,13 +13,75 @@
|
|||
#include "Armory/HistPlotter.h"
|
||||
#include "TVector3.h"
|
||||
|
||||
void make_plots();
|
||||
void makeplots()
|
||||
{
|
||||
TCanvas *c1 = new TCanvas("c1", "c1", 0, 0, 1024, 768);
|
||||
c1->Divide(2, 2);
|
||||
|
||||
TH2F *h1, *h2, *h3, *h4 = nullptr;
|
||||
|
||||
int main(){
|
||||
std::string type = "Cal_cut";
|
||||
TFile *inFile = TFile::Open("Cal_checkQQQ.root");
|
||||
TF1 f1("x","x",0 ,80);
|
||||
|
||||
make_plots();
|
||||
return 0;
|
||||
|
||||
for (int ring = 0; ring < 16; ring++)
|
||||
{
|
||||
for (int wedge = 0; wedge < 16; wedge++)
|
||||
{
|
||||
|
||||
c1->cd(1);
|
||||
h1 = (TH2F *)inFile->Get(Form("E%s/h%s_qqq%d_ring%d_wedge%d", type.c_str(), type.c_str(), 0, ring, wedge));
|
||||
gPad->SetGrid();
|
||||
if (h1)
|
||||
{
|
||||
h1->SetTitle(Form("QQQ%d Ring %d Wedge %d %s E", 0, ring, wedge, type.c_str()));
|
||||
h1->Draw("COLZ");
|
||||
f1.DrawClone("same");
|
||||
|
||||
gPad->Modified();
|
||||
gPad->Update();
|
||||
}
|
||||
|
||||
c1->cd(2);
|
||||
h2 = (TH2F *)inFile->Get(Form("E%s/h%s_qqq%d_ring%d_wedge%d", type.c_str(), type.c_str(), 1, ring, wedge));
|
||||
gPad->SetGrid();
|
||||
if (h2)
|
||||
{
|
||||
std::cout<<h2<<std::endl;
|
||||
h2->SetTitle(Form("QQQ%d Ring %d Wedge %d %s E", 1, ring, wedge, type.c_str()));
|
||||
h2->Draw("COLZ");
|
||||
f1.DrawClone("same");
|
||||
gPad->Modified();
|
||||
gPad->Update();
|
||||
}
|
||||
|
||||
c1->cd(3);
|
||||
h3 = (TH2F *)inFile->Get(Form("E%s/h%s_qqq%d_ring%d_wedge%d", type.c_str(), type.c_str(), 2, ring, wedge));
|
||||
gPad->SetGrid();
|
||||
if (h3)
|
||||
{
|
||||
h3->SetTitle(Form("QQQ%d Ring %d Wedge %d %s E", 2, ring, wedge, type.c_str()));
|
||||
h3->Draw("COLZ");
|
||||
f1.DrawClone("same");
|
||||
gPad->Modified();
|
||||
gPad->Update();
|
||||
}
|
||||
|
||||
c1->cd(4);
|
||||
h4 = (TH2F *)inFile->Get(Form("E%s/h%s_qqq%d_ring%d_wedge%d", type.c_str(), type.c_str(), 3, ring, wedge));
|
||||
gPad->SetGrid();
|
||||
if (h4)
|
||||
{
|
||||
h4->SetTitle(Form("QQQ%d Ring %d Wedge %d %s E", 3, ring, wedge, type.c_str()));
|
||||
h4->Draw("COLZ");
|
||||
f1.DrawClone("same");
|
||||
gPad->Modified();
|
||||
gPad->Update();
|
||||
}
|
||||
while (gPad->WaitPrimitive());
|
||||
}
|
||||
}
|
||||
|
||||
inFile->Close();
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user