Skip to content

Commit

Permalink
Merge branch 'bugfix/split-CDCDedxPID-module-into-two-release9' into …
Browse files Browse the repository at this point in the history
…'release/09-00'

Split CDCDedxPID module into two modules release 9

See merge request belle2/software/basf2!3947
  • Loading branch information
Frankenfrog committed Jan 17, 2025
2 parents 1f83a4a + f6a84a0 commit 9174ede
Show file tree
Hide file tree
Showing 170 changed files with 2,419 additions and 1,289 deletions.
2 changes: 1 addition & 1 deletion alignment/SConscript
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Import('env')

env['LIBS'] = ['framework', 'cdc_dataobjects',
env['LIBS'] = ['framework', 'cdc_dataobjects', 'cdc_dbobjects',
'genfit2', '$ROOT_LIBS', 'EG', 'svd', 'pxd',
'alignment_dataobjects', 'calibration', 'calibration_dataobjects',
'klm_dataobjects', 'klm_dbobjects', 'klm', 'cdc', 'alignment_dbobjects',
Expand Down
4 changes: 2 additions & 2 deletions cdc/SConscript
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Import('env')

env['LIBS'] = ['framework', 'geometry', 'simulation', 'calibration',
'$ROOT_LIBS', 'Geom', 'EG', 'cdc_dataobjects',
env['LIBS'] = ['framework', 'geometry', 'simulation', 'analysis', 'analysis_dataobjects',
'$ROOT_LIBS', 'Geom', 'EG', 'cdc_dataobjects', 'cdc_dbobjects',
'$GEANT4_LIBS', 'CLHEP', 'mdst_dataobjects', 'simulation_dataobjects', "boost_iostreams"]

#env.Append(CPPDEFINES = {'CDC_DEBUG':None})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <TRandom.h>


#include <reconstruction/dbobjects/CDCDedx1DCell.h>
#include <cdc/dbobjects/CDCDedx1DCell.h>
#include <calibration/CalibrationAlgorithm.h>
#include <framework/database/DBObjPtr.h>

Expand Down Expand Up @@ -57,12 +57,12 @@ namespace Belle2 {
void setVariableBins(bool value) {isVarBins = value;}

/**
* funtion to set truncation method (local vs global)
* function to set truncation method (local vs global)
*/
void setLayerTrunc(bool value = false) {isFixTrunc = value;}

/**
* set false if generating absoulte (not relative)
* set false if generating absolute (not relative)
* payload
*/
void setMergePayload(bool value) { isMerge = value;}
Expand All @@ -78,7 +78,7 @@ namespace Belle2 {
void setRotSymmetry(bool value) {isRotSymm = value;}

/**
* function to set bins of trunction from histogram
* function to set bins of truncation from histogram
*/
void setTrucationBins(double lowedge, double upedge)
{
Expand All @@ -91,12 +91,12 @@ namespace Belle2 {
void enableExtraPlots(bool value = false) {isMakePlots = value;}

/**
* funtion to set pt limit
* function to set pt limit
*/
void setPtLimit(double value) {m_ptMax = value;}

/**
* funtion to set cos #theta limit
* function to set cos \f$\theta\f$ limit
*/
void setCosLimit(double value) {m_cosMax = value;}

Expand All @@ -116,7 +116,7 @@ namespace Belle2 {
}

/**
* class funtion to set rotation symmetry
* class function to set rotation symmetry
*/
int rotationalBin(int nbin, int ibin)
{
Expand All @@ -133,7 +133,7 @@ namespace Belle2 {
void getExpRunInfo();

/**
* class function to create vectors for bin mappping (Var->symm)
* class function to create vectors for bin mapping (Var->symm)
*/
void CreateBinMapping();

Expand All @@ -143,7 +143,7 @@ namespace Belle2 {
void defineHisto(std::vector<TH1D*> hdedxhit[2], TH1D* hdedxlay[2], TH1D* hentalay[2]);

/**
* function to get bins of trunction from histogram
* function to get bins of truncation from histogram
*/
void getTruncatedBins(TH1D* hist, int& binlow, int& binhigh);

Expand All @@ -153,28 +153,28 @@ namespace Belle2 {
double getTruncationMean(TH1D* hist, int binlow, int binhigh);

/**
* funtion to generate final constants
* function to generate final constants
*/
void createPayload();

/**
* funtion to plot merging factor
* function to plot merging factor
*/
void plotMergeFactor(std::map<int, std::vector<double>> bounds, const std::array<int, 2> nDev,
std::map<int, std::vector<int>> steps);

/**
* function to draw the dE/dx histrogram in enta bins
* function to draw the dE/dx histogram in enta bins
*/
void plotdedxHist(std::vector<TH1D*> hdedxhit[2]);

/**
* funtion to draw dedx dist. for Inner/outer layer
* function to draw dedx dist. for Inner/outer layer
*/
void plotLayerDist(TH1D* hdedxL[2]);

/**
* funtion to draw pt vs costh and entrance angle distribution for Inner/Outer layer
* function to draw pt vs costh and entrance angle distribution for Inner/Outer layer
*/
void plotQaPars(TH1D* hentalay[2], TH2D* hptcosth);

Expand Down Expand Up @@ -205,7 +205,7 @@ namespace Belle2 {
double m_eaMin; /**< lower edge of enta angle */
double m_eaMax; /**< upper edge of enta angle */
double m_eaBW; /**< binwdith of enta angle bin */
int m_eaBin; /**< # of bins for etna angle */
int m_eaBin; /**< # of bins for enta angle */

double m_dedxMin; /**< lower edge of dedxhit */
double m_dedxMax; /**< upper edge of dedxhit */
Expand All @@ -214,18 +214,17 @@ namespace Belle2 {
double m_ptMax; /**< a limit on transverse momentum */
double m_cosMax; /**< a limit on cos theta */

double m_truncMin; /**< lower thershold on truncation*/
double m_truncMax; /**< uppr thershold on truncation */
double m_truncMin; /**< lower threshold on truncation*/
double m_truncMax; /**< upper threshold on truncation */

int m_binSplit;/**< multiply nbins by this factor in full range */
int m_binMerge;/**< merge bins by this factor in (-pi/2 <-> -pi/4) and (pi/4 <-> pi/2) region*/

double m_chargeType; /**< charge type for baseline adj */
double m_adjustFac;/**< faactor with that one what to adjust baseline */
double m_adjustFac;/**< factor with that one what to adjust baseline */

bool isFixTrunc; /**< true = fix window for all out/inner layers */
bool isVarBins; /**< true: if variable bin size is requested */
bool isRotSymm; /**< if rotation symmtery requested */
bool isRotSymm; /**< if rotation symmetry requested */
bool isMakePlots; /**< produce plots for status */
bool isPrintLog; /**< print more debug information */
bool isMerge; /**< print more debug information */
Expand All @@ -234,9 +233,9 @@ namespace Belle2 {
std::string m_runExp; /**< add suffix to all plot name */
std::string m_label[2] = {"IL", "OL"}; /**< add inner/outer layer label */

std::vector<int> m_eaBinLocal; /**< # of var bins for etna angle */
std::array<std::vector<int>, 2> m_binIndex; /**< symm/Var bin numebrs */
std::array<std::vector<double>, 2>m_binValue; /**< etna Var bin values */
std::vector<int> m_eaBinLocal; /**< # of var bins for enta angle */
std::array<std::vector<int>, 2> m_binIndex; /**< symm/Var bin numbers */
std::array<std::vector<double>, 2>m_binValue; /**< enta Var bin values */

std::vector<std::vector<double>> m_onedcors; /**< final vectors of calibration */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
#include <framework/database/DBObjPtr.h>
#include <framework/database/IntervalOfValidity.h>

#include <reconstruction/dbobjects/CDCDedxBadWires.h>
#include <reconstruction/dbobjects/CDCDedxWireGain.h>
#include <cdc/dbobjects/CDCDedxBadWires.h>
#include <cdc/dbobjects/CDCDedxWireGain.h>

#include <calibration/CalibrationAlgorithm.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include<map>
#include<vector>

#include <reconstruction/dbobjects/CDCDedxCosineEdge.h>
#include <cdc/dbobjects/CDCDedxCosineEdge.h>
#include <calibration/CalibrationAlgorithm.h>
#include <framework/database/DBObjPtr.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#pragma once

#include <reconstruction/dbobjects/CDCDedxCosineCor.h>
#include <cdc/dbobjects/CDCDedxCosineCor.h>
#include <calibration/CalibrationAlgorithm.h>
#include <framework/database/DBObjPtr.h>
#include <TH1D.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@

#include <calibration/CalibrationAlgorithm.h>
#include <framework/database/DBObjPtr.h>
#include <reconstruction/dbobjects/CDCDedxInjectionTime.h>
#include <reconstruction/utility/CDCDedxMeanPred.h>
#include <reconstruction/utility/CDCDedxSigmaPred.h>
#include <cdc/dbobjects/CDCDedxInjectionTime.h>
#include <cdc/utilities/CDCDedxMeanPred.h>
#include <cdc/utilities/CDCDedxSigmaPred.h>
#include <framework/gearbox/Const.h>

// namespace constants
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#pragma once

#include <reconstruction/dbobjects/CDCDedxRunGain.h>
#include <cdc/dbobjects/CDCDedxRunGain.h>
#include <calibration/CalibrationAlgorithm.h>
#include <framework/database/DBObjPtr.h>
#include <TH1D.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#include <TStyle.h>
#include <TH1I.h>

#include <reconstruction/dbobjects/CDCDedxWireGain.h>
#include <reconstruction/dbobjects/CDCDedxBadWires.h>
#include <cdc/dbobjects/CDCDedxWireGain.h>
#include <cdc/dbobjects/CDCDedxBadWires.h>
#include <cdc/dbobjects/CDCGeometry.h>
#include <calibration/CalibrationAlgorithm.h>
#include <framework/database/DBObjPtr.h>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
* This file is licensed under LGPL-3.0, see LICENSE.md. *
**************************************************************************/

#include <reconstruction/calibration/CDCDedx1DCellAlgorithm.h>
#include <cdc/calibration/CDCdEdx/CDCDedx1DCellAlgorithm.h>
#include <cmath>

using namespace Belle2;

//-----------------------------------------------------------------
Expand Down Expand Up @@ -90,13 +92,13 @@ CalibrationAlgorithm::EResult CDCDedx1DCellAlgorithm::calibrate()

ttree->GetEvent(i);

if (abs(costh) > m_cosMax) continue;
if (std::abs(costh) > m_cosMax) continue;

// remove wide angle bhabha tracks
// double mom = pt/sqrt(1-costh*costh);
// if(abs(pt)<2.4 && abs(mom)>3.6)continue;

if (abs(pt) > m_ptMax) continue;
if (std::abs(pt) > m_ptMax) continue;

//change to random 10%
int rand = gRandom->Integer(100);
Expand Down Expand Up @@ -273,7 +275,7 @@ void CDCDedx1DCellAlgorithm::CreateBinMapping()
if (isVarBins) binwidth = m_eaBW * steps[il][ibin];
double binvalue = pastbin + binwidth;
pastbin = binvalue;
if (abs(binvalue) < 1e-5)binvalue = 0;
if (std::abs(binvalue) < 1e-5)binvalue = 0;
m_binValue[il].push_back(binvalue);
}
temp = ieaprime;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
* This file is licensed under LGPL-3.0, see LICENSE.md. *
**************************************************************************/

#include <reconstruction/calibration/CDCDedx2DCellAlgorithm.h>
#include <cdc/calibration/CDCdEdx/CDCDedx2DCellAlgorithm.h>

#include <reconstruction/dbobjects/CDCDedx2DCell.h>
#include <cdc/dbobjects/CDCDedx2DCell.h>

#include <TBox.h>
#include <TCanvas.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* This file is licensed under LGPL-3.0, see LICENSE.md. *
**************************************************************************/

#include <reconstruction/calibration/CDCDedxBadWireAlgorithm.h>
#include <cdc/calibration/CDCdEdx/CDCDedxBadWireAlgorithm.h>

using namespace Belle2;
using namespace CDC;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <TH1I.h>
#include <TLegend.h>

#include <reconstruction/calibration/CDCDedxCosEdgeAlgorithm.h>
#include <cdc/calibration/CDCdEdx/CDCDedxCosEdgeAlgorithm.h>

using namespace Belle2;
using namespace std;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* This file is licensed under LGPL-3.0, see LICENSE.md. *
**************************************************************************/

#include <reconstruction/calibration/CDCDedxCosineAlgorithm.h>
#include <cdc/calibration/CDCdEdx/CDCDedxCosineAlgorithm.h>

#include <TF1.h>
#include <TLine.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* This file is licensed under LGPL-3.0, see LICENSE.md. *
**************************************************************************/

#include <reconstruction/calibration/CDCDedxInjectTimeAlgorithm.h>
#include <cdc/calibration/CDCdEdx/CDCDedxInjectTimeAlgorithm.h>

using namespace Belle2;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
* This file is licensed under LGPL-3.0, see LICENSE.md. *
**************************************************************************/

#include <reconstruction/calibration/CDCDedxMomentumAlgorithm.h>
#include <cdc/calibration/CDCdEdx/CDCDedxMomentumAlgorithm.h>

#include <reconstruction/dbobjects/CDCDedxMomentumCor.h>
#include <cdc/dbobjects/CDCDedxMomentumCor.h>

#include <TF1.h>
#include <TH1F.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* This file is licensed under LGPL-3.0, see LICENSE.md. *
**************************************************************************/

#include <reconstruction/calibration/CDCDedxRunGainAlgorithm.h>
#include <cdc/calibration/CDCdEdx/CDCDedxRunGainAlgorithm.h>

#include <TF1.h>
#include <TCanvas.h>
Expand Down Expand Up @@ -215,4 +215,4 @@ void CDCDedxRunGainAlgorithm::FitGaussianWRange(TH1D*& temphist, TString& status
status = "FitOK";
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* This file is licensed under LGPL-3.0, see LICENSE.md. *
**************************************************************************/

#include <reconstruction/calibration/CDCDedxWireGainAlgorithm.h>
#include <cdc/calibration/CDCdEdx/CDCDedxWireGainAlgorithm.h>

using namespace Belle2;
using namespace CDC;
Expand Down
2 changes: 1 addition & 1 deletion cdc/calibration/SConscript
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Import('env')

env['LIBS'] = ['tracking_trackFindingCDC','$ROOT_LIBS','Minuit', 'cdc', 'cdc_dataobjects', 'framework',
'calibration', 'calibration_dataobjects']
'calibration', 'calibration_dataobjects', 'cdc_dbobjects']
env['SUBLIB'] = True

Return('env')
Loading

0 comments on commit 9174ede

Please sign in to comment.