/************************************************************************** * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contributors are mentioned in the code where appropriate. * * * * Permission to use, copy, modify and distribute this software and its * * documentation strictly for non-commercial purposes is hereby granted * * without fee, provided that the above copyright notice appears in all * * copies and that both the copyright notice and this permission notice * * appear in the supporting documentation. The authors make no claims * * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ // $Id$ // Macro to generate histograms from digits // By E. Sicking, CERN TTree* GetTreeD(Int_t ievent, const TString& detName, Int_t nfiles) { for (Int_t file =0; fileGet(Form("Event%d/TreeD",ievent)); if (treeD) return treeD; } return 0; } void digitsTRD(Int_t nevents, Int_t nfiles) { TH1F * hadc = new TH1F("hadc", "hadc", 260, -99, 1200); TH1F * hadcLow = new TH1F("hadcLow", "hadcLow", 100, -5, 5); TH1F * hadclog = new TH1F("hadclog", "hadclog", 100, -1, 4); TTree *treeD=0x0; AliTRDdigitsManager manD; for (Int_t event=0; eventExpand(); rowMax = digitsD->GetNrow(); colMax = digitsD->GetNcol(); timeMax = digitsD->GetNtime(); //cout << "Detector " << idet << endl; cout << "\r Detector " << idet; cout.flush(); for (Int_t irow = 0; irow < rowMax; irow++) { for (Int_t icol = 0; icol < colMax; icol++) { for (Int_t itime = 0; itime < timeMax; itime++) { signal= digitsD->GetData(irow, icol, itime); hadc-> Fill(signal); hadcLow-> Fill(signal); if(signal>0.) hadclog-> Fill(TMath::Log10(signal)); } //time } //col } //row }//detector chamber cout << "\n \r Event " << event << endl; }//event TFile fc("digits.TRD.root","RECREATE"); fc.cd(); hadcLow->Write(); hadc->Write(); hadclog->Write(); fc.Close(); }