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

FarDetSliceHandle.cxx

Go to the documentation of this file.
00001 
00002 #include "FarDetSliceHandle.h"
00003 
00004 ClassImp(FarDetSliceHandle)
00005 
00006 FarDetSliceHandle::FarDetSliceHandle()
00007 {
00008 
00009 }
00010   
00011 FarDetSliceHandle::FarDetSliceHandle(const FarDetSliceHandle &csh) :
00012   CandSliceHandle(csh)
00013 {
00014 
00015 }  
00016 
00017 FarDetSliceHandle::FarDetSliceHandle(FarDetSlice *cs) :
00018   CandSliceHandle(cs)
00019 {
00020 
00021 }
00022   
00023 FarDetSliceHandle::~FarDetSliceHandle()
00024 {
00025 
00026 }
00027   
00028 FarDetSliceHandle* FarDetSliceHandle::DupHandle() const
00029 {
00030   return (new FarDetSliceHandle(*this));
00031 }
00032   
00033 void FarDetSliceHandle::Trace(const char* c) const
00034 {
00035   CandHandle::Trace(c);
00036 }
00037 
00038 void FarDetSliceHandle::SetSM1(Double_t* charge, Double_t* xpos, Double_t* ypos, Double_t* zpos)
00039 {
00040   FarDetSlice* myslice = dynamic_cast< FarDetSlice*>(GetOwnedCandBase());
00041   
00042   for(Int_t i=0;i<11;i++){
00043     myslice->fFidChargeSM1[i]=charge[i];
00044     myslice->fMeanXPosSM1[i]=xpos[i];
00045     myslice->fMeanYPosSM1[i]=ypos[i];  
00046     myslice->fMeanZPosSM1[i]=zpos[i];
00047   }
00048 }
00049   
00050 void FarDetSliceHandle::SetSM2(Double_t* charge, Double_t* xpos, Double_t* ypos, Double_t* zpos)
00051 {
00052   FarDetSlice* myslice = dynamic_cast< FarDetSlice*>(GetOwnedCandBase());
00053   
00054   for(Int_t i=0;i<11;i++){
00055     myslice->fFidChargeSM2[i]=charge[i];
00056     myslice->fMeanXPosSM2[i]=xpos[i];
00057     myslice->fMeanYPosSM2[i]=ypos[i];
00058     myslice->fMeanZPosSM2[i]=zpos[i];
00059   }
00060 }
00061 
00062 void FarDetSliceHandle::SetMaxPlaneCharge(Double_t charge)
00063 {
00064   dynamic_cast< FarDetSlice*>(GetOwnedCandBase())->fMaxPlaneCharge=charge;
00065 }
00066   
00067 void FarDetSliceHandle::SetEventId(Int_t id)
00068 {
00069   dynamic_cast< FarDetSlice*>(GetOwnedCandBase())->fEventId=id;
00070 }
00071 
00072 void FarDetSliceHandle::SetEventIdSM1(Int_t idsm1)
00073 {
00074   dynamic_cast< FarDetSlice*>(GetOwnedCandBase())->fEventIdSM1=idsm1;
00075 }
00076 
00077 void FarDetSliceHandle::SetEventIdSM2(Int_t idsm2)
00078 {
00079   dynamic_cast< FarDetSlice*>(GetOwnedCandBase())->fEventIdSM2=idsm2;
00080 }
00081 
00082 void FarDetSliceHandle::SetEventIdX(Int_t idx)
00083 {
00084   dynamic_cast< FarDetSlice*>(GetOwnedCandBase())->fEventIdX=idx;
00085 }
00086 
00087 void FarDetSliceHandle::SetEdgesSM1(Int_t nedges)
00088 {
00089   dynamic_cast< FarDetSlice*>(GetOwnedCandBase())->fEdgesSM1=nedges;
00090 }
00091 
00092 void FarDetSliceHandle::SetEdgesSM2(Int_t nedges)
00093 {
00094   dynamic_cast< FarDetSlice*>(GetOwnedCandBase())->fEdgesSM2=nedges;
00095 }
00096 
00097 void FarDetSliceHandle::SetEdges(Int_t nedges)
00098 {
00099   dynamic_cast< FarDetSlice*>(GetOwnedCandBase())->fEdges=nedges;
00100 }
00101 
00102 void FarDetSliceHandle::SetGoodUPlanes(Int_t uplanes)
00103 {
00104   dynamic_cast< FarDetSlice*>(GetOwnedCandBase())->fGoodUPlanes=uplanes;
00105 }
00106 
00107 void FarDetSliceHandle::SetGoodVPlanes(Int_t vplanes)
00108 { 
00109   dynamic_cast< FarDetSlice*>(GetOwnedCandBase())->fGoodVPlanes=vplanes;
00110 }
00111   
00112 void FarDetSliceHandle::SetGoodPlanes(Int_t nplanes)
00113 {
00114   dynamic_cast< FarDetSlice*>(GetOwnedCandBase())->fGoodPlanes=nplanes;
00115 }
00116 
00117 void FarDetSliceHandle::SetGoodStrips(Int_t nstrips)
00118 {
00119   dynamic_cast< FarDetSlice*>(GetOwnedCandBase())->fGoodStrips=nstrips;
00120 }
00121 
00122 Double_t FarDetSliceHandle::GetFidChargeSM1(Int_t id) const
00123 {
00124   if(id>=0 && id<11){
00125     return dynamic_cast< const FarDetSlice*>(GetCandBase())->fFidChargeSM1[id];
00126   }
00127   else return 0.0;
00128 }
00129   
00130 Double_t FarDetSliceHandle::GetFidChargeSM2(Int_t id) const
00131 {
00132   if(id>=0 && id<11){
00133     return dynamic_cast< const FarDetSlice*>(GetCandBase())->fFidChargeSM2[id];
00134   }
00135   else return 0.0;
00136 } 
00137 
00138 Double_t FarDetSliceHandle::GetMeanXPosSM1(Int_t id) const
00139 {
00140   if(id>=0 && id<11){
00141     return dynamic_cast< const FarDetSlice*>(GetCandBase())->fMeanXPosSM1[id];
00142   }
00143   else return -999.9;
00144 }
00145   
00146 Double_t FarDetSliceHandle::GetMeanXPosSM2(Int_t id) const
00147 {
00148   if(id>=0 && id<11){
00149     return dynamic_cast< const FarDetSlice*>(GetCandBase())->fMeanXPosSM2[id];
00150   }
00151   else return -999.9;
00152 }
00153 
00154 Double_t FarDetSliceHandle::GetMeanYPosSM1(Int_t id) const
00155 {
00156   if(id>=0 && id<11){
00157     return dynamic_cast< const FarDetSlice*>(GetCandBase())->fMeanYPosSM1[id];
00158   }
00159   else return -999.9;
00160 }
00161   
00162 Double_t FarDetSliceHandle::GetMeanYPosSM2(Int_t id) const
00163 {
00164   if(id>=0 && id<11){
00165     return dynamic_cast< const FarDetSlice*>(GetCandBase())->fMeanYPosSM2[id];
00166   }
00167   else return -999.9;
00168 }
00169 
00170 Double_t FarDetSliceHandle::GetMeanZPosSM1(Int_t id) const
00171 {
00172   if(id>=0 && id<11){
00173     return dynamic_cast< const FarDetSlice*>(GetCandBase())->fMeanZPosSM1[id];
00174   }
00175   else return -999.9;
00176 }
00177   
00178 Double_t FarDetSliceHandle::GetMeanZPosSM2(Int_t id) const
00179 {
00180   if(id>=0 && id<11){
00181     return dynamic_cast< const FarDetSlice*>(GetCandBase())->fMeanZPosSM2[id];
00182   }
00183   else return -999.9;
00184 }
00185 
00186 Double_t FarDetSliceHandle::GetMaxPlaneCharge() const
00187 {
00188   return dynamic_cast< const FarDetSlice*>(GetCandBase())->fMaxPlaneCharge;
00189 }
00190 
00191 Double_t FarDetSliceHandle::GetTotalCharge() const
00192 {
00193   Double_t qSM1=0.0,qSM2=0.0;
00194   for(Int_t myint=0;myint<11;myint++){
00195     qSM1+=dynamic_cast<const FarDetSlice*>(GetCandBase())->fFidChargeSM1[myint];
00196     qSM2+=dynamic_cast<const FarDetSlice*>(GetCandBase())->fFidChargeSM2[myint];
00197   }
00198   return qSM1+qSM2;
00199 }
00200 
00201 Double_t FarDetSliceHandle::GetFidCharge() const
00202 {
00203   Double_t qSM1=0.0,qSM2=0.0;
00204   qSM1=dynamic_cast< const FarDetSlice*>(GetCandBase())->fFidChargeSM1[0];
00205   qSM2=dynamic_cast< const FarDetSlice*>(GetCandBase())->fFidChargeSM2[0];
00206   return qSM1+qSM2;
00207 }
00208  
00209 Int_t FarDetSliceHandle::GetEventId() const
00210 {
00211   return dynamic_cast< const FarDetSlice*>(GetCandBase())->fEventId;
00212 }
00213 
00214 Int_t FarDetSliceHandle::GetEventIdSM1() const
00215 {
00216   return dynamic_cast< const FarDetSlice*>(GetCandBase())->fEventIdSM1;
00217 }
00218 
00219 Int_t FarDetSliceHandle::GetEventIdSM2() const
00220 {
00221   return dynamic_cast< const FarDetSlice*>(GetCandBase())->fEventIdSM2;
00222 }
00223 
00224 Int_t FarDetSliceHandle::GetEventIdX() const
00225 {
00226   return dynamic_cast< const FarDetSlice*>(GetCandBase())->fEventIdX;
00227 }
00228 
00229 Int_t FarDetSliceHandle::GetEdgesSM1() const
00230 {
00231   return dynamic_cast< const FarDetSlice*>(GetCandBase())->fEdgesSM1;
00232 }
00233 
00234 Int_t FarDetSliceHandle::GetEdgesSM2() const
00235 {
00236   return dynamic_cast< const FarDetSlice*>(GetCandBase())->fEdgesSM2;
00237 }
00238 
00239 Int_t FarDetSliceHandle::GetEdges() const
00240 {
00241   return dynamic_cast< const FarDetSlice*>(GetCandBase())->fEdges;
00242 }
00243 
00244 Int_t FarDetSliceHandle::GetGoodUPlanes() const
00245 {
00246   return dynamic_cast< const FarDetSlice*>(GetCandBase())->fGoodUPlanes;
00247 }
00248 
00249 Int_t FarDetSliceHandle::GetGoodVPlanes() const
00250 {
00251   return dynamic_cast< const FarDetSlice*>(GetCandBase())->fGoodVPlanes;
00252 }
00253 
00254 Int_t FarDetSliceHandle::GetGoodPlanes() const
00255 {
00256   return dynamic_cast< const FarDetSlice*>(GetCandBase())->fGoodPlanes;
00257 }
00258 
00259 Int_t FarDetSliceHandle::GetGoodStrips() const
00260 {
00261   return dynamic_cast< const FarDetSlice*>(GetCandBase())->fGoodStrips;
00262 }
00263 
00264 XXXITRIMP(FarDetSliceHandle)

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