Skip to content

Commit c461ba5

Browse files
Remove vector and use XAs
1 parent 306b771 commit c461ba5

2 files changed

Lines changed: 3 additions & 10 deletions

File tree

sbndcode/LightPropagationCorrection/LightPropagationCorrection_module.cc

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@ sbnd::LightPropagationCorrection::LightPropagationCorrection(fhicl::ParameterSet
3636
fOpDetX.push_back(pdCenter.X());
3737
fOpDetY.push_back(pdCenter.Y());
3838
fOpDetZ.push_back(pdCenter.Z());
39-
if(fPDSMap.pdType(opch)=="pmt_coated") fOpDetType.push_back(0);
40-
else if(fPDSMap.pdType(opch)=="pmt_uncoated") fOpDetType.push_back(1);
41-
else if(fPDSMap.pdType(opch)=="xarapuca_vuv") fOpDetType.push_back(2);
42-
else if(fPDSMap.pdType(opch)=="xarapuca_vis") fOpDetType.push_back(3);
43-
else fOpDetType.push_back(-1);
4439
}
4540

4641
auto const& tpc = art::ServiceHandle<geo::Geometry>()->TPC();
@@ -449,15 +444,14 @@ void sbnd::LightPropagationCorrection::GetPropagationTimeCorrectionPerChannel()
449444
double distanceToOpDet = std::sqrt(dx*dx + dy*dy + dz*dz);
450445
double cathodeToOpDet = std::sqrt(_opDetX*_opDetX + (dy/2)*(dy/2) + (dz/2)*(dz/2)); // Distance from cathode to OpDet in mm
451446
double spToCathode = std::sqrt( fSpacePointX[sp]*fSpacePointX[sp] + (dy/2)*(dy/2) + (dz/2)*(dz/2)); // Distance from space point to cathode in mm
447+
452448
float lightPropTimeVIS = spToCathode/fVGroupVUV + cathodeToOpDet/fVGroupVIS; // Speed
453449
float lightPropTimeVUV = distanceToOpDet / fVGroupVUV; // Speed of light in mm/ns for VUV
454450
float lightPropTime = 0;
455-
if(fOpDetType[opdet]==0)
451+
if(fPDSMap.pdType(opch)=="pmt_coated" || fPDSMap.pdType(opch)=="xarapuca_vuv")
456452
lightPropTime = std::min(lightPropTimeVIS, lightPropTimeVUV);
457-
else if(fOpDetType[opdet]==1)
453+
else if(fPDSMap.pdType(opch)=="pmt_uncoated" || fPDSMap.pdType(opch)=="xarapuca_vis")
458454
lightPropTime = lightPropTimeVIS;
459-
else
460-
continue;
461455
float partPropTime = std::sqrt((fSpacePointX[sp]-fRecoVx)*(fSpacePointX[sp]-fRecoVx) + (fSpacePointY[sp]-fRecoVy)*(fSpacePointY[sp]-fRecoVy) + (fSpacePointZ[sp]-fRecoVz)*(fSpacePointZ[sp]-fRecoVz))/fSpeedOfLight;
462456
float PropTime = lightPropTime + partPropTime;
463457
if(PropTime < minPropTime) minPropTime = PropTime;

sbndcode/LightPropagationCorrection/LightPropagationCorrection_module.hh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ private:
162162
std::vector<double> fOpDetX;
163163
std::vector<double> fOpDetY;
164164
std::vector<double> fOpDetZ;
165-
std::vector<int> fOpDetType;
166165

167166
std::string fReco2Label;
168167
std::string fOpT0FinderModuleLabel;

0 commit comments

Comments
 (0)