FairRoot/PandaRoot
Public Member Functions | Private Attributes | List of all members
PndMvdRecoCharge Class Reference

#include <PndMvdRecoCharge.h>

Public Member Functions

 PndMvdRecoCharge ()
 Default constructor. More...
 
 PndMvdRecoCharge (Double_t tr, Double_t a, Double_t threshold)
 Main constructor. More...
 
Double_t GetCharge (PndSdsDigi &digi)
 
Double_t GetCharge (Double_t tot)
 

Private Attributes

Double_t fthreshold
 
Double_t ftr
 
Double_t fa
 

Detailed Description

Definition at line 8 of file PndMvdRecoCharge.h.

Constructor & Destructor Documentation

PndMvdRecoCharge::PndMvdRecoCharge ( )

Default constructor.

Definition at line 4 of file PndMvdRecoCharge.cxx.

References fa, fthreshold, and ftr.

4  {
5  ftr = 100.;
6  fa = 60.;
7  fthreshold = 3000;
8  std::cout << "-W- <PndMvdRecoCharge::PndMvdRecoCharge()>: constructor with default parameters used"<<std::endl;
9  };
PndMvdRecoCharge::PndMvdRecoCharge ( Double_t  tr,
Double_t  a,
Double_t  threshold 
)

Main constructor.

Definition at line 12 of file PndMvdRecoCharge.cxx.

References a, fa, fthreshold, ftr, threshold, and tr.

12  {
13  ftr = tr;
14  fa = a;
16  };
Int_t a
Definition: anaLmdDigi.C:126
double threshold

Member Function Documentation

Double_t PndMvdRecoCharge::GetCharge ( PndSdsDigi digi)

Definition at line 18 of file PndMvdRecoCharge.cxx.

References fa, fthreshold, ftr, and sqrt().

19 {
20  if (digi.GetTot()<0){
21  std::cout<<"-E- <PndMvdRecoCharge::GetCharge(PndSdsDigi &digi)>: time over threshold not calculated in digitization step"<<std::endl;
22  return -1;
23  }
24  return (-fa*ftr+fthreshold+digi.GetTot()*fa)/2.+sqrt( pow( (fa*ftr-fthreshold-digi.GetTot()*fa),2) / 4. + fa* fthreshold * ftr );
25 }
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
Double_t PndMvdRecoCharge::GetCharge ( Double_t  tot)

Definition at line 27 of file PndMvdRecoCharge.cxx.

References fa, fthreshold, ftr, and sqrt().

28 {
29  if (tot<0){
30  std::cout<<"-E- <PndMvdRecoCharge::GetCharge(Double_t tot)>: time over threshold not calculated in digitization step"<<std::endl;
31  return -1;
32  }
33  return (-fa*ftr+fthreshold+tot*fa)/2.+sqrt( pow( (fa*ftr-fthreshold-tot*fa),2) / 4. + fa* fthreshold * ftr );
34 }
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29

Member Data Documentation

Double_t PndMvdRecoCharge::fa
private

Definition at line 21 of file PndMvdRecoCharge.h.

Referenced by GetCharge(), and PndMvdRecoCharge().

Double_t PndMvdRecoCharge::fthreshold
private

Definition at line 19 of file PndMvdRecoCharge.h.

Referenced by GetCharge(), and PndMvdRecoCharge().

Double_t PndMvdRecoCharge::ftr
private

Definition at line 20 of file PndMvdRecoCharge.h.

Referenced by GetCharge(), and PndMvdRecoCharge().


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