20 #include "nusimdata/SimulationBase/MCTruth.h"
28 #include "Api/PandoraApi.h"
29 #include "Managers/PluginManager.h"
30 #include "Plugins/LArTransformationPlugin.h"
38 #include "messagefacility/MessageLogger/MessageLogger.h"
42 namespace lar_pandora {
51 mf::LogDebug(
"LArPandora") <<
" *** LArPandoraInput::CreatePandoraHits2D(...) *** "
55 throw cet::exception(
"LArPandora")
56 <<
"CreatePandoraHits2D - primary Pandora instance does not exist ";
60 art::ServiceHandle<geo::Geometry const> theGeometry;
61 auto const detProp = art::ServiceHandle<detinfo::DetectorPropertiesService const>()->DataFor(e);
69 for (HitVector::const_iterator iter = hitVector.begin(), iterEnd = hitVector.end();
72 const art::Ptr<recob::Hit>
hit = *iter;
77 const double hit_Charge(hit->Integral());
78 const double hit_Time(hit->PeakTime());
79 const double hit_TimeStart(hit->PeakTimeMinusRMS());
80 const double hit_TimeEnd(hit->PeakTimePlusRMS());
84 detProp.ConvertTicksToX(hit_Time, hit_WireID.Plane, hit_WireID.TPC, hit_WireID.Cryostat));
85 const double dxpos_cm(
86 std::fabs(
detProp.ConvertTicksToX(
87 hit_TimeEnd, hit_WireID.Plane, hit_WireID.TPC, hit_WireID.Cryostat) -
89 hit_TimeStart, hit_WireID.Plane, hit_WireID.TPC, hit_WireID.Cryostat)));
93 theGeometry->Cryostat(hit_WireID.Cryostat)
95 .Plane(hit_WireID.Plane)
96 .Wire(hit_WireID.Wire)
98 const double y0_cm(xyz[1]);
99 const double z0_cm(xyz[2]);
102 const double wire_pitch_cm(theGeometry->WirePitch(hit_View));
109 caloHitParameters.m_expectedDirection = pandora::CartesianVector(0., 0., 1.);
110 caloHitParameters.m_cellNormalVector = pandora::CartesianVector(0., 0., 1.);
111 caloHitParameters.m_cellSize0 = settings.
m_dx_cm;
113 caloHitParameters.m_cellThickness = wire_pitch_cm;
114 caloHitParameters.m_cellGeometry = pandora::RECTANGULAR;
115 caloHitParameters.m_time = 0.;
116 caloHitParameters.m_nCellRadiationLengths = settings.
m_dx_cm / settings.
m_rad_cm;
117 caloHitParameters.m_nCellInteractionLengths = settings.
m_dx_cm / settings.
m_int_cm;
118 caloHitParameters.m_isDigital =
false;
119 caloHitParameters.m_hitRegion = pandora::SINGLE_REGION;
120 caloHitParameters.m_layer = 0;
121 caloHitParameters.m_isInOuterSamplingLayer =
false;
122 caloHitParameters.m_inputEnergy = hit_Charge;
123 caloHitParameters.m_mipEquivalentEnergy = mips;
124 caloHitParameters.m_electromagneticEnergy = mips * settings.
m_mips_to_gev;
125 caloHitParameters.m_hadronicEnergy = mips * settings.
m_mips_to_gev;
126 caloHitParameters.m_pParentAddress = (
void*)((intptr_t)(++hitCounter));
130 driftVolumeMap, hit_WireID.Cryostat, hit_WireID.TPC);
132 if (hit_View == detType->
TargetViewW(hit_WireID.TPC, hit_WireID.Cryostat)) {
133 caloHitParameters.m_hitType = pandora::TPC_VIEW_W;
134 const double wpos_cm(
135 pPandora->GetPlugins()->GetLArTransformationPlugin()->YZtoW(y0_cm, z0_cm));
136 caloHitParameters.m_positionVector = pandora::CartesianVector(xpos_cm, 0., wpos_cm);
138 else if (hit_View == detType->
TargetViewU(hit_WireID.TPC, hit_WireID.Cryostat)) {
139 caloHitParameters.m_hitType = pandora::TPC_VIEW_U;
140 const double upos_cm(
141 pPandora->GetPlugins()->GetLArTransformationPlugin()->YZtoU(y0_cm, z0_cm));
142 caloHitParameters.m_positionVector = pandora::CartesianVector(xpos_cm, 0., upos_cm);
144 else if (hit_View == detType->
TargetViewV(hit_WireID.TPC, hit_WireID.Cryostat)) {
145 caloHitParameters.m_hitType = pandora::TPC_VIEW_V;
146 const double vpos_cm(
147 pPandora->GetPlugins()->GetLArTransformationPlugin()->YZtoV(y0_cm, z0_cm));
148 caloHitParameters.m_positionVector = pandora::CartesianVector(xpos_cm, 0., vpos_cm);
151 throw cet::exception(
"LArPandora")
152 <<
"CreatePandoraHits2D - this wire view not recognised (View=" << hit_View <<
") ";
155 catch (
const pandora::StatusCodeException&) {
156 mf::LogWarning(
"LArPandora")
157 <<
"CreatePandoraHits2D - invalid calo hit parameter provided, all assigned values must "
158 "be finite, calo hit omitted "
165 throw cet::exception(
"LArPandora")
166 <<
"CreatePandoraHits2D - detected an excessive number of hits (" << hitCounter <<
") ";
168 idToHitMap[hitCounter] =
hit;
172 PANDORA_THROW_RESULT_IF(
173 pandora::STATUS_CODE_SUCCESS,
175 PandoraApi::CaloHit::Create(*pPandora, caloHitParameters, caloHitFactory));
177 catch (
const pandora::StatusCodeException&) {
178 mf::LogWarning(
"LArPandora") <<
"CreatePandoraHits2D - unable to create calo hit, "
179 "insufficient or invalid information supplied "
192 mf::LogDebug(
"LArPandora") <<
" *** LArPandoraInput::CreatePandoraLArTPCs(...) *** "
196 throw cet::exception(
"LArPandora")
197 <<
"CreatePandoraDetectorGaps - primary Pandora instance does not exist ";
205 parameters.m_larTPCVolumeId = driftVolume.GetVolumeID();
206 parameters.m_centerX = driftVolume.GetCenterX();
207 parameters.m_centerY = driftVolume.GetCenterY();
208 parameters.m_centerZ = driftVolume.GetCenterZ();
209 parameters.m_widthX = driftVolume.GetWidthX();
210 parameters.m_widthY = driftVolume.GetWidthY();
211 parameters.m_widthZ = driftVolume.GetWidthZ();
212 parameters.m_wirePitchU = driftVolume.GetWirePitchU();
213 parameters.m_wirePitchV = driftVolume.GetWirePitchV();
214 parameters.m_wirePitchW = driftVolume.GetWirePitchW();
215 parameters.m_wireAngleU = driftVolume.GetWireAngleU();
216 parameters.m_wireAngleV = driftVolume.GetWireAngleV();
217 parameters.m_wireAngleW = driftVolume.GetWireAngleW();
218 parameters.m_sigmaUVW = driftVolume.GetSigmaUVZ();
219 parameters.m_isDriftInPositiveX = driftVolume.IsPositiveDrift();
221 catch (
const pandora::StatusCodeException&) {
222 mf::LogWarning(
"LArPandora") <<
"CreatePandoraLArTPCs - invalid tpc parameter provided, "
223 "all assigned values must be finite, tpc omitted "
229 PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS,
231 PandoraApi::Geometry::LArTPC::Create(*pPandora, parameters));
233 catch (
const pandora::StatusCodeException&) {
234 mf::LogWarning(
"LArPandora") <<
"CreatePandoraLArTPCs - unable to create tpc, insufficient "
235 "or invalid information supplied "
250 art::ServiceHandle<geo::Geometry const> theGeometry;
253 mf::LogDebug(
"LArPandora") <<
" *** LArPandoraInput::CreatePandoraDetectorGaps(...) *** "
257 throw cet::exception(
"LArPandora")
258 <<
"CreatePandoraDetectorGaps - primary Pandora instance does not exist ";
268 catch (
const pandora::StatusCodeException&) {
269 mf::LogWarning(
"LArPandora")
270 <<
"CreatePandoraDetectorGaps - invalid line gap parameter provided, all assigned values "
271 "must be finite, line gap omitted "
276 PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS,
278 PandoraApi::Geometry::LineGap::Create(*pPandora, parameters));
280 catch (
const pandora::StatusCodeException&) {
281 mf::LogWarning(
"LArPandora") <<
"CreatePandoraDetectorGaps - unable to create line gap, "
282 "insufficient or invalid information supplied "
295 mf::LogDebug(
"LArPandora") <<
" *** LArPandoraInput::CreatePandoraReadoutGaps(...) *** "
299 throw cet::exception(
"LArPandora")
300 <<
"CreatePandoraReadoutGaps - primary Pandora instance does not exist ";
304 art::ServiceHandle<geo::Geometry const> theGeometry;
306 art::ServiceHandle<lariov::ChannelStatusService const>()->GetProvider());
310 for (
unsigned int icstat = 0; icstat < theGeometry->Ncryostats(); ++icstat) {
311 for (
unsigned int itpc = 0; itpc < theGeometry->NTPC(icstat); ++itpc) {
314 for (
unsigned int iplane = 0; iplane <
TPC.Nplanes(); ++iplane) {
316 const float halfWirePitch(0.5f * theGeometry->WirePitch(plane.View()));
317 const unsigned int nWires(theGeometry->Nwires(plane.ID()));
319 int firstBadWire(-1), lastBadWire(-1);
321 for (
unsigned int iwire = 0; iwire < nWires; ++iwire) {
323 theGeometry->PlaneWireToChannel(iplane, iwire, itpc, icstat));
324 const bool isBadChannel(channelStatus.
IsBad(channel));
325 const bool isLastWire(nWires == (iwire + 1));
327 if (isBadChannel && (firstBadWire < 0)) firstBadWire = iwire;
329 if (isBadChannel || isLastWire) lastBadWire = iwire;
331 if (isBadChannel && !isLastWire)
continue;
333 if ((firstBadWire < 0) || (lastBadWire < 0))
continue;
335 double firstXYZ[3], lastXYZ[3];
336 theGeometry->Cryostat(icstat)
340 .GetCenter(firstXYZ);
341 theGeometry->Cryostat(icstat)
353 float xFirst(-std::numeric_limits<float>::max());
354 float xLast(std::numeric_limits<float>::max());
356 const unsigned int volumeId(
358 LArDriftVolumeMap::const_iterator volumeIter(driftVolumeMap.find(volumeId));
360 if (driftVolumeMap.end() != volumeIter) {
361 xFirst = volumeIter->second.GetCenterX() - 0.5f * volumeIter->second.GetWidthX();
362 xLast = volumeIter->second.GetCenterX() + 0.5f * volumeIter->second.GetWidthX();
367 iview, itpc, icstat, firstXYZ, lastXYZ, halfWirePitch, xFirst, xLast, pPandora);
369 catch (
const pandora::StatusCodeException&) {
370 mf::LogWarning(
"LArPandora")
371 <<
"CreatePandoraReadoutGaps - invalid line gap parameter provided, all assigned "
372 "values must be finite, line gap omitted "
378 PANDORA_THROW_RESULT_IF(pandora::STATUS_CODE_SUCCESS,
380 PandoraApi::Geometry::LineGap::Create(*pPandora, parameters));
382 catch (
const pandora::StatusCodeException&) {
383 mf::LogWarning(
"LArPandora") <<
"CreatePandoraReadoutGaps - unable to create line "
384 "gap, insufficient or invalid information supplied "
402 mf::LogDebug(
"LArPandora") <<
" *** LArPandoraInput::CreatePandoraMCParticles(...) *** "
404 art::ServiceHandle<cheat::ParticleInventoryService const> particleInventoryService;
407 throw cet::exception(
"LArPandora")
408 <<
"CreatePandoraMCParticles - primary Pandora instance does not exist ";
415 for (MCParticlesToMCTruth::const_iterator iter = particleToTruthMap.begin(),
416 iterEnd = particleToTruthMap.end();
419 const art::Ptr<simb::MCParticle> particle = iter->first;
420 particleMap[particle->TrackId()] = particle;
424 int neutrinoCounter(0);
428 for (MCTruthToMCParticles::const_iterator iter1 = truthToParticleMap.begin(),
429 iterEnd1 = truthToParticleMap.end();
432 const art::Ptr<simb::MCTruth> truth = iter1->first;
434 if (truth->NeutrinoSet()) {
435 const simb::MCNeutrino neutrino(truth->GetNeutrino());
439 throw cet::exception(
"LArPandora")
440 <<
"CreatePandoraMCParticles - detected an excessive number of mc neutrinos ("
441 << neutrinoCounter <<
")";
443 const int neutrinoID(neutrinoCounter + 9 * settings.
m_uidOffset);
449 mcParticleParameters.
m_nuanceCode = neutrino.InteractionType();
451 mcParticleParameters.m_energy = neutrino.Nu().E();
452 mcParticleParameters.m_momentum =
453 pandora::CartesianVector(neutrino.Nu().Px(), neutrino.Nu().Py(), neutrino.Nu().Pz());
454 mcParticleParameters.m_vertex =
455 pandora::CartesianVector(neutrino.Nu().Vx(), neutrino.Nu().Vy(), neutrino.Nu().Vz());
456 mcParticleParameters.m_endpoint =
457 pandora::CartesianVector(neutrino.Nu().Vx(), neutrino.Nu().Vy(), neutrino.Nu().Vz());
458 mcParticleParameters.m_particleId = neutrino.Nu().PdgCode();
459 mcParticleParameters.m_mcParticleType = pandora::MC_3D;
460 mcParticleParameters.m_pParentAddress = (
void*)((intptr_t)neutrinoID);
462 catch (
const pandora::StatusCodeException&) {
463 mf::LogWarning(
"LArPandora")
464 <<
"CreatePandoraMCParticles - invalid mc neutrino parameter provided, all assigned "
465 "values must be finite, mc neutrino omitted "
471 PANDORA_THROW_RESULT_IF(
472 pandora::STATUS_CODE_SUCCESS,
474 PandoraApi::MCParticle::Create(*pPandora, mcParticleParameters, mcParticleFactory));
476 catch (
const pandora::StatusCodeException&) {
477 mf::LogWarning(
"LArPandora") <<
"CreatePandoraMCParticles - unable to create mc "
478 "neutrino, insufficient or invalid information supplied "
486 for (MCParticleVector::const_iterator iter2 = particleVector.begin(),
487 iterEnd2 = particleVector.end();
490 const art::Ptr<simb::MCParticle> particle = *iter2;
491 const int trackID(particle->TrackId());
494 if (particle->Mother() == 0) {
496 PANDORA_THROW_RESULT_IF(
497 pandora::STATUS_CODE_SUCCESS,
499 PandoraApi::SetMCParentDaughterRelationship(
500 *pPandora, (
void*)((intptr_t)neutrinoID), (
void*)((intptr_t)trackID)));
502 catch (
const pandora::StatusCodeException&) {
503 mf::LogWarning(
"LArPandora") <<
"CreatePandoraMCParticles - unable to create mc "
504 "particle relationship, invalid information supplied "
513 mf::LogDebug(
"LArPandora") <<
" Number of Pandora neutrinos: " << neutrinoCounter
517 int particleCounter(0);
520 std::map<const simb::MCParticle, bool> primaryGeneratorMCParticleMap;
523 for (MCParticleMap::const_iterator iterI = particleMap.begin(), iterEndI = particleMap.end();
526 const art::Ptr<simb::MCParticle> particle = iterI->second;
528 if (particle->TrackId() != iterI->first)
529 throw cet::exception(
"LArPandora") <<
"CreatePandoraMCParticles - mc truth information "
530 "appears to be scrambled in this event";
533 throw cet::exception(
"LArPandora")
534 <<
"CreatePandoraMCParticles - detected an excessive number of MC particles ("
535 << particle->TrackId() <<
")";
540 int firstT(-1), lastT(-1);
543 if (firstT < 0 && lastT < 0) {
549 const float vtxX(particle->Vx(firstT));
550 const float vtxY(particle->Vy(firstT));
551 const float vtxZ(particle->Vz(firstT));
553 const float endX(particle->Vx(lastT));
554 const float endY(particle->Vy(lastT));
555 const float endZ(particle->Vz(lastT));
557 const float pX(particle->Px(firstT));
558 const float pY(particle->Py(firstT));
559 const float pZ(particle->Pz(firstT));
560 const float E(particle->E(firstT));
564 const int trackID(particle->TrackId());
565 const simb::Origin_t
origin(particleInventoryService->TrackIdToMCTruth(trackID).Origin());
573 else if (simb::kSingleParticle ==
origin) {
584 if (processMap.find(particle->Process()) != processMap.end()) {
585 mcParticleParameters.
m_process = processMap[particle->Process()];
589 mf::LogWarning(
"LArPandora")
590 <<
"CreatePandoraMCParticles - found an unknown process" << std::endl;
592 mcParticleParameters.m_energy =
E;
593 mcParticleParameters.m_particleId = particle->PdgCode();
594 mcParticleParameters.m_momentum = pandora::CartesianVector(pX, pY, pZ);
595 mcParticleParameters.m_vertex = pandora::CartesianVector(vtxX, vtxY, vtxZ);
596 mcParticleParameters.m_endpoint = pandora::CartesianVector(endX, endY, endZ);
597 mcParticleParameters.m_mcParticleType = pandora::MC_3D;
598 mcParticleParameters.m_pParentAddress = (
void*)((intptr_t)particle->TrackId());
600 catch (
const pandora::StatusCodeException&) {
601 mf::LogWarning(
"LArPandora")
602 <<
"CreatePandoraMCParticles - invalid mc particle parameter provided, all assigned "
603 "values must be finite, mc particle omitted "
609 PANDORA_THROW_RESULT_IF(
610 pandora::STATUS_CODE_SUCCESS,
612 PandoraApi::MCParticle::Create(*pPandora, mcParticleParameters, mcParticleFactory));
614 catch (
const pandora::StatusCodeException&) {
615 mf::LogWarning(
"LArPandora") <<
"CreatePandoraMCParticles - unable to create mc particle, "
616 "insufficient or invalid information supplied "
622 const int id_mother(particle->Mother());
623 MCParticleMap::const_iterator iterJ = particleMap.find(id_mother);
625 if (iterJ != particleMap.end()) {
627 PANDORA_THROW_RESULT_IF(
628 pandora::STATUS_CODE_SUCCESS,
630 PandoraApi::SetMCParentDaughterRelationship(
631 *pPandora, (
void*)((intptr_t)id_mother), (
void*)((intptr_t)particle->TrackId())));
633 catch (
const pandora::StatusCodeException&) {
634 mf::LogWarning(
"LArPandora") <<
"CreatePandoraMCParticles - Unable to create mc particle "
635 "relationship, invalid information supplied "
642 mf::LogDebug(
"LArPandora") <<
"Number of mc particles: " << particleCounter << std::endl;
650 std::map<const simb::MCParticle, bool>& primaryMCParticleMap)
652 for (
const simb::MCParticle& mcParticle : mcParticleVector) {
653 if (
"primary" == mcParticle.Process()) {
654 primaryMCParticleMap.emplace(std::make_pair(mcParticle,
false));
663 std::map<const simb::MCParticle, bool>& primaryMCParticleMap)
665 for (
auto& mcParticleIter : primaryMCParticleMap) {
666 if (!mcParticleIter.second) {
667 const simb::MCParticle primaryMCParticle(mcParticleIter.first);
669 if (std::fabs(primaryMCParticle.Px() - mcParticle->Px()) <
670 std::numeric_limits<double>::epsilon() &&
671 std::fabs(primaryMCParticle.Py() - mcParticle->Py()) <
672 std::numeric_limits<double>::epsilon() &&
673 std::fabs(primaryMCParticle.Pz() - mcParticle->Pz()) <
674 std::numeric_limits<double>::epsilon()) {
675 mcParticleIter.second =
true;
690 mf::LogDebug(
"LArPandora") <<
" *** LArPandoraInput::CreatePandoraMCLinks(...) *** "
694 throw cet::exception(
"LArPandora")
695 <<
"CreatePandoraMCLinks2D - primary Pandora instance does not exist ";
699 for (IdToHitMap::const_iterator iterI = idToHitMap.begin(), iterEndI = idToHitMap.end();
702 const int hitID(iterI->first);
703 const art::Ptr<recob::Hit>
hit(iterI->second);
707 HitsToTrackIDEs::const_iterator iterJ = hitToParticleMap.find(hit);
709 if (hitToParticleMap.end() == iterJ)
continue;
713 if (trackCollection.size() == 0)
714 throw cet::exception(
"LArPandora")
715 <<
"CreatePandoraMCLinks2D - found a hit without any associated MC truth information ";
718 for (
unsigned int k = 0;
k < trackCollection.size(); ++
k) {
720 const int trackID(
std::abs(trackIDE.trackID));
721 const float energyFrac(trackIDE.energyFrac);
724 PANDORA_THROW_RESULT_IF(
725 pandora::STATUS_CODE_SUCCESS,
727 PandoraApi::SetCaloHitToMCParticleRelationship(
728 *pPandora, (
void*)((intptr_t)hitID), (
void*)((intptr_t)trackID), energyFrac));
730 catch (
const pandora::StatusCodeException&) {
731 mf::LogWarning(
"LArPandora") <<
"CreatePandoraMCLinks2D - unable to create calo hit to "
732 "mc particle relationship, invalid information supplied "
744 const art::Ptr<simb::MCParticle>& particle,
748 art::ServiceHandle<geo::Geometry const> theGeometry;
752 for (
unsigned int icstat = 0; icstat < theGeometry->Ncryostats(); ++icstat) {
753 for (
unsigned int itpc = 0; itpc < theGeometry->NTPC(icstat); ++itpc) {
754 int thisfirstT(-1), thislastT(-1);
757 if (thisfirstT < 0)
continue;
759 if (firstT < 0 || thisfirstT < firstT) firstT = thisfirstT;
761 if (lastT < 0 || thislastT > lastT) lastT = thislastT;
770 const unsigned int tpc,
771 const art::Ptr<simb::MCParticle>& particle,
775 art::ServiceHandle<geo::Geometry const> theGeometry;
777 bool foundStartPosition(
false);
778 const int numTrajectoryPoints(static_cast<int>(particle->NumberTrajectoryPoints()));
780 for (
int nt = 0; nt < numTrajectoryPoints; ++nt) {
781 const double pos[3] = {particle->Vx(nt), particle->Vy(nt), particle->Vz(nt)};
782 geo::TPCID tpcID = theGeometry->FindTPCAtPosition(pos);
786 if (!(cstat == tpcID.
Cryostat && tpc == tpcID.
TPC))
continue;
790 if (!foundStartPosition) {
792 foundStartPosition =
true;
801 const art::Ptr<simb::MCParticle>& particle,
804 art::ServiceHandle<geo::Geometry const> theGeometry;
805 auto const clock_data = art::ServiceHandle<detinfo::DetectorClocksService const>()->DataFor(e);
806 auto const det_prop =
807 art::ServiceHandle<detinfo::DetectorPropertiesService const>()->DataFor(e, clock_data);
809 unsigned int which_tpc(0);
810 unsigned int which_cstat(0);
811 double pos[3] = {particle->Vx(nt), particle->Vy(nt), particle->Vz(nt)};
812 theGeometry->PositionToTPC(pos, which_tpc, which_cstat);
814 const float vtxT(particle->T(nt));
815 const float vtxTDC(clock_data.TPCG4Time2Tick(vtxT));
818 const geo::TPCGeo& theTpc = theGeometry->Cryostat(which_cstat).TPC(which_tpc);
820 return (driftDir * (vtxTDC - vtxTDC0) * det_prop.GetXTicksCoefficient());
828 const double hit_Charge,
831 art::ServiceHandle<geo::Geometry const> theGeometry;
834 const double dQdX(hit_Charge / (theGeometry->WirePitch(hit_View)));
835 const double dQdX_e(dQdX /
910 : m_pPrimaryPandora(nullptr)
911 , m_useHitWidths(
true)
912 , m_useBirksCorrection(
false)
913 , m_useActiveBoundingBox(
false)
914 , m_uidOffset(100000000)
915 , m_hitCounterOffset(0)
921 , m_mips_if_negative(0.)
922 , m_mips_to_gev(3.5
e-4)
923 , m_recombination_factor(0.63)
Interface class for LArPandora producer modules, which reconstruct recob::PFParticles from recob::Hit...
virtual bool IsBad(raw::ChannelID_t channel) const =0
Returns whether the specified channel is bad in the current run.
virtual geo::View_t TargetViewW(const geo::TPCID::TPCID_t tpc, const geo::CryostatID::CryostatID_t cstat) const =0
Map a LArSoft view to Pandora's W view.
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
std::map< unsigned int, LArDriftVolume > LArDriftVolumeMap
Header file for the lar calo hit class.
Declaration of signal hit object.
std::map< art::Ptr< simb::MCParticle >, art::Ptr< simb::MCTruth > > MCParticlesToMCTruth
Empty interface to map pandora to specifics in the LArSoft geometry.
bool isValid
Whether this ID points to a valid element.
Geometry information for a single TPC.
std::vector< LArDriftVolume > LArDriftVolumeList
CryostatID_t Cryostat
Index of cryostat.
static unsigned int GetVolumeID(const LArDriftVolumeMap &driftVolumeMap, const unsigned int cstat, const unsigned int tpc)
Get drift volume ID from a specified cryostat/tpc pair.
std::map< int, art::Ptr< recob::Hit > > IdToHitMap
pandora::InputUInt m_larTPCVolumeId
The lar tpc volume id.
Drift towards negative X values.
virtual geo::View_t TargetViewU(const geo::TPCID::TPCID_t tpc, const geo::CryostatID::CryostatID_t cstat) const =0
Map a LArSoft view to Pandora's U view.
pandora::InputInt m_process
The process creating the particle.
std::map< int, art::Ptr< simb::MCParticle > > MCParticleMap
std::map< art::Ptr< recob::Hit >, TrackIDEVector > HitsToTrackIDEs
static unsigned int GetDaughterVolumeID(const LArDriftVolumeMap &driftVolumeMap, const unsigned int cstat, const unsigned int tpc)
Get daughter volume ID from a specified cryostat/tpc pair.
constexpr double kGeVToElectrons
23.6eV per ion pair, 1e9 eV/GeV
std::vector< simb::MCParticle > RawMCParticleVector
pandora::InputUInt m_daughterVolumeId
The daughter volume id.
std::map< art::Ptr< simb::MCTruth >, MCParticleVector > MCTruthToMCParticles
Geometry information for a single wire plane.The plane is represented in the geometry by a solid whic...
std::vector< art::Ptr< simb::MCParticle > > MCParticleVector
std::vector< sim::TrackIDE > TrackIDEVector
double ElectronsToADC() const
Class providing information about the quality of channels.
The data type to uniquely identify a TPC.
DriftDirection_t DriftDirection() const
Returns an enumerator value describing the drift direction.
virtual PandoraApi::Geometry::LineGap::Parameters CreateLineGapParametersFromReadoutGaps(const geo::View_t view, const geo::TPCID::TPCID_t tpc, const geo::CryostatID::CryostatID_t cstat, const double firstXYZ[3], const double lastXYZ[3], const float halfWirePitch, const float xFirst, const float xLast, const pandora::Pandora *pPandora) const =0
Create the line gap parameters to give to the pandora API.
LArMCParticleFactory responsible for object creation.
virtual geo::View_t TargetViewV(const geo::TPCID::TPCID_t tpc, const geo::CryostatID::CryostatID_t cstat) const =0
Map a LArSoft view to Pandora's V view.
fhicl::Table< sbnd::crt::CRTDetSimParams > Parameters
LAr mc particle parameters.
std::vector< art::Ptr< recob::Hit > > HitVector
LArPandoraDetectorType * GetDetectorType()
Factory class that returns the correct detector type interface.
Encapsulate the construction of a single detector plane.
std::vector< LArDetectorGap > LArDetectorGapList
double BirksCorrection(double dQdX) const
dQ/dX in electrons/cm, returns dE/dX in MeV/cm.
pandora::InputInt m_nuanceCode
The nuance code.
Interface for experiment-specific channel quality info provider.
int trigger_offset(DetectorClocksData const &data)
LArCaloHitFactory responsible for object creation.
drift volume class to hold properties of drift volume
unsigned int ChannelID_t
Type representing the ID of a readout channel.
TPCID_t TPC
Index of the TPC within its cryostat.
Interface for experiment-specific service for channel quality info.
Collection of Physical constants used in LArSoft.
Helper functions for extracting detector geometry for use in reconsruction.
Ionization energy from a Geant4 track.
BEGIN_PROLOG don t mess with this pandoraTrackGausCryoW true
art framework interface to geometry description
constexpr Point origin()
Returns a origin position with a point of the specified type.
virtual PandoraApi::Geometry::LineGap::Parameters CreateLineGapParametersFromDetectorGaps(const LArDetectorGap &gap) const =0
Create the line gap parameters to give to the pandora API.
drift volume class to hold properties of drift volume
Encapsulate the construction of a single detector plane.