FairRoot/PandaRoot
PndMvdRecoCharge.cxx
Go to the documentation of this file.
1 #include "PndMvdRecoCharge.h"
2 
5  ftr = 100.;
6  fa = 60.;
7  fthreshold = 3000;
8  std::cout << "-W- <PndMvdRecoCharge::PndMvdRecoCharge()>: constructor with default parameters used"<<std::endl;
9  };
10 
13  ftr = tr;
14  fa = a;
16  };
17 
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 }
26 
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 }
35 
36 
37 
38 
39 
TClonesArray * digi
Base class for Digi information.
Definition: PndSdsDigi.h:29
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
Double_t GetCharge(PndSdsDigi &digi)
Int_t a
Definition: anaLmdDigi.C:126
Double_t
PndMvdRecoCharge()
Default constructor.
double threshold