This is an example of accessing sample CAL Digi and Recon TDS classes and creating an ntuple with selected items. Note that to create ntuples, you will need the ntupleWriterSvc package built and in your path - this should happen for you when you checkout and build userAlg.
This example will produce an ntuple with three columns - NumCalLogs, eTotal and eCorr.
- access the digi collection from the TDS - Event::CallDigiCol - a fancy stl vector
- use an iterator to loop over all digis and accumulate total (ADC) energy
- create ntuple columns for the number of digis and total energy
- access the cluster collection from the TDS - Event::CalClusterCol
- use an iterator to loop over all clusters and extract the corrected energy
- create an ntuple column to store the corrected energy
StatusCode UserAlg::execute() {
|
You will want to be accessing the TDS - awaiting better descriptions of the classes, see the Event Model description.
R.Dubois Last Modified: 2004-08-04 15:40:37 -0700