00001 00002 // 00003 // Purpose: This is the header file that defines a base class to help 00004 // fill the tuple correctly with TMBL3 objects. 00005 // 00006 // Author: Yann Coadou 00007 // Date: 24 March 2004 00008 // 00010 00011 #ifndef TMBL3BASE_H_ 00012 #define TMBL3BASE_H_ 00013 00014 #include "TObject.h" 00015 #include <string> 00016 #include <cmath> 00017 00022 class TMBL3Base : public TObject 00023 { 00024 public: 00025 TMBL3Base(); //constructor 00026 TMBL3Base(const TMBL3Base&); //copy constructor 00027 00028 ~TMBL3Base() {;} //destructor 00029 00030 // setters 00031 void Et(float x) {et = x;} 00032 void Eta(float x) {eta = x;} 00033 void DetEta(float x) { deteta = x; } 00034 void Phi(float x) {phi = x;} 00035 void ToolName(const std::string &x) {toolname = x;} 00036 00037 // accessors 00038 std::string ToolName() const {return toolname;} 00039 float Et() const {return et;} 00040 float Pt() const { return et;} 00041 float Eta() const {return eta;} 00042 float DetEta() const { return deteta; } 00043 float Phi() const {return phi;} 00044 float Px() const {return et * std::cos(phi);} 00045 float Py() const {return et * std::sin(phi);} 00046 float Pz() const {return et * std::sinh(eta);} 00047 float E() const {return et * std::cosh(eta);} 00048 00049 00050 //private: 00051 protected: 00052 float et; 00053 float eta; 00054 float deteta; 00055 float phi; 00056 std::string toolname; 00057 00058 ClassDef(TMBL3Base,1) 00059 00060 }; //end of class TMBL3Base 00061 #endif // TMBL3BASE_H_
1.3.4