EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
tofBarrel.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file tofBarrel.h
1 #ifndef __TOFBARREL_H__
2 #define __TOFBARREL_H__
3 
4 //
5 // Hello tofBarrel Fans:
6 //
7 // This is an example class that inherits from the PID base class.
8 // We shall implement all the necessary functions as required by the
9 // base class.
10 //
11 // The UNIQUE identifiers for this class are radius, eta extent, and
12 // time resolution.
13 //
14 // Note that in keeping with any well written base class, we shall
15 // give default values to all the constructor arguments.
16 //
17 // This routine assumes units of cm for distances and picoSeconds for time.
18 //
19 
21 
22 class tofBarrel: public PID
23 {
24 public:
25  tofBarrel(double radius=100, double etaLow=-1.0, double etaHigh=1.0, double sigmaT=10);
26  virtual ~tofBarrel() {}
27 
28  bool valid (double eta, double p) {return (eta>etaLow && eta<etaHigh);}
29  double numSigma(double eta, double p, PID::type PID);
30  double maxP (double eta, double numSigma, PID::type PID);
31  double minP (double eta, double numSigma, PID::type PID) {return 0;}
32  std::string name () {return myName;}
33  void description ();
34 
35 protected:
36  std::string myName;
37 
38  // utility function
39  double tof(double L, double p, double m);
40 
41  // TOF wall parameters
42  double radius; // cm
43  double etaLow;
44  double etaHigh;
45  double sigmaT; // picosecond
46 
47  // Physical constants (should come from elsewhere!)
48  double mPion; // GeV/c^2
49  double mKaon; // GeV/c^2
50  double mProton; // GeV/c^2
51  double c; // cm/picosecond;
52 };
53 
54 #endif /* __PID_H__ */