Commit 9c11fb9e authored by Kostyleva D.A's avatar Kostyleva D.A

First commit in 2017, nothing important

parent cdd6d9f8
......@@ -113,15 +113,15 @@ int main(int argc, const char * argv[])
TTree* rtree = new TTree("rtree", "tree for drs4 analysis");
//rtree->Branch("t1", &t1, "t1/D"); //br for time of threshold crossing signal in 1 ch
// rtree->Branch("t2", &t2, "t2/D"); //br for time of threshold crossing signal in 2 ch
int ncell;
const int ncellMax = 1024;
double amp_ch1[ncellMax], time_ch1[ncellMax]; //variable size array
// int ncell;
// const int ncellMax = 1024;
// double amp_ch1[ncellMax], time_ch1[ncellMax]; //variable size array
//------for other channels
// double amp_ch2[ncellMax], time_ch2[ncellMax];
rtree->Branch("ncell", &ncell, "ncell/I");
rtree->Branch("amp_ch1", amp_ch1, "amp_ch1[ncell]/D");
rtree->Branch("time_ch1", time_ch1, "time_ch1[ncell]/D");
// rtree->Branch("ncell", &ncell, "ncell/I");
// rtree->Branch("amp_ch1", amp_ch1, "amp_ch1[ncell]/D");
// rtree->Branch("time_ch1", time_ch1, "time_ch1[ncell]/D");
RawEvent *event = new RawEvent();
rtree->Bronch("rawEvent", "RawEvent", &event);
......@@ -250,9 +250,9 @@ int main(int argc, const char * argv[])
waveform[b][chn_index][i] = (voltage[i] / 65536. + eh.range/1000.0 - 0.5); //calculation of amplitudes values for each cell
//for ROOT
ncell = i;
//ncell = i;
if(chn_index == 0) {
amp_ch1[i] = waveform[b][chn_index][i];
//amp_ch1[i] = waveform[b][chn_index][i];
event->SetAmp(waveform[b][chn_index][i], i);
// event->InvertAmp(waveform[b][chn_index][i], i);
/*printf("old ampl %f ",amp_ch1[i]);
......@@ -295,7 +295,7 @@ int main(int argc, const char * argv[])
//for ROOT
for(i=0 ; i<1024 ; i++) {
time_ch1[i] = time[b][0][i];
//time_ch1[i] = time[b][0][i];
event->SetTime(time[b][0][i],i);
/*printf("old time %f ",time_ch1[i]);
event->PrintTime(i);
......
......@@ -51,11 +51,11 @@ public:
void SetAmp(Double_t a, Int_t i);
//Takes amplitude (raw data, voltage from binary file)
//and places it in the array Amp[NCELLS]
//and places it in the array fAmp
void SetTime(Double_t t, Int_t i);
//Takes time (raw data, times from binary file)
//and places it in the array Time[NCELLS]
//and places it in the array fTime
void PrintAmp(Int_t i);
//Prints i amplitudes (to make sense i shold be NCELLS)
......
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