Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-10-13 09:43:11

0001 
0002 // Copyright 2020-2025, Jefferson Science Associates, LLC.
0003 // Subject to the terms in the LICENSE file found in the top-level directory.
0004 
0005 #pragma once
0006 #include <JANA/JObject.h>
0007 #include <cstdint>
0008 
0009 
0010 struct TDCHit: public JObject {
0011 
0012     JOBJECT_PUBLIC(TDCHit)
0013 
0014     uint32_t cell_id; // Cell's id
0015 
0016     double x; // x location of cell's center [cm]
0017     double y; // y location of cell's center [cm]
0018     double z; // z location of cell's center [cm]
0019 
0020     double time;  // Time [ns]
0021 
0022 
0023     // Define a constructor that forces all fields to be initialized
0024     TDCHit(uint32_t cell_id, double x, double y, double z, uint64_t time)
0025     : cell_id(cell_id), x(x), y(y), z(z), time(time) {}
0026 
0027 
0028     void Summarize(JObjectSummary& summary) const override {
0029         summary.add(cell_id, NAME_OF(cell_id), "%d", "Cell ID");
0030         summary.add(x, NAME_OF(x), "%f", "x location of cell center [cm]");
0031         summary.add(y, NAME_OF(y), "%f", "y location of cell center [cm]");
0032         summary.add(z, NAME_OF(z), "%f", "z location of cell center [cm]");
0033         summary.add(time, NAME_OF(time), "%d", "Time [ns]");
0034     }
0035 };
0036 
0037