...
No Format |
---|
void process(EventHeader header) { // Give a position for the B-field measurement to be retrieved. double[] pos = {0,0,0}; // Provide your own b array to be filled. double [] b = {0,0,0}; // Get the FieldMap from the detector. FieldMap field = event.getDetector().getFieldMap(); // Fill your array with the B field data. field.getField(pos, b); // Print B field data to screen. System.out.println("bfield (" + b[0] + "," + b[1] + "," + b[2] + ")"); } |
Creating a New Detector
- Download an existing compact description. See Full Detector Simulation using SLIC for instructions. Alternately, you can start a new compact description from scratch.
- Change the name field to a unique identifier for your detector.
It is very important to change this tag. Otherwise, the detector conditions system will not recognize your new detector model.No Format <info name="DETECTOR_TAG"/>
- Copy the new compact description into a new directory.
- Create a new file detector.properties with the following line.
No Format DETECTOR_TAG: file:///path/to/DETECTOR_TAG
- Make all the changes required to this compact description.
- Regenerate the LCDD file for your detector. See Converting to LCDD or HepRep using GeomConverter for instructions.
- Generate LCIO events with this LCDD file using slic.
- Setup an alias to the new detector so JAS/lcsim can find it. (see above)