00001 #ifndef TMBL2BASE_H_ 00002 #define TMBL2BASE_H_ 00003 00005 // 00006 // Purpose: This is the header file that defines a base class to help 00007 // fill the tuple correctly with L2 objects. 00008 // 00009 // Author: Yann Coadou 00010 // Date: 19 April 2004 00011 // 00013 00014 00015 #include "TObject.h" 00016 #include <cmath> 00017 00022 class TMBL2Base : public TObject 00023 { 00024 public: 00025 TMBL2Base(); //constructor 00026 TMBL2Base(const TMBL2Base&); //copy constructor 00027 00028 ~TMBL2Base() {;} //destructor 00029 00031 00032 void Et(float x) {et = x;} 00033 void iEta(int x) {ieta = x;} 00034 void iPhi(int x) {iphi = x;} 00036 00038 00039 float Et() const {return et;} 00040 float Pt() const { return et; } 00041 int iEta() const {return ieta;} 00042 int iPhi() const {return iphi;} 00043 float Eta() const {return ieta*0.05 - 3.975;} 00044 float Phi() const {return (0.5+iphi)*M_PI/80.;} 00045 00046 float Px() const {return et * std::cos(Phi());} 00047 float Py() const {return et * std::sin(Phi());} 00048 float Pz() const {return et * std::sinh(Eta());} 00049 float E() const {return et * std::cosh(Eta());} 00051 protected: 00052 float et; 00053 int ieta; 00054 int iphi; 00055 00056 ClassDef(TMBL2Base,1) 00057 00058 }; //end of class TMBL2Base 00059 #endif // TMBL2BASE_H_
1.3.4