VaDigit Class Reference

#include <VaDigit.h>

List of all members.

Public Member Functions

 VaDigit (CandDigitHandle *cdh)
 VaDigit (const VaDigit &rhs)
 ~VaDigit ()
CandDigitHandleGetCandDigitHandle ()
Double_t GetChargeAdc ()
Double_t GetCrossTalkChargeAdc ()
Double_t GetCrossTalk (CandDigitHandle *yourdigit)
void AddCrossTalk (CandDigitHandle *yourdigit, Double_t y)
Bool_t IsSameTime (VaDigit *vadigit)
Bool_t IsSameTime (CandDigitHandle *yourdigit)
Bool_t IsSameStrip (VaDigit *vadigit)
Bool_t IsSameStrip (CandDigitHandle *yourdigit)
Bool_t IsSamePmt (VaDigit *vadigit)
Bool_t IsSamePmt (CandDigitHandle *yourdigit)

Private Attributes

CandDigitHandlefDigit
Double_t fChargeAdc
Double_t fCrossTalkChargeAdc

Detailed Description

Definition at line 7 of file VaDigit.h.


Constructor & Destructor Documentation

VaDigit::VaDigit ( CandDigitHandle cdh  ) 

Definition at line 6 of file VaDigit.cxx.

References CalDigitType::kNone.

00006                                      :
00007   fDigit(0),
00008   fChargeAdc(0.0),
00009   fCrossTalkChargeAdc(0.0)
00010 {
00011   if(cdh){
00012     fDigit = cdh;
00013     fChargeAdc = cdh->GetCharge(CalDigitType::kNone);
00014     fCrossTalkChargeAdc = 0.0;
00015   }
00016 }  

VaDigit::VaDigit ( const VaDigit rhs  ) 

Definition at line 18 of file VaDigit.cxx.

00018                                    :
00019   TObject(rhs),
00020   fDigit(rhs.fDigit),
00021   fChargeAdc(rhs.fChargeAdc),
00022   fCrossTalkChargeAdc(rhs.fCrossTalkChargeAdc)
00023 {
00024 
00025 }
 

VaDigit::~VaDigit (  ) 

Definition at line 27 of file VaDigit.cxx.

00028 {
00029 
00030 }


Member Function Documentation

void VaDigit::AddCrossTalk ( CandDigitHandle yourdigit,
Double_t  y 
)

Definition at line 81 of file VaDigit.cxx.

References fCrossTalkChargeAdc, CandDigitHandle::GetCharge(), GetCrossTalk(), and CalDigitType::kNone.

Referenced by AlgFarDetStripList::RunAlg().

00082 {
00083   if( tot>0.0 ){
00084     Double_t adc = yourdigit->GetCharge(CalDigitType::kNone);
00085     fCrossTalkChargeAdc += (this->GetCrossTalk(yourdigit)/tot)*adc;
00086   }
00087 }

CandDigitHandle * VaDigit::GetCandDigitHandle (  ) 

Definition at line 32 of file VaDigit.cxx.

References fDigit.

Referenced by GetCrossTalk(), IsSamePmt(), IsSameStrip(), IsSameTime(), and AlgFarDetStrip::RunAlg().

00033 {
00034   return fDigit;
00035 }

Double_t VaDigit::GetChargeAdc (  ) 

Definition at line 37 of file VaDigit.cxx.

References fChargeAdc.

Referenced by AlgFarDetStrip::RunAlg().

00038 {
00039   return fChargeAdc;
00040 }

Double_t VaDigit::GetCrossTalk ( CandDigitHandle yourdigit  ) 

Definition at line 47 of file VaDigit.cxx.

References GetCandDigitHandle(), CandDigitHandle::GetChannelId(), CandDigitHandle::GetCharge(), RawChannelId::GetVaChannel(), IsSamePmt(), and CalDigitType::kNone.

Referenced by AddCrossTalk(), and AlgFarDetStripList::RunAlg().

00048 {
00049 
00050   Int_t vachannel2m16pixel[22] = {-1,-1,14,0,15,1,
00051                                         10,4,11,5,
00052                                          6,8,7,9,
00053                                          2,13,3,12,-1,-1,-1,-1};
00054 
00055   Double_t mycharge=0.0,myoverlap=0.0;
00056 
00057   if( this->IsSamePmt(yourdigit) ){
00058     CandDigitHandle* mydigit = (CandDigitHandle*)(this->GetCandDigitHandle()); 
00059     mycharge = mydigit->GetCharge(CalDigitType::kNone);
00060 
00061     RawChannelId yourCh = yourdigit->GetChannelId();    
00062     Int_t yourChannel = yourCh.GetVaChannel();
00063     Int_t yourPixel = vachannel2m16pixel[yourChannel];
00064 
00065     RawChannelId myCh = mydigit->GetChannelId();    
00066     Int_t myChannel = myCh.GetVaChannel();
00067     Int_t myPixel = vachannel2m16pixel[myChannel];
00068 
00069     Int_t dPixel = yourPixel-myPixel;
00070 
00071     if( myPixel>=0 && yourPixel>=0 && dPixel!=0 ){
00072       if(1) myoverlap=0.001;
00073       if(dPixel==-5 || dPixel==-3 || dPixel==3 || dPixel==5) myoverlap=0.01;
00074       if(dPixel==-4 || dPixel==-1 || dPixel==1 || dPixel==4) myoverlap=0.05;
00075     }
00076   }
00077 
00078   return myoverlap*mycharge;
00079 }

Double_t VaDigit::GetCrossTalkChargeAdc (  ) 

Definition at line 42 of file VaDigit.cxx.

References fCrossTalkChargeAdc.

Referenced by AlgFarDetStrip::RunAlg().

00043 {
00044   return fCrossTalkChargeAdc;
00045 }

Bool_t VaDigit::IsSamePmt ( CandDigitHandle yourdigit  ) 

Definition at line 161 of file VaDigit.cxx.

References GetCandDigitHandle(), CandDigitHandle::GetChannelId(), RawChannelId::GetCrate(), RawChannelId::GetVaAdcSel(), RawChannelId::GetVaChip(), RawChannelId::GetVarcId(), and RawChannelId::GetVmm().

00162 {
00163   Bool_t match=0;
00164   Int_t yourCrate=-999,yourVarc=-999,yourVmm=-999,yourVaadc=-999,yourVachip=-999;
00165   Int_t myCrate=999,myVarc=999,myVmm=999,myVaadc=999,myVachip=999;
00166 
00167   CandDigitHandle* mydigit = (CandDigitHandle*)(this->GetCandDigitHandle());
00168 
00169   RawChannelId yourCh = yourdigit->GetChannelId();    
00170   yourCrate = yourCh.GetCrate();
00171   yourVarc = yourCh.GetVarcId();
00172   yourVmm = yourCh.GetVmm();
00173   yourVaadc = yourCh.GetVaAdcSel();
00174   yourVachip = yourCh.GetVaChip();
00175 
00176   RawChannelId myCh = mydigit->GetChannelId();    
00177   myCrate = myCh.GetCrate();
00178   myVarc = myCh.GetVarcId();
00179   myVmm = myCh.GetVmm();
00180   myVaadc = myCh.GetVaAdcSel();
00181   myVachip = myCh.GetVaChip();
00182 
00183   if( yourCrate==myCrate 
00184    && yourVarc==myVarc 
00185    && yourVmm==myVmm
00186    && yourVaadc==myVaadc
00187    && yourVachip==myVachip ) match=1;
00188 
00189   return match;
00190 }

Bool_t VaDigit::IsSamePmt ( VaDigit vadigit  ) 

Definition at line 129 of file VaDigit.cxx.

References GetCandDigitHandle(), CandDigitHandle::GetChannelId(), RawChannelId::GetCrate(), RawChannelId::GetVaAdcSel(), RawChannelId::GetVaChip(), RawChannelId::GetVarcId(), and RawChannelId::GetVmm().

Referenced by GetCrossTalk(), and AlgFarDetStripList::RunAlg().

00130 {
00131   Bool_t match=0;
00132   Int_t yourCrate=-999,yourVarc=-999,yourVmm=-999,yourVaadc=-999,yourVachip=-999;
00133   Int_t myCrate=999,myVarc=999,myVmm=999,myVaadc=999,myVachip=999;
00134 
00135   CandDigitHandle* yourdigit = (CandDigitHandle*)(vadigit->GetCandDigitHandle());
00136   CandDigitHandle* mydigit = (CandDigitHandle*)(this->GetCandDigitHandle());  
00137 
00138   RawChannelId yourCh = yourdigit->GetChannelId();    
00139   yourCrate = yourCh.GetCrate();
00140   yourVarc = yourCh.GetVarcId();
00141   yourVmm = yourCh.GetVmm();
00142   yourVaadc = yourCh.GetVaAdcSel();
00143   yourVachip = yourCh.GetVaChip();
00144 
00145   RawChannelId myCh = mydigit->GetChannelId();    
00146   myCrate = myCh.GetCrate();
00147   myVarc = myCh.GetVarcId();
00148   myVmm = myCh.GetVmm();
00149   myVaadc = myCh.GetVaAdcSel();
00150   myVachip = myCh.GetVaChip();
00151 
00152   if( yourCrate==myCrate 
00153    && yourVarc==myVarc 
00154    && yourVmm==myVmm
00155    && yourVaadc==myVaadc
00156    && yourVachip==myVachip ) match=1;
00157 
00158   return match; 
00159 }

Bool_t VaDigit::IsSameStrip ( CandDigitHandle yourdigit  ) 

Definition at line 119 of file VaDigit.cxx.

References PlexSEIdAltL::GetBestSEId(), GetCandDigitHandle(), CandDigitHandle::GetPlexSEIdAltL(), and PlexStripEndId::IsSameStrip().

00120 {
00121   Bool_t match=0;
00122   CandDigitHandle* mydigit = (CandDigitHandle*)(this->GetCandDigitHandle());
00123   PlexStripEndId mySEId = mydigit->GetPlexSEIdAltL().GetBestSEId();
00124   PlexStripEndId yourSEId = yourdigit->GetPlexSEIdAltL().GetBestSEId();
00125   if( mySEId.IsSameStrip(yourSEId) ) match=1;
00126   return match;
00127 }

Bool_t VaDigit::IsSameStrip ( VaDigit vadigit  ) 

Definition at line 108 of file VaDigit.cxx.

References PlexSEIdAltL::GetBestSEId(), GetCandDigitHandle(), CandDigitHandle::GetPlexSEIdAltL(), and PlexStripEndId::IsSameStrip().

Referenced by AlgFarDetStripList::RunAlg().

00109 {
00110   Bool_t match=0;
00111   CandDigitHandle* yourdigit = (CandDigitHandle*)(vadigit->GetCandDigitHandle());
00112   CandDigitHandle* mydigit = (CandDigitHandle*)(this->GetCandDigitHandle());
00113   PlexStripEndId mySEId = mydigit->GetPlexSEIdAltL().GetBestSEId();
00114   PlexStripEndId yourSEId = yourdigit->GetPlexSEIdAltL().GetBestSEId();
00115   if( mySEId.IsSameStrip(yourSEId) ) match=1;
00116   return match;
00117 }

Bool_t VaDigit::IsSameTime ( CandDigitHandle yourdigit  ) 

Definition at line 99 of file VaDigit.cxx.

References GetCandDigitHandle(), CandDigitHandle::GetTime(), and CalTimeType::kNone.

00100 {
00101   Bool_t match=0;
00102   CandDigitHandle* mydigit = (CandDigitHandle*)(this->GetCandDigitHandle());
00103   if( 1.0e9*(mydigit->GetTime(CalTimeType::kNone)-yourdigit->GetTime(CalTimeType::kNone))>-500.0
00104    && 1.0e9*(mydigit->GetTime(CalTimeType::kNone)-yourdigit->GetTime(CalTimeType::kNone))<500.0 ) match=1;
00105   return match;
00106 }

Bool_t VaDigit::IsSameTime ( VaDigit vadigit  ) 

Definition at line 89 of file VaDigit.cxx.

References GetCandDigitHandle(), CandDigitHandle::GetTime(), and CalTimeType::kNone.

Referenced by AlgFarDetStripList::RunAlg().

00090 {
00091   Bool_t match=0;
00092   CandDigitHandle* yourdigit = (CandDigitHandle*)(vadigit->GetCandDigitHandle());
00093   CandDigitHandle* mydigit = (CandDigitHandle*)(this->GetCandDigitHandle());
00094   if( 1.0e9*(mydigit->GetTime(CalTimeType::kNone)-yourdigit->GetTime(CalTimeType::kNone))>-500.0
00095    && 1.0e9*(mydigit->GetTime(CalTimeType::kNone)-yourdigit->GetTime(CalTimeType::kNone))<500.0 ) match=1;
00096   return match;
00097 }


Member Data Documentation

Double_t VaDigit::fChargeAdc [private]

Definition at line 30 of file VaDigit.h.

Referenced by GetChargeAdc().

Double_t VaDigit::fCrossTalkChargeAdc [private]

Definition at line 31 of file VaDigit.h.

Referenced by AddCrossTalk(), and GetCrossTalkChargeAdc().

Definition at line 29 of file VaDigit.h.

Referenced by GetCandDigitHandle().


The documentation for this class was generated from the following files:

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1