Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef HcalTestBeam_PHcalTB04Info_h
0002 #define HcalTestBeam_PHcalTB04Info_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     HcalTestBeam
0006 // Class  :     PHcalTB04Info
0007 //
0008 /**\class PHcalTB04Info PHcalTB04Info.h SimDataFormats/HcalTestBeam/interface/PHcalTB04Info.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:  Sun May 14 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 // forward declarations
0031 class HcalTB04Analysis;
0032 
0033 class PHcalTB04Info {
0034   typedef std::vector<float> FloatVector;
0035   typedef std::vector<int> IntVector;
0036   friend class HcalTB04Analysis;
0037 
0038 public:
0039   PHcalTB04Info();
0040   virtual ~PHcalTB04Info();
0041 
0042   // ---------- const member functions ---------------------
0043   int primary() const { return nPrimary; }
0044   int partID() const { return idBeam; }
0045   float initE() const { return eBeam; }
0046   float eta() const { return etaBeam; }
0047   float phi() const { return phiBeam; }
0048   int crystal() const { return nCrystal; }
0049   IntVector idsEcal() const { return idEcal; }
0050   int tower() const { return nTower; }
0051   IntVector idsHcal() const { return idHcal; }
0052   float simEtotal() const { return simEtot; }
0053   float simEcE() const { return simEEc; }
0054   float simHcE() const { return simEHc; }
0055   float digEtotal() const { return digEtot; }
0056   float digEcE() const { return digEEc; }
0057   float digHcE() const { return digEHc; }
0058   FloatVector simEEcal() const { return esime; }
0059   FloatVector digEEcal() const { return edige; }
0060   FloatVector simEHcal() const { return esimh; }
0061   FloatVector digEHcal() const { return edigh; }
0062 
0063   int nHit() const { return hit; }
0064   IntVector detectorHit() const { return detHit; }
0065   IntVector etaIndexHit() const { return etaHit; }
0066   IntVector phiIndexHit() const { return phiHit; }
0067   IntVector layerHit() const { return layHit; }
0068   FloatVector energyHit() const { return eHit; }
0069   FloatVector timeHit() const { return tHit; }
0070 
0071   int evNum() const { return v1EvNum; }
0072   int vtxType() const { return v1Type; }
0073   int vtxSec() const { return v1Nsec; }
0074   IntVector vtxTrkID() const { return v1secTrackID; }
0075   IntVector vtxPartID() const { return v1secPartID; }
0076   float vtxPrimX() const { return v1X; }
0077   float vtxPrimY() const { return v1Y; }
0078   float vtxPrimZ() const { return v1Z; }
0079   float vtxPrimR() const { return v1R; }
0080   float vtxPrimU() const { return v1U; }
0081   float vtxPrimV() const { return v1V; }
0082   float vtxPrimW() const { return v1W; }
0083   float vtxPrimPx() const { return v1Px; }
0084   float vtxPrimPy() const { return v1Py; }
0085   float vtxPrimPz() const { return v1Pz; }
0086   FloatVector vtxSecPx() const { return v1secPx; }
0087   FloatVector vtxSecPy() const { return v1secPy; }
0088   FloatVector vtxSecPz() const { return v1secPz; }
0089   FloatVector vtxSecEk() const { return v1secEk; }
0090 
0091   // ---------- static member functions --------------------
0092 
0093   // ---------- member functions ---------------------------
0094   void clear();
0095   void setIDs(const std::vector<int>&, const std::vector<int>&);
0096   void setPrimary(int primary, int id, double energy, double eta, double phi);
0097   void setEdep(double simtot, double sime, double simh, double digtot, double dige, double digh);
0098   void setEdepEcal(const std::vector<double>& esim, const std::vector<double>& edig);
0099   void setEdepHcal(const std::vector<double>& esim, const std::vector<double>& edig);
0100 
0101   void setTrnsProf(const std::vector<double>& es1,
0102                    const std::vector<double>& eq1,
0103                    const std::vector<double>& es2,
0104                    const std::vector<double>& eq2);
0105   void setLongProf(const std::vector<double>& es, const std::vector<double>& eq);
0106   void saveHit(int det, int lay, int eta, int phi, double e, double t);
0107 
0108   //Vertex associated methods
0109   void setVtxPrim(
0110       int evNum, int type, double x, double y, double z, double u, double v, double w, double px, double py, double pz);
0111   void setVtxSec(int id, int pdg, double px, double py, double pz, double ek);
0112 
0113 private:
0114   //  PHcalTB04Info(const PHcalTB04Info&);
0115   //  const PHcalTB04Info& operator=(const PHcalTB04Info&);
0116 
0117   // ---------- member data --------------------------------
0118 
0119   //Beam parameters
0120   int nPrimary, idBeam;
0121   float eBeam, etaBeam, phiBeam;
0122 
0123   //Deposited energies
0124   float simEtot, simEEc, simEHc;
0125   float digEtot, digEEc, digEHc;
0126   FloatVector esime, edige;
0127   FloatVector esimh, edigh;
0128   FloatVector latsimEta, latdigEta;
0129   FloatVector latsimPhi, latdigPhi;
0130   FloatVector longsim, longdig;
0131 
0132   //Tower Members
0133   int nCrystal;
0134   IntVector idEcal;
0135   int nTower;
0136   IntVector idHcal;
0137 
0138   //Hit Members
0139   int hit;
0140   IntVector detHit, etaHit, phiHit, layHit;
0141   FloatVector eHit, tHit;
0142 
0143   //Vertex members
0144   int v1EvNum, v1Type, v1Nsec;
0145   IntVector v1secTrackID, v1secPartID;
0146   float v1X, v1Y, v1Z, v1R, v1U, v1V, v1W;
0147   float v1Px, v1Py, v1Pz;
0148   FloatVector v1secPx, v1secPy, v1secPz, v1secEk;
0149 };
0150 
0151 #endif