#include <PndEmcClusterCalibrator.h>
Definition at line 101 of file PndEmcClusterCalibrator.h.
PndEmcClusterSimpleCalibrator::PndEmcClusterSimpleCalibrator |
( |
Int_t |
version = 1 | ) |
|
Definition at line 465 of file PndEmcClusterCalibrator.cxx.
References fParObject, PndEmcAbsClusterCalibrator::fPath, and TString.
468 fPath = getenv(
"VMCWORKDIR");
469 fPath +=
"/macro/params/";
472 fileNamePhoton.Form(
"emc_correction_par_gamma_%i.root",version);
473 fileNamePhoton=
fPath+fileNamePhoton;
484 fPhoton =
new TFile(fileNamePhoton,
"READ");
485 if (fPhoton->IsZombie())
487 std::cout<<
"EMC cluster correction file "<<fileNamePhoton<<
" for photons does not exist for given version"<<std::endl;
491 fPhoton->GetObject(
"PndEmcClusterCalibrationParObject",
fParObject);
493 std::cout <<
"-E- PndEmcClusterSimpleCalibrator: Could not get Emc cluster calibration information from file " << fPhoton << std::endl;
496 std::cout<<
"EMC photon calibration parameters are read succesfully"<<std::endl;
PndEmcClusterCalibrationParObject * fParObject
PndEmcClusterSimpleCalibrator::~PndEmcClusterSimpleCalibrator |
( |
| ) |
|
|
virtual |
Implements PndEmcAbsClusterCalibrator.
Definition at line 531 of file PndEmcClusterCalibrator.cxx.
References cos(), Double_t, PndEmcCluster::energy(), exp(), fParObject, PndEmcClusterCalibrationParObject::GetCalibrationPar(), log(), p1, p2, Pi, sqrt(), and PndEmcCluster::where().
535 std::cout<<
"PndEmcClusterSimpleCalibrator:: EMC Cluster energy correction is not defined for pid="<<
pid<<
". Photon correction is used"<<std::endl;
539 TVector3 clusterPosition= clust->
where();
540 Double_t theta_cluster=clusterPosition.Theta();
545 if ( (clusterPosition.Z() < 180.0)&&(theta_cluster<141.*
TMath::Pi()/180.))
547 if (e<0.03) e1 = 0.03;
548 if (e>8.0) e1 = 8.0 ;
551 if ( (clusterPosition.Z() < 180.0)&&(theta_cluster>141.*
TMath::Pi()/180.))
553 if (e<0.03) e1 = 0.03;
554 if (e>2.0) e1 = 2.0 ;
557 if (clusterPosition.Z() > 180.0)
559 if (e<0.01) e1 = 0.01;
560 if (e>16.0) e1 = 16.0 ;
565 if ( clusterPosition.Z() > 500.0)
569 else if ( (clusterPosition.Z() < 180.0)&&(theta_cluster>141.*
TMath::Pi()/180.))
573 else if ( (clusterPosition.Z() < 180.0)&&(theta_cluster<141.*
TMath::Pi()/180.))
588 double p0,
p1,
p2, p3, p4, p5, p6, p7, p8, p9;
598 eout=(p0-p1/
sqrt(e1)+p2/e1+p3/(e1*e1)-p4/(e1*
sqrt(e1)))*e;
617 +p5*
cos(theta1)*
cos(theta1)
622 eout=e*
exp(factor1);
friend F32vec4 cos(const F32vec4 &a)
friend F32vec4 exp(const F32vec4 &a)
friend F32vec4 sqrt(const F32vec4 &a)
friend F32vec4 log(const F32vec4 &a)
void GetCalibrationPar(Int_t iParSet, Double_t *pars)
virtual Double_t energy() const
PndEmcClusterCalibrationParObject * fParObject
void PndEmcClusterSimpleCalibrator::Init |
( |
| ) |
|
|
inline |
TVector3 PndEmcClusterSimpleCalibrator::Where |
( |
PndEmcCluster * |
clust, |
|
|
Int_t |
pid = 22 |
|
) |
| |
|
virtual |
TString PndEmcAbsClusterCalibrator::fPath |
|
protectedinherited |
Int_t PndEmcAbsClusterCalibrator::fVersion |
|
protectedinherited |
The documentation for this class was generated from the following files: