Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:30:52

0001 #ifndef SimPPS_RPDigiProducer_RP_ENERGY_DEPOSIT_UNIT_H
0002 #define SimPPS_RPDigiProducer_RP_ENERGY_DEPOSIT_UNIT_H
0003 
0004 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
0005 #include "DataFormats/GeometryVector/interface/LocalVector.h"
0006 
0007 /**
0008  * Class which allows to "follow" an elementary charge in the silicon.
0009  * It basically defines a quantum of energy, with a position.
0010  */
0011 class RPEnergyDepositUnit {
0012 public:
0013   RPEnergyDepositUnit() : energy_(0), position_(0, 0, 0) {}
0014   RPEnergyDepositUnit(double energy, double x, double y, double z) : energy_(energy), position_(x, y, z) {}
0015   RPEnergyDepositUnit(double energy, const Local3DPoint& position) : energy_(energy), position_(position) {}
0016   inline double Energy() const { return energy_; }
0017   inline const Local3DPoint& Position() const { return position_; }
0018 
0019   inline void setEnergy(double e) { energy_ = e; }
0020   inline void setPosition(Local3DPoint p) { position_ = p; }
0021 
0022 private:
0023   double energy_;
0024   Local3DPoint position_;
0025 };
0026 
0027 #endif  //SimPPS_RPDigiProducer_RP_ENERGY_DEPOSIT_UNIT_H