Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2026-10-15 08:21:04

0001 #ifndef G4EVAL_PARTICLEFLOWEVAL_H
0002 #define G4EVAL_PARTICLEFLOWEVAL_H
0003 
0004 #include "CaloRawClusterEval.h"
0005 #include "CaloRawTowerEval.h"
0006 #include "CaloTruthEval.h"
0007 #include "SvtxTrackEval.h"
0008 
0009 #include <map>
0010 #include <set>
0011 #include <string>
0012 #include <utility>
0013 #include <vector>
0014 
0015 #include <calobase/RawTowerDefs.h>
0016 
0017 class PHCompositeNode;
0018 class PHG4Hit;
0019 class PHG4Particle;
0020 class PHG4Shower;
0021 class RawClusterContainer;
0022 class RawCluster;
0023 class RawTowerContainer;
0024 class TowerInfoContainer;
0025 class ParticleFlowElement;
0026 class SvtxTrack;
0027 class CaloRawClusterEval;
0028 
0029 
0030 
0031 class ParticleFlowEval
0032 {
0033  public:
0034   /// example caloname: CEMC, HCALIN, HCALOUT
0035   ParticleFlowEval(PHCompositeNode* topNode);
0036   virtual ~ParticleFlowEval();
0037 
0038   //Separate the HCal layers (inner and outer) in order to evaluate
0039   void SeparateHCals(RawCluster *hcluster);
0040 
0041   //Pass the particle to be evaluated, then get other information
0042   PHG4Particle* get_truth_particle_flow(ParticleFlowElement *pflow);
0043 
0044   /// reinitialize the eval for a new event
0045   void next_event(PHCompositeNode* topNode);
0046 
0047   std::set<PHG4Shower*> all_truth_primary_showers_emcal();
0048   std::set<PHG4Shower*> all_truth_primary_showers_emcal(RawCluster *cluster);
0049   std::set<PHG4Shower*> all_truth_primary_showers_hcal();
0050   std::set<PHG4Shower*> all_truth_primary_showers_ihcal();
0051   std::set<PHG4Shower*> all_truth_primary_showers_ohcal();
0052 
0053   PHG4Shower* max_truth_primary_shower_by_energy_emcal();
0054   PHG4Shower* max_truth_primary_shower_by_energy_emcal(RawCluster *cluster);
0055   PHG4Shower* max_truth_primary_shower_by_energy_hcal();
0056   PHG4Shower* max_truth_primary_shower_by_energy_ihcal();
0057   PHG4Shower* max_truth_primary_shower_by_energy_ohcal();
0058 
0059   std::set<PHG4Particle*> all_truth_primary_particles_emcal();
0060   std::set<PHG4Particle*> all_truth_primary_particles_emcal(RawCluster* cluster);
0061   std::set<PHG4Particle*> all_truth_primary_particles_hcal();
0062   std::set<PHG4Particle*> all_truth_primary_particles_ihcal();
0063   std::set<PHG4Particle*> all_truth_primary_particles_ohcal();
0064 
0065   PHG4Particle* max_truth_primary_particle_by_energy_emcal();
0066   PHG4Particle* max_truth_primary_particle_by_energy_emcal(RawCluster* cluster);
0067   PHG4Particle* max_truth_primary_particle_by_energy_hcal();
0068   PHG4Particle* max_truth_primary_particle_by_energy_ihcal();
0069   PHG4Particle* max_truth_primary_particle_by_energy_ohcal();
0070   PHG4Particle* max_truth_particle_by_nclusters_track();
0071 
0072  private:
0073   CaloRawClusterEval _clustereval_emcal;
0074   CaloRawClusterEval _clustereval_ihcal;
0075   CaloRawClusterEval _clustereval_ohcal;
0076   SvtxTrackEval _trackeval;
0077 
0078   ParticleFlowElement *_pflow = nullptr;
0079   SvtxTrack *_track = nullptr;
0080   std::vector<RawCluster*> _topo_emcal;
0081   RawCluster *_topo_ihcal = nullptr;
0082   RawCluster *_topo_ohcal = nullptr;
0083 
0084 };
0085 
0086 #endif  // G4EVAL_PARTICLEFLOWEVAL_H