-- LaurenceCarson - 22 May 2014

Attached are some input files, both in .txt format and .root format. Some more info, and the recipe to access the data, on each of these is given below.

Text format

These were supplied by Haofei. They are from a test that illuminated only one pixel, so only one .txt file (QDCchannel06.txt) has any significant signal. This is the spectrum that is well fitted with a non-zero "first-dynode" contribution, and has been shown in my presentations. The gain seems to be large, so presumably this was taken with HV = 1000V.

To access the data from these files, in C++ I do (here address1 is a string which holds the path to the .txt file):

ifstream indata;

TH1F *h = new TH1F("h","MaPMT histogram",250,0,2500);

indata.open(address1);

if(indata) { // file couldn't be opened

cerr << "Error: file " << t << " could not be opened" << endl;

continue;

}

indata >> num;

while ( indata.eof() ) { // keep reading until end-of-file

if(num < 2500 & num >0){ //to have a reasonable range in the plot, I set a maximum value for this pixel

k = num * 0.1; //scaling by bin width

h->AddBinContent(k+1);

}

indata >> num; // sets EOF flag if no value found

}

indata.close()

This gives a histogram with 10 ADC channels per bin.

ROOT format

These are data taken by Adam and Matt. There are many such files, here I give one with HV = 900V and one with HV = 1000V. From the original file names, they are from the new PMTs, and have a very small magnetic field applied. You can access different pixels in the same ROOT file by looking at a different index of the array (as shown below). Atm we can only read out 16 pixels at a time. Pixel[0] of the spectra at 900V is the distribution from my presentations that I got a good fit from, but with zero fitted contribution from the "first dynode" component. Pixel[0] of the spectra at 1000V is the distribution where the fitted signal gain is (by eye) clearly too low (and again no "first dynode" component is found by the fit).

To access the data from these files, in C++ I do (here inputname is a string which holds the path to the .root file):

TH1F *h = new TH1F("h","MaPMT histogram",250,0,2500);

TFile* inputFile = new TFile(inputname.c_str());

if (inputFile->IsZombie()){

std::cout << "Failed to find input file" << std::endl;

return;

}

TTree* tree = (TTree*)inputFile->Get("QDCReadoutTree");

if (tree){

std::cout << "Failed to find input tree" << std::endl;

return;

}

int raw[32];

tree->SetBranchAddress("Value",raw);

int nevent = tree->GetEntries();

for (int ievent =0 ; ievent<nevent; ++ievent){

tree->GetEntry(ievent);

k = raw[0] * 0.1; //scaling by bin width

h->AddBinContent(k+1);

}

Again, this gives a histogram with 10 ADC channels per bin. This example will take the spectrum for pixel[0]. To get the spectrum for pixel[1], simply change raw[0] to raw[1] , and so on.

Topic attachments
I Attachment History Action Size Date Who Comment
Compressed Zip archivezip Spectra_RootFiles.zip r1 manage 3441.7 K 2014-05-22 - 19:30 LaurenceCarson Zip files of MaPMT spectra
Compressed Zip archivezip Spectra_TxtFiles.zip r1 manage 402.1 K 2014-05-22 - 19:30 LaurenceCarson Zip files of MaPMT spectra
Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2014-05-22 - LaurenceCarson
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback