Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLUE algorithm and Phoenix visualiser #1416

Open
wants to merge 41 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
93e24b1
Add VisGenerator, analyzer for producing JSON from event data for vis…
Lysarina Jun 12, 2024
035d2e9
Updates to ldmx-vis
Lysarina Jun 14, 2024
d6d91d7
Checkpoint for VisGenertor
Lysarina Jun 17, 2024
0cc403c
First draft of ldmx phoenix visualization
Lysarina Jun 17, 2024
eee6022
Colors array
Lysarina Jun 17, 2024
3ff7c7f
Small fixes
Lysarina Jun 17, 2024
3a1c9f5
Added nlohmann library for JSON
Lysarina Jun 19, 2024
5fbe589
Short installation readme for ldmx-vis
Lysarina Jun 19, 2024
8c6c9bc
Add some bools to VisGenerator to choose JSON content
Lysarina Jun 20, 2024
0e05643
EcalClusterProducer is now runnable
Lysarina Jun 20, 2024
de65817
Merge
Lysarina Jun 28, 2024
bb2d34a
Remove empty ecal clusters from collection
Lysarina Jun 24, 2024
3d72269
Clean saved ecal clusters
Lysarina Jun 25, 2024
fc5461b
More vis info
Lysarina Jun 28, 2024
648bd64
Add EcalClusterAnalyzer
Lysarina Jun 28, 2024
7e25996
SimCalorimeterHits now have origin electron ID in Contrib
Lysarina Jul 2, 2024
81f0ae4
Update vis and clusteranalyzer with originid
Lysarina Jul 2, 2024
87e9dee
Add electron truth visualization
Lysarina Jul 3, 2024
46f5f51
Implemented ATLAS topoclustering method
Lysarina Jul 3, 2024
4044c33
Some refactoring of visgenerator
Lysarina Jul 8, 2024
84783ab
More histograms
Lysarina Jul 8, 2024
fd37a6b
First draft of CLUE
Lysarina Jul 29, 2024
b6a8688
WIP; improving merged cluster splitting
Lysarina Jul 30, 2024
542380f
First okay-ish version of single-layer CLUE + cleanup
Lysarina Jul 31, 2024
3a0338f
Layer visualization + commented out calocell vis
Lysarina Jul 31, 2024
8e47820
Tuning parameters
Lysarina Jul 31, 2024
3ec004e
Changed event display default file
Lysarina Jul 31, 2024
9bfcc1d
Git complained about file size, cut it in half
Lysarina Jul 31, 2024
862f57e
Removed some obsolete files
Lysarina Aug 1, 2024
ed0fd84
A shabby layering expansion for CLUE
Lysarina Aug 1, 2024
26a31aa
Checkpoint for mixed hit handling
Lysarina Aug 2, 2024
2e103f1
A very bad mixed hit handling, will be removed
Lysarina Aug 2, 2024
f03e0f1
Final updates to bad mixed hit handling
Lysarina Aug 5, 2024
9ec8b36
Cleaning + generalization of nbr of electrons
Lysarina Aug 5, 2024
2c90bf8
Generalisation updates
Lysarina Aug 7, 2024
98e99fa
Removed printline
Lysarina Aug 7, 2024
65e52e9
Generalization to origin ID storage
Lysarina Aug 14, 2024
a181335
3D Clustering, comments, cleaning
Lysarina Aug 26, 2024
d9c5f75
Changed variable names
Lysarina Aug 26, 2024
f474d22
clang
Lysarina Aug 28, 2024
a0093c2
clang
Lysarina Aug 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 113 additions & 0 deletions DQM/include/DQM/VisGenerator.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
#ifndef DQM_VISGENERATOR_H
#define DQM_VISGENERATOR_H

// LDMX Framework
#include "Framework/Configure/Parameters.h"
#include "Framework/EventProcessor.h"

// JSON
#include "DQM/json.hpp"

namespace dqm {

/**
* @class VisGenerator
* @brief Generates JSON file of event data for Phoenix visualisation
*/

class VisGenerator : public framework::Analyzer {
public:
VisGenerator(const std::string& name, framework::Process& process)
: Analyzer(name, process) {}

virtual void configure(framework::config::Parameters& ps);

virtual void analyze(const framework::Event& event);

void ecalClusterRecHit(const framework::Event& event,
const std::string& eKey);

void groundTruthTracks(const framework::Event& event,
const std::string& eKey);

void extractLayers(const framework::Event& event, const std::string& eKey);

// void caloCells(const framework::Event& event, const std::string& eKey);

virtual void onNewRun(const ldmx::RunHeader& runHeader);

virtual void onProcessEnd();

private:
// Include ground truth (simulated) info
bool includeGroundTruth_;

// Simulated info has contribs with originID (not available by default)
bool originIdAvailable_;

// Number of electrons in simulation
int nbrOfElectrons_;

// Collection Name for SimHits
std::string ecalSimHitColl_;

// Pass Name for SimHits
std::string ecalSimHitPass_;

// Include ecal rec hits
bool includeEcalRecHits_;

// Collection Name for RecHits
std::string ecalRecHitColl_;

// Pass Name for RecHits
std::string ecalRecHitPass_;

// Include ecal clusters
bool includeEcalClusters_;

// Collection name for ecal clusters
std::string ecalClusterColl_;

// Pass name for ecal clusters
std::string ecalClusterPass_;

// Generate json file visualizing hit origins
// NEEDS ORIGIN ID
bool visHitOrigin_;
std::string truthFilename_;

// Generate json file visualizing ecal layers
bool visLayers_;
std::string layerFilename_;

// Output filename
std::string filename_;

// List of event numbers that should be included
std::vector<int> onlyIncludeEvents_;
// List of event numbers that should be excluded
std::vector<int> excludeEvents_;

// Run number
int runNbr_{1};

nlohmann::json j;

nlohmann::json truth;

nlohmann::json layer;

// Colors available for clusters
std::vector<std::string> colors{"0xFFB6C1", "0xFFA500", "0xFFFF00",
"0x7FFF00", "0x00FFFF", "0x663399"};

// String "translations" for hex colors above
// If adding new hex colors, add translation here
std::vector<std::string> colorstrings{"pink", "orange", "yellow",
"green", "blue", "purple"};
};

} // namespace dqm

#endif
Loading
Loading