Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef PValidationFormats_h
0002 #define PValidationFormats_h
0003 
0004 ///////////////////////////////////////////////////////////////////////////////
0005 // PGlobalSimHit
0006 ///////////////////////////////////////////////////////////////////////////////
0007 #ifndef PGlobalSimHit_h
0008 #define PGlobalSimHit_h
0009 
0010 /** \class PGlobalSimHit
0011  *  
0012  *  DataFormat class to hold the information for the Global Hit Validation
0013  *
0014  *  \author M. Strang SUNY-Buffalo
0015  */
0016 
0017 #include <vector>
0018 #include <memory>
0019 
0020 class PGlobalSimHit {
0021 public:
0022   PGlobalSimHit()
0023       : nRawGenPart(0),
0024         nG4Vtx(0),
0025         nG4Trk(0),
0026         nECalHits(0),
0027         nPreShHits(0),
0028         nHCalHits(0),
0029         nPxlFwdHits(0),
0030         nPxlBrlHits(0),
0031         nSiFwdHits(0),
0032         nSiBrlHits(0),
0033         nMuonDtHits(0),
0034         nMuonCscHits(0),
0035         nMuonRpcFwdHits(0),
0036         nMuonRpcBrlHits(0) {}
0037   virtual ~PGlobalSimHit() {}
0038 
0039   struct Vtx {
0040     Vtx() : x(0), y(0), z(0) {}
0041     float x;
0042     float y;
0043     float z;
0044   };
0045 
0046   struct Trk {
0047     Trk() : pt(0), e(0) {}
0048     float pt;
0049     float e;
0050   };
0051 
0052   struct CalHit {
0053     CalHit() : e(0), tof(0), phi(0), eta(0) {}
0054     float e;
0055     float tof;
0056     float phi;
0057     float eta;
0058   };
0059 
0060   struct FwdHit {
0061     FwdHit() : tof(0), z(0), phi(0), eta(0) {}
0062     float tof;
0063     float z;
0064     float phi;
0065     float eta;
0066   };
0067 
0068   struct BrlHit {
0069     BrlHit() : tof(0), r(0), phi(0), eta(0) {}
0070     float tof;
0071     float r;
0072     float phi;
0073     float eta;
0074   };
0075 
0076   typedef std::vector<Vtx> VtxVector;
0077   typedef std::vector<Trk> TrkVector;
0078   typedef std::vector<CalHit> CalVector;
0079   typedef std::vector<FwdHit> FwdVector;
0080   typedef std::vector<BrlHit> BrlVector;
0081 
0082   // put functions
0083   void putRawGenPart(int n);
0084   void putG4Vtx(const std::vector<float>& x, const std::vector<float>& y, const std::vector<float>& z);
0085   void putG4Trk(const std::vector<float>& pt, const std::vector<float>& e);
0086   void putECalHits(const std::vector<float>& e,
0087                    const std::vector<float>& tof,
0088                    const std::vector<float>& phi,
0089                    const std::vector<float>& eta);
0090   void putPreShHits(const std::vector<float>& e,
0091                     const std::vector<float>& tof,
0092                     const std::vector<float>& phi,
0093                     const std::vector<float>& eta);
0094   void putHCalHits(const std::vector<float>& e,
0095                    const std::vector<float>& tof,
0096                    const std::vector<float>& phi,
0097                    const std::vector<float>& eta);
0098   void putPxlFwdHits(const std::vector<float>& tof,
0099                      const std::vector<float>& z,
0100                      const std::vector<float>& phi,
0101                      const std::vector<float>& eta);
0102   void putPxlBrlHits(const std::vector<float>& tof,
0103                      const std::vector<float>& r,
0104                      const std::vector<float>& phi,
0105                      const std::vector<float>& eta);
0106   void putSiFwdHits(const std::vector<float>& tof,
0107                     const std::vector<float>& z,
0108                     const std::vector<float>& phi,
0109                     const std::vector<float>& eta);
0110   void putSiBrlHits(const std::vector<float>& tof,
0111                     const std::vector<float>& r,
0112                     const std::vector<float>& phi,
0113                     const std::vector<float>& eta);
0114   void putMuonCscHits(const std::vector<float>& tof,
0115                       const std::vector<float>& z,
0116                       const std::vector<float>& phi,
0117                       const std::vector<float>& eta);
0118   void putMuonDtHits(const std::vector<float>& tof,
0119                      const std::vector<float>& r,
0120                      const std::vector<float>& phi,
0121                      const std::vector<float>& eta);
0122   void putMuonRpcFwdHits(const std::vector<float>& tof,
0123                          const std::vector<float>& z,
0124                          const std::vector<float>& phi,
0125                          const std::vector<float>& eta);
0126   void putMuonRpcBrlHits(const std::vector<float>& tof,
0127                          const std::vector<float>& r,
0128                          const std::vector<float>& phi,
0129                          const std::vector<float>& eta);
0130 
0131   int getnRawGenPart() const { return nRawGenPart; }
0132   int getnG4Vtx() const { return nG4Vtx; }
0133   VtxVector getG4Vtx() const { return G4Vtx; }
0134   int getnG4Trk() const { return nG4Trk; }
0135   TrkVector getG4Trk() const { return G4Trk; }
0136   int getnECalHits() const { return nECalHits; }
0137   CalVector getECalHits() const { return ECalHits; }
0138   int getnPreShHits() const { return nPreShHits; }
0139   CalVector getPreShHits() const { return PreShHits; }
0140   int getnHCalHits() const { return nHCalHits; }
0141   CalVector getHCalHits() const { return HCalHits; }
0142   int getnPxlFwdHits() const { return nPxlFwdHits; }
0143   FwdVector getPxlFwdHits() const { return PxlFwdHits; }
0144   int getnPxlBrlHits() const { return nPxlBrlHits; }
0145   BrlVector getPxlBrlHits() const { return PxlBrlHits; }
0146   int getnSiFwdHits() const { return nSiFwdHits; }
0147   FwdVector getSiFwdHits() const { return SiFwdHits; }
0148   int getnSiBrlHits() const { return nSiBrlHits; }
0149   BrlVector getSiBrlHits() const { return SiBrlHits; }
0150   int getnMuonDtHits() const { return nMuonDtHits; }
0151   BrlVector getMuonDtHits() const { return MuonDtHits; }
0152   int getnMuonCscHits() const { return nMuonCscHits; }
0153   FwdVector getMuonCscHits() const { return MuonCscHits; }
0154   int getnMuonRpcFwdHits() const { return nMuonRpcFwdHits; }
0155   FwdVector getMuonRpcFwdHits() const { return MuonRpcFwdHits; }
0156   int getnMuonRpcBrlHits() const { return nMuonRpcBrlHits; }
0157   BrlVector getMuonRpcBrlHits() const { return MuonRpcBrlHits; }
0158 
0159 private:
0160   // G4MC info
0161   int nRawGenPart;
0162   int nG4Vtx;
0163   VtxVector G4Vtx;
0164   int nG4Trk;
0165   TrkVector G4Trk;
0166 
0167   // ECal info
0168   int nECalHits;
0169   CalVector ECalHits;
0170   int nPreShHits;
0171   CalVector PreShHits;
0172 
0173   // HCal info
0174   int nHCalHits;
0175   CalVector HCalHits;
0176 
0177   // Tracker info
0178   int nPxlFwdHits;
0179   FwdVector PxlFwdHits;
0180   int nPxlBrlHits;
0181   BrlVector PxlBrlHits;
0182   int nSiFwdHits;
0183   FwdVector SiFwdHits;
0184   int nSiBrlHits;
0185   BrlVector SiBrlHits;
0186 
0187   // Muon info
0188   int nMuonDtHits;
0189   BrlVector MuonDtHits;
0190   int nMuonCscHits;
0191   FwdVector MuonCscHits;
0192   int nMuonRpcFwdHits;
0193   FwdVector MuonRpcFwdHits;
0194   int nMuonRpcBrlHits;
0195   BrlVector MuonRpcBrlHits;
0196 
0197 };  // end class declaration
0198 
0199 #endif  // endif PGlobalHit_h
0200 
0201 ///////////////////////////////////////////////////////////////////////////////
0202 // PGlobalDigi
0203 ///////////////////////////////////////////////////////////////////////////////
0204 
0205 #ifndef PGlobalDigi_h
0206 #define PGlobalDigi_h
0207 
0208 class PGlobalDigi {
0209 public:
0210   PGlobalDigi()
0211       : nEBCalDigis(0),
0212         nEECalDigis(0),
0213         nESCalDigis(0),
0214         nHBCalDigis(0),
0215         nHECalDigis(0),
0216         nHOCalDigis(0),
0217         nHFCalDigis(0),
0218         nTIBL1Digis(0),
0219         nTIBL2Digis(0),
0220         nTIBL3Digis(0),
0221         nTIBL4Digis(0),
0222         nTOBL1Digis(0),
0223         nTOBL2Digis(0),
0224         nTOBL3Digis(0),
0225         nTOBL4Digis(0),
0226         nTIDW1Digis(0),
0227         nTIDW2Digis(0),
0228         nTIDW3Digis(0),
0229         nTECW1Digis(0),
0230         nTECW2Digis(0),
0231         nTECW3Digis(0),
0232         nTECW4Digis(0),
0233         nTECW5Digis(0),
0234         nTECW6Digis(0),
0235         nTECW7Digis(0),
0236         nTECW8Digis(0),
0237         nBRL1Digis(0),
0238         nBRL2Digis(0),
0239         nBRL3Digis(0),
0240         nFWD1pDigis(0),
0241         nFWD1nDigis(0),
0242         nFWD2pDigis(0),
0243         nFWD2nDigis(0),
0244         nMB1Digis(0),
0245         nMB2Digis(0),
0246         nMB3Digis(0),
0247         nMB4Digis(0),
0248         nCSCstripDigis(0),
0249         nCSCwireDigis(0) {}
0250   virtual ~PGlobalDigi() {}
0251 
0252   ////////////
0253   // ECal Info
0254   ////////////
0255   struct ECalDigi {
0256     ECalDigi() : maxPos(0), AEE(0), SHE(0) {}
0257     int maxPos;
0258     double AEE;  //maximum analog equivalent energy
0259     float SHE;   //simhit energy sum
0260   };
0261   typedef std::vector<ECalDigi> ECalDigiVector;
0262   struct ESCalDigi {
0263     ESCalDigi() : ADC0(0), ADC1(0), ADC2(0), SHE(0) {}
0264     float ADC0, ADC1, ADC2;  //ADC counts
0265     float SHE;               //sum simhit energy
0266   };
0267   typedef std::vector<ESCalDigi> ESCalDigiVector;
0268   //put functions
0269   void putEBCalDigis(const std::vector<int>& maxpos, const std::vector<double>& aee, const std::vector<float>& she);
0270   void putEECalDigis(const std::vector<int>& maxpos, const std::vector<double>& aee, const std::vector<float>& she);
0271   void putESCalDigis(const std::vector<float>& adc0,
0272                      const std::vector<float>& adc1,
0273                      const std::vector<float>& adc2,
0274                      const std::vector<float>& she);
0275   //get functions
0276   int getnEBCalDigis() const { return nEBCalDigis; }
0277   int getnEECalDigis() const { return nEECalDigis; }
0278   int getnESCalDigis() const { return nESCalDigis; }
0279   ECalDigiVector getEBCalDigis() const { return EBCalDigis; }
0280   ECalDigiVector getEECalDigis() const { return EECalDigis; }
0281   ESCalDigiVector getESCalDigis() const { return ESCalDigis; }
0282 
0283   ////////////
0284   // HCal Info
0285   ////////////
0286   struct HCalDigi {
0287     HCalDigi() : AEE(0), SHE(0) {}
0288     float AEE;  //sum analog equivalent energy in fC
0289     float SHE;  //simhit energy sum
0290   };
0291   typedef std::vector<HCalDigi> HCalDigiVector;
0292   //put functions
0293   void putHBCalDigis(const std::vector<float>& aee, const std::vector<float>& she);
0294   void putHECalDigis(const std::vector<float>& aee, const std::vector<float>& she);
0295   void putHOCalDigis(const std::vector<float>& aee, const std::vector<float>& she);
0296   void putHFCalDigis(const std::vector<float>& aee, const std::vector<float>& she);
0297   //get functions
0298   int getnHBCalDigis() const { return nHBCalDigis; }
0299   int getnHECalDigis() const { return nHECalDigis; }
0300   int getnHOCalDigis() const { return nHOCalDigis; }
0301   int getnHFCalDigis() const { return nHFCalDigis; }
0302   HCalDigiVector getHBCalDigis() const { return HBCalDigis; }
0303   HCalDigiVector getHECalDigis() const { return HECalDigis; }
0304   HCalDigiVector getHOCalDigis() const { return HOCalDigis; }
0305   HCalDigiVector getHFCalDigis() const { return HFCalDigis; }
0306 
0307   ////////////////////////
0308   // Silicon Tracker info
0309   ///////////////////////
0310 
0311   ///////////////
0312   // SiStrip info
0313   ///////////////
0314   struct SiStripDigi {
0315     SiStripDigi() : ADC(0), STRIP(0) {}
0316     float ADC;  //adc value
0317     int STRIP;  //strip number
0318   };
0319   typedef std::vector<SiStripDigi> SiStripDigiVector;
0320   //put functions
0321   void putTIBL1Digis(const std::vector<float>& adc, const std::vector<int>& strip);
0322   void putTIBL2Digis(const std::vector<float>& adc, const std::vector<int>& strip);
0323   void putTIBL3Digis(const std::vector<float>& adc, const std::vector<int>& strip);
0324   void putTIBL4Digis(const std::vector<float>& adc, const std::vector<int>& strip);
0325   void putTOBL1Digis(const std::vector<float>& adc, const std::vector<int>& strip);
0326   void putTOBL2Digis(const std::vector<float>& adc, const std::vector<int>& strip);
0327   void putTOBL3Digis(const std::vector<float>& adc, const std::vector<int>& strip);
0328   void putTOBL4Digis(const std::vector<float>& adc, const std::vector<int>& strip);
0329   void putTIDW1Digis(const std::vector<float>& adc, const std::vector<int>& strip);
0330   void putTIDW2Digis(const std::vector<float>& adc, const std::vector<int>& strip);
0331   void putTIDW3Digis(const std::vector<float>& adc, const std::vector<int>& strip);
0332   void putTECW1Digis(const std::vector<float>& adc, const std::vector<int>& strip);
0333   void putTECW2Digis(const std::vector<float>& adc, const std::vector<int>& strip);
0334   void putTECW3Digis(const std::vector<float>& adc, const std::vector<int>& strip);
0335   void putTECW4Digis(const std::vector<float>& adc, const std::vector<int>& strip);
0336   void putTECW5Digis(const std::vector<float>& adc, const std::vector<int>& strip);
0337   void putTECW6Digis(const std::vector<float>& adc, const std::vector<int>& strip);
0338   void putTECW7Digis(const std::vector<float>& adc, const std::vector<int>& strip);
0339   void putTECW8Digis(const std::vector<float>& adc, const std::vector<int>& strip);
0340   //get functions
0341   int getnTIBL1Digis() const { return nTIBL1Digis; }
0342   int getnTIBL2Digis() const { return nTIBL2Digis; }
0343   int getnTIBL3Digis() const { return nTIBL3Digis; }
0344   int getnTIBL4Digis() const { return nTIBL4Digis; }
0345   int getnTOBL1Digis() const { return nTOBL1Digis; }
0346   int getnTOBL2Digis() const { return nTOBL2Digis; }
0347   int getnTOBL3Digis() const { return nTOBL3Digis; }
0348   int getnTOBL4Digis() const { return nTOBL4Digis; }
0349   int getnTIDW1Digis() const { return nTIDW1Digis; }
0350   int getnTIDW2Digis() const { return nTIDW2Digis; }
0351   int getnTIDW3Digis() const { return nTIDW3Digis; }
0352   int getnTECW1Digis() const { return nTECW1Digis; }
0353   int getnTECW2Digis() const { return nTECW2Digis; }
0354   int getnTECW3Digis() const { return nTECW3Digis; }
0355   int getnTECW4Digis() const { return nTECW4Digis; }
0356   int getnTECW5Digis() const { return nTECW5Digis; }
0357   int getnTECW6Digis() const { return nTECW6Digis; }
0358   int getnTECW7Digis() const { return nTECW7Digis; }
0359   int getnTECW8Digis() const { return nTECW8Digis; }
0360   SiStripDigiVector getTIBL1Digis() const { return TIBL1Digis; }
0361   SiStripDigiVector getTIBL2Digis() const { return TIBL2Digis; }
0362   SiStripDigiVector getTIBL3Digis() const { return TIBL3Digis; }
0363   SiStripDigiVector getTIBL4Digis() const { return TIBL4Digis; }
0364   SiStripDigiVector getTOBL1Digis() const { return TOBL1Digis; }
0365   SiStripDigiVector getTOBL2Digis() const { return TOBL2Digis; }
0366   SiStripDigiVector getTOBL3Digis() const { return TOBL3Digis; }
0367   SiStripDigiVector getTOBL4Digis() const { return TOBL4Digis; }
0368   SiStripDigiVector getTIDW1Digis() const { return TIDW1Digis; }
0369   SiStripDigiVector getTIDW2Digis() const { return TIDW2Digis; }
0370   SiStripDigiVector getTIDW3Digis() const { return TIDW3Digis; }
0371   SiStripDigiVector getTECW1Digis() const { return TECW1Digis; }
0372   SiStripDigiVector getTECW2Digis() const { return TECW2Digis; }
0373   SiStripDigiVector getTECW3Digis() const { return TECW3Digis; }
0374   SiStripDigiVector getTECW4Digis() const { return TECW4Digis; }
0375   SiStripDigiVector getTECW5Digis() const { return TECW5Digis; }
0376   SiStripDigiVector getTECW6Digis() const { return TECW6Digis; }
0377   SiStripDigiVector getTECW7Digis() const { return TECW7Digis; }
0378   SiStripDigiVector getTECW8Digis() const { return TECW8Digis; }
0379 
0380   ///////////////
0381   // SiPixel info
0382   ///////////////
0383   struct SiPixelDigi {
0384     SiPixelDigi() : ADC(0), ROW(0), COLUMN(0) {}
0385     float ADC;   //adc value
0386     int ROW;     //row number
0387     int COLUMN;  //column number
0388   };
0389   typedef std::vector<SiPixelDigi> SiPixelDigiVector;
0390   //put functions
0391   void putBRL1Digis(const std::vector<float>& adc, const std::vector<int>& row, const std::vector<int>& column);
0392   void putBRL2Digis(const std::vector<float>& adc, const std::vector<int>& row, const std::vector<int>& column);
0393   void putBRL3Digis(const std::vector<float>& adc, const std::vector<int>& row, const std::vector<int>& column);
0394   void putFWD1pDigis(const std::vector<float>& adc, const std::vector<int>& row, const std::vector<int>& column);
0395   void putFWD1nDigis(const std::vector<float>& adc, const std::vector<int>& row, const std::vector<int>& column);
0396   void putFWD2pDigis(const std::vector<float>& adc, const std::vector<int>& row, const std::vector<int>& column);
0397   void putFWD2nDigis(const std::vector<float>& adc, const std::vector<int>& row, const std::vector<int>& column);
0398   //get functions
0399   int getnBRL1Digis() const { return nBRL1Digis; }
0400   int getnBRL2Digis() const { return nBRL2Digis; }
0401   int getnBRL3Digis() const { return nBRL3Digis; }
0402   int getnFWD1pDigis() const { return nFWD1pDigis; }
0403   int getnFWD1nDigis() const { return nFWD1nDigis; }
0404   int getnFWD2pDigis() const { return nFWD2pDigis; }
0405   int getnFWD2nDigis() const { return nFWD2nDigis; }
0406   SiPixelDigiVector getBRL1Digis() const { return BRL1Digis; }
0407   SiPixelDigiVector getBRL2Digis() const { return BRL2Digis; }
0408   SiPixelDigiVector getBRL3Digis() const { return BRL3Digis; }
0409   SiPixelDigiVector getFWD1pDigis() const { return FWD1pDigis; }
0410   SiPixelDigiVector getFWD1nDigis() const { return FWD1nDigis; }
0411   SiPixelDigiVector getFWD2pDigis() const { return FWD2pDigis; }
0412   SiPixelDigiVector getFWD2nDigis() const { return FWD2nDigis; }
0413 
0414   ////////////
0415   // Muon info
0416   ////////////
0417 
0418   //////////
0419   // DT Info
0420   //////////
0421   struct DTDigi {
0422     DTDigi() : SLAYER(0), TIME(0), LAYER(0) {}
0423     int SLAYER;  //superlayer number
0424     float TIME;  //time of hit
0425     int LAYER;   //layer number
0426   };
0427   typedef std::vector<DTDigi> DTDigiVector;
0428   //put functions
0429   void putMB1Digis(const std::vector<int>& slayer, const std::vector<float>& time, const std::vector<int>& layer);
0430   void putMB2Digis(const std::vector<int>& slayer, const std::vector<float>& time, const std::vector<int>& layer);
0431   void putMB3Digis(const std::vector<int>& slayer, const std::vector<float>& time, const std::vector<int>& layer);
0432   void putMB4Digis(const std::vector<int>& slayer, const std::vector<float>& time, const std::vector<int>& layer);
0433   //get functions
0434   int getnMB1Digis() const { return nMB1Digis; }
0435   int getnMB2Digis() const { return nMB2Digis; }
0436   int getnMB3Digis() const { return nMB3Digis; }
0437   int getnMB4Digis() const { return nMB4Digis; }
0438   DTDigiVector getMB1Digis() const { return MB1Digis; }
0439   DTDigiVector getMB2Digis() const { return MB2Digis; }
0440   DTDigiVector getMB3Digis() const { return MB3Digis; }
0441   DTDigiVector getMB4Digis() const { return MB4Digis; }
0442 
0443   /////////////////
0444   // CSC Strip info
0445   /////////////////
0446   struct CSCstripDigi {
0447     CSCstripDigi() : ADC(0) {}
0448     float ADC;  //ped subtracted amplitude
0449   };
0450   typedef std::vector<CSCstripDigi> CSCstripDigiVector;
0451   //put functions
0452   void putCSCstripDigis(const std::vector<float>& adc);
0453   //get functions
0454   int getnCSCstripDigis() const { return nCSCstripDigis; }
0455   CSCstripDigiVector getCSCstripDigis() const { return CSCstripDigis; }
0456 
0457   /////////////////
0458   // CSC Wire info
0459   /////////////////
0460   struct CSCwireDigi {
0461     CSCwireDigi() : TIME(0) {}
0462     float TIME;  //time
0463   };
0464   typedef std::vector<CSCwireDigi> CSCwireDigiVector;
0465   //put functions
0466   void putCSCwireDigis(const std::vector<float>& time);
0467   //get functions
0468   int getnCSCwireDigis() const { return nCSCwireDigis; }
0469   CSCwireDigiVector getCSCwireDigis() const { return CSCwireDigis; }
0470 
0471 private:
0472   ////////////
0473   // ECal info
0474   ////////////
0475   int nEBCalDigis;
0476   ECalDigiVector EBCalDigis;
0477   int nEECalDigis;
0478   ECalDigiVector EECalDigis;
0479   int nESCalDigis;
0480   ESCalDigiVector ESCalDigis;
0481 
0482   ////////////
0483   // HCal info
0484   ////////////
0485   int nHBCalDigis;
0486   HCalDigiVector HBCalDigis;
0487   int nHECalDigis;
0488   HCalDigiVector HECalDigis;
0489   int nHOCalDigis;
0490   HCalDigiVector HOCalDigis;
0491   int nHFCalDigis;
0492   HCalDigiVector HFCalDigis;
0493 
0494   ////////////////////////
0495   // Silicon Tracker info
0496   ///////////////////////
0497 
0498   //////////////
0499   //SiStrip info
0500   //////////////
0501   int nTIBL1Digis;
0502   SiStripDigiVector TIBL1Digis;
0503   int nTIBL2Digis;
0504   SiStripDigiVector TIBL2Digis;
0505   int nTIBL3Digis;
0506   SiStripDigiVector TIBL3Digis;
0507   int nTIBL4Digis;
0508   SiStripDigiVector TIBL4Digis;
0509   int nTOBL1Digis;
0510   SiStripDigiVector TOBL1Digis;
0511   int nTOBL2Digis;
0512   SiStripDigiVector TOBL2Digis;
0513   int nTOBL3Digis;
0514   SiStripDigiVector TOBL3Digis;
0515   int nTOBL4Digis;
0516   SiStripDigiVector TOBL4Digis;
0517   int nTIDW1Digis;
0518   SiStripDigiVector TIDW1Digis;
0519   int nTIDW2Digis;
0520   SiStripDigiVector TIDW2Digis;
0521   int nTIDW3Digis;
0522   SiStripDigiVector TIDW3Digis;
0523   int nTECW1Digis;
0524   SiStripDigiVector TECW1Digis;
0525   int nTECW2Digis;
0526   SiStripDigiVector TECW2Digis;
0527   int nTECW3Digis;
0528   SiStripDigiVector TECW3Digis;
0529   int nTECW4Digis;
0530   SiStripDigiVector TECW4Digis;
0531   int nTECW5Digis;
0532   SiStripDigiVector TECW5Digis;
0533   int nTECW6Digis;
0534   SiStripDigiVector TECW6Digis;
0535   int nTECW7Digis;
0536   SiStripDigiVector TECW7Digis;
0537   int nTECW8Digis;
0538   SiStripDigiVector TECW8Digis;
0539 
0540   //////////////
0541   //SiPixel info
0542   //////////////
0543   int nBRL1Digis;
0544   SiPixelDigiVector BRL1Digis;
0545   int nBRL2Digis;
0546   SiPixelDigiVector BRL2Digis;
0547   int nBRL3Digis;
0548   SiPixelDigiVector BRL3Digis;
0549   int nFWD1pDigis;
0550   SiPixelDigiVector FWD1pDigis;
0551   int nFWD1nDigis;
0552   SiPixelDigiVector FWD1nDigis;
0553   int nFWD2pDigis;
0554   SiPixelDigiVector FWD2pDigis;
0555   int nFWD2nDigis;
0556   SiPixelDigiVector FWD2nDigis;
0557 
0558   ////////////
0559   // Muon info
0560   ////////////
0561 
0562   //////////
0563   // DT Info
0564   //////////
0565   int nMB1Digis;
0566   DTDigiVector MB1Digis;
0567   int nMB2Digis;
0568   DTDigiVector MB2Digis;
0569   int nMB3Digis;
0570   DTDigiVector MB3Digis;
0571   int nMB4Digis;
0572   DTDigiVector MB4Digis;
0573 
0574   /////////////////
0575   // CSC Strip info
0576   ////////////////
0577   int nCSCstripDigis;
0578   CSCstripDigiVector CSCstripDigis;
0579 
0580   /////////////////
0581   // CSC Wire info
0582   ////////////////
0583   int nCSCwireDigis;
0584   CSCwireDigiVector CSCwireDigis;
0585 
0586 };  // end class declaration
0587 
0588 #endif  //PGlobalDigiHit_h
0589 
0590 ///////////////////////////////////////////////////////////////////////////////
0591 // PGlobalRecHit
0592 ///////////////////////////////////////////////////////////////////////////////
0593 
0594 #ifndef PGlobalRecHit_h
0595 #define PGlobalRecHit_h
0596 
0597 class PGlobalRecHit {
0598 public:
0599   PGlobalRecHit()
0600       : nEBCalRecHits(0),
0601         nEECalRecHits(0),
0602         nESCalRecHits(0),
0603         nHBCalRecHits(0),
0604         nHECalRecHits(0),
0605         nHOCalRecHits(0),
0606         nHFCalRecHits(0),
0607         nTIBL1RecHits(0),
0608         nTIBL2RecHits(0),
0609         nTIBL3RecHits(0),
0610         nTIBL4RecHits(0),
0611         nTOBL1RecHits(0),
0612         nTOBL2RecHits(0),
0613         nTOBL3RecHits(0),
0614         nTOBL4RecHits(0),
0615         nTIDW1RecHits(0),
0616         nTIDW2RecHits(0),
0617         nTIDW3RecHits(0),
0618         nTECW1RecHits(0),
0619         nTECW2RecHits(0),
0620         nTECW3RecHits(0),
0621         nTECW4RecHits(0),
0622         nTECW5RecHits(0),
0623         nTECW6RecHits(0),
0624         nTECW7RecHits(0),
0625         nTECW8RecHits(0),
0626         nBRL1RecHits(0),
0627         nBRL2RecHits(0),
0628         nBRL3RecHits(0),
0629         nFWD1pRecHits(0),
0630         nFWD1nRecHits(0),
0631         nFWD2pRecHits(0),
0632         nFWD2nRecHits(0),
0633         nDTRecHits(0),
0634         nCSCRecHits(0),
0635         nRPCRecHits(0) {}
0636   virtual ~PGlobalRecHit() {}
0637 
0638   ////////////
0639   // ECal Info
0640   ////////////
0641   struct ECalRecHit {
0642     ECalRecHit() : RE(0), SHE(0) {}
0643     float RE;   //reconstructed energy
0644     float SHE;  //simhit energy
0645   };
0646   typedef std::vector<ECalRecHit> ECalRecHitVector;
0647   //put functions
0648   void putEBCalRecHits(const std::vector<float>& re, const std::vector<float>& she);
0649   void putEECalRecHits(const std::vector<float>& re, const std::vector<float>& she);
0650   void putESCalRecHits(const std::vector<float>& re, const std::vector<float>& she);
0651   //get functions
0652   int getnEBCalRecHits() const { return nEBCalRecHits; }
0653   int getnEECalRecHits() const { return nEECalRecHits; }
0654   int getnESCalRecHits() const { return nESCalRecHits; }
0655   ECalRecHitVector getEBCalRecHits() const { return EBCalRecHits; }
0656   ECalRecHitVector getEECalRecHits() const { return EECalRecHits; }
0657   ECalRecHitVector getESCalRecHits() const { return ESCalRecHits; }
0658 
0659   ////////////
0660   // HCal Info
0661   ////////////
0662   struct HCalRecHit {
0663     HCalRecHit() : REC(0), R(0), SHE(0) {}
0664     float REC;  // reconstructed energy
0665     float R;    // distance in cone
0666     float SHE;  // simhit energy
0667   };
0668   typedef std::vector<HCalRecHit> HCalRecHitVector;
0669   //put functions
0670   void putHBCalRecHits(const std::vector<float>& rec, const std::vector<float>& r, const std::vector<float>& she);
0671   void putHECalRecHits(const std::vector<float>& rec, const std::vector<float>& r, const std::vector<float>& she);
0672   void putHOCalRecHits(const std::vector<float>& rec, const std::vector<float>& r, const std::vector<float>& she);
0673   void putHFCalRecHits(const std::vector<float>& rec, const std::vector<float>& r, const std::vector<float>& she);
0674   //get functions
0675   int getnHBCalRecHits() const { return nHBCalRecHits; }
0676   int getnHECalRecHits() const { return nHECalRecHits; }
0677   int getnHOCalRecHits() const { return nHOCalRecHits; }
0678   int getnHFCalRecHits() const { return nHFCalRecHits; }
0679   HCalRecHitVector getHBCalRecHits() const { return HBCalRecHits; }
0680   HCalRecHitVector getHECalRecHits() const { return HECalRecHits; }
0681   HCalRecHitVector getHOCalRecHits() const { return HOCalRecHits; }
0682   HCalRecHitVector getHFCalRecHits() const { return HFCalRecHits; }
0683 
0684   ////////////////////////
0685   // Silicon Tracker info
0686   ///////////////////////
0687 
0688   ///////////////
0689   // SiStrip info
0690   ///////////////
0691   struct SiStripRecHit {
0692     SiStripRecHit() : RX(0), RY(0), SX(0), SY(0) {}
0693     float RX;  //reconstructed x
0694     float RY;  //reconstructed y
0695     float SX;  //simulated x
0696     float SY;  //simulated y
0697   };
0698   typedef std::vector<SiStripRecHit> SiStripRecHitVector;
0699   //put functions
0700   void putTIBL1RecHits(const std::vector<float>& rx,
0701                        const std::vector<float>& ry,
0702                        const std::vector<float>& sx,
0703                        const std::vector<float>& sy);
0704   void putTIBL2RecHits(const std::vector<float>& rx,
0705                        const std::vector<float>& ry,
0706                        const std::vector<float>& sx,
0707                        const std::vector<float>& sy);
0708   void putTIBL3RecHits(const std::vector<float>& rx,
0709                        const std::vector<float>& ry,
0710                        const std::vector<float>& sx,
0711                        const std::vector<float>& sy);
0712   void putTIBL4RecHits(const std::vector<float>& rx,
0713                        const std::vector<float>& ry,
0714                        const std::vector<float>& sx,
0715                        const std::vector<float>& sy);
0716   void putTOBL1RecHits(const std::vector<float>& rx,
0717                        const std::vector<float>& ry,
0718                        const std::vector<float>& sx,
0719                        const std::vector<float>& sy);
0720   void putTOBL2RecHits(const std::vector<float>& rx,
0721                        const std::vector<float>& ry,
0722                        const std::vector<float>& sx,
0723                        const std::vector<float>& sy);
0724   void putTOBL3RecHits(const std::vector<float>& rx,
0725                        const std::vector<float>& ry,
0726                        const std::vector<float>& sx,
0727                        const std::vector<float>& sy);
0728   void putTOBL4RecHits(const std::vector<float>& rx,
0729                        const std::vector<float>& ry,
0730                        const std::vector<float>& sx,
0731                        const std::vector<float>& sy);
0732   void putTIDW1RecHits(const std::vector<float>& rx,
0733                        const std::vector<float>& ry,
0734                        const std::vector<float>& sx,
0735                        const std::vector<float>& sy);
0736   void putTIDW2RecHits(const std::vector<float>& rx,
0737                        const std::vector<float>& ry,
0738                        const std::vector<float>& sx,
0739                        const std::vector<float>& sy);
0740   void putTIDW3RecHits(const std::vector<float>& rx,
0741                        const std::vector<float>& ry,
0742                        const std::vector<float>& sx,
0743                        const std::vector<float>& sy);
0744   void putTECW1RecHits(const std::vector<float>& rx,
0745                        const std::vector<float>& ry,
0746                        const std::vector<float>& sx,
0747                        const std::vector<float>& sy);
0748   void putTECW2RecHits(const std::vector<float>& rx,
0749                        const std::vector<float>& ry,
0750                        const std::vector<float>& sx,
0751                        const std::vector<float>& sy);
0752   void putTECW3RecHits(const std::vector<float>& rx,
0753                        const std::vector<float>& ry,
0754                        const std::vector<float>& sx,
0755                        const std::vector<float>& sy);
0756   void putTECW4RecHits(const std::vector<float>& rx,
0757                        const std::vector<float>& ry,
0758                        const std::vector<float>& sx,
0759                        const std::vector<float>& sy);
0760   void putTECW5RecHits(const std::vector<float>& rx,
0761                        const std::vector<float>& ry,
0762                        const std::vector<float>& sx,
0763                        const std::vector<float>& sy);
0764   void putTECW6RecHits(const std::vector<float>& rx,
0765                        const std::vector<float>& ry,
0766                        const std::vector<float>& sx,
0767                        const std::vector<float>& sy);
0768   void putTECW7RecHits(const std::vector<float>& rx,
0769                        const std::vector<float>& ry,
0770                        const std::vector<float>& sx,
0771                        const std::vector<float>& sy);
0772   void putTECW8RecHits(const std::vector<float>& rx,
0773                        const std::vector<float>& ry,
0774                        const std::vector<float>& sx,
0775                        const std::vector<float>& sy);
0776   //get functions
0777   int getnTIBL1RecHits() const { return nTIBL1RecHits; }
0778   int getnTIBL2RecHits() const { return nTIBL2RecHits; }
0779   int getnTIBL3RecHits() const { return nTIBL3RecHits; }
0780   int getnTIBL4RecHits() const { return nTIBL4RecHits; }
0781   int getnTOBL1RecHits() const { return nTOBL1RecHits; }
0782   int getnTOBL2RecHits() const { return nTOBL2RecHits; }
0783   int getnTOBL3RecHits() const { return nTOBL3RecHits; }
0784   int getnTOBL4RecHits() const { return nTOBL4RecHits; }
0785   int getnTIDW1RecHits() const { return nTIDW1RecHits; }
0786   int getnTIDW2RecHits() const { return nTIDW2RecHits; }
0787   int getnTIDW3RecHits() const { return nTIDW3RecHits; }
0788   int getnTECW1RecHits() const { return nTECW1RecHits; }
0789   int getnTECW2RecHits() const { return nTECW2RecHits; }
0790   int getnTECW3RecHits() const { return nTECW3RecHits; }
0791   int getnTECW4RecHits() const { return nTECW4RecHits; }
0792   int getnTECW5RecHits() const { return nTECW5RecHits; }
0793   int getnTECW6RecHits() const { return nTECW6RecHits; }
0794   int getnTECW7RecHits() const { return nTECW7RecHits; }
0795   int getnTECW8RecHits() const { return nTECW8RecHits; }
0796   SiStripRecHitVector getTIBL1RecHits() const { return TIBL1RecHits; }
0797   SiStripRecHitVector getTIBL2RecHits() const { return TIBL2RecHits; }
0798   SiStripRecHitVector getTIBL3RecHits() const { return TIBL3RecHits; }
0799   SiStripRecHitVector getTIBL4RecHits() const { return TIBL4RecHits; }
0800   SiStripRecHitVector getTOBL1RecHits() const { return TOBL1RecHits; }
0801   SiStripRecHitVector getTOBL2RecHits() const { return TOBL2RecHits; }
0802   SiStripRecHitVector getTOBL3RecHits() const { return TOBL3RecHits; }
0803   SiStripRecHitVector getTOBL4RecHits() const { return TOBL4RecHits; }
0804   SiStripRecHitVector getTIDW1RecHits() const { return TIDW1RecHits; }
0805   SiStripRecHitVector getTIDW2RecHits() const { return TIDW2RecHits; }
0806   SiStripRecHitVector getTIDW3RecHits() const { return TIDW3RecHits; }
0807   SiStripRecHitVector getTECW1RecHits() const { return TECW1RecHits; }
0808   SiStripRecHitVector getTECW2RecHits() const { return TECW2RecHits; }
0809   SiStripRecHitVector getTECW3RecHits() const { return TECW3RecHits; }
0810   SiStripRecHitVector getTECW4RecHits() const { return TECW4RecHits; }
0811   SiStripRecHitVector getTECW5RecHits() const { return TECW5RecHits; }
0812   SiStripRecHitVector getTECW6RecHits() const { return TECW6RecHits; }
0813   SiStripRecHitVector getTECW7RecHits() const { return TECW7RecHits; }
0814   SiStripRecHitVector getTECW8RecHits() const { return TECW8RecHits; }
0815 
0816   ///////////////
0817   // SiPixel info
0818   ///////////////
0819   struct SiPixelRecHit {
0820     SiPixelRecHit() : RX(0), RY(0), SX(0), SY(0) {}
0821     float RX;  //reconstructed x
0822     float RY;  //reconstructed y
0823     float SX;  //simulated x
0824     float SY;  //simulated y
0825   };
0826   typedef std::vector<SiPixelRecHit> SiPixelRecHitVector;
0827   //put functions
0828   void putBRL1RecHits(const std::vector<float>& rx,
0829                       const std::vector<float>& ry,
0830                       const std::vector<float>& sx,
0831                       const std::vector<float>& sy);
0832   void putBRL2RecHits(const std::vector<float>& rx,
0833                       const std::vector<float>& ry,
0834                       const std::vector<float>& sx,
0835                       const std::vector<float>& sy);
0836   void putBRL3RecHits(const std::vector<float>& rx,
0837                       const std::vector<float>& ry,
0838                       const std::vector<float>& sx,
0839                       const std::vector<float>& sy);
0840   void putFWD1pRecHits(const std::vector<float>& rx,
0841                        const std::vector<float>& ry,
0842                        const std::vector<float>& sx,
0843                        const std::vector<float>& sy);
0844   void putFWD1nRecHits(const std::vector<float>& rx,
0845                        const std::vector<float>& ry,
0846                        const std::vector<float>& sx,
0847                        const std::vector<float>& sy);
0848   void putFWD2pRecHits(const std::vector<float>& rx,
0849                        const std::vector<float>& ry,
0850                        const std::vector<float>& sx,
0851                        const std::vector<float>& sy);
0852   void putFWD2nRecHits(const std::vector<float>& rx,
0853                        const std::vector<float>& ry,
0854                        const std::vector<float>& sx,
0855                        const std::vector<float>& sy);
0856   //get functions
0857   int getnBRL1RecHits() const { return nBRL1RecHits; }
0858   int getnBRL2RecHits() const { return nBRL2RecHits; }
0859   int getnBRL3RecHits() const { return nBRL3RecHits; }
0860   int getnFWD1pRecHits() const { return nFWD1pRecHits; }
0861   int getnFWD1nRecHits() const { return nFWD1nRecHits; }
0862   int getnFWD2pRecHits() const { return nFWD2pRecHits; }
0863   int getnFWD2nRecHits() const { return nFWD2nRecHits; }
0864   SiPixelRecHitVector getBRL1RecHits() const { return BRL1RecHits; }
0865   SiPixelRecHitVector getBRL2RecHits() const { return BRL2RecHits; }
0866   SiPixelRecHitVector getBRL3RecHits() const { return BRL3RecHits; }
0867   SiPixelRecHitVector getFWD1pRecHits() const { return FWD1pRecHits; }
0868   SiPixelRecHitVector getFWD1nRecHits() const { return FWD1nRecHits; }
0869   SiPixelRecHitVector getFWD2pRecHits() const { return FWD2pRecHits; }
0870   SiPixelRecHitVector getFWD2nRecHits() const { return FWD2nRecHits; }
0871 
0872   ////////////
0873   // Muon info
0874   ////////////
0875 
0876   //////////
0877   // DT Info
0878   //////////
0879   struct DTRecHit {
0880     DTRecHit() : RHD(0), SHD(0) {}
0881     float RHD;  //distance of rechit from wire
0882     float SHD;  //distance of simhit from wire
0883   };
0884   typedef std::vector<DTRecHit> DTRecHitVector;
0885   //put functions
0886   void putDTRecHits(const std::vector<float>& rhd, const std::vector<float>& shd);
0887   //get functions
0888   int getnDTRecHits() const { return nDTRecHits; }
0889   DTRecHitVector getDTRecHits() const { return DTRecHits; }
0890 
0891   /////////////////
0892   // CSC info
0893   /////////////////
0894   struct CSCRecHit {
0895     CSCRecHit() : RHPHI(0), RHPERP(0), SHPHI(0) {}
0896     float RHPHI;   //reconstructed hit phi
0897     float RHPERP;  //reconstructed hit perp
0898     float SHPHI;   //simulated hit phi
0899   };
0900   typedef std::vector<CSCRecHit> CSCRecHitVector;
0901   //put functions
0902   void putCSCRecHits(const std::vector<float>& rhphi,
0903                      const std::vector<float>& rhperp,
0904                      const std::vector<float>& shphi);
0905   //get functions
0906   int getnCSCRecHits() const { return nCSCRecHits; }
0907   CSCRecHitVector getCSCRecHits() const { return CSCRecHits; }
0908 
0909   /////////////////
0910   // RPC info
0911   /////////////////
0912   struct RPCRecHit {
0913     RPCRecHit() : RHX(0), SHX(0) {}
0914     float RHX;  //reconstructed hit x
0915     float SHX;  //simulated hit x
0916   };
0917   typedef std::vector<RPCRecHit> RPCRecHitVector;
0918   //put functions
0919   void putRPCRecHits(const std::vector<float>& rhx, const std::vector<float>& shx);
0920   //get functions
0921   int getnRPCRecHits() const { return nRPCRecHits; }
0922   RPCRecHitVector getRPCRecHits() const { return RPCRecHits; }
0923 
0924 private:
0925   ////////////
0926   // ECal info
0927   ////////////
0928   int nEBCalRecHits;
0929   ECalRecHitVector EBCalRecHits;
0930   int nEECalRecHits;
0931   ECalRecHitVector EECalRecHits;
0932   int nESCalRecHits;
0933   ECalRecHitVector ESCalRecHits;
0934 
0935   ////////////
0936   // HCal info
0937   ////////////
0938   int nHBCalRecHits;
0939   HCalRecHitVector HBCalRecHits;
0940   int nHECalRecHits;
0941   HCalRecHitVector HECalRecHits;
0942   int nHOCalRecHits;
0943   HCalRecHitVector HOCalRecHits;
0944   int nHFCalRecHits;
0945   HCalRecHitVector HFCalRecHits;
0946 
0947   ////////////////////////
0948   // Silicon Tracker info
0949   ///////////////////////
0950 
0951   //////////////
0952   //SiStrip info
0953   //////////////
0954   int nTIBL1RecHits;
0955   SiStripRecHitVector TIBL1RecHits;
0956   int nTIBL2RecHits;
0957   SiStripRecHitVector TIBL2RecHits;
0958   int nTIBL3RecHits;
0959   SiStripRecHitVector TIBL3RecHits;
0960   int nTIBL4RecHits;
0961   SiStripRecHitVector TIBL4RecHits;
0962   int nTOBL1RecHits;
0963   SiStripRecHitVector TOBL1RecHits;
0964   int nTOBL2RecHits;
0965   SiStripRecHitVector TOBL2RecHits;
0966   int nTOBL3RecHits;
0967   SiStripRecHitVector TOBL3RecHits;
0968   int nTOBL4RecHits;
0969   SiStripRecHitVector TOBL4RecHits;
0970   int nTIDW1RecHits;
0971   SiStripRecHitVector TIDW1RecHits;
0972   int nTIDW2RecHits;
0973   SiStripRecHitVector TIDW2RecHits;
0974   int nTIDW3RecHits;
0975   SiStripRecHitVector TIDW3RecHits;
0976   int nTECW1RecHits;
0977   SiStripRecHitVector TECW1RecHits;
0978   int nTECW2RecHits;
0979   SiStripRecHitVector TECW2RecHits;
0980   int nTECW3RecHits;
0981   SiStripRecHitVector TECW3RecHits;
0982   int nTECW4RecHits;
0983   SiStripRecHitVector TECW4RecHits;
0984   int nTECW5RecHits;
0985   SiStripRecHitVector TECW5RecHits;
0986   int nTECW6RecHits;
0987   SiStripRecHitVector TECW6RecHits;
0988   int nTECW7RecHits;
0989   SiStripRecHitVector TECW7RecHits;
0990   int nTECW8RecHits;
0991   SiStripRecHitVector TECW8RecHits;
0992 
0993   //////////////
0994   //SiPixel info
0995   //////////////
0996   int nBRL1RecHits;
0997   SiPixelRecHitVector BRL1RecHits;
0998   int nBRL2RecHits;
0999   SiPixelRecHitVector BRL2RecHits;
1000   int nBRL3RecHits;
1001   SiPixelRecHitVector BRL3RecHits;
1002   int nFWD1pRecHits;
1003   SiPixelRecHitVector FWD1pRecHits;
1004   int nFWD1nRecHits;
1005   SiPixelRecHitVector FWD1nRecHits;
1006   int nFWD2pRecHits;
1007   SiPixelRecHitVector FWD2pRecHits;
1008   int nFWD2nRecHits;
1009   SiPixelRecHitVector FWD2nRecHits;
1010 
1011   ////////////
1012   // Muon info
1013   ////////////
1014 
1015   //////////
1016   // DT Info
1017   //////////
1018   int nDTRecHits;
1019   DTRecHitVector DTRecHits;
1020 
1021   /////////////////
1022   // CSC info
1023   ////////////////
1024   int nCSCRecHits;
1025   CSCRecHitVector CSCRecHits;
1026 
1027   /////////////////
1028   // RPC info
1029   ////////////////
1030   int nRPCRecHits;
1031   RPCRecHitVector RPCRecHits;
1032 
1033 };  // end class declaration
1034 
1035 #endif  //PGlobalRecHitHit_h
1036 
1037 ///////////////////////////////////////////////////////////////////////////////
1038 // PEcalValidInfo
1039 ///////////////////////////////////////////////////////////////////////////////
1040 
1041 #ifndef PEcalValidInfo_H
1042 #define PEcalValidInfo_H
1043 
1044 /*----------------------------------------------------------
1045 Class Description:
1046       The Class, PEcalValidInfo, includes all the quantities 
1047     needed to validate for the Simulation of Eletromagnetic 
1048     Calorimetor. 
1049        The Objects of this class will be save into regular 
1050     Root file vis EDProducer.
1051 
1052 Author: X.HUANG ( huangxt@fnal.gov )
1053 Date:  Dec, 2005
1054 
1055 ---------------------------------------------------------*/
1056 
1057 #include <string>
1058 #include <vector>
1059 #include "DataFormats/Math/interface/LorentzVector.h"
1060 
1061 class EcalTestAnalysis;
1062 
1063 class PEcalValidInfo {
1064   friend class EcalTestAnalysis;
1065   friend class PreshowerTestAnalysis;
1066   friend class SimHitSingleTest;
1067   friend class EcalSimHitsValidProducer;
1068   typedef std::vector<float> FloatVector;
1069 
1070 public:
1071   PEcalValidInfo()
1072       : ee1(0.0),
1073         ee4(0.0),
1074         ee9(0.0),
1075         ee16(0.0),
1076         ee25(0.0),
1077         eb1(0.0),
1078         eb4(0.0),
1079         eb9(0.0),
1080         eb16(0.0),
1081         eb25(0.0),
1082         totalEInEE(0.0),
1083         totalEInEB(0.0),
1084         totalEInES(0.0),
1085         totalHits(0),
1086         nHitsInEE(0),
1087         nHitsInEB(0),
1088         nHitsInES(0),
1089         nHitsIn1ES(0),
1090         nHitsIn2ES(0) {}
1091 
1092   ~PEcalValidInfo() {}
1093 
1094   // Get functions.
1095   float ee1x1() const { return ee1; }
1096   float ee2x2() const { return ee4; }
1097   float ee3x3() const { return ee9; }
1098   float ee4x4() const { return ee16; }
1099   float ee5x5() const { return ee25; }
1100 
1101   float eb1x1() const { return eb1; }
1102   float eb2x2() const { return eb4; }
1103   float eb3x3() const { return eb9; }
1104   float eb4x4() const { return eb16; }
1105   float eb5x5() const { return eb25; }
1106 
1107   float eInEE() const { return totalEInEE; }
1108   float eInEB() const { return totalEInEB; }
1109   float eInES() const { return totalEInES; }
1110 
1111   float eInEEzp() const { return totalEInEEzp; }
1112   float eInEEzm() const { return totalEInEEzm; }
1113 
1114   float eInESzp() const { return totalEInESzp; }
1115   float eInESzm() const { return totalEInESzm; }
1116 
1117   int hitsInEcal() const { return totalHits; }
1118   int hitsInEE() const { return nHitsInEE; }
1119   int hitsInEB() const { return nHitsInEB; }
1120   int hitsInES() const { return nHitsInES; }
1121   int hitsIn1ES() const { return nHitsIn1ES; }
1122   int hitsIn2ES() const { return nHitsIn2ES; }
1123 
1124   int hitsIn1ESzp() const { return nHitsIn1ESzp; }
1125   int hitsIn1ESzm() const { return nHitsIn1ESzm; }
1126   int hitsIn2ESzp() const { return nHitsIn2ESzp; }
1127   int hitsIn2ESzm() const { return nHitsIn2ESzm; }
1128 
1129   int crystalInEB() const { return nCrystalInEB; }
1130   int crystalInEEzp() const { return nCrystalInEEzp; }
1131   int crystalInEEzm() const { return nCrystalInEEzm; }
1132 
1133   FloatVector bX0() const { return eBX0; }
1134   FloatVector eX0() const { return eEX0; }
1135 
1136   FloatVector eIn1ES() const { return eOf1ES; }
1137   FloatVector eIn2ES() const { return eOf2ES; }
1138   FloatVector zOfInES() const { return zOfES; }
1139 
1140   FloatVector eIn1ESzp() const { return eOf1ESzp; }
1141   FloatVector eIn1ESzm() const { return eOf1ESzm; }
1142 
1143   FloatVector eIn2ESzp() const { return eOf2ESzp; }
1144   FloatVector eIn2ESzm() const { return eOf2ESzm; }
1145 
1146   FloatVector phiOfEEHits() const { return phiOfEECaloG4Hit; }
1147   FloatVector etaOfEEHits() const { return etaOfEECaloG4Hit; }
1148   FloatVector tOfEEHits() const { return tOfEECaloG4Hit; }
1149   FloatVector eOfEEHits() const { return eOfEECaloG4Hit; }
1150   FloatVector eOfEEPlusHits() const { return eOfEEPlusCaloG4Hit; }
1151   FloatVector eOfEEMinusHits() const { return eOfEEMinusCaloG4Hit; }
1152 
1153   FloatVector phiOfEBHits() const { return phiOfEBCaloG4Hit; }
1154   FloatVector etaOfEBHits() const { return etaOfEBCaloG4Hit; }
1155   FloatVector tOfEBHits() const { return tOfEBCaloG4Hit; }
1156   FloatVector eOfEBHits() const { return eOfEBCaloG4Hit; }
1157 
1158   FloatVector phiOfiESHits() const { return phiOfESCaloG4Hit; }
1159   FloatVector etaOfESHits() const { return etaOfESCaloG4Hit; }
1160   FloatVector tOfESHits() const { return tOfESCaloG4Hit; }
1161   FloatVector eOfESHits() const { return eOfESCaloG4Hit; }
1162 
1163   math::XYZTLorentzVector momentum() const { return theMomentum; }
1164   math::XYZTLorentzVector vertex() const { return theVertex; }
1165 
1166   int pId() const { return thePID; }
1167 
1168 private:
1169   float ee1;   //Energy deposition in cluser1x1
1170   float ee4;   //Energy deposition in cluser2x2
1171   float ee9;   //Energy deposition in cluser3x3
1172   float ee16;  //Energy deposition in cluser4x4
1173   float ee25;  //Energy deposition in cluser5x5
1174 
1175   float eb1;   //Energy deposition in cluser1x1
1176   float eb4;   //Energy deposition in cluser2x2
1177   float eb9;   //Energy deposition in cluser3x3
1178   float eb16;  //Energy deposition in cluser4x4
1179   float eb25;  //Energy deposition in cluser5x5
1180 
1181   float totalEInEE;  //The Total Energy deposited in EE;
1182   float totalEInEB;  //The Total Energy deposited in EB;
1183   float totalEInES;  //The Total Energy deposited in ES;
1184 
1185   float totalEInEEzp;
1186   float totalEInEEzm;
1187   float totalEInESzp;
1188   float totalEInESzm;
1189 
1190   int totalHits;   //Total number of Hits.
1191   int nHitsInEE;   //Total number of Hits in EE.
1192   int nHitsInEB;   //Total number of Hits in EB.
1193   int nHitsInES;   //Total number of Hits in ES.
1194   int nHitsIn1ES;  //Total number of Hits in 1st Layer of ES;
1195   int nHitsIn2ES;  //Total number of Hits in 2nd Layer of ES;
1196 
1197   int nHitsIn1ESzp;
1198   int nHitsIn1ESzm;
1199   int nHitsIn2ESzp;
1200   int nHitsIn2ESzm;
1201 
1202   int nCrystalInEB;
1203   int nCrystalInEEzp;
1204   int nCrystalInEEzm;
1205 
1206   FloatVector eBX0;  // longitudinal Energy deposition In EB.
1207   FloatVector eEX0;  // longitudinal Energy deposition In EE.
1208 
1209   FloatVector eOf1ES;  // Energy deposition of Hits in 1st layer of ES;
1210   FloatVector eOf2ES;  // Energy deposition of Hits in 2nd layer of ES;
1211   FloatVector zOfES;
1212 
1213   FloatVector eOf1ESzp;
1214   FloatVector eOf1ESzm;
1215   FloatVector eOf2ESzp;
1216   FloatVector eOf2ESzm;
1217 
1218   FloatVector phiOfEECaloG4Hit;     // Phi of Hits.
1219   FloatVector etaOfEECaloG4Hit;     // Eta of Hits.
1220   FloatVector tOfEECaloG4Hit;       // Tof of Hits.
1221   FloatVector eOfEECaloG4Hit;       // Energy depostion of Hits.
1222   FloatVector eOfEEPlusCaloG4Hit;   // Energy depostion of Hits.
1223   FloatVector eOfEEMinusCaloG4Hit;  // Energy depostion of Hits.
1224 
1225   FloatVector phiOfESCaloG4Hit;  // Phi of Hits.
1226   FloatVector etaOfESCaloG4Hit;  // Eta of Hits.
1227   FloatVector tOfESCaloG4Hit;    // Tof of Hits.
1228   FloatVector eOfESCaloG4Hit;    // Energy depostion of Hits.
1229 
1230   FloatVector phiOfEBCaloG4Hit;  // Phi of Hits.
1231   FloatVector etaOfEBCaloG4Hit;  // Eta of Hits.
1232   FloatVector tOfEBCaloG4Hit;    // Tof of Hits.
1233   FloatVector eOfEBCaloG4Hit;    // Energy depostion of Hits.
1234 
1235   int thePID;  // add more ??
1236   math::XYZTLorentzVector theMomentum;
1237   math::XYZTLorentzVector theVertex;
1238 };
1239 
1240 #endif  // endif PECal
1241 
1242 ///////////////////////////////////////////////////////////////////////////////
1243 // PHcalValidInfoJets
1244 ///////////////////////////////////////////////////////////////////////////////
1245 
1246 #ifndef PHcalValidInfoJets_H
1247 #define PHcalValidInfoJets_H
1248 
1249 #include <string>
1250 #include <vector>
1251 #include <memory>
1252 
1253 class SimG4HcalValidation;
1254 
1255 class PHcalValidInfoJets {
1256   friend class SimG4HcalValidation;
1257 
1258 public:
1259   PHcalValidInfoJets()
1260       : nJetHit(0),
1261         nJet(0),
1262         ecalJet(0.),
1263         hcalJet(0.),
1264         hoJet(0.),
1265         etotJet(0.),
1266         detaJet(0.),
1267         dphiJet(0.),
1268         drJet(0.),
1269         dijetM(0.) {}
1270   virtual ~PHcalValidInfoJets() {}
1271 
1272   // acceess
1273 
1274   std::vector<float> jethite() const { return jetHite; }
1275   std::vector<float> jethitr() const { return jetHitr; }
1276   std::vector<float> jethitt() const { return jetHitt; }
1277   int njethit() const { return nJetHit; }
1278 
1279   std::vector<float> jete() const { return jetE; }
1280   std::vector<float> jeteta() const { return jetEta; }
1281   std::vector<float> jetphi() const { return jetPhi; }
1282   int njet() const { return nJet; }
1283 
1284   float ecaljet() const { return ecalJet; }
1285   float hcaljet() const { return hcalJet; }
1286   float hojet() const { return hoJet; }
1287   float etotjet() const { return etotJet; }
1288 
1289   float detajet() const { return detaJet; }
1290   float dphijet() const { return dphiJet; }
1291   float drjet() const { return drJet; }
1292   float dijetm() const { return dijetM; }
1293 
1294   // fill
1295   void fillTProfileJet(double e, double r, double t);
1296   void fillEcollectJet(double ee, double he, double hoe, double etot);
1297   void fillEtaPhiProfileJet(double eta0, double phi0, double eta, double phi, double dist);
1298   void fillJets(const std::vector<double>& enj, const std::vector<double>& etaj, const std::vector<double>& phij);
1299   void fillDiJets(double mass);
1300 
1301 private:
1302   int nJetHit, nJet;
1303   float ecalJet, hcalJet, hoJet, etotJet;
1304   float detaJet, dphiJet, drJet, dijetM;
1305   std::vector<float> jetHite;
1306   std::vector<float> jetHitr;
1307   std::vector<float> jetHitt;
1308   std::vector<float> jetE;
1309   std::vector<float> jetEta;
1310   std::vector<float> jetPhi;
1311 };
1312 
1313 #endif
1314 
1315 ///////////////////////////////////////////////////////////////////////////////
1316 // PHcalValidInfoLayer
1317 ///////////////////////////////////////////////////////////////////////////////
1318 
1319 #ifndef PHcalValidInfoLayer_H
1320 #define PHcalValidInfoLayer_H
1321 
1322 #include <string>
1323 #include <vector>
1324 #include <memory>
1325 
1326 class SimG4HcalValidation;
1327 
1328 class PHcalValidInfoLayer {
1329   friend class SimG4HcalValidation;
1330 
1331 public:
1332   PHcalValidInfoLayer()
1333       : hitN(0), eHO(0.0), eHBHE(0.0), eEBEE(0.0), elongHF(0.0), eshortHF(0.0), eEcalHF(0.0), eHcalHF(0.0) {}
1334   virtual ~PHcalValidInfoLayer() {}
1335 
1336   // access
1337   int nHit() const { return hitN; }
1338 
1339   float eho() const { return eHO; }
1340   float ehbhe() const { return eHBHE; }
1341   float eebee() const { return eEBEE; }
1342   float elonghf() const { return elongHF; }
1343   float eshorthf() const { return eshortHF; }
1344   float eecalhf() const { return eEcalHF; }
1345   float ehcalhf() const { return eHcalHF; }
1346 
1347   std::vector<float> elayer() const { return eLayer; }
1348   std::vector<float> edepth() const { return eDepth; }
1349 
1350   std::vector<float> etaHit() const { return hitEta; }
1351   std::vector<float> phiHit() const { return hitPhi; }
1352   std::vector<float> eHit() const { return hitE; }
1353   std::vector<float> tHit() const { return hitTime; }
1354   std::vector<float> layerHit() const { return hitLayer; }
1355   std::vector<float> idHit() const { return hitId; }
1356 
1357   // filling
1358   void fillLayers(double el[], double ed[], double ho, double hbhe, double ebee);
1359   void fillHF(double fibl, double fibs, double enec, double enhc);
1360   void fillHits(int Nhits, int lay, int unitID, double eta, double phi, double ehit, double t);
1361   //  void clear();
1362 
1363 private:
1364   int hitN;
1365   float eHO, eHBHE, eEBEE;
1366   float elongHF, eshortHF, eEcalHF, eHcalHF;
1367   std::vector<float> eLayer;
1368   std::vector<float> eDepth;
1369   // SimHits parameters
1370   std::vector<float> hitLayer;  // float for int
1371   std::vector<float> hitId;     // float for int
1372   std::vector<float> hitEta;
1373   std::vector<float> hitPhi;
1374   std::vector<float> hitE;
1375   std::vector<float> hitTime;
1376 };
1377 
1378 #endif
1379 
1380 ///////////////////////////////////////////////////////////////////////////////
1381 // PHcalValidInfoNxN
1382 ///////////////////////////////////////////////////////////////////////////////
1383 
1384 #ifndef PHcalValidInfoNxN_H
1385 #define PHcalValidInfoNxN_H
1386 
1387 #include <string>
1388 #include <vector>
1389 #include <memory>
1390 
1391 class SimG4HcalValidation;
1392 
1393 class PHcalValidInfoNxN {
1394   friend class SimG4HcalValidation;
1395 
1396 public:
1397   PHcalValidInfoNxN()
1398       : nNxN(0), ecalNxNr(0), hcalNxNr(0.), hoNxNr(0.), etotNxNr(0.), ecalNxN(0.), hcalNxN(0.), hoNxN(0.), etotNxN(0.) {}
1399   virtual ~PHcalValidInfoNxN() {}
1400 
1401   // access
1402   std::vector<float> idnxn() const { return idNxN; }
1403   std::vector<float> enxn() const { return eNxN; }
1404   std::vector<float> tnxn() const { return tNxN; }
1405   int nnxn() const { return nNxN; }
1406 
1407   float ecalnxnr() const { return ecalNxNr; }
1408   float hcalnxnr() const { return hcalNxNr; }
1409   float honxnr() const { return hoNxNr; }
1410   float etotnxnr() const { return etotNxNr; }
1411 
1412   float ecalnxn() const { return ecalNxN; }
1413   float hcalnxn() const { return hcalNxN; }
1414   float honxn() const { return hoNxN; }
1415   float etotnxn() const { return etotNxN; }
1416 
1417   // fill
1418   void fillHvsE(double ee, double he, double hoe, double etot);
1419   void fillEcollectNxN(double een, double hen, double hoen, double etotn);
1420   void fillTProfileNxN(double e, int i, double t);
1421 
1422 private:
1423   int nNxN;
1424   float ecalNxNr, hcalNxNr, hoNxNr, etotNxNr;
1425   float ecalNxN, hcalNxN, hoNxN, etotNxN;
1426   std::vector<float> idNxN;  // float for int
1427   std::vector<float> eNxN;
1428   std::vector<float> tNxN;
1429 };
1430 
1431 #endif
1432 
1433 ///////////////////////////////////////////////////////////////////////////////
1434 // PMuonSimHit
1435 ///////////////////////////////////////////////////////////////////////////////
1436 
1437 #ifndef PMuonSimHit_h
1438 #define PMuonSimHit_h
1439 
1440 #include <vector>
1441 #include <memory>
1442 
1443 /// Class PMuonSimHit defines structure of simulated hits data in CSC,DT,RPC
1444 /// for validation. It also includes vertex and track info.
1445 
1446 class PMuonSimHit {
1447 public:
1448   PMuonSimHit() : nRawGenPart(0), nG4Vtx(0), nG4Trk(0), nCSCHits(0), nDTHits(0), nRPCHits(0) {}
1449   virtual ~PMuonSimHit() {}
1450 
1451   struct Vtx {
1452     Vtx() : x(0), y(0), z(0) {}
1453     float x;
1454     float y;
1455     float z;
1456   };
1457 
1458   struct Trk {
1459     Trk() : pt(0), e(0), eta(0), phi(0) {}
1460     float pt;
1461     float e;
1462     float eta;
1463     float phi;
1464   };
1465 
1466   struct CSC {
1467     CSC()
1468         : _cscId(0),
1469           _detUnitId(0),
1470           _trackId(0),
1471           _processType(0),
1472           _particleType(0),
1473           _pabs(0),
1474           _globposz(0),
1475           _globposphi(0),
1476           _globposeta(0),
1477           _locposx(0),
1478           _locposy(0),
1479           _locposz(0),
1480           _locdirx(0),
1481           _locdiry(0),
1482           _locdirz(0),
1483           _locdirtheta(0),
1484           _locdirphi(0),
1485           _exitpointx(0),
1486           _exitpointy(0),
1487           _exitpointz(0),
1488           _entrypointx(0),
1489           _entrypointy(0),
1490           _entrypointz(0),
1491           _enloss(0),
1492           _tof(0) {}
1493 
1494     int _cscId;
1495     unsigned int _detUnitId;
1496     float _trackId;
1497     float _processType;
1498     float _particleType;
1499     float _pabs;
1500     float _globposz;
1501     float _globposphi;
1502     float _globposeta;
1503     float _locposx;
1504     float _locposy;
1505     float _locposz;
1506     float _locdirx;
1507     float _locdiry;
1508     float _locdirz;
1509     float _locdirtheta;
1510     float _locdirphi;
1511     float _exitpointx;
1512     float _exitpointy;
1513     float _exitpointz;
1514     float _entrypointx;
1515     float _entrypointy;
1516     float _entrypointz;
1517     float _enloss;
1518     float _tof;
1519   };
1520 
1521   struct DT {
1522     DT()
1523         : _detUnitId(0),
1524           _trackId(0),
1525           _processType(0),
1526           _particleType(0),
1527           _pabs(0),
1528           _globposz(0),
1529           _globposphi(0),
1530           _globposeta(0),
1531           _locposx(0),
1532           _locposy(0),
1533           _locposz(0),
1534           _locdirx(0),
1535           _locdiry(0),
1536           _locdirz(0),
1537           _locdirtheta(0),
1538           _locdirphi(0),
1539           _exitpointx(0),
1540           _exitpointy(0),
1541           _exitpointz(0),
1542           _entrypointx(0),
1543           _entrypointy(0),
1544           _entrypointz(0),
1545           _enloss(0),
1546           _tof(0) {}
1547 
1548     unsigned int _detUnitId;
1549     float _trackId;
1550     float _processType;
1551     float _particleType;
1552     float _pabs;
1553     float _globposz;
1554     float _globposphi;
1555     float _globposeta;
1556     float _locposx;
1557     float _locposy;
1558     float _locposz;
1559     float _locdirx;
1560     float _locdiry;
1561     float _locdirz;
1562     float _locdirtheta;
1563     float _locdirphi;
1564     float _exitpointx;
1565     float _exitpointy;
1566     float _exitpointz;
1567     float _entrypointx;
1568     float _entrypointy;
1569     float _entrypointz;
1570     float _enloss;
1571     float _tof;
1572   };
1573 
1574   struct RPC {
1575     RPC()
1576         : _detUnitId(0),
1577           _trackId(0),
1578           _processType(0),
1579           _particleType(0),
1580           _pabs(0),
1581           _globposz(0),
1582           _globposphi(0),
1583           _globposeta(0),
1584           _locposx(0),
1585           _locposy(0),
1586           _locposz(0),
1587           _locdirx(0),
1588           _locdiry(0),
1589           _locdirz(0),
1590           _locdirtheta(0),
1591           _locdirphi(0),
1592           _exitpointx(0),
1593           _exitpointy(0),
1594           _exitpointz(0),
1595           _entrypointx(0),
1596           _entrypointy(0),
1597           _entrypointz(0),
1598           _enloss(0),
1599           _tof(0) {}
1600 
1601     unsigned int _detUnitId;
1602     float _trackId;
1603     float _processType;
1604     float _particleType;
1605     float _pabs;
1606     float _globposz;
1607     float _globposphi;
1608     float _globposeta;
1609     float _locposx;
1610     float _locposy;
1611     float _locposz;
1612     float _locdirx;
1613     float _locdiry;
1614     float _locdirz;
1615     float _locdirtheta;
1616     float _locdirphi;
1617     float _exitpointx;
1618     float _exitpointy;
1619     float _exitpointz;
1620     float _entrypointx;
1621     float _entrypointy;
1622     float _entrypointz;
1623     float _enloss;
1624     float _tof;
1625   };
1626 
1627   typedef std::vector<Vtx> VtxVector;
1628   typedef std::vector<Trk> TrkVector;
1629 
1630   typedef std::vector<CSC> CSCVector;
1631   typedef std::vector<DT> DTVector;
1632   typedef std::vector<RPC> RPCVector;
1633 
1634   /// put functions
1635 
1636   void putRawGenPart(int n);
1637 
1638   void putG4Vtx(const std::vector<float>& x, const std::vector<float>& y, const std::vector<float>& z);
1639   void putG4Trk(const std::vector<float>& pt,
1640                 const std::vector<float>& e,
1641                 const std::vector<float>& eta,
1642                 const std::vector<float>& phi);
1643 
1644   void putCSCHits(const std::vector<int>& _cscId,
1645                   const std::vector<unsigned int>& _detUnitId,
1646                   const std::vector<float>& _trackId,
1647                   const std::vector<float>& _processType,
1648                   const std::vector<float>& _particleType,
1649                   const std::vector<float>& _pabs,
1650                   const std::vector<float>& _globposz,
1651                   const std::vector<float>& _globposphi,
1652                   const std::vector<float>& _globposeta,
1653                   const std::vector<float>& _locposx,
1654                   const std::vector<float>& _locposy,
1655                   const std::vector<float>& _locposz,
1656                   const std::vector<float>& _locdirx,
1657                   const std::vector<float>& _locdiry,
1658                   const std::vector<float>& _locdirz,
1659                   const std::vector<float>& _locdirtheta,
1660                   const std::vector<float>& _locdirphi,
1661                   const std::vector<float>& _exitpointx,
1662                   const std::vector<float>& _exitpointy,
1663                   const std::vector<float>& _exitpointz,
1664                   const std::vector<float>& _entrypointx,
1665                   const std::vector<float>& _entrypointy,
1666                   const std::vector<float>& _entrypointz,
1667                   const std::vector<float>& _enloss,
1668                   const std::vector<float>& _tof);
1669 
1670   void putDTHits(const std::vector<unsigned int>& _detUnitId,
1671                  const std::vector<float>& _trackId,
1672                  const std::vector<float>& _processType,
1673                  const std::vector<float>& _particleType,
1674                  const std::vector<float>& _pabs,
1675                  const std::vector<float>& _globposz,
1676                  const std::vector<float>& _globposphi,
1677                  const std::vector<float>& _globposeta,
1678                  const std::vector<float>& _locposx,
1679                  const std::vector<float>& _locposy,
1680                  const std::vector<float>& _locposz,
1681                  const std::vector<float>& _locdirx,
1682                  const std::vector<float>& _locdiry,
1683                  const std::vector<float>& _locdirz,
1684                  const std::vector<float>& _locdirtheta,
1685                  const std::vector<float>& _locdirphi,
1686                  const std::vector<float>& _exitpointx,
1687                  const std::vector<float>& _exitpointy,
1688                  const std::vector<float>& _exitpointz,
1689                  const std::vector<float>& _entrypointx,
1690                  const std::vector<float>& _entrypointy,
1691                  const std::vector<float>& _entrypointz,
1692                  const std::vector<float>& _enloss,
1693                  const std::vector<float>& _tof);
1694 
1695   void putRPCHits(const std::vector<unsigned int>& _detUnitId,
1696                   const std::vector<float>& _trackId,
1697                   const std::vector<float>& _processType,
1698                   const std::vector<float>& _particleType,
1699                   const std::vector<float>& _pabs,
1700                   const std::vector<float>& _globposz,
1701                   const std::vector<float>& _globposphi,
1702                   const std::vector<float>& _globposeta,
1703                   const std::vector<float>& _locposx,
1704                   const std::vector<float>& _locposy,
1705                   const std::vector<float>& _locposz,
1706                   const std::vector<float>& _locdirx,
1707                   const std::vector<float>& _locdiry,
1708                   const std::vector<float>& _locdirz,
1709                   const std::vector<float>& _locdirtheta,
1710                   const std::vector<float>& _locdirphi,
1711                   const std::vector<float>& _exitpointx,
1712                   const std::vector<float>& _exitpointy,
1713                   const std::vector<float>& _exitpointz,
1714                   const std::vector<float>& _entrypointx,
1715                   const std::vector<float>& _entrypointy,
1716                   const std::vector<float>& _entrypointz,
1717                   const std::vector<float>& _enloss,
1718                   const std::vector<float>& _tof);
1719 
1720   /// get functions
1721 
1722   int getnRawGenPart() { return nRawGenPart; }
1723   int getnG4Vtx() { return nG4Vtx; }
1724   int getnG4Trk() { return nG4Trk; }
1725 
1726   VtxVector getG4Vtx() { return G4Vtx; }
1727   TrkVector getG4Trk() { return G4Trk; }
1728 
1729   int getnCSCHits() { return nCSCHits; }
1730   CSCVector getCSCHits() { return CSCHits; }
1731 
1732   int getnDTHits() { return nDTHits; }
1733   DTVector getDTHits() { return DTHits; }
1734 
1735   int getnRPCHits() { return nRPCHits; }
1736   RPCVector getRPCHits() { return RPCHits; }
1737 
1738 private:
1739   /// G4MC info
1740 
1741   int nRawGenPart;
1742   int nG4Vtx;
1743   VtxVector G4Vtx;
1744   int nG4Trk;
1745   TrkVector G4Trk;
1746 
1747   /// Hit info
1748 
1749   int nCSCHits;
1750   CSCVector CSCHits;
1751 
1752   int nDTHits;
1753   DTVector DTHits;
1754 
1755   int nRPCHits;
1756   RPCVector RPCHits;
1757 };
1758 
1759 #endif
1760 
1761 ///////////////////////////////////////////////////////////////////////////////
1762 // PTrackerSimHit
1763 ///////////////////////////////////////////////////////////////////////////////
1764 
1765 #ifndef PTrackerSimHit_h
1766 #define PTrackerSimHit_h
1767 
1768 #include <vector>
1769 #include <memory>
1770 
1771 class PTrackerSimHit {
1772 public:
1773   PTrackerSimHit() : nRawGenPart(0), nG4Vtx(0), nG4Trk(0), nHits(0) {}
1774   virtual ~PTrackerSimHit() {}
1775 
1776   struct Vtx {
1777     Vtx() : x(0), y(0), z(0) {}
1778     float x;
1779     float y;
1780     float z;
1781   };
1782 
1783   struct Trk {
1784     Trk() : pt(0), e(0), eta(0), phi(0) {}
1785     float pt;
1786     float e;
1787     float eta;
1788     float phi;
1789   };
1790 
1791   struct Hit {
1792     Hit()
1793         : _sysID(0),
1794           _detUnitId(0),
1795           _trackId(0),
1796           _processType(0),
1797           _particleType(0),
1798           _pabs(0),
1799           _lpx(0),
1800           _lpy(0),
1801           _lpz(0),
1802           _ldx(0),
1803           _ldy(0),
1804           _ldz(0),
1805           _ldtheta(0),
1806           _ldphi(0),
1807           _exx(0),
1808           _exy(0),
1809           _exz(0),
1810           _enx(0),
1811           _eny(0),
1812           _enz(0),
1813           _eloss(0),
1814           _tof(0) {}
1815     int _sysID;
1816     float _detUnitId;
1817     float _trackId;
1818     float _processType;
1819     float _particleType;
1820     float _pabs;
1821     float _lpx;
1822     float _lpy;
1823     float _lpz;
1824     float _ldx;
1825     float _ldy;
1826     float _ldz;
1827     float _ldtheta;
1828     float _ldphi;
1829     float _exx;
1830     float _exy;
1831     float _exz;
1832     float _enx;
1833     float _eny;
1834     float _enz;
1835     float _eloss;
1836     float _tof;
1837   };
1838 
1839   typedef std::vector<Vtx> VtxVector;
1840   typedef std::vector<Trk> TrkVector;
1841   typedef std::vector<Hit> HitVector;
1842 
1843   // put functions
1844   void putRawGenPart(int n);
1845   void putG4Vtx(const std::vector<float>& x, const std::vector<float>& y, const std::vector<float>& z);
1846   void putG4Trk(const std::vector<float>& pt,
1847                 const std::vector<float>& e,
1848                 const std::vector<float>& eta,
1849                 const std::vector<float>& phi);
1850   void putHits(const std::vector<int>& _sysID,
1851                const std::vector<float>& _detUnitId,
1852                const std::vector<float>& _trackId,
1853                const std::vector<float>& _processType,
1854                const std::vector<float>& _particleType,
1855                const std::vector<float>& _pabs,
1856                const std::vector<float>& _lpx,
1857                const std::vector<float>& _lpy,
1858                const std::vector<float>& _lpz,
1859                const std::vector<float>& _ldx,
1860                const std::vector<float>& _ldy,
1861                const std::vector<float>& _ldz,
1862                const std::vector<float>& _ldtheta,
1863                const std::vector<float>& _ldphi,
1864                const std::vector<float>& _exx,
1865                const std::vector<float>& _exy,
1866                const std::vector<float>& _exz,
1867                const std::vector<float>& _enx,
1868                const std::vector<float>& _eny,
1869                const std::vector<float>& _enz,
1870                const std::vector<float>& _eloss,
1871                const std::vector<float>& _tof);
1872 
1873   // get functions
1874   int getnRawGenPart() { return nRawGenPart; }
1875   int getnG4Vtx() { return nG4Vtx; }
1876   VtxVector getG4Vtx() { return G4Vtx; }
1877   int getnG4Trk() { return nG4Trk; }
1878   TrkVector getG4Trk() { return G4Trk; }
1879   int getnHits() { return nHits; }
1880   HitVector getHits() { return Hits; }
1881 
1882 private:
1883   // G4MC info
1884   int nRawGenPart;
1885   int nG4Vtx;
1886   VtxVector G4Vtx;
1887   int nG4Trk;
1888   TrkVector G4Trk;
1889   // Tracker info
1890   int nHits;
1891   HitVector Hits;
1892 
1893 };  // end class declaration
1894 
1895 #endif
1896 
1897 #endif  // endif PValidationFormats_h