Commit 3cda1a29 authored by Kostyleva D.A's avatar Kostyleva D.A

Dead layer value is included

parent 3f051ee0
...@@ -26,6 +26,8 @@ AculCalibration::AculCalibration() : fEnergy(0), fEnergyInput(0), fA(0), fB(0), ...@@ -26,6 +26,8 @@ AculCalibration::AculCalibration() : fEnergy(0), fEnergyInput(0), fA(0), fB(0),
// todo: change size of fA and fB in some other place // todo: change size of fA and fB in some other place
fA.Set(32); fA.Set(32);
fB.Set(32); fB.Set(32);
fEnergy.Set(4);
fEnergyInput.Set(4);
kRaNOPEAKS = 0; kRaNOPEAKS = 0;
fLowerPeakRelativeHight = 0.; fLowerPeakRelativeHight = 0.;
...@@ -979,10 +981,10 @@ void AculCalibration::CalibrateRawSpectra(const char* inputfile, const char* blo ...@@ -979,10 +981,10 @@ void AculCalibration::CalibrateRawSpectra(const char* inputfile, const char* blo
TString oFileName; TString oFileName;
//outputfile with calibrated spectra //outputfile with calibrated spectra
if ( (lowersubaddress == 0) && (uppersubaddress == ADDRESSNUMBER-1) ) { oFileName.Form("%s[]E.root", block); } if ( (lowersubaddress == 0) && (uppersubaddress == ADDRESSNUMBER-1) ) { oFileName.Form("%s[]Ecal.root", block); }
else { else {
if (lowersubaddress == uppersubaddress) { oFileName.Form("%s[%d]E.root", block, lowersubaddress); } if (lowersubaddress == uppersubaddress) { oFileName.Form("%s[%d]Ecal.root", block, lowersubaddress); }
else { oFileName.Form("%s[%d-%d]E.root", block, lowersubaddress, uppersubaddress); } else { oFileName.Form("%s[%d-%d]Ecal.root", block, lowersubaddress, uppersubaddress); }
} }
TFile *fw = new TFile(oFileName.Data(), "RECREATE"); TFile *fw = new TFile(oFileName.Data(), "RECREATE");
......
...@@ -60,8 +60,8 @@ private: ...@@ -60,8 +60,8 @@ private:
//parameters to be read from file //parameters to be read from file
Int_t kRaNOPEAKS; Int_t kRaNOPEAKS;
TArrayD fEnergy; TArrayD fEnergy; //energy after passing through deadlayer
TArrayD fEnergyInput; TArrayD fEnergyInput; //incidental energy, set from .par
Double_t fLowerChannel; Double_t fLowerChannel;
Double_t fUpperChannel; Double_t fUpperChannel;
Double_t fLowerPeakRelativeHight; //pouziva se, private Double_t fLowerPeakRelativeHight; //pouziva se, private
......
#include <TSystem.h>
#include <iostream>
using namespace std;
void calibration1()
{
// gSystem->Load("/home/dariak/AculUtils/libAculData.so");
gSystem->Load("/home/vratik/workspace/AculUtils/libTELoss.so");
gSystem->Load("/home/vratik/workspace/AculUtils/libAculData.so");
AculCalibration cal;
// cal.SetParFileName("/home/dariak/AculUtils/parforcal.par"); //from .par
cal.SetParFileName("/home/vratik/workspace/AculUtils/parforcal.par"); //from .par
cal.Init();
//return;
cal.PrintInputParameters();
TCanvas *c1 = new TCanvas();
cal.ShowEnergySpectra("SQ22[]E.root", c1, 32);
// return;
// cal.CalculateCalibParameters("/home/dariak/AculUtils/exp1016/clb_raw_files/sq22/clb07_0001.root", "SQ22", "AnalysisxTree", 100, 1500);
// cal.CalculateCalibParameters("/home/vratik/workspace/AculUtils/exp1016/clb_raw_files/clb07_0001.root", "SQ22", "AnalysisxTree", 100, 1500);
return;
// CalculateCalibParameters(const char* inputfile, const char* block, const char* treename, Int_t lowerchannel = 0, Int_t upperchannel = 4095, Int_t nEBins = 1000, Int_t lowersubaddress = 0, Int_t uppersubaddress = ADDRESSNUMBER-1);
cal.PrintCalibrationParameters();
TFile fr("/home/dariak/AculUtils/exp1016/SQ22[]E.root");
cout << fr.GetListOfKeys()->GetEntries() << " histograms" << endl;
TCanvas *c2 = new TCanvas();
cal.FindEnergyPeaks(c2,"SQ22[]E.root","outputenergrun07.txt");
/* TList *histList = fr.GetListOfKeys();
TH1 *hWork = 0;
for (Int_t i = 0; i < 32; i++)
{
fr.GetObject(histList->At(i)->GetName(), hWork);
cal->PeaksFitting(hWork);
}*/
}
void calibration2()
{
gSystem->Load("/home/dariak/AculUtils/libAculData.so");
AculCalibration cal;
cal.SetInputParameters("/home/dariak/AculUtils/parforcal.par"); //takes !only! a number of peaks from .par
cal.SetCalibrationParameters("/home/dariak/AculUtils/SQ22[].cal"); //takes calibration parameters
cal.PrintCalibrationParameters();
TCanvas *c2 = new TCanvas();
cal.CalibrateRawSpectra("/home/dariak/AculUtils/exp1016/clb_raw_files/sq22/clb09_0001.root", "SQ22", "AnalysisxTree", 100, 1500, 500); //takes data from raw file and calibrates it with obtained calibration parameters, void CalibrateRawSpectra(const char* inputfile, const char* block, const char* treename, Int_t lowerchannel = 0, Int_t upperchannel = 4095, Int_t nEBins = 1000, Int_t lowersubaddress = 0, Int_t uppersubaddress = ADDRESSNUMBER-1);
TFile fr("/home/dariak/AculUtils/SQ22[]E.root");
cout << fr.GetListOfKeys()->GetEntries() << " histograms" << endl;
cal.FindEnergyPeaks(c2,"SQ22[]E.root","outputenergrun09.txt");
/* TList *histList = fr.GetListOfKeys();
TH1 *hWork = 0;
c1->Clear();
c1->Divide(6, 6);
for (Int_t i = 0; i < 32; i++)
{
fr.GetObject(histList->At(i)->GetName(), hWork);
c1->cd(i+1);
cal->PeaksFitting(hWork);
hWork->Draw();
}
/* c1->Divide(2, 2);
c1->cd(1);
fr.GetObject(histList->At(7)->GetName(), hWork);
cal->PeaksFitting(hWork);
hWork->Draw();
fr.GetObject(histList->At(8)->GetName(), hWork);
c1->cd(2);
cal->PeaksFitting(hWork);
hWork->Draw();
fr.GetObject(histList->At(23)->GetName(), hWork);
c1->cd(3);
cal->PeaksFitting(hWork);
hWork->Draw();
fr.GetObject(histList->At(24)->GetName(), hWork);
c1->cd(4);
cal->PeaksFitting(hWork);
hWork->Draw();
*/
}
{
// gSystem->Load("/home/dariak/AculUtils/libAculData.so");
gSystem->Load("/home/vratik/workspace/AculUtils/libAculData.so");
AculCalibration cal;
cal.SetInputParameters("../../parforcal.par"); //from .par
// cal.CalculateCalibParameters("clb08_0001.root", "SQ22", "AnalysisxTree", 100, 4095);
cal.CalculateCalibParameters("../../clb_raw_files/clb08_0001.root", "SQ22", "AnalysisxTree", 100, 4095);
// CalculateCalibParameters(const char* inputfile, const char* block, const Int_t address, const char* treename, Int_t lowerchannel = 0, Int_t upperchannel = 4095, Int_t nEBins = 1000, Int_t lowersubaddress = 0, Int_t uppersubaddress = ADDRESSNUMBER-1);
// TFile fr("SQ22[]E.root");
// cout << fr.GetListOfKeys()->GetEntries() << " histograms" << endl;
// TList *histList = fr.GetListOfKeys();
// TH1 *hWork = 0;
// for (Int_t i = 0; i < 32; i++)
// {
// fr.GetObject(histList->At(i)->GetName(), hWork);
// cal->PeaksFitting(hWork);
// }
}
void calibration2()
{
gSystem->Load("/home/dariak/AculUtils/libAculData.so");
AculCalibration cal;
cal->SetInputParameters();
cal->SetCalibrationParameters("SQ22[].cal"); //takes calibration parameters
cal->PrintCalibrationParameters(22, 22);
TCanvas *c1 = new TCanvas();
TCanvas *c2 = new TCanvas();
cal->CalibrateRawSpectra("clb09_0001.root", "SQ22", "AnalysisxTree", 100, 800, 500); //takes data from raw file and calibrates it with obtained calibration parameters
//cal->CalibrateRawSpectra("clb09_0001.root", "SQ22", "AnalysisxTree", 100, 800, 500); //takes data from raw file and calibrates it with obtained calibration parameters
//return;
TFile fr("SQ22[]E.root");
cout << fr.GetListOfKeys()->GetEntries() << " histograms" << endl;
TList *histList = fr.GetListOfKeys();
TH1 *hWork = 0;
c1->Clear();
c1->Divide(6, 6);
for (Int_t i = 0; i < 32; i++)
{
fr.GetObject(histList->At(i)->GetName(), hWork);
c1->cd(i+1);
cal->PeaksFitting(hWork);
hWork->Draw();
}
cal.FindEnergyPeaks(c2,"SQ22[]E.root","output.txt");
/* c1->Divide(2, 2);
c1->cd(1);
fr.GetObject(histList->At(7)->GetName(), hWork);
cal->PeaksFitting(hWork);
hWork->Draw();
fr.GetObject(histList->At(8)->GetName(), hWork);
c1->cd(2);
cal->PeaksFitting(hWork);
hWork->Draw();
fr.GetObject(histList->At(23)->GetName(), hWork);
c1->cd(3);
cal->PeaksFitting(hWork);
hWork->Draw();
fr.GetObject(histList->At(24)->GetName(), hWork);
c1->cd(4);
cal->PeaksFitting(hWork);
hWork->Draw();
*/
}
{
gSystem->Load("~/workspace/Utilities/libAculData.so");
TFile fr("clb01_0001.root");
TTree *tr = (TTree*)fr.Get("AnalysisxTree");
tr->Draw("SQ22[0]", "SQ22[0]>100");
}
{
gSystem->Load("../libTELoss.so");
TELoss mSi;
//set parameters for Si and alpha
mSi.SetEL(1, 2.321); // density in g/cm3
mSi.AddEL(14., 28.086, 1); //Z, mass
// mSi.SetZP(1., 1.); //protons
mSi.SetZP(2., 4.); //alphas, Z, A
mSi.SetEtab(100000, 200.); // ?, MeV calculate ranges
mSi.SetDeltaEtab(300); // calculate delta E
// TCanvas *c1 = new TCanvas("name", "title which can consist more than one word.", 617, 0, 1058, 972);
// cout << mSi.GetE(50, 1000) << endl; //(input energy E0 in MeV, microns)
// cout << mSi.GetE0(9.04, 1000) << endl; //(output energy E in MeV, microns)
//calculated energies for run1 - run3
/*
Double_t deltaL1 = mSi.GetR(4.789, 4.623); //(doule E0, double E in MeV) calculates layer in mcm for averages
Double_t deltaL2 = mSi.GetR(5.5,5.355);
Double_t deltaL3 = mSi.GetR(6.017,5.880);
Double_t deltaL4 = mSi.GetR(7.693, 7.577);
*/
//calculated energies for run4 - run5
/*
Double_t deltaL1 = mSi.GetR(4.782,4.613); //(doule E0, double E in MeV) calculates layer in mcm for averages
Double_t deltaL2 = mSi.GetR(5.503,5.348);
Double_t deltaL3 = mSi.GetR(6.016,5.875);
Double_t deltaL4 = mSi.GetR(7.692,7.571);
*/
//calculated energies for run6 - run7
/*
Double_t deltaL1 = mSi.GetR(4.788,4.675); //(doule E0, double E in MeV) calculates layer in mcm for averages
Double_t deltaL2 = mSi.GetR(5.502,5.340);
Double_t deltaL3 = mSi.GetR(6.017,5.923);
Double_t deltaL4 = mSi.GetR(7.693,7.612);
*/
//calculated energies for run8 - run9
Double_t deltaL1 = mSi.GetR(4.787,4.648); //(doule E0, double E in MeV) calculates layer in mcm for averages
Double_t deltaL2 = mSi.GetR(5.501,5.380);
Double_t deltaL3 = mSi.GetR(6.018,5.903);
Double_t deltaL4 = mSi.GetR(7.692,7.594);
cout << deltaL1 << " mcm" << endl; //MeV, microns - delta layer
cout << deltaL2 << " mcm" << endl;
cout << deltaL3 << " mcm" << endl;
cout << deltaL4 << " mcm" << endl << endl;
cout << "dead layer 1 is: " << deltaL1/(TMath::Sqrt(2) - 1) << " mcm" << endl; //MeV, microns
cout << "dead layer 2 is: " <<deltaL2/(TMath::Sqrt(2) - 1) << " mcm" << endl; //MeV, microns
cout << "dead layer 3 is: " <<deltaL3/(TMath::Sqrt(2) - 1) << " mcm" << endl; //MeV, microns
cout << "dead layer 4 is: " <<deltaL4/(TMath::Sqrt(2) - 1) << " mcm" << endl << endl; //MeV, microns
cout << "Back dead layer for detector 1-11 is : " << ( deltaL1/(TMath::Sqrt(2) - 1) + deltaL2/(TMath::Sqrt(2) - 1)+ deltaL3/(TMath::Sqrt(2) - 1) + deltaL4/(TMath::Sqrt(2) - 1) )/4. << " mcm" << endl; //dead layer width
}
{
gSystem->Load("/home/dariak/AculUtils/libAculData.so");
AculCalibration cal;
cal.SetInputParameters(); //from .par
cal.CalculateCalibParameters("clb09_0001.root", "SQ22", "AnalysisxTree", 100, 4095);
// CalculateCalibParameters(const char* inputfile, const char* block, const Int_t address, const char* treename, Int_t lowerchannel = 0, Int_t upperchannel = 4095, Int_t nEBins = 1000, Int_t lowersubaddress = 0, Int_t uppersubaddress = ADDRESSNUMBER-1);
TFile fr("SQ22[].root");
cout << fr.GetListOfKeys()->GetEntries() << " histograms" << endl;
TList *histList = fr.GetListOfKeys();
TH1 *hWork = 0;
for (Int_t i = 0; i < 32; i++)
{
fr.GetObject(histList->At(i)->GetName(), hWork);
cal->PeaksFitting(hWork);
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
#define AnalysisxTree_cxx
#include "AnalysisxTree.h"
#include <TH2.h>
#include <TStyle.h>
#include <TCanvas.h>
void AnalysisxTree::Loop()
{
// In a ROOT session, you can do:
// Root > .L AnalysisxTree.C
// Root > AnalysisxTree t
// Root > t.GetEntry(12); // Fill t data members with entry number 12
// Root > t.Show(); // Show values of entry 12
// Root > t.Show(16); // Read and show values of entry 16
// Root > t.Loop(); // Loop on all entries
//
// This is the loop skeleton where:
// jentry is the global entry number in the chain
// ientry is the entry number in the current Tree
// Note that the argument to GetEntry must be:
// jentry for TChain::GetEntry
// ientry for TTree::GetEntry and TBranch::GetEntry
//
// To read only selected branches, Insert statements like:
// METHOD1:
// fChain->SetBranchStatus("*",0); // disable all branches
// fChain->SetBranchStatus("branchname",1); // activate branchname
// METHOD2: replace line
// fChain->GetEntry(jentry); //read all branches
//by b_branchname->GetEntry(ientry); //read only this branch
if (fChain == 0) return;
Long64_t nentries = fChain->GetEntriesFast();
Long64_t nbytes = 0, nb = 0;
for (Long64_t jentry=0; jentry<nentries;jentry++) {
Long64_t ientry = LoadTree(jentry);
if (ientry < 0) break;
nb = fChain->GetEntry(jentry); nbytes += nb;
// if (Cut(ientry) < 0) continue;
}
}
//////////////////////////////////////////////////////////
// This class has been automatically generated on
// Mon Oct 3 10:53:30 2016 by ROOT version 5.34/30
// from TTree AnalysisxTree/Go4FileStore
// found on file: clb01_0001.root
//////////////////////////////////////////////////////////
#ifndef AnalysisxTree_h
#define AnalysisxTree_h
#include <TROOT.h>
#include <TChain.h>
#include <TFile.h>
// Header file for the classes stored in the TTree if any.
// Fixed size dimensions of array or collections stored in the TTree if any.
const Int_t kMaxLiEvent = 1;
class AnalysisxTree {
public :
TTree *fChain; //!pointer to the analyzed TTree or TChain
Int_t fCurrent; //!current Tree number in a TChain
// Declaration of leaf types
//TLiEvent *LiEvent_;
//TLiEvent *LiEvent_TGo4EventElement;
UShort_t LiEvent_SQ11[16];
UShort_t LiEvent_SQ12[32];
UShort_t LiEvent_SQ13[16];
UShort_t LiEvent_SQ21[16];
UShort_t LiEvent_SQ22[32];
UShort_t LiEvent_SQ23[16];
UShort_t LiEvent_ANR[16];
UShort_t LiEvent_ANS[16];
UShort_t LiEvent_ANC[32];
UShort_t LiEvent_TSQ11[16];
UShort_t LiEvent_TSQ12[32];
UShort_t LiEvent_TSQ21[16];
UShort_t LiEvent_TSQ22[32];
UShort_t LiEvent_TANR[16];
UShort_t LiEvent_TANS[16];
UShort_t LiEvent_QDC[16];
UShort_t LiEvent_TDC[16];
UShort_t LiEvent_SCR[16];
UShort_t LiEvent_nx1;
UShort_t LiEvent_ny1;
UShort_t LiEvent_nx2;
UShort_t LiEvent_ny2;
UShort_t LiEvent_x1[32];
UShort_t LiEvent_y1[32];
UShort_t LiEvent_x2[32];
UShort_t LiEvent_y2[32];
UShort_t LiEvent_adc1[16];
UShort_t LiEvent_adc2[16];
UShort_t LiEvent_adc3[16];
UShort_t LiEvent_adc4[16];
UShort_t LiEvent_tdc1[32];
UShort_t LiEvent_tdc2[32];
UInt_t LiEvent_time;
Int_t LiEvent_nevent;
Int_t LiEvent_trigger;
Int_t LiEvent_subevents;
Int_t LiEvent_evsize;
// List of branches
TBranch *b_LiEvent_SQ11; //!
TBranch *b_LiEvent_SQ12; //!
TBranch *b_LiEvent_SQ13; //!
TBranch *b_LiEvent_SQ21; //!
TBranch *b_LiEvent_SQ22; //!
TBranch *b_LiEvent_SQ23; //!
TBranch *b_LiEvent_ANR; //!
TBranch *b_LiEvent_ANS; //!
TBranch *b_LiEvent_ANC; //!
TBranch *b_LiEvent_TSQ11; //!
TBranch *b_LiEvent_TSQ12; //!
TBranch *b_LiEvent_TSQ21; //!
TBranch *b_LiEvent_TSQ22; //!
TBranch *b_LiEvent_TANR; //!
TBranch *b_LiEvent_TANS; //!
TBranch *b_LiEvent_QDC; //!
TBranch *b_LiEvent_TDC; //!
TBranch *b_LiEvent_SCR; //!
TBranch *b_LiEvent_nx1; //!
TBranch *b_LiEvent_ny1; //!
TBranch *b_LiEvent_nx2; //!
TBranch *b_LiEvent_ny2; //!
TBranch *b_LiEvent_x1; //!
TBranch *b_LiEvent_y1; //!
TBranch *b_LiEvent_x2; //!
TBranch *b_LiEvent_y2; //!
TBranch *b_LiEvent_adc1; //!
TBranch *b_LiEvent_adc2; //!
TBranch *b_LiEvent_adc3; //!
TBranch *b_LiEvent_adc4; //!
TBranch *b_LiEvent_tdc1; //!
TBranch *b_LiEvent_tdc2; //!
TBranch *b_LiEvent_time; //!
TBranch *b_LiEvent_nevent; //!
TBranch *b_LiEvent_trigger; //!
TBranch *b_LiEvent_subevents; //!
TBranch *b_LiEvent_evsize; //!
AnalysisxTree(TTree *tree=0);
virtual ~AnalysisxTree();
virtual Int_t Cut(Long64_t entry);
virtual Int_t GetEntry(Long64_t entry);
virtual Long64_t LoadTree(Long64_t entry);
virtual void Init(TTree *tree);
virtual void Loop();
virtual Bool_t Notify();
virtual void Show(Long64_t entry = -1);
};
#endif
#ifdef AnalysisxTree_cxx
AnalysisxTree::AnalysisxTree(TTree *tree) : fChain(0)
{
// if parameter tree is not specified (or zero), connect the file
// used to generate this class and read the Tree.
if (tree == 0) {
TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("clb01_0001.root");
if (!f || !f->IsOpen()) {
f = new TFile("clb01_0001.root");
}
f->GetObject("AnalysisxTree",tree);
}
Init(tree);
}
AnalysisxTree::~AnalysisxTree()
{
if (!fChain) return;
delete fChain->GetCurrentFile();
}
Int_t AnalysisxTree::GetEntry(Long64_t entry)
{
// Read contents of entry.
if (!fChain) return 0;
return fChain->GetEntry(entry);
}
Long64_t AnalysisxTree::LoadTree(Long64_t entry)
{
// Set the environment to read one entry
if (!fChain) return -5;
Long64_t centry = fChain->LoadTree(entry);
if (centry < 0) return centry;
if (fChain->GetTreeNumber() != fCurrent) {
fCurrent = fChain->GetTreeNumber();
Notify();
}
return centry;
}
void AnalysisxTree::Init(TTree *tree)
{
// The Init() function is called when the selector needs to initialize
// a new tree or chain. Typically here the branch addresses and branch
// pointers of the tree will be set.
// It is normally not necessary to make changes to the generated
// code, but the routine can be extended by the user if needed.
// Init() will be called many times when running on PROOF
// (once per file to be processed).
// Set branch addresses and branch pointers
if (!tree) return;
fChain = tree;
fCurrent = -1;
fChain->SetMakeClass(1);
fChain->SetBranchAddress("LiEvent.SQ11[16]", LiEvent_SQ11, &b_LiEvent_SQ11);
fChain->SetBranchAddress("LiEvent.SQ12[32]", LiEvent_SQ12, &b_LiEvent_SQ12);
fChain->SetBranchAddress("LiEvent.SQ13[16]", LiEvent_SQ13, &b_LiEvent_SQ13);
fChain->SetBranchAddress("LiEvent.SQ21[16]", LiEvent_SQ21, &b_LiEvent_SQ21);
fChain->SetBranchAddress("LiEvent.SQ22[32]", LiEvent_SQ22, &b_LiEvent_SQ22);
fChain->SetBranchAddress("LiEvent.SQ23[16]", LiEvent_SQ23, &b_LiEvent_SQ23);
fChain->SetBranchAddress("LiEvent.ANR[16]", LiEvent_ANR, &b_LiEvent_ANR);
fChain->SetBranchAddress("LiEvent.ANS[16]", LiEvent_ANS, &b_LiEvent_ANS);
fChain->SetBranchAddress("LiEvent.ANC[32]", LiEvent_ANC, &b_LiEvent_ANC);
fChain->SetBranchAddress("LiEvent.TSQ11[16]", LiEvent_TSQ11, &b_LiEvent_TSQ11);
fChain->SetBranchAddress("LiEvent.TSQ12[32]", LiEvent_TSQ12, &b_LiEvent_TSQ12);
fChain->SetBranchAddress("LiEvent.TSQ21[16]", LiEvent_TSQ21, &b_LiEvent_TSQ21);
fChain->SetBranchAddress("LiEvent.TSQ22[32]", LiEvent_TSQ22, &b_LiEvent_TSQ22);
fChain->SetBranchAddress("LiEvent.TANR[16]", LiEvent_TANR, &b_LiEvent_TANR);
fChain->SetBranchAddress("LiEvent.TANS[16]", LiEvent_TANS, &b_LiEvent_TANS);
fChain->SetBranchAddress("LiEvent.QDC[16]", LiEvent_QDC, &b_LiEvent_QDC);
fChain->SetBranchAddress("LiEvent.TDC[16]", LiEvent_TDC, &b_LiEvent_TDC);
fChain->SetBranchAddress("LiEvent.SCR[16]", LiEvent_SCR, &b_LiEvent_SCR);
fChain->SetBranchAddress("LiEvent.nx1", &LiEvent_nx1, &b_LiEvent_nx1);
fChain->SetBranchAddress("LiEvent.ny1", &LiEvent_ny1, &b_LiEvent_ny1);
fChain->SetBranchAddress("LiEvent.nx2", &LiEvent_nx2, &b_LiEvent_nx2);
fChain->SetBranchAddress("LiEvent.ny2", &LiEvent_ny2, &b_LiEvent_ny2);
fChain->SetBranchAddress("LiEvent.x1[32]", LiEvent_x1, &b_LiEvent_x1);
fChain->SetBranchAddress("LiEvent.y1[32]", LiEvent_y1, &b_LiEvent_y1);
fChain->SetBranchAddress("LiEvent.x2[32]", LiEvent_x2, &b_LiEvent_x2);
fChain->SetBranchAddress("LiEvent.y2[32]", LiEvent_y2, &b_LiEvent_y2);
fChain->SetBranchAddress("LiEvent.adc1[16]", LiEvent_adc1, &b_LiEvent_adc1);
fChain->SetBranchAddress("LiEvent.adc2[16]", LiEvent_adc2, &b_LiEvent_adc2);
fChain->SetBranchAddress("LiEvent.adc3[16]", LiEvent_adc3, &b_LiEvent_adc3);
fChain->SetBranchAddress("LiEvent.adc4[16]", LiEvent_adc4, &b_LiEvent_adc4);
fChain->SetBranchAddress("LiEvent.tdc1[32]", LiEvent_tdc1, &b_LiEvent_tdc1);
fChain->SetBranchAddress("LiEvent.tdc2[32]", LiEvent_tdc2, &b_LiEvent_tdc2);
fChain->SetBranchAddress("LiEvent.time", &LiEvent_time, &b_LiEvent_time);
fChain->SetBranchAddress("LiEvent.nevent", &LiEvent_nevent, &b_LiEvent_nevent);
fChain->SetBranchAddress("LiEvent.trigger", &LiEvent_trigger, &b_LiEvent_trigger);
fChain->SetBranchAddress("LiEvent.subevents", &LiEvent_subevents, &b_LiEvent_subevents);
fChain->SetBranchAddress("LiEvent.evsize", &LiEvent_evsize, &b_LiEvent_evsize);
Notify();
}
Bool_t AnalysisxTree::Notify()
{
// The Notify() function is called when a new file is opened. This
// can be either for a new TTree in a TChain or when when a new TTree
// is started when using PROOF. It is normally not necessary to make changes
// to the generated code, but the routine can be extended by the
// user if needed. The return value is currently not used.
return kTRUE;
}
void AnalysisxTree::Show(Long64_t entry)
{
// Print contents of entry.
// If entry is not specified, print current entry
if (!fChain) return;
fChain->Show(entry);
}
Int_t AnalysisxTree::Cut(Long64_t entry)
{
// This function may be called from Loop.
// returns 1 if entry is accepted.
// returns -1 otherwise.
return 1;
}
#endif // #ifdef AnalysisxTree_cxx
#include "TROOT.h"
void makeClassFromTree()
{
gSystem->Load("../libAculData.so");
TFile fr("clb01_0001.root");
TTree *tr = (TTree*)fr.Get("AnalysisxTree");
tr->MakeClass();
// tr->MakeCode();
}
{
gSystem->Load("../../libAculData.so");
cout << "kasjbdjka" << endl;
AculCalibration cal;
UShort_t SQ22 = 14;
cal.SomeFunction(SQ22, 3);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment