I've written two scripts that others might find useful for the on-line analysis.
1. The first is a simple bash script that runs a for loop to run the e143_analyzer.py script for a sequence of start values (-s). You'll need to change the increment and
start/end of the for loop to set the time resolution.
2. The second is a root script that takes the above generated scripts, reads the histograms, and then fills a 2D histogram. You'll need to adjust the TH2 bin number to
match both the bin number of the TH1s and the number of analysed files. I've included a print line to help identify the TH1 bin number.
To see the first results, I've attached a sum of July 1st 22-23h data. Sadly, I don't see any indication of the isomer, or at least the production is very low. |
#define e143_comparison_cxx
#include <iostream>
#include <math.h>
#include <vector>
#include "TROOT.h"
#include "TFile.h"
#include "TChain.h"
#include "TTree.h"
#include "TBranch.h"
#include "TCanvas.h"
#include "TGraph.h"
#include "TGraphPainter.h"
#include "TColor.h"
#include "TH1.h"
#include "TH2.h"
#include "TH3.h"
#include "TH1F.h"
#include "TH2F.h"
#include "TH3F.h"
#include "THStack.h"
#include "THistPainter.h"
using namespace std;
void e143_comparison()
{
TH2 *h1vt_410MHz_07m01d22h_10ms = new TH2F("h1vt_410MHz_07m01d22h_10ms","410Mhz 07.01.22h Additiion (10 ms res);frequency (Hz);time (s)",256,4.06704e+08,4.06753e+08,200,0,2);
int nframes = 200;
vector<TFile*> tf_frames;
vector<TH1*> h1_frames(nframes,NULL);
char chname[300];
for(int i=0; i<nframes; i++)
{
sprintf(chname,"E143_Results/410MHz-07.01.22h_s%.2f_t0.01.root",i*0.01);
//cout << chname << endl;
tf_frames.push_back(new TFile(chname));
tf_frames[i]->GetObject("th1f",h1_frames[i]);
for(long j=0; j<256; j++)
{
h1vt_410MHz_07m01d22h_10ms->SetBinContent(j+1, i+1, h1_frames[i]->GetBinContent(j));
}
}
cout << "Total Bins: " << h1_frames[100]->GetNbinsX() << ", Xlow: " << h1_frames[100]->GetBinCenter(1) << ", Xhigh: " << h1_frames[100]->GetBinCenter(h1_frames[100]->GetNbinsX()) << endl;
TCanvas *c1 = new TCanvas("c1","c1",50,50,1000,800);
h1vt_410MHz_07m01d22h_10ms->Draw("COLZ");
TFile *fhists = new TFile("e143_added_th2s.root","RECREATE");
h1vt_410MHz_07m01d22h_10ms->Write();
cout << "Written h1vt_410MHz_07m01d22h_10ms to file." << endl;
fhists->Close();
}
int main ()
{
e143_comparison();
return 0;
}
|