CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/SimDataFormats/HcalTestBeam/interface/PHcalTB06Info.h

Go to the documentation of this file.
00001 #ifndef HcalTestBeam_PHcalTB06Info_h
00002 #define HcalTestBeam_PHcalTB06Info_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     HcalTestBeam
00006 // Class  :     PHcalTB06Info
00007 // 
00017 //
00018 // Original Author:  Sunanda Banerjee
00019 //         Created:  Tue Oct 10 10:14:34 CEST 2006
00020 //
00021 
00022 // system include files
00023 #include <string>
00024 #include <vector>
00025 #include <memory>
00026 #include <cmath>
00027 
00028 // user include files
00029 
00030 class PHcalTB06Info {
00031 
00032 public:
00033   PHcalTB06Info();
00034   virtual ~PHcalTB06Info();
00035 
00036   struct Vtx {
00037     Vtx(): trackID(0), partID(0), px(0), py(0), pz(0), eKin(0) {}
00038     int   trackID;
00039     int   partID;
00040     float px;
00041     float py;
00042     float pz;
00043     float eKin;
00044   };
00045 
00046   struct Hit {
00047     Hit(): id(0), eta(0), phi(0), e(0), t(0) {}
00048     unsigned int id;
00049     float    eta;
00050     float    phi;
00051     float    e;
00052     float    t;
00053   };
00054 
00055   typedef std::vector<float>  FloatVector;
00056   typedef std::vector<int>    IntVector;
00057   typedef std::vector<Vtx>    VtxVector;
00058   typedef std::vector<Hit>    HitVector;
00059 
00060   // ---------- const member functions ---------------------
00061   int          primary()                    const {return nPrimary;}
00062   int          partID()                     const {return idBeam;}
00063   float        initE()                      const {return eBeam;}
00064   float        eta()                        const {return etaBeam;}
00065   float        phi()                        const {return phiBeam;}
00066   float        simEtotal()                  const {return simEtot;}
00067   float        simEcE()                     const {return simEEc;}
00068   float        simHcE()                     const {return simEHc;}
00069 
00070   HitVector    simHits()                    const {return hits;}
00071   Hit          simHit(unsigned int i)       const {return hits[i];}
00072   unsigned int simHitID(unsigned int i)     const {return hits[i].id;}
00073   float        simHitEta(unsigned int i)    const {return hits[i].eta;}
00074   float        simHitPhi(unsigned int i)    const {return hits[i].phi;}
00075   float        simHitE(unsigned int i)      const {return hits[i].e;}
00076   float        simHitT(unsigned int i)      const {return hits[i].t;}
00077 
00078   int          evNum()                      const {return v1EvNum;}
00079   int          vtxType()                    const {return v1Type;}
00080   float        vtxPrimX()                   const {return v1X;}
00081   float        vtxPrimY()                   const {return v1Y;}
00082   float        vtxPrimZ()                   const {return v1Z;}
00083   float        vtxPrimR()                   const {return v1R;}
00084   float        vtxPrimU()                   const {return v1U;}
00085   float        vtxPrimV()                   const {return v1V;}
00086   float        vtxPrimW()                   const {return v1W;}
00087   float        vtxPrimPx()                  const {return v1Px;}
00088   float        vtxPrimPy()                  const {return v1Py;}
00089   float        vtxPrimPz()                  const {return v1Pz;}
00090   int          vtxSec()                     const {return v1Nsec;}
00091   VtxVector    vtxSecondaries()             const {return v1Sec;}
00092   Vtx          vtxSecondary(unsigned int i) const {return v1Sec[i];}
00093   int          vtxTrackID(unsigned int i)   const {return v1Sec[i].trackID;}
00094   int          vtxPartID(unsigned int i)    const {return v1Sec[i].partID;}
00095   float        vtxSecPx(unsigned int i)     const {return v1Sec[i].px;}
00096   float        vtxSecPy(unsigned int i)     const {return v1Sec[i].py;}
00097   float        vtxSecPz(unsigned int i)     const {return v1Sec[i].pz;}
00098   float        vtxSecEKin(unsigned int i)   const {return v1Sec[i].eKin;}
00099 
00100   // ---------- static member functions --------------------
00101 
00102   // ---------- member functions ---------------------------
00103   void clear();
00104   void setPrimary(int primary, int id, double energy, double eta, double phi);
00105   void setEdep(double simtot, double sime, double simh);
00106   void saveHit(unsigned int det, double eta, double phi, double e, double t);
00107 
00108   //Vertex associated methods
00109   void setVtxPrim(int evNum, int type, double x, double y, double z, double u,
00110                   double v, double w, double px, double py, double pz); 
00111   void setVtxSec(int id, int pdg, double px, double py, double pz, double ek); 
00112 
00113 private:
00114   //  PHcalTB06Info(const PHcalTB06Info&); 
00115   //  const PHcalTB06Info& operator=(const PHcalTB06Info&); 
00116 
00117   // ---------- member data --------------------------------
00118 
00119   //Beam parameters
00120   int          nPrimary, idBeam;
00121   float        eBeam, etaBeam, phiBeam;
00122 
00123   //Deposited energies
00124   float        simEtot, simEEc, simEHc;
00125   float        digEtot, digEEc, digEHc;
00126 
00127   //Hit Members
00128   int         hit;
00129   HitVector   hits;
00130 
00131   //Vertex members
00132   int          v1EvNum, v1Type, v1Nsec;
00133   float        v1X, v1Y, v1Z, v1R, v1U, v1V, v1W;
00134   float        v1Px, v1Py, v1Pz;
00135   VtxVector    v1Sec;
00136 };
00137 
00138 
00139 #endif