Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-03 08:15:35

0001 #ifndef __STACALORIMETERCHARACTERIZATION_H__
0002 #define __STACALORIMETERCHARACTERIZATION_H__
0003 
0004 
0005 // --- need to check all these includes...
0006 #include <fun4all/SubsysReco.h>
0007 #include <vector>
0008 
0009 class PHCompositeNode;
0010 //class PHG4HoughTransform;
0011 class TH1D;
0012 class TH2D;
0013 //class TProfile;
0014 class TProfile2D;
0015 class RawTower;
0016 class RawCluster;
0017 class RawTowerContainer;
0018 class RawClusterContainer;
0019 
0020 class STACalorimeterCharacterization: public SubsysReco
0021 {
0022 
0023  public:
0024 
0025   STACalorimeterCharacterization(const std::string &name="STACalorimeterCharacterization");
0026 
0027   int Init(PHCompositeNode*);
0028   int process_event(PHCompositeNode*);
0029   int End(PHCompositeNode*);
0030 
0031   void set_nlayers(unsigned int x) {nlayers = x;}
0032 
0033   void set_verbosity(int x) {verbosity = x;}
0034   //void set_docalocuts(bool x) {docalocuts = x;}
0035 
0036   std::vector<RawTower*> get_ordered_towers(RawCluster*, RawTowerContainer*);
0037   std::vector<RawTower*> get_ordered_towers(const RawTowerContainer*);
0038   std::vector<RawCluster*> get_ordered_clusters(const RawClusterContainer*);
0039   void inspect_ordered_towers(const std::vector<RawTower*>&);
0040   void inspect_ordered_towers(const std::vector<RawTower*>&, int);
0041   void inspect_ordered_towers(const std::vector<RawTower*>&, double, int);
0042 
0043 
0044  private:
0045 
0046   // all values taken from sPHENIX pCDR
0047   // note the somewhat mysterious overlap
0048   // between the outer edge of the EMC
0049   // and the inner edge of the inner HCal
0050   // that shouldn't be a problem here, though
0051   const double emc_radius_inner =  90.0;
0052   const double hci_radius_inner = 115.7;
0053   const double hco_radius_inner = 182.0;
0054   const double emc_radius_outer = 116.1;
0055   const double hci_radius_outer = 137.0;
0056   const double hco_radius_outer = 268.5;
0057 
0058   // PHG4HoughTransform _hough; ERROR
0059 
0060   double magneticfield;
0061 
0062   int verbosity;
0063   //bool docalocuts;
0064 
0065   // event counter
0066   unsigned long long nevents;
0067   unsigned long long nerrors;
0068   unsigned long long nwarnings;
0069 
0070   // number of layers
0071   unsigned int nlayers;
0072 
0073   // output histograms ---------------------------------------------------------
0074 
0075 
0076 
0077   TH2D* _energy_ratio_emc;
0078   TH2D* _energy_ratio_hci;
0079   TH2D* _energy_ratio_hco;
0080   TH2D* _energy_ratio_hct;
0081   TH2D* _energy_ratio_tot_dumb;
0082   TH2D* _energy_ratio_tot_smart;
0083 
0084   TH2D* _energy_ratio_elb_emc;
0085   TH2D* _energy_ratio_elb_hci;
0086   TH2D* _energy_ratio_elb_hco;
0087   TH2D* _energy_ratio_elb_hct;
0088   TH2D* _energy_ratio_elb_tot_dumb;
0089   TH2D* _energy_ratio_elb_tot_smart;
0090 
0091   TH2D* _energy_ratio_eub_emc;
0092   TH2D* _energy_ratio_eub_hci;
0093   TH2D* _energy_ratio_eub_hco;
0094   TH2D* _energy_ratio_eub_hct;
0095   TH2D* _energy_ratio_eub_tot_dumb;
0096   TH2D* _energy_ratio_eub_tot_smart;
0097 
0098   TH2D* _energy_dphi_emc;
0099   TH2D* _energy_dphi_hci;
0100   TH2D* _energy_dphi_hco;
0101 
0102   TH2D* _energy_deta_emc;
0103   TH2D* _energy_deta_hci;
0104   TH2D* _energy_deta_hco;
0105 
0106   TProfile2D* _towers_3x3_emc;
0107   TProfile2D* _towers_5x5_emc;
0108   TProfile2D* _towers_7x7_emc;
0109   TProfile2D* _towers_9x9_emc;
0110 
0111   TH2D* _tower_energy_emc[10];
0112   TH2D* _towersum_energy_emc[10];
0113 
0114   TProfile2D* _towers_3x3_hci;
0115   TProfile2D* _towers_5x5_hci;
0116   TProfile2D* _towers_7x7_hci;
0117   TProfile2D* _towers_9x9_hci;
0118 
0119   TH2D* _tower_energy_hci[10];
0120   TH2D* _towersum_energy_hci[10];
0121 
0122   TProfile2D* _towers_3x3_hco;
0123   TProfile2D* _towers_5x5_hco;
0124   TProfile2D* _towers_7x7_hco;
0125   TProfile2D* _towers_9x9_hco;
0126 
0127   TH2D* _tower_energy_hco[10];
0128   TH2D* _towersum_energy_hco[10];
0129 
0130 };
0131 
0132 #endif // __STACALORIMETERCHARACTERIZATION_H__