CGEM BOSS 6.6.5.g
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
 
Float_t getX (int n) const
 
Float_t getY (int n) const
 
Float_t getZ (int n) const
 
Float_t getT (int n) const
 
const std::vector< Float_t > & getXContainer () const
 
const std::vector< Float_t > & getYContainer () const
 
const std::vector< Float_t > & getZContainer () const
 
const std::vector< Float_t > & getTContainer () const
 
void setDebugging (bool debugging)
 
void setGainMultiplier (vector< double > GainMultiplier)
 
void setTransMultiplier (double TransMultiplier)
 
void setDiffuMultiplier (double DiffuMultiplier)
 
- 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 void setDebugging (bool debugging)=0
 
virtual int getNelectrons () const =0
 
virtual Float_t getX (int n) const =0
 
virtual Float_t getY (int n) const =0
 
virtual Float_t getZ (int n) const =0
 
virtual Float_t getT (int n) const =0
 
virtual const std::vector< Float_t > & getXContainer () const =0
 
virtual const std::vector< Float_t > & getYContainer () const =0
 
virtual const std::vector< Float_t > & getZContainer () const =0
 
virtual const std::vector< Float_t > & getTContainer () const =0
 

Detailed Description

Definition at line 14 of file SamplingGar.h.

Constructor & Destructor Documentation

◆ SamplingGar()

SamplingGar::SamplingGar ( )

Definition at line 27 of file SamplingGar.cxx.

27 {
28 m_GainMultiplier[0]=1.60;
29 m_GainMultiplier[1]=1.60;
30 m_GainMultiplier[2]=1.60;
31}

◆ ~SamplingGar()

SamplingGar::~SamplingGar ( )

Definition at line 33 of file SamplingGar.cxx.

33 {
34}

Member Function Documentation

◆ getNelectrons()

int SamplingGar::getNelectrons ( ) const
inlinevirtual

Implements DriftAndAvalanche.

Definition at line 24 of file SamplingGar.h.

24{return m_nMulElec;}

◆ getT()

Float_t SamplingGar::getT ( int  n) const
inlinevirtual

Implements DriftAndAvalanche.

Definition at line 28 of file SamplingGar.h.

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

◆ getTContainer()

const std::vector< Float_t > & SamplingGar::getTContainer ( ) const
inlinevirtual

Implements DriftAndAvalanche.

Definition at line 32 of file SamplingGar.h.

32{return m_eT;}

◆ getX()

Float_t SamplingGar::getX ( int  n) const
inlinevirtual

Implements DriftAndAvalanche.

Definition at line 25 of file SamplingGar.h.

25{return m_eX[n];}

◆ getXContainer()

const std::vector< Float_t > & SamplingGar::getXContainer ( ) const
inlinevirtual

Implements DriftAndAvalanche.

Definition at line 29 of file SamplingGar.h.

29{return m_eX;}

◆ getY()

Float_t SamplingGar::getY ( int  n) const
inlinevirtual

Implements DriftAndAvalanche.

Definition at line 26 of file SamplingGar.h.

26{return m_eY[n];}

◆ getYContainer()

const std::vector< Float_t > & SamplingGar::getYContainer ( ) const
inlinevirtual

Implements DriftAndAvalanche.

Definition at line 30 of file SamplingGar.h.

30{return m_eY;}

◆ getZ()

Float_t SamplingGar::getZ ( int  n) const
inlinevirtual

Implements DriftAndAvalanche.

Definition at line 27 of file SamplingGar.h.

27{return m_eZ[n];}

◆ getZContainer()

const std::vector< Float_t > & SamplingGar::getZContainer ( ) const
inlinevirtual

Implements DriftAndAvalanche.

Definition at line 31 of file SamplingGar.h.

31{return m_eZ;}

◆ init()

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

Implements DriftAndAvalanche.

Definition at line 36 of file SamplingGar.cxx.

36 {
37 m_geomSvc = geomSvc;
38 m_magConfig = magConfig;
39
40 readSmearPar();
41
42 // initialize polya functions
43 char funname[10];
44 for(int l=0; l<3;l++){
45 for(int i=0; i<3; i++){
46 sprintf(funname, "funPolya%d%d", l, i);
47 m_funPolya[l][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);
48 m_funPolya[l][i]->SetParameter(0, m_gain_gem[i][0]);
49 m_funPolya[l][i]->SetParameter(1, m_gain_gem[i][1]*m_GainMultiplier[l]);
50 m_funPolya[l][i]->SetParameter(2, m_gain_gem[i][2]);
51 }
52 }
53}

◆ setDebugging()

void SamplingGar::setDebugging ( bool  debugging)
inlinevirtual

Implements DriftAndAvalanche.

Definition at line 33 of file SamplingGar.h.

33{m_debugging = debugging;}

◆ setDiffuMultiplier()

void SamplingGar::setDiffuMultiplier ( double  DiffuMultiplier)
inline

Definition at line 42 of file SamplingGar.h.

42{m_DiffuMultiplier = DiffuMultiplier;}

Referenced by CgemDigitizerSvc::initialize().

◆ setGainMultiplier()

void SamplingGar::setGainMultiplier ( vector< double >  GainMultiplier)
inline

Definition at line 35 of file SamplingGar.h.

36 {
37 m_GainMultiplier[0] = GainMultiplier[0];
38 m_GainMultiplier[1] = GainMultiplier[1];
39 m_GainMultiplier[2] = GainMultiplier[2];
40 }

Referenced by CgemDigitizerSvc::initialize().

◆ setIonElectrons()

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 55 of file SamplingGar.cxx.

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

◆ setTransMultiplier()

void SamplingGar::setTransMultiplier ( double  TransMultiplier)
inline

Definition at line 41 of file SamplingGar.h.

41{m_TransMultiplier = TransMultiplier;}

Referenced by CgemDigitizerSvc::initialize().


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