Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-09-27 07:03:44

0001 
0002 #ifndef _DELPHES_CONFIG_TOF_
0003 #define _DELPHES_CONFIG_TOF_
0004 
0005 #include "DelphesConfig.h"
0006 
0007 class DelphesConfigTOF: public DelphesConfig {
0008  public:
0009  DelphesConfigTOF(const char *dname): DelphesConfig(dname), 
0010     m_T0Resolution(0.0), m_DetectorResolution(0.0), m_InstallationRadius(0.0),
0011     m_EtaMin(0.0), m_EtaMax(0.0), m_MomentumMin(0.0), m_MomentumMax(0.0),
0012     m_EtaBinCount(0), m_MomentumBinCount(0), m_MagneticField(0.0), 
0013     m_MomentumResolutionA(0.0), m_MomentumResolutionB(0.0), m_PathLengthResolution(0.0) {};
0014   ~DelphesConfigTOF() {};
0015   
0016   void SetT0Resolution        (double value)     { m_T0Resolution         = value; }
0017   // Assume a constant one; [mm];
0018   void SetPathLengthResolution(double value)     { m_PathLengthResolution = value; }
0019   // dp/p ~ a*p + b; either in momentum or in Pt;
0020   void SetMomentumResolution(double a, double b) { 
0021     m_MomentumResolutionA = a; m_MomentumResolutionB = b;
0022   };
0023   void SetDetectorResolution  (double value)     { m_DetectorResolution   = value; }
0024   void SetInstallationRadius  (double value)     { m_InstallationRadius   = value; }
0025   void SetMagneticField       (double value)     { m_MagneticField        = value; }
0026   // Well, would be more natural to give Z-range along the beam line;
0027   void SetEtaRange(double min, double max, unsigned ebins) {
0028     m_EtaMin = min;
0029     m_EtaMax = max;
0030     m_EtaBinCount = ebins;
0031   };  
0032   void SetMomentumRange(double min, double max, unsigned ebins) {
0033     m_MomentumMin = min;
0034     m_MomentumMax = max;
0035     m_MomentumBinCount = ebins;
0036   };   
0037 
0038   // TOF-specific call (input parameters -> sigma counts);
0039   int DoSigmaCalculations( void );
0040 
0041   // In this case TOF measurement always exists -> no zero entries expected;
0042   //bool ApplyThresholdModeLogic() { return false; };
0043   // Generic call (sigma -> efficiency);
0044   int Calculate();
0045   
0046  private:
0047   double m_T0Resolution, m_DetectorResolution, m_InstallationRadius;
0048   double m_EtaMin, m_EtaMax;
0049   double m_MomentumMin, m_MomentumMax;
0050   unsigned m_EtaBinCount, m_MomentumBinCount;
0051   double m_MagneticField;
0052 
0053   double m_MomentumResolutionA, m_MomentumResolutionB, m_PathLengthResolution;
0054 
0055   double tof(double m, double p, double l);
0056 
0057   ClassDef(DelphesConfigTOF, 1)
0058 };
0059 
0060 #endif