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

UberMC.cxx

Go to the documentation of this file.
00001 #include "TObject.h"
00002 #include "TClonesArray.h"
00003 #include "MessageService/MsgService.h"
00004 #include "CalDetDST/UberMCHit.h"
00005 #include "CalDetDST/UberMC.h"
00006 
00007 ClassImp(UberMC)
00008 CVSID("$Id: UberMC.cxx,v 1.2 2003/05/06 22:08:50 vahle Exp $");
00009 using namespace std;
00010 
00011 TClonesArray *UberMC::fgmchitlist = 0;
00012 //________________________________________________________________________________
00013 UberMC::UberMC():
00014   mctype(0),
00015   mcpx(0.),
00016   mcpy(0.),
00017   mcpz(0.),
00018   mcenergy(0.),
00019   mcenergydep(0.),
00020   mcvx(0.),
00021   mcvy(0.),
00022   mcvz(0.),
00023   nhep(0),
00024   stdheplist()
00025 {
00026   if(!fgmchitlist){
00027     fgmchitlist = new TClonesArray("UberMCHit",1440);
00028   }
00029   mchitlist = fgmchitlist;
00030 
00031 }//end UberMC()
00032 //________________________________________________________________________________
00033 UberMC::~UberMC()
00034 {
00035   mchitlist->Clear();
00036 }
00037 //________________________________________________________________________________
00038 void UberMC::ResetEvent()
00039 {
00040   MSG("UberMC",Msg::kDebug)<<"In UberMC ResetEvent"<<endl;
00041   mchitlist->Clear();
00042 //  stdheplist->Clear();
00043   fmchitindex=0;
00044 
00045   mctype=0;
00046   mcpx=0.;
00047   mcpy=0.;
00048   mcpz=0.;
00049   mcenergy=0.;
00050   mcenergydep=0.;
00051   mcvx=0.;
00052   mcvy=0.;
00053   mcvz=0.;
00054   nhep=0;
00055 }//end ResetEvent()
00056 //________________________________________________________________________________
00057 void UberMC::AddNextHit(UShort_t p, UShort_t s)
00058 {
00059   MSG("UberMC",Msg::kDebug)<<"In UberMC AddNextHit"<<endl;
00060   new((*mchitlist)[fmchitindex]) UberMCHit();
00061   UberMCHit *mcuh = static_cast<UberMCHit *>((*mchitlist)[fmchitindex]);
00062   mcuh->SetPlaneStrip(p,s);
00063   fmchitindex++;
00064   return;
00065 
00066 }//end AddNextHit()
00067 //________________________________________________________________________________
00068 void UberMC::AddNextHitValues(Int_t hb, Float_t edep, Float_t tpos, Float_t praw,
00069                  Float_t nraw, Float_t pcorr, Float_t ncorr, Float_t ptdc,
00070                  Float_t ntdc, Float_t pdist, Float_t ndist)
00071 {
00072   MSG("UberMC",Msg::kDebug)<<"In UberMC AddnextHitValues"<<endl;
00073   UberMCHit *mcuh = static_cast<UberMCHit *>((*mchitlist)[fmchitindex-1]);
00074   mcuh->AddValues(hb,edep,tpos,praw,nraw,pcorr,ncorr,ptdc,ntdc,pdist,ndist);
00075   return;
00076 }//end AddNextHitValues()
00077 //_________________________________________________________________________________
00078 
00079 
00080 
00081 
00082 
00083 
00084 
00085 
00086 
00087 
00088 

Generated on Mon Feb 15 11:07:47 2010 for loon by  doxygen 1.3.9.1