Main Page | Compound List | File List | Compound Members | File Members | Related Pages

McTkrStrip.cxx

Go to the documentation of this file.
00001 #include <mcRootData/McTkrStrip.h>
00002 #include <commonRootData/RootDataUtil.h>
00003 #include "Riostream.h"
00004 
00005 #include "McObjectManager.h"
00006 
00007 ClassImp(McTkrStrip)
00008 
00009 McTkrStrip::McTkrStrip(const VolumeIdentifier& id, UInt_t strip, Double_t e,
00010          Bool_t noise, Double_t deltaX, Double_t deltaY, TRefArray* hitList)
00011         : m_planeId(id)
00012         , m_strip(strip)
00013         , m_energy(e)
00014         , m_noise(noise)
00015         , m_deltaX(deltaX)
00016         , m_deltaY(deltaY) 
00017 {
00018     m_hits.Clear();
00019     if (hitList) 
00020     {
00021         for(int idx=0; idx < hitList->GetEntries(); idx++)
00022             m_hits.Add(hitList->At(idx));
00023     }
00024 };
00025 
00026 McTkrStrip::McTkrStrip()
00027         : m_strip(0)
00028         , m_energy(0)
00029         , m_noise(false)
00030         , m_deltaX(0.)
00031         , m_deltaY(0.) 
00032 {
00033     m_hits.Clear();
00034 };
00035 
00036 McTkrStrip::~McTkrStrip()
00037 {
00038     Clear();
00039 }
00040     
00041 void McTkrStrip::initialize(const VolumeIdentifier& id, UInt_t strip, Double_t e,
00042          Bool_t noise, Double_t deltaX, Double_t deltaY, TRefArray* hitList)
00043 {
00044     m_planeId = id;
00045     m_strip   = strip;
00046     m_energy  = e;
00047     m_noise   = noise;
00048     m_deltaX  = deltaX;
00049     m_deltaY  = deltaY;
00050 
00051     m_hits.Clear();
00052     if (hitList) 
00053     {
00054         for(int idx=0; idx < hitList->GetEntries(); idx++)
00055             m_hits.Add(hitList->At(idx));
00056     }
00057 };
00058 
00059 void McTkrStrip::Clear(Option_t *)
00060 {
00061     m_hits.Clear();
00062 }
00063 
00064 void McTkrStrip::Print(Option_t *option) const {
00065     using namespace std;
00066     TObject::Print(option);
00067     m_planeId.Print(option);
00068     std::cout.precision(2);
00069     std::cout << "Strip #" << m_strip << ", deposited energy=" << m_energy << std::endl;
00070 }

Generated on Tue Dec 11 16:28:53 2007 by doxygen 1.3.3