Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Basic.cxx

Go to the documentation of this file.
00001 // $Id: Basic.cxx,v 1.11 2009/10/15 18:30:13 jyuko Exp $
00002 
00003 // C++
00004 #include <cmath>
00005 #include <iostream>
00006 
00007 // Local
00008 #include "PhysicsNtuple/Basic.h"
00009 
00010 using namespace std;
00011 
00012 //-------------------------------------------------------------------
00013 Anp::Basic::Basic()
00014    :nustrip(0),
00015     nvstrip(0),
00016     nuplane(0),
00017     nvplane(0),
00018     beg_uplane(0),
00019     beg_vplane(0),
00020     end_uplane(0),
00021     end_vplane(0),
00022     adcu(-1.0e6),
00023     adcv(-1.0e6),
00024     pe(-1.0e6),
00025     sigcoru(-1.0e6),
00026     sigcorv(-1.0e6),
00027     siglin(-1.0e6),
00028     sigmap(-1.0e6),
00029     mip(-1.0e6),
00030     active_frac(-1.0e6),
00031     max_time(-1.0e6),
00032     min_time(-1.0e6)
00033 {
00034    //
00035    // !!!FillHeader expects that adcu, adcv, sigcoru and sigcorv are set to 0!!!
00036    //
00037 }
00038 
00039 //-------------------------------------------------------------------
00040 Anp::Basic::~Basic()
00041 {
00042 }
00043 
00044 //----------------------------------------------------------------------
00045 void Anp::Basic::Clear()
00046 {
00047    nustrip = 0;
00048    nvstrip = 0;
00049 
00050    nuplane = 0;
00051    nvplane = 0;
00052 
00053    beg_uplane = 0;
00054    beg_vplane = 0;
00055    end_uplane = 0;
00056    end_vplane = 0;
00057 
00058    adcu    = -1.0e6;
00059    adcv    = -1.0e6;
00060    pe      = -1.0e6;
00061    sigcoru = -1.0e6;
00062    sigcorv = -1.0e6;
00063    siglin  = -1.0e6;
00064    sigmap  = -1.0e6;
00065    mip     = -1.0e6;
00066 
00067    active_frac = -1.0e6;
00068 
00069    max_time = -1.0e6;
00070    min_time = -1.0e6;
00071 }
00072 
00073 //----------------------------------------------------------------------
00074 short Anp::Basic::BegPlane() const
00075 {
00076    return std::min<short>(beg_vplane, beg_uplane);
00077 }
00078 
00079 //----------------------------------------------------------------------
00080 short Anp::Basic::EndPlane() const
00081 {
00082    return std::max<short>(end_vplane, end_uplane);
00083 }
00084 
00085 //----------------------------------------------------------------------
00086 void Anp::Basic::Print(std::ostream& o) const
00087 {
00088    o << "Basic::Print" << endl
00089      << "   all plane (n, beg, end) = ("
00090      << NPlane() << ", " << BegPlane() << ", " << EndPlane() << ") " << endl
00091      << "   u   plane (n, beg, end) = ("
00092      << NUPlane() << ", " << BegUPlane() << ", " << EndUPlane() << ")"  << endl
00093      << "   v   plane (n, beg, end) = ("
00094      << NVPlane() << ", " << BegVPlane() << ", " << EndVPlane() << ")"  << endl
00095      << "   nstrip (v, u) = (" << nvstrip << ", " << nustrip << ")" << endl
00096      << "   adc    (v, u) = (" << adcv << ", " << adcu << ")" << endl
00097      << "   sigcor (v, u) = (" << sigcorv << ", " << sigcoru << ")" << endl
00098      << "   pe = " << pe << endl
00099      << "   time (beg, end, span) = (" << min_time << ", " << max_time
00100      << ", " << max_time - min_time << ")" << endl;
00101 }

Generated on Mon Feb 15 11:06:23 2010 for loon by  doxygen 1.3.9.1