BOSS 7.1.3
BESIII Offline Software System
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
slope.cxx File Reference

Go to the source code of this file.

Functions

void slope ()
 

Variables

const double k_high = 0.0
 
const double k_low = 0.0
 
const double b = 1.0
 
const bool b_trunc = true
 

Function Documentation

◆ slope()

void slope ( )

Definition at line 12 of file slope.cxx.

13{
14 TFile *f=new TFile("eangle.root");
15 ostringstream strout;
16 strout<<"ddgcalib";
17 TTree *tree = f->Get(strout.str().c_str());
18 double dedx[100],eangle[100], fitmean[100], fitmeanerr[100];
19 double pos_fitmean[100], pos_fitmeanerr[100], neg_fitmean[100], neg_fitmeanerr[100];
20 // tree->SetBranchAddress("gain",dedx);
21 if(b_trunc) tree->SetBranchAddress("truncgain",dedx);
22 else tree->SetBranchAddress("gain",dedx);
23 tree->SetBranchAddress("eangle",eangle);
24 tree->SetBranchAddress("fitmean",fitmean);
25 tree->SetBranchAddress("fitmeanerr",fitmeanerr);
26 tree->SetBranchAddress("pos_fitmean",pos_fitmean);
27 tree->SetBranchAddress("pos_fitmeanerr",pos_fitmeanerr);
28 tree->SetBranchAddress("neg_fitmean",neg_fitmean);
29 tree->SetBranchAddress("neg_fitmeanerr",neg_fitmeanerr);
30
31 cout<<"Entries: "<<tree->GetEntries()<<endl;
32 tree->GetEntry(0);
33
34 int entry[1] = {100};
35 double denangle[100];
36 // for(int i=0; i<100; i++) denangle[i] = (dedx[i])*(k*(eangle[i])+b); // correct by a slope
37 // next we try sub-region correction with a slope
38 for(int i=0; i<100; i++){
39 if(fabs(eangle[i])<=0.04) denangle[i] = (dedx[i])*(k_high*(eangle[i])+b);
40 // cout << "eangle: " << eangle[i] << endl;
41 else denangle[i] = (dedx[i])*(k_low*(eangle[i])+b); // correct by a slope
42 }
43 TFile *f_save = new TFile("eangle_new.root","recreate");
44 TTree* entra = new TTree("entracalib", "entracalib");
45 entra->Branch("1denangle_entry", entry, "entry[1]/I");
46 entra->Branch("1denangle", denangle, "denangle[100]/D");
47 entra->Fill();
48 entra->Write();
49 f_save->Close();
50 f->Close();
51}
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
const bool b_trunc
Definition slope.cxx:10
const double k_high
Definition slope.cxx:7
const double b
Definition slope.cxx:9
const double k_low
Definition slope.cxx:8

Referenced by MdcSegInfoAxialO::calcFromOrigin(), MdcSegInfoAxialO::calcFromOrigin(), MdcSegInfoSterO::calcStereo(), MdcSegInfoCsmc::calcStraight(), MdcSegInfoCsmc::calcStraight(), XtInteCalib::calib(), dEdxVsCosNP(), DedxCorrecSvc::EntaCorrec(), EsTimeAlg::execute(), MucRec2DRoad::Fit(), MucRec2DRoad::GetSimpleFitParams(), MucRec2DRoad::SimpleFit(), and MucRec2DRoad::SimpleFitNoCurrentGap().

Variable Documentation

◆ b

const double b = 1.0

Definition at line 9 of file slope.cxx.

Referenced by AsymGauss(), DifComplex::atan2, MucRec2DRoad::AttachHit(), TofQCorrSvc::BQRaw1(), TofQCorrSvc::BQRaw2(), EmcRecGeoPlane::Build(), EvtbTosllVectorAmp::CalcAmp(), EvtbTosllAmp::CalcMaxProb(), EvtSemiLeptonicAmp::CalcMaxProb(), HoughStereo::cald(), HoughTrack::cald_layer(), TMLink::cDrift(), CFCir::CFCir(), Lpar::circle(), compare_zsfit(), MucGeoGap::CompareIntersection(), BesEmcEndGeometry::ComputeDimAndPos(), ExtBesEmcEndGeometry::ComputeDimAndPos(), db_mysql::Connect(), BesTofConstruction::ConstructBr1Tof(), BesTofConstruction::ConstructBr2Tof(), BesTofConstruction::ConstructEcTof(), DifNumber::correlation, DifNumber::correlation, DifNumber::correlation(), DifNumber::correlation(), DifVector::cross, dbcg_(), dcg_(), dcgn_(), dcgs_(), TMLink::dDrift(), EvtBsquark::decay(), EvtDsToPipPipPimPi0::decay(), dgmres_(), dhels_(), dir_(), BesPolygon2D::DistancetoPrimitive(), TRunge::DisToWire(), TTrackManager::divide(), TTrackManager::divideByIp(), dllti2_(), dllti2_(), domn_(), dpigmr_(), TMLink::drift(), dsdbcg_(), dsdcg_(), dsdcgn_(), dsdcgs_(), dsdgmr_(), dsdi_(), dsdomn_(), dsdscl_(), dsgs_(), dsiccg_(), dsilur_(), dsjac_(), dsli2_(), dsli_(), dsllti_(), dslubc_(), dslucn_(), dslucs_(), dslugm_(), dslui2_(), dslui4_(), dslui_(), dsluom_(), dsluti_(), dsmmi2_(), dsmmti_(), EmcRecGeoPlane::EmcRecGeoPlane(), TrkHotListFull::endFoundRange(), Kinem< R >::eq(), TofQCorrSvc::EQRaw(), EvtDiracSpinor::EvtLeptonVACurrent, EvtPawt(), MagFieldReader::execute(), EvtSpinAmp::extcont(), MagneticFieldSvc::fieldVector(), MucGeoGeneral::FindIntersection(), MucGeoGeneral::FindIntersectionQuadLocal(), MucGeoGeneral::FindIntersectionSurface(), TConformalFinder0::findSegments(), MdcxFindTracks::findz_cyl(), MucRec2DRoad::Fit(), TCosmicFitter::fit(), TCosmicFitter::fit(), RealDBUtil::ConnectionProvider::getcal(), TRadSpline3::GetCoeff(), TRadSpline5::GetCoeff(), BesTView::GetDistancetoAxis(), BesMagneticField::GetFieldValue(), ExtBesMagneticField::GetFieldValue(), MucGeometron::GetIntersectionQuadPlane(), MucGeometron::GetIntersectionQuadPlaneLocal(), MucMagneticField::getMucField(), MucRec2DRoad::GetSimpleFitParams(), BesTofConstruction::getXYZ(), DedxCorrecSvc::I2D(), HadronSaturation::I2D(), HadronSaturation::I2D(), Millepede::initialize(), EvtSpinAmp::intcont(), ParticleIDBase::interpolation(), isdbcg_(), isdcg_(), isdcgn_(), isdcgs_(), isdgmr_(), isdir_(), isdomn_(), issbcg_(), isscg_(), isscgn_(), isscgs_(), issgmr_(), issir_(), issomn_(), IRawDataCnvSvc::Leaf::Leaf(), HoughTrack::Leastfit(), HoughZsFit::leastFit(), HoughZsFit::leastLine(), less_layer(), less_layer_3D(), MucRecLineFit::LineFit(), MucRecLineFit::LineFit(), main(), main(), HTrackParameter::minDistanceTwoHelix(), mwCalloc(), mwCalloc_(), Kinem< R >::neq(), NHits(), DifComplex::operator!=, DifNumber::operator!=, DifNumber::operator!=, DifNumber::operator!=, rdbModel::ColCompare::operator()(), rdbModel::FieldValCompare::operator()(), DifComplex::operator*, DifFourVector::operator*, DifNumber::operator*, DifNumber::operator*, DifNumber::operator*, DifVector::operator*, DifComplex::operator+, DifFourVector::operator+, DifNumber::operator+, DifNumber::operator+, DifNumber::operator+, DifVector::operator+, DifComplex::operator-, DifFourVector::operator-, DifNumber::operator-, DifNumber::operator-, DifNumber::operator-, DifPoint::operator-, DifVector::operator-, DifComplex::operator/, DifNumber::operator/, DifNumber::operator/, DifNumber::operator/, DifNumber::operator<, DifNumber::operator<, DifNumber::operator<, DifNumber::operator<=, DifNumber::operator<=, DifNumber::operator<=, DifComplex::operator==, DifNumber::operator==, DifNumber::operator==, DifNumber::operator==, DifNumber::operator>, DifNumber::operator>, DifNumber::operator>, DifNumber::operator>=, DifNumber::operator>=, DifNumber::operator>=, MdcUtilitySvc::pointOnHelixPatPar(), HTrackParameter::positionTwoHelix(), DifNumber::pow, MucRec2DRoad::Project(), MucRec3DRoad::Project(), MucRec3DRoad::ProjectNoCurrentGap(), MucGeoGap::ProjectToGap(), MucGeoGap::ProjectToGapQuadLocal(), MucGeoGap::ProjectToGapSurface(), MucRec3DRoad::ProjectWithSigma(), MucRecQuadFit::QuadFit(), FTTrack::r_phi2Fit(), FTTrack::r_phi3Fit(), FTTrack::r_phi4Fit(), FTTrack::r_phiReFit(), KalFitTrack::radius_numf(), MdcTSF::ReadLut(), MdcTF::ReadTFLut(), BesEmcConstruction::RotAngleFromNewZ(), DifVector::rotate(), Lpar::s(), sbcg_(), scg_(), scgn_(), scgs_(), TMSelector::select(), eformat::write::set(), RootInterface::setBranchAddress(), rdbModel::Manager::setBuilder(), BesEventHeader::SetEventHeaderGeneral(), XmlRpc::XmlRpcSource::setKeepOpen(), sgmres_(), shels_(), EvtGammaMatrix::sigmaLower(), EvtGammaMatrix::sigmaUpper(), sir_(), slope(), small_layer(), EvtConExc::SoftPhoton_xs(), solveQuad(), somn_(), TTrackManager::sortBanksByPt(), sortByArcLength(), SortByB(), SortByPt(), sortBySequentialLength(), SortByWireId(), sortByWireId(), sortByWireSerialNumber(), SortByX(), spigmr_(), EvtPolInt::splint(), ssdbcg_(), ssdcg_(), ssdcgn_(), ssdcgs_(), ssdgmr_(), ssdi_(), ssdomn_(), ssdscl_(), ssgs_(), ssiccg_(), ssilur_(), ssjac_(), ssli2_(), ssli_(), ssllti_(), sslubc_(), sslucn_(), sslucs_(), sslugm_(), sslui2_(), sslui4_(), sslui_(), ssluom_(), ssluti_(), ssmmi2_(), ssmmti_(), EvtSVVHelAmp::SVVHel(), TLine2D::TLine2D(), ers::Core::to_string(), TrackStatus(), TRadSplinePoly3::TRadSplinePoly3(), TRadSplinePoly5::TRadSplinePoly5(), and MagneticFieldSvc::uniFieldVector().

◆ b_trunc

const bool b_trunc = true

Definition at line 10 of file slope.cxx.

Referenced by slope().

◆ k_high

const double k_high = 0.0

Definition at line 7 of file slope.cxx.

Referenced by slope().

◆ k_low

const double k_low = 0.0

Definition at line 8 of file slope.cxx.

Referenced by slope().