Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:17:49

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef BBC_BBCOUTV1_H
0004 #define BBC_BBCOUTV1_H
0005 
0006 #include "BbcOut.h"
0007 
0008 #include <iostream>
0009 #include <limits>
0010 
0011 class TClonesArray;
0012 
0013 ///
0014 class BbcOutV1 : public BbcOut
0015 {
0016  public:
0017   ///
0018   BbcOutV1() = default;
0019   ///
0020   ~BbcOutV1() override = default;
0021 
0022   /// Clear Event from memory
0023   virtual void Reset() override;
0024 
0025   /** identify Function from PHObject
0026       @param os Output Stream
0027    */
0028   void identify(std::ostream &out = std::cout) const override;
0029 
0030   /// isValid returns non zero if object contains vailid data
0031   int isValid() const override;
0032 
0033   /// get ZVertex determined by Bbc
0034   Float_t get_zvtx() const override { return bz; }
0035 
0036   /// get Error on ZVertex determined by Bbc
0037   Float_t get_zvtxerr() const override { return bzerr; }
0038 
0039   /// get T0 determined by Bbc
0040   Float_t get_t0() const override { return bt0; }
0041 
0042   /// get Error on T0 determined by Bbc
0043   Float_t get_t0err() const override { return bt0err; }
0044 
0045   /** set T0 for Bbc
0046       @param t0 Bbc T0
0047       @param t0err Bbc T0 error
0048    */
0049   void set_t0(const Float_t t0, const Float_t t0err = 0) override;
0050 
0051   //! set vertex
0052   void set_zvtx(const Float_t vtx, const Float_t vtxerr = 0) override;
0053 
0054   /** set Vtx Error for Bbc
0055       @param vtxerr Bbc Vtx Error
0056   */
0057   void set_zvtxerr(const Float_t vtxerr) override;
0058 
0059   /** Add Bbc North/South data containing Number of pmt's, Energy and Timing
0060       @param npmt Number of PMT's fired
0061       @param energy Energy in North/South
0062       @param timing Timing of North/South
0063       @param iarm  Arm, use Bbc::North and Bbc::South
0064    */
0065   void set_arm(const int iarm, const Short_t npmt, const Float_t chargesum, const Float_t timing) override;
0066 
0067   /** get Number of PMT's fired in North/South Bbc
0068       @param iarm  Arm, use Bbc::North and Bbc::South
0069    */
0070   Short_t get_npmt(const int iarm) const override;
0071 
0072   /** get Number of Charged Particles into North/South Bbc
0073       @param iarm  Arm, use Bbc::North and Bbc::South
0074    */
0075   Float_t get_q(const int iarm) const override;
0076 
0077   /** get Timing of North/South Bbc
0078       @param iarm  Arm, use Bbc::North and Bbc::South
0079    */
0080   Float_t get_time(const int iarm) const override;
0081 
0082  private:
0083   Float_t bz{std::numeric_limits<Float_t>::quiet_NaN()};
0084   Float_t bzerr{std::numeric_limits<Float_t>::quiet_NaN()};
0085   Float_t bt0{std::numeric_limits<Float_t>::quiet_NaN()};
0086   Float_t bt0err{std::numeric_limits<Float_t>::quiet_NaN()};
0087   Float_t bns{0};
0088   Float_t bnn{0};
0089   Float_t bqs{0};
0090   Float_t bqn{0};
0091   Float_t bts{std::numeric_limits<Float_t>::quiet_NaN()};
0092   Float_t btn{std::numeric_limits<Float_t>::quiet_NaN()};
0093 
0094   ClassDefOverride(BbcOutV1, 1)
0095 };
0096 
0097 #endif