CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
SamplingGar Class Reference

#include <SamplingGar.h>

+ Inheritance diagram for SamplingGar:

Public Member Functions

 SamplingGar ()
 
 ~SamplingGar ()
 
void init (ICgemGeomSvc *geomSvc, double magConfig)
 
void setIonElectrons (int layer, int nElectrons, std::vector< double > x, std::vector< double > y, std::vector< double > z, std::vector< double > t)
 
int getNelectrons () const
 
double getX (int n) const
 
double getY (int n) const
 
double getZ (int n) const
 
double getT (int n) const
 
 SamplingGar ()
 
 ~SamplingGar ()
 
void init (ICgemGeomSvc *geomSvc, double magConfig)
 
void setIonElectrons (int layer, int nElectrons, std::vector< double > x, std::vector< double > y, std::vector< double > z, std::vector< double > t)
 
int getNelectrons () const
 
double getX (int n) const
 
double getY (int n) const
 
double getZ (int n) const
 
double getT (int n) const
 
- Public Member Functions inherited from DriftAndAvalanche
 DriftAndAvalanche ()
 
virtual ~DriftAndAvalanche ()
 
virtual void init (ICgemGeomSvc *geomSvc, double magConfig)=0
 
virtual void setIonElectrons (int layer, int nElectrons, std::vector< double > x, std::vector< double > y, std::vector< double > z, std::vector< double > t)=0
 
virtual int getNelectrons () const =0
 
virtual double getX (int n) const =0
 
virtual double getY (int n) const =0
 
virtual double getZ (int n) const =0
 
virtual double getT (int n) const =0
 
 DriftAndAvalanche ()
 
virtual ~DriftAndAvalanche ()
 
virtual void init (ICgemGeomSvc *geomSvc, double magConfig)=0
 
virtual void setIonElectrons (int layer, int nElectrons, std::vector< double > x, std::vector< double > y, std::vector< double > z, std::vector< double > t)=0
 
virtual int getNelectrons () const =0
 
virtual double getX (int n) const =0
 
virtual double getY (int n) const =0
 
virtual double getZ (int n) const =0
 
virtual double getT (int n) const =0
 

Detailed Description

Constructor & Destructor Documentation

◆ SamplingGar() [1/2]

SamplingGar::SamplingGar ( )

Definition at line 27 of file SamplingGar.cxx.

27 {
28}

◆ ~SamplingGar() [1/2]

SamplingGar::~SamplingGar ( )

Definition at line 30 of file SamplingGar.cxx.

30 {
31}

◆ SamplingGar() [2/2]

SamplingGar::SamplingGar ( )

◆ ~SamplingGar() [2/2]

SamplingGar::~SamplingGar ( )

Member Function Documentation

◆ getNelectrons() [1/2]

int SamplingGar::getNelectrons ( ) const
inlinevirtual

Implements DriftAndAvalanche.

Definition at line 24 of file Cgem/CgemDigitizerSvc/CgemDigitizerSvc-00-00-24/CgemDigitizerSvc/SamplingGar.h.

24{return m_nMulElec;}

◆ getNelectrons() [2/2]

int SamplingGar::getNelectrons ( ) const
inlinevirtual

Implements DriftAndAvalanche.

Definition at line 24 of file InstallArea/include/CgemDigitizerSvc/CgemDigitizerSvc/SamplingGar.h.

24{return m_nMulElec;}

◆ getT() [1/2]

double SamplingGar::getT ( int  n) const
inlinevirtual

Implements DriftAndAvalanche.

Definition at line 28 of file Cgem/CgemDigitizerSvc/CgemDigitizerSvc-00-00-24/CgemDigitizerSvc/SamplingGar.h.

28{return m_eT[n];}
const Int_t n

◆ getT() [2/2]

double SamplingGar::getT ( int  n) const
inlinevirtual

Implements DriftAndAvalanche.

Definition at line 28 of file InstallArea/include/CgemDigitizerSvc/CgemDigitizerSvc/SamplingGar.h.

28{return m_eT[n];}

◆ getX() [1/2]

double SamplingGar::getX ( int  n) const
inlinevirtual

◆ getX() [2/2]

double SamplingGar::getX ( int  n) const
inlinevirtual

Implements DriftAndAvalanche.

Definition at line 25 of file InstallArea/include/CgemDigitizerSvc/CgemDigitizerSvc/SamplingGar.h.

25{return m_eX[n];}

◆ getY() [1/2]

double SamplingGar::getY ( int  n) const
inlinevirtual

◆ getY() [2/2]

double SamplingGar::getY ( int  n) const
inlinevirtual

Implements DriftAndAvalanche.

Definition at line 26 of file InstallArea/include/CgemDigitizerSvc/CgemDigitizerSvc/SamplingGar.h.

26{return m_eY[n];}

◆ getZ() [1/2]

double SamplingGar::getZ ( int  n) const
inlinevirtual

◆ getZ() [2/2]

double SamplingGar::getZ ( int  n) const
inlinevirtual

Implements DriftAndAvalanche.

Definition at line 27 of file InstallArea/include/CgemDigitizerSvc/CgemDigitizerSvc/SamplingGar.h.

27{return m_eZ[n];}

◆ init() [1/2]

void SamplingGar::init ( ICgemGeomSvc geomSvc,
double  magConfig 
)
virtual

Implements DriftAndAvalanche.

Definition at line 33 of file SamplingGar.cxx.

33 {
34 m_geomSvc = geomSvc;
35 m_magConfig = magConfig;
36
37 readSmearPar();
38
39 // initialize polya functions
40 char funname[3];
41 for(int i=0; i<3; i++){
42 sprintf(funname, "funPolya%d", i);
43 m_funPolya[i] = new TF1(funname, "[0]*pow(1+[2],1+[2])*pow(x/[1],[2])*exp(-(1+[2])*x/[1])/TMath::Gamma(1+[2])", 1, 500);
44 m_funPolya[i]->SetParameter(0, m_gain_gem[i][0]);
45 m_funPolya[i]->SetParameter(1, m_gain_gem[i][1]);
46 m_funPolya[i]->SetParameter(2, m_gain_gem[i][2]);
47 }
48}

◆ init() [2/2]

void SamplingGar::init ( ICgemGeomSvc geomSvc,
double  magConfig 
)
virtual

Implements DriftAndAvalanche.

◆ setIonElectrons() [1/2]

void SamplingGar::setIonElectrons ( int  layer,
int  nElectrons,
std::vector< double >  x,
std::vector< double >  y,
std::vector< double >  z,
std::vector< double >  t 
)
virtual

Implements DriftAndAvalanche.

Definition at line 50 of file SamplingGar.cxx.

50 {
51 clear();
52 m_nIonE = nElectrons;
53 // cout << "nIonE = " << m_nIonE << endl;
54 for(int i=0; i<nElectrons; i++){
55 double r = sqrt(x[i]*x[i] + y[i]*y[i]);
56 double phi;
57 if(y[i] >= 0) phi = acos(x[i] / r);
58 else phi = CLHEP::twopi - acos(x[i] / r);
59 m_vecIonR.push_back(r);
60 m_vecIonPhi.push_back(phi);
61 m_vecIonZ.push_back(z[i]);
62 m_vecIonT.push_back(t[i]);
63
64 // cout << "check geom layer" << setw(15) << layer << setw(15) << m_geomSvc->getCgemLayer(layer)->getInnerROfGapD()
65 // << setw(15) << m_geomSvc->getCgemLayer(layer)->getOuterROfGapD()
66 // << setw(15) << m_geomSvc->getCgemLayer(layer)->getCgemFoil(0)->getInnerROfCgemFoil() << endl;
67
68 double radii_gem1 = m_geomSvc->getCgemLayer(layer)->getCgemFoil(0)->getInnerROfCgemFoil();
69 double driftD = radii_gem1 - r;
70 // cout << "driftD = " << setw(15) << driftD << setw(15) << radii_gem1 << setw(15) << r << endl;
71 samplingDrift(driftD, i);
72 }
73 // cout << "nMultiGem1 = " << m_nEgem1 << endl;
74 for(int i=0; i<m_nEgem1; i++) samplingTransfer(1, i);
75 // cout << "nMultiGem2 = " << m_nEgem2 << endl;
76 for(int i=0; i<m_nEgem2; i++) samplingTransfer(2, i);
77 // cout << "nMultiGem3 = " << m_nEgem3 << endl;
78 calMultiE(layer);
79}
virtual CgemGeoLayer * getCgemLayer(int i) const =0
int t()
Definition: t.c:1

◆ setIonElectrons() [2/2]

void SamplingGar::setIonElectrons ( int  layer,
int  nElectrons,
std::vector< double >  x,
std::vector< double >  y,
std::vector< double >  z,
std::vector< double >  t 
)
virtual

Implements DriftAndAvalanche.


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