Commit 6286f15e authored by David Blyth's avatar David Blyth

fixme

parent 8ae1e154
......@@ -32,22 +32,7 @@ void printBFields() {
}
}
genfit::AbsMeasurement *makeMeasurement(proio::Event *event, uint64_t id, eic::EnergyDep *entry,
double &time) {
bool fromID = false;
time = 0;
int nTimes = 0;
for (auto sourceID : entry->source()) {
auto simHit = dynamic_cast<eic::SimHit *>(event->GetEntry(sourceID));
if (simHit) {
if (simHit->particle() == id) fromID = true;
time += simHit->globalprepos().t();
time += simHit->globalpostpos().t();
nTimes += 2;
}
}
time /= nTimes;
if (!fromID) return NULL;
genfit::AbsMeasurement *makeMeasurement(eic::EnergyDep *entry) {
if (entry->mean() / entry->noise() < 2) return NULL;
TVectorD hitCoords(3);
......@@ -217,7 +202,19 @@ int main(int argc, char **argv) {
while (reader->Next(&event)) {
checkMetadata(&event);
;
std::set<uint64_t> available_obs;
std::map<uint64_t, genfit::AbsMeasurement *> measurements;
for (auto id : event.TaggedEntries("Tracker")) {
auto obs = dynamic_cast<eic::EnergyDep *>(event.GetEntry(id));
if (obs) {
available_obs.insert(id);
measurements[id] = makeMeasurement(obs);
}
}
while (available_obs.size() > 2) {
;
}
// std::vector<uint64_t> partIDs = event->TaggedEntries("GenStable");
// for (auto partID : partIDs) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment