![]() |
|
|||
File indexing completed on 2023-03-17 11:11:05
0001 //------------------------------------------------- 0002 // 0003 /** \class DTBtiHit 0004 * 0005 * A class for hits in a drift cell 0006 * 0007 * 0008 * 0009 * \author C. Grandi, S. Vanini 0010 * Modifications: 0011 * 28/X/02 S.Vanini: tshift=425 included in register 0012 * 1/IV/03 SV time in clock units included: _clockTime 0013 * --> operation with drift time are commented 0014 * 22/VI/04 SV: last trigger code update 0015 * 15/I/07 SV : new config update 0016 */ 0017 // 0018 //-------------------------------------------------- 0019 #ifndef DT_BTI_HIT_H 0020 #define DT_BTI_HIT_H 0021 0022 //------------------------------------ 0023 // Collaborating Class Declarations -- 0024 //------------------------------------ 0025 class DTDigi; 0026 0027 //---------------------- 0028 // Base Class Headers -- 0029 //---------------------- 0030 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfig.h" 0031 #include "L1TriggerConfig/DTTPGConfig/interface/DTConfigBti.h" 0032 0033 //--------------- 0034 // C++ Headers -- 0035 //--------------- 0036 #include <cmath> 0037 #include <string> 0038 0039 // --------------------- 0040 // -- Class Interface -- 0041 // --------------------- 0042 0043 class DTBtiHit { 0044 public: 0045 /// Constructor 0046 DTBtiHit(const DTDigi*, DTConfigBti*); 0047 0048 /// Constructor from clock times 0049 DTBtiHit(int clockTime, DTConfigBti*); 0050 0051 /// Copy constructor 0052 DTBtiHit(const DTBtiHit&); 0053 0054 /// Destructor 0055 ~DTBtiHit(); 0056 0057 /// Assignment operator 0058 DTBtiHit& operator=(const DTBtiHit&); 0059 0060 /// Move the hit forward in time one step 0061 inline void stepDownTime() { //_curTime-=_stepTime; 0062 _clockTime -= 1; 0063 } 0064 0065 /// Return the associated DTDigi 0066 inline const DTDigi* hitDigi() const { return _hitdigi; } 0067 0068 /// Return the current time 0069 /*! hits with curTime >0 correspond to avalanches drifting to wires 0070 <0 " " signals already in the registers 0071 SV curTime=4000 if digis are given in clock units.... 0072 */ 0073 inline float curTime() const { return _curTime; } 0074 inline int clockTime() const { return _clockTime; } 0075 0076 //! true if avalanche is still drifting 0077 inline int isDrifting() const { //return _curTime>=0 && _curTime<4000; 0078 return _clockTime > 1 && _clockTime < 400; 0079 } 0080 0081 //! true if signal is in the registers 0082 //SV jtrig()=_config->ST() added: is for tdrift==0 0083 inline int isInsideReg() const { 0084 //return _curTime<0 && jtrig()<=_config->ST(); 0085 return (_clockTime <= 0 && jtrig() <= _config->ST()); //SV bug fix 17XII03 0086 } 0087 0088 //! position in registers 0089 inline int jtrig() const { 0090 //return (int)(fabs(_curTime)/_stepTime); 0091 return -_clockTime; 0092 } 0093 //inline float jtrig() const { return fabs(_curTime)/_stepTime; } //prova SV 0094 //SV 13/XI/02 half-int simulation added 0095 /*inline float jtrig() const { 0096 int idt = int(fabs(_curTime/_stepTime)); 0097 float rest = fmod( fabs(_curTime), _stepTime ); 0098 int irest = 0; 0099 if(rest==0.0) 0100 irest = 1; 0101 else 0102 irest = int( rest / (_stepTime*0.5) ); 0103 float jtrig_int4 = float(idt) + float(irest)*0.5; 0104 return jtrig_int4; 0105 } 0106 */ 0107 0108 public: 0109 static const float _stepTime; 0110 static const float _stepTimeTdc; 0111 static std::string t0envFlag; 0112 0113 private: 0114 const DTDigi* _hitdigi; 0115 DTConfigBti* _config; 0116 float _curTime; 0117 int _clockTime; 0118 }; 0119 0120 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.2.1 LXR engine. The LXR team |
![]() ![]() |