Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:28:51

0001 #ifndef HcalTestBeam_PHcalTB06Info_h
0002 #define HcalTestBeam_PHcalTB06Info_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     HcalTestBeam
0006 // Class  :     PHcalTB06Info
0007 //
0008 /**\class PHcalTB06Info PHcalTB06Info.h SimDataFormats/HcalTestBeam/interface/PHcalTB06Info.h
0009 
0010  Description: Histogram handling class for analysis
0011 
0012  Usage:
0013     Simulation information for test beam studies of 2004 Test Beam
0014     Contains beam information, hits and digitised results
0015 
0016 */
0017 //
0018 // Original Author:  Sunanda Banerjee
0019 //         Created:  Tue Oct 10 10:14:34 CEST 2006
0020 //
0021 
0022 // system include files
0023 #include <string>
0024 #include <vector>
0025 #include <memory>
0026 #include <cmath>
0027 
0028 // user include files
0029 
0030 class PHcalTB06Info {
0031 public:
0032   PHcalTB06Info();
0033   virtual ~PHcalTB06Info();
0034 
0035   struct Vtx {
0036     Vtx() : trackID(0), partID(0), px(0), py(0), pz(0), eKin(0) {}
0037     int trackID;
0038     int partID;
0039     float px;
0040     float py;
0041     float pz;
0042     float eKin;
0043   };
0044 
0045   struct Hit {
0046     Hit() : id(0), eta(0), phi(0), e(0), t(0) {}
0047     unsigned int id;
0048     float eta;
0049     float phi;
0050     float e;
0051     float t;
0052   };
0053 
0054   typedef std::vector<float> FloatVector;
0055   typedef std::vector<int> IntVector;
0056   typedef std::vector<Vtx> VtxVector;
0057   typedef std::vector<Hit> HitVector;
0058 
0059   // ---------- const member functions ---------------------
0060   int primary() const { return nPrimary; }
0061   int partID() const { return idBeam; }
0062   float initE() const { return eBeam; }
0063   float eta() const { return etaBeam; }
0064   float phi() const { return phiBeam; }
0065   float simEtotal() const { return simEtot; }
0066   float simEcE() const { return simEEc; }
0067   float simHcE() const { return simEHc; }
0068 
0069   HitVector simHits() const { return hits; }
0070   Hit simHit(unsigned int i) const { return hits[i]; }
0071   unsigned int simHitID(unsigned int i) const { return hits[i].id; }
0072   float simHitEta(unsigned int i) const { return hits[i].eta; }
0073   float simHitPhi(unsigned int i) const { return hits[i].phi; }
0074   float simHitE(unsigned int i) const { return hits[i].e; }
0075   float simHitT(unsigned int i) const { return hits[i].t; }
0076 
0077   int evNum() const { return v1EvNum; }
0078   int vtxType() const { return v1Type; }
0079   float vtxPrimX() const { return v1X; }
0080   float vtxPrimY() const { return v1Y; }
0081   float vtxPrimZ() const { return v1Z; }
0082   float vtxPrimR() const { return v1R; }
0083   float vtxPrimU() const { return v1U; }
0084   float vtxPrimV() const { return v1V; }
0085   float vtxPrimW() const { return v1W; }
0086   float vtxPrimPx() const { return v1Px; }
0087   float vtxPrimPy() const { return v1Py; }
0088   float vtxPrimPz() const { return v1Pz; }
0089   int vtxSec() const { return v1Nsec; }
0090   VtxVector vtxSecondaries() const { return v1Sec; }
0091   Vtx vtxSecondary(unsigned int i) const { return v1Sec[i]; }
0092   int vtxTrackID(unsigned int i) const { return v1Sec[i].trackID; }
0093   int vtxPartID(unsigned int i) const { return v1Sec[i].partID; }
0094   float vtxSecPx(unsigned int i) const { return v1Sec[i].px; }
0095   float vtxSecPy(unsigned int i) const { return v1Sec[i].py; }
0096   float vtxSecPz(unsigned int i) const { return v1Sec[i].pz; }
0097   float vtxSecEKin(unsigned int i) const { return v1Sec[i].eKin; }
0098 
0099   // ---------- static member functions --------------------
0100 
0101   // ---------- member functions ---------------------------
0102   void clear();
0103   void setPrimary(int primary, int id, double energy, double eta, double phi);
0104   void setEdep(double simtot, double sime, double simh);
0105   void saveHit(unsigned int det, double eta, double phi, double e, double t);
0106 
0107   //Vertex associated methods
0108   void setVtxPrim(
0109       int evNum, int type, double x, double y, double z, double u, double v, double w, double px, double py, double pz);
0110   void setVtxSec(int id, int pdg, double px, double py, double pz, double ek);
0111 
0112 private:
0113   //  PHcalTB06Info(const PHcalTB06Info&);
0114   //  const PHcalTB06Info& operator=(const PHcalTB06Info&);
0115 
0116   // ---------- member data --------------------------------
0117 
0118   //Beam parameters
0119   int nPrimary, idBeam;
0120   float eBeam, etaBeam, phiBeam;
0121 
0122   //Deposited energies
0123   float simEtot, simEEc, simEHc;
0124   float digEtot, digEEc, digEHc;
0125 
0126   //Hit Members
0127   int hit;
0128   HitVector hits;
0129 
0130   //Vertex members
0131   int v1EvNum, v1Type, v1Nsec;
0132   float v1X, v1Y, v1Z, v1R, v1U, v1V, v1W;
0133   float v1Px, v1Py, v1Pz;
0134   VtxVector v1Sec;
0135 };
0136 
0137 #endif