Skip to content
Snippets Groups Projects
Commit 8d386a7d authored by ShengYang.b@gmail.com's avatar ShengYang.b@gmail.com
Browse files

fix the event fill()

parent 661bcb86
No related branches found
No related tags found
No related merge requests found
......@@ -395,7 +395,9 @@ void generateWaveform(string fileName, bool DRAW){
eventDatatree->SetBranchAddress("lastStepZ",&LastStepZf);
// Output root file
//TFile* outFile = new TFile(Form("WF_%s",fileName), "RECREATE");
TFile* outFile = new TFile( "output.root", "RECREATE");
TTree* outTree = new TTree( "tree", "tree" );
outTree->Branch("gunPosX",&Xf);
outTree->Branch("gunPosY",&Yf);
......@@ -454,7 +456,6 @@ void generateWaveform(string fileName, bool DRAW){
for(int bin = 0; bin < 1024; bin ++){
waveforms[tile]->push_back(evaluateSum( pulses[tile], timeBinWidth*bin ) + rnd.Gaus(mean,sigma) );
}//end waveform loop
outTree->Fill();
if(DRAW){
for(int bin = 0; bin < 1024; bin ++){
......@@ -478,6 +479,7 @@ void generateWaveform(string fileName, bool DRAW){
pulses[tile].clear();
if(DRAW)h[tile]->Reset();
}//end tile loop
outTree->Fill();
}//end event loop
cout << endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment