Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:29:43

0001 #ifndef RPCOBJECTS_RPCDIGISIMLINK_H
0002 #define RPCOBJECTS_RPCDIGISIMLINK_H
0003 
0004 #include <map>
0005 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
0006 #include "DataFormats/GeometryVector/interface/LocalVector.h"
0007 #include "SimDataFormats/EncodedEventId/interface/EncodedEventId.h"
0008 
0009 class RPCDigiSimLink {
0010 public:
0011   RPCDigiSimLink(std::pair<unsigned int, int> digi,
0012                  Local3DPoint entryPoint,
0013                  LocalVector momentumAtEntry,
0014                  float timeOfFlight,
0015                  float energyLoss,
0016                  int particleType,
0017                  unsigned int detUnitId,
0018                  unsigned int trackId,
0019                  EncodedEventId eventId,
0020                  unsigned short processType) {
0021     _entryPoint = entryPoint;
0022     _momentumAtEntry = momentumAtEntry;
0023     _timeOfFlight = timeOfFlight;
0024     _energyLoss = energyLoss;
0025     _particleType = particleType;
0026     _detUnitId = detUnitId;
0027     _trackId = trackId;
0028     _eventId = eventId;
0029     _processType = processType;
0030     _digi = digi;
0031   }
0032 
0033   RPCDigiSimLink() { ; }
0034 
0035   ~RPCDigiSimLink() { ; }
0036 
0037   unsigned int getStrip() const { return _digi.first; }
0038   unsigned int getBx() const { return _digi.second; }
0039   Local3DPoint getEntryPoint() const { return _entryPoint; }
0040   LocalVector getMomentumAtEntry() const { return _momentumAtEntry; }
0041   float getTimeOfFlight() const { return _timeOfFlight; }
0042   float getEnergyLoss() const { return _energyLoss; }
0043   int getParticleType() const { return _particleType; }
0044   unsigned int getDetUnitId() const { return _detUnitId; }
0045   unsigned int getTrackId() const { return _trackId; }
0046   EncodedEventId getEventId() const { return _eventId; }
0047   unsigned short getProcessType() const { return _processType; }
0048 
0049   inline bool operator<(const RPCDigiSimLink& other) const { return getStrip() < other.getStrip(); }
0050 
0051 private:
0052   std::pair<unsigned int, int> _digi;
0053 
0054   Local3DPoint _entryPoint;
0055   LocalVector _momentumAtEntry;
0056   float _timeOfFlight;
0057   float _energyLoss;
0058   int _particleType;
0059   unsigned int _detUnitId;
0060   unsigned int _trackId;
0061   EncodedEventId _eventId;
0062   unsigned short _processType;
0063 };
0064 #endif