Skip to content

Commit

Permalink
Merge branch 'main' into update-topocluster-reco-associations
Browse files Browse the repository at this point in the history
  • Loading branch information
Chao1009 authored Oct 29, 2024
2 parents 783c121 + 32d3800 commit 4d021ac
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ci:
skip: [clang-format]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
Expand Down
36 changes: 19 additions & 17 deletions src/algorithms/fardetectors/MatrixTransferStatic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ void eicrecon::MatrixTransferStatic::process(
aY[1][0] = 0.0204108951; //c
aY[1][1] = -0.139318692; //d

local_x_offset = -0.339334;
local_y_offset = -0.000299454;
local_x_slope_offset = -0.219603248;
local_y_slope_offset = -0.000176128;
local_x_offset = -1209.29;//-0.339334; these are the local coordinate values
local_y_offset = 0.00132511;//-0.000299454;
local_x_slope_offset = -45.4772;//-0.219603248;
local_y_slope_offset = 0.000745498;//-0.000176128;

}
else if(abs(100.0 - nomMomentum)/100.0 < nomMomentumError){
Expand All @@ -99,10 +99,10 @@ void eicrecon::MatrixTransferStatic::process(
aY[1][0] = 0.0226283320; //c
aY[1][1] = -0.082666019; //d

local_x_offset = -0.329072;
local_y_offset = -0.00028343;
local_x_slope_offset = -0.218525084;
local_y_slope_offset = -0.00015321;
local_x_offset = -1209.27;//-0.329072;
local_y_offset = 0.00355218;//-0.00028343;
local_x_slope_offset = -45.4737;//-0.218525084;
local_y_slope_offset = 0.00204394;//-0.00015321;

}
else if(abs(41.0 - nomMomentum)/41.0 < nomMomentumError){
Expand All @@ -117,10 +117,10 @@ void eicrecon::MatrixTransferStatic::process(
aY[1][0] = 0.0179664765; //c
aY[1][1] = 0.004160679; //d

local_x_offset = -0.283273;
local_y_offset = -0.00552451;
local_x_slope_offset = -0.21174031;
local_y_slope_offset = -0.003212011;
local_x_offset = -1209.22;//-0.283273;
local_y_offset = 0.00868737;//-0.00552451;
local_x_slope_offset = -45.4641;//-0.21174031;
local_y_slope_offset = 0.00498786;//-0.003212011;

}
else if(abs(135.0 - nomMomentum)/135.0 < nomMomentumError){ //135 GeV deuterons
Expand Down Expand Up @@ -202,16 +202,16 @@ void eicrecon::MatrixTransferStatic::process(

if(!goodHit2 && gpos.z() > m_cfg.hit2minZ && gpos.z() < m_cfg.hit2maxZ){

goodHit[1].x = pos0.x();
goodHit[1].y = pos0.y();
goodHit[1].z = gpos.z();
goodHit[1].x = gpos.x(); //pos0.x() - pos0 is local coordinates, gpos is global
goodHit[1].y = gpos.y(); //pos0.y() - temporarily changing to global to solve the local coordinate issue
goodHit[1].z = gpos.z(); // - which is unique to the Roman pots situation
goodHit2 = true;

}
if(!goodHit1 && gpos.z() > m_cfg.hit1minZ && gpos.z() < m_cfg.hit1maxZ){

goodHit[0].x = pos0.x();
goodHit[0].y = pos0.y();
goodHit[0].x = gpos.x(); //pos0.x()
goodHit[0].y = gpos.y(); //pos0.y()
goodHit[0].z = gpos.z();
goodHit1 = true;

Expand Down Expand Up @@ -252,6 +252,8 @@ void eicrecon::MatrixTransferStatic::process(
}
}

Yip[1] = Yrp[0]/aY[0][1];

// convert polar angles to radians
double rsx = Xip[1] * dd4hep::mrad;
double rsy = Yip[1] * dd4hep::mrad;
Expand Down
2 changes: 2 additions & 0 deletions src/algorithms/tracking/ActsToTracks.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ void ActsToTracks::process(const Input& input, const Output& output) const {
for (size_t j = 0; const auto& [b, y] : edm4eic_indexed_units) {
// FIXME why not pars.getCovariance()(i,j) = covariance(a,b) / x / y;
cov(i,j) = covariance(a,b) / x / y;
++j;
}
++i;
}
pars.setCovariance(cov);

Expand Down
4 changes: 2 additions & 2 deletions src/algorithms/tracking/CKFTracking.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ namespace eicrecon {
std::vector<ActsExamples::Trajectories*>,
std::vector<ActsExamples::ConstTrackContainer*>
>
CKFTracking::process(const edm4eic::Measurement2DCollection& meas2Ds,
const edm4eic::TrackParametersCollection &init_trk_params) {
CKFTracking::process(const edm4eic::TrackParametersCollection& init_trk_params,
const edm4eic::Measurement2DCollection& meas2Ds) {


// create sourcelink and measurement containers
Expand Down
4 changes: 2 additions & 2 deletions src/algorithms/tracking/CKFTracking.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ namespace eicrecon {
std::vector<ActsExamples::Trajectories*>,
std::vector<ActsExamples::ConstTrackContainer*>
>
process(const edm4eic::Measurement2DCollection& meas2Ds,
const edm4eic::TrackParametersCollection &init_trk_params);
process(const edm4eic::TrackParametersCollection& init_trk_params,
const edm4eic::Measurement2DCollection& meas2Ds);

private:
std::shared_ptr<spdlog::logger> m_log;
Expand Down
9 changes: 5 additions & 4 deletions src/detectors/B0ECAL/B0ECAL.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@ extern "C" {
{"B0ECalRawHits"},
#endif
{
.eRes = {0.0 * sqrt(dd4hep::GeV), 0.02, 0.0 * dd4hep::GeV},
// The stochastic term is set using light yield in PbOW4 of N_photons = 145.75 / GeV / mm, for 6x6 mm2 sensors with PDE=0.18 (a=1/sqrt(145.75*36*0.18))
.eRes = {0.0326 * sqrt(dd4hep::GeV), 0.00, 0.0 * dd4hep::GeV},
.tRes = 0.0 * dd4hep::ns,
.threshold= 5.0 * dd4hep::MeV,
.capADC = 16384,
.dyRangeADC = 20 * dd4hep::GeV,
.dyRangeADC = 170 * dd4hep::GeV,
.pedMeanADC = 100,
.pedSigmaADC = 1,
.resolutionTDC = 1e-11,
Expand All @@ -50,12 +51,12 @@ extern "C" {
"B0ECalRecHits", {"B0ECalRawHits"}, {"B0ECalRecHits"},
{
.capADC = 16384,
.dyRangeADC = 20. * dd4hep::GeV,
.dyRangeADC = 170. * dd4hep::GeV,
.pedMeanADC = 100,
.pedSigmaADC = 1,
.resolutionTDC = 1e-11,
.thresholdFactor = 0.0,
.thresholdValue = 0.0,
.thresholdValue = 1.0, // using threshold of 10 photons = 10 MeV = 1 ADC
.sampFrac = "0.998",
.readout = "B0ECalHits",
.sectorField = "sector",
Expand Down
2 changes: 1 addition & 1 deletion src/detectors/BEMC/BEMC.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ extern "C" {
.resolutionTDC = EcalBarrelScFi_resolutionTDC,
.thresholdFactor = 0.0, // use only thresholdValue
.thresholdValue = 5.0, // 16384 ADC counts/1500 MeV * 0.5 MeV (desired threshold) = 5.46
.sampFrac = "0.10200085",
.sampFrac = "0.09320426",
.readout = "EcalBarrelScFiHits",
.layerField = "layer",
.sectorField = "sector",
Expand Down
2 changes: 1 addition & 1 deletion src/detectors/EEMC/EEMC.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ extern "C" {
{"EcalEndcapNRawHits"},
#endif
{
.eRes = {0.0 * sqrt(dd4hep::GeV), 0.02, 0.0 * dd4hep::GeV},
.eRes = {0.0 * sqrt(dd4hep::GeV), 0.0, 0.0 * dd4hep::GeV},
.tRes = 0.0 * dd4hep::ns,
.threshold = 0.0 * dd4hep::MeV, // Use ADC cut instead
.capADC = EcalEndcapN_capADC,
Expand Down
4 changes: 2 additions & 2 deletions src/global/tracking/CKFTracking_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ class CKFTracking_factory :
m_acts_trajectories_output(),
m_acts_tracks_output()
) = m_algo->process(
*m_measurements_input(),
*m_parameters_input()
*m_parameters_input(),
*m_measurements_input()
);
}
};
Expand Down

0 comments on commit 4d021ac

Please sign in to comment.