-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
37b94be
commit 98c58a1
Showing
74 changed files
with
3,922 additions
and
4,375 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
115 changes: 49 additions & 66 deletions
115
Tracking/include/Tracking/Digitization/SiElectrodeData.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,55 @@ | ||
#pragma once | ||
|
||
//---< SimCore >---// | ||
#include "SimCore/Event/SimTrackerHit.h" | ||
#include <set> | ||
|
||
#include "SimCore/Event/SimTrackerHit.h" | ||
|
||
namespace tracking { | ||
namespace digitization { | ||
|
||
class SiElectrodeData { | ||
|
||
public: | ||
|
||
SiElectrodeData(); | ||
|
||
SiElectrodeData(int charge) { | ||
charge_ = charge; | ||
} | ||
|
||
~SiElectrodeData() { | ||
sim_hits_.clear(); | ||
} | ||
|
||
SiElectrodeData(int charge, const ldmx::SimTrackerHit& sim_hit) { | ||
|
||
charge_ = charge; | ||
sim_hits_.insert(sim_hit); | ||
} | ||
|
||
// TODO:: Maybe use the vector directly? | ||
SiElectrodeData(int charge, | ||
const std::vector<ldmx::SimTrackerHit>& sim_hits) { | ||
|
||
charge_ = charge; | ||
|
||
for (auto& sim_hit : sim_hits) { | ||
sim_hits_.insert(sim_hit); | ||
} | ||
} | ||
|
||
|
||
bool isValid() const { | ||
return (getCharge() != 0); | ||
} | ||
|
||
int getCharge() const {return charge_;} | ||
|
||
std::set<ldmx::SimTrackerHit> getSimulatedHits() const { | ||
return sim_hits_; | ||
} | ||
|
||
|
||
//TODO Change to operator overloading for cleaner code | ||
SiElectrodeData add(const SiElectrodeData& electrode_data); | ||
|
||
SiElectrodeData add(int charge, std::set<ldmx::SimTrackerHit> simulated_hits); | ||
|
||
SiElectrodeData addCharge(int charge); | ||
|
||
SiElectrodeData addSimulatedHit(const ldmx::SimTrackerHit hit); | ||
|
||
|
||
private: | ||
|
||
int charge_{}; | ||
std::set<ldmx::SimTrackerHit> sim_hits_; | ||
|
||
}; | ||
|
||
|
||
} // digitization | ||
} // tracking | ||
namespace digitization { | ||
|
||
class SiElectrodeData { | ||
public: | ||
SiElectrodeData(); | ||
|
||
SiElectrodeData(int charge) { charge_ = charge; } | ||
|
||
~SiElectrodeData() { sim_hits_.clear(); } | ||
|
||
SiElectrodeData(int charge, const ldmx::SimTrackerHit& sim_hit) { | ||
charge_ = charge; | ||
sim_hits_.insert(sim_hit); | ||
} | ||
|
||
// TODO:: Maybe use the vector directly? | ||
SiElectrodeData(int charge, | ||
const std::vector<ldmx::SimTrackerHit>& sim_hits) { | ||
charge_ = charge; | ||
|
||
for (auto& sim_hit : sim_hits) { | ||
sim_hits_.insert(sim_hit); | ||
} | ||
} | ||
|
||
bool isValid() const { return (getCharge() != 0); } | ||
|
||
int getCharge() const { return charge_; } | ||
|
||
std::set<ldmx::SimTrackerHit> getSimulatedHits() const { return sim_hits_; } | ||
|
||
// TODO Change to operator overloading for cleaner code | ||
SiElectrodeData add(const SiElectrodeData& electrode_data); | ||
|
||
SiElectrodeData add(int charge, std::set<ldmx::SimTrackerHit> simulated_hits); | ||
|
||
SiElectrodeData addCharge(int charge); | ||
|
||
SiElectrodeData addSimulatedHit(const ldmx::SimTrackerHit hit); | ||
|
||
private: | ||
int charge_{}; | ||
std::set<ldmx::SimTrackerHit> sim_hits_; | ||
}; | ||
|
||
} // namespace digitization | ||
} // namespace tracking |
Oops, something went wrong.