...
This little tutorial will help you build your own analysis code step-by-step. After finishing this section you should be able to write a complete analysis inside the JAS3 framework.
Let's get started: Create a new file with File->New->Java File
. Save it as MyExampleClass.java.
At first we need to create a class that inherits from the Driver
class:
...
Code Block |
---|
import java.util.List; import org.lcsim.event.EventHeader; import org.lcsim.event.MCParticle; import org.lcsim.util.Driver; import org.lcsim.util.aida.AIDA; public class MyExampleClass extends Driver { private AIDA aida = AIDA.defaultInstance(); public MyExampleClass(){ add(new MyJetFindingDriver()); add(new Analysis101()); }; public void process(EventHeader event) { super.process(event); // this takes care that the child Drivers are loaded and processed. List<List<MCParticle>> jetList = (List<List<MCParticle>>) event.get("jetList"); aida.cloud1D("nJets").fill(jetList.size()); } } |
Save the file.
Open the file !MyJetFindingDriver.java! and compile it.
Open the Analysis101 example and compile it.
Compile and load the MyExampleClass example.