1 package org.lcsim.users.jeremym;
2
3 import org.lcsim.event.CalorimeterHit;
4 import org.lcsim.event.EventHeader;
5 import org.lcsim.util.aida.AIDA;
6
7
8
9
10
11 public class CalorimeterHitExampleDriver {
12
13 static String collectionName = "EcalBarrelHits";
14 AIDA aida = AIDA.defaultInstance();
15
16 public void process(EventHeader event) {
17 double totalEnergy = 0.;
18 for (CalorimeterHit hit : event.get(CalorimeterHit.class, collectionName)) {
19 totalEnergy += hit.getCorrectedEnergy();
20 aida.cloud1D("EcalBarrel Energy").fill(totalEnergy);
21 }
22 }
23 }