From c8607c6f9bad6b3b3ff7bb1df6171901ae97d1f1 Mon Sep 17 00:00:00 2001 From: raffaelladevita Date: Sat, 20 May 2017 00:09:55 +0200 Subject: [PATCH] added event header data structure and MC.jaon --- .../jlab/clas/detector/DetectorHeader.java | 62 +++++++++++++++++++ etc/bankdefs/hipo/MC.json | 39 ++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 common-tools/clas-reco/src/main/java/org/jlab/clas/detector/DetectorHeader.java create mode 100644 etc/bankdefs/hipo/MC.json diff --git a/common-tools/clas-reco/src/main/java/org/jlab/clas/detector/DetectorHeader.java b/common-tools/clas-reco/src/main/java/org/jlab/clas/detector/DetectorHeader.java new file mode 100644 index 0000000000..53efe9f90f --- /dev/null +++ b/common-tools/clas-reco/src/main/java/org/jlab/clas/detector/DetectorHeader.java @@ -0,0 +1,62 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package org.jlab.clas.detector; + +/** + * + * @author devita + */ +public class DetectorHeader { + + private int run = 0; + private int event = 0; + private int trigger = 0; + private double rfTime = 0.0; + private double startTime = 0.0; + + public DetectorHeader() { + } + + public int getEvent() { + return event; + } + + public double getRfTime(){ + return rfTime; + } + + public int getRun() { + return run; + } + + public double getStartTime(){ + return this.startTime; + } + + public int getTrigger() { + return trigger; + } + + public void setEvent(int event) { + this.event = event; + } + + public void setRfTime(double rf){ + this.rfTime = rf; + } + + public void setRun(int run) { + this.run = run; + } + + public void setStartTime(double starttime){ + this.startTime = starttime; + } + + public void setTrigger(int trigger) { + this.trigger = trigger; + } +} diff --git a/etc/bankdefs/hipo/MC.json b/etc/bankdefs/hipo/MC.json new file mode 100644 index 0000000000..e54c82fbcf --- /dev/null +++ b/etc/bankdefs/hipo/MC.json @@ -0,0 +1,39 @@ +[ + { + "bank": "MC::Event", + "group": 41, + "info": "Head bank for the generated event", + "items": [ + {"name":"npart", "id":1, "type":"int16", "info":"number of particles in eth event"}, + {"name":"btype", "id":2, "type":"int16", "info":"Beam type"}, + {"name":"ebeam", "id":3, "type":"float", "info":"Beam energy"}, + {"name":"pbeam", "id":4, "type":"float", "info":"Beam polarization"}, + {"name":"atarget", "id":5, "type":"int16", "info":"Mass number of the target"}, + {"name":"ztarget", "id":6, "type":"int16", "info":"Atomic number oif the target"}, + {"name":"ptargetm", "id":7, "type":"float", "info":"Target polarization"}, + {"name":"te", "id":8, "type":"float", "info":"Transferred energy"}, + {"name":"tm", "id":9, "type":"float", "info":"Transferred momentum squared"}, + {"name":"weight", "id":10, "type":"float", "info":"Event weight"} + ] + }, + { + "bank": "MC::Particle", + "group": 42, + "info": "Generated Particle information", + "items": [ + {"name":"status", "id":1, "type":"int8", "info":"particle status"}, + {"name":"pid", "id":2, "type":"int32", "info":"particle id in LUND conventions"}, + {"name":"parent", "id":3, "type":"int8", "info":"index of the parent"}, + {"name":"daughts", "id":4, "type":"int8", "info":"index of the first daughter"}, + {"name":"daughtl", "id":5, "type":"int8", "info":"index of the last daughter"}, + {"name":"px", "id":6, "type":"float", "info":"x component of the momentum"}, + {"name":"py", "id":7, "type":"float", "info":"y component of the momentum"}, + {"name":"pz", "id":8, "type":"float", "info":"z component of the momentum"}, + {"name":"vx", "id":9, "type":"float", "info":"x component of the vertex"}, + {"name":"vy", "id":10, "type":"float", "info":"y component of the vertex"}, + {"name":"vz", "id":11, "type":"float", "info":"z component of the vertex"}, + {"name":"mass", "id":12, "type":"float", "info":"mass of the particle"}, + {"name":"ltime", "id":13, "type":"float", "info":"particle lifetime"} + ] + } +]