Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

TMBLum.cpp

Go to the documentation of this file.
00001 #include "tmb_tree/TMBLum.hpp"
00002 
00003 ClassImp(TMBLum)
00004 
00005   TMBLum::TMBLum() { _id = 0; _charge = 0;  _time = 0; _slew=0; _range=0; }
00006 
00007 TMBLum::TMBLum(Int_t id, Int_t charge, Int_t time, Int_t slew, Int_t range, Int_t tc){
00008   _id = id;
00009   _tc = tc;
00010   //  _charge = charge;
00011   _time = time;
00012   _slew = slew;
00013   _range = range;
00014 
00015   if (range == 0)
00016     {
00017       _charge = -2000 + 100 * charge;
00018     }
00019   else if (range == 1)
00020     {
00021       _charge = 10800 + 200 * charge;
00022     }
00023   else if (range == 2)
00024     {
00025       _charge = 36400 + 400 * charge;
00026     }
00027   else if (range == 3)
00028     {
00029       _charge = 87600 + 800 * charge;
00030     }
00031   else
00032     {
00033       _charge = -999;
00034     }
00035 
00036 }
00037   
00038 TMBLum::TMBLum(Int_t id, Float_t charge, Float_t time, Float_t slew, Float_t range, Float_t tc){
00039   Int_t Range = (Int_t)range;
00040   _id = (Int_t)id;
00041   // _charge = (Int_t)(charge*1000.0);
00042   _time = (Int_t)time;
00043   _slew = (Int_t)slew;
00044   _tc   = (Int_t)tc;
00045   _range = Range;
00046   if (Range == 0)
00047     {
00048       _charge = -2000 + 100 * (Int_t) charge;
00049     }
00050   else if (Range == 1)
00051     {
00052       _charge = 10800 + 200 * (Int_t) charge;
00053     }
00054   else if (Range == 2)
00055     {
00056       _charge = 36400 + 400 * (Int_t) charge;
00057     }
00058   else if (Range == 3)
00059     {
00060       _charge = 87600 + 800 * (Int_t) charge;
00061     }
00062   else
00063     {
00064       _charge = -999;
00065     }
00066 }
00067 
00068 
00069 Float_t TMBLum::phi() const {
00070   Float_t phi=-999.0;
00071   if (_id<17)
00072     phi = (16-_id)*15;
00073   else if (_id < 24)
00074     phi = (24-_id)*15+16*15;
00075   else if (_id < 44)
00076     phi = (43-_id)*15;
00077   else if (_id < 48)
00078     phi = (48-_id)*15+19*15;
00079  ;
00080   return phi;
00081 }
00082 
00083 
00084 
00085 
00086 

Generated on Tue Mar 28 10:13:05 2006 for CAF by doxygen 1.3.4