Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef TEMPLATECREATION_H
0004 #define TEMPLATECREATION_H
0005 
0006 #include <fun4all/SubsysReco.h>
0007 
0008 #include <string>
0009 
0010 class PHCompositeNode;
0011 class TProfile;
0012 class TH2D;
0013 class TemplateCreation : public SubsysReco
0014 {
0015  public:
0016 
0017   TemplateCreation(const std::string &name = "TemplateCreation");
0018 
0019   ~TemplateCreation() override;
0020 
0021  
0022   int Init(PHCompositeNode *topNode) override;
0023   int InitRun(PHCompositeNode *topNode) override;
0024   int process_event(PHCompositeNode *topNode) override;
0025   int ResetEvent(PHCompositeNode *topNode) override;
0026   int EndRun(const int runnumber) override;
0027   int End(PHCompositeNode *topNode) override;
0028   int Reset(PHCompositeNode * /*topNode*/) override;
0029   
0030   void set_outfile(std::string outfilename)
0031   {
0032     s_outfilename = outfilename;
0033   }  
0034   void set_nsamples(int samples)
0035   {
0036     nsamples = samples;
0037   }
0038 
0039   void set_packetrange(int lowpacket, int highpacket)
0040   {
0041     m_packet_low = lowpacket;
0042     m_packet_high = highpacket;
0043   }
0044 
0045 
0046 
0047  private:
0048   double rising_shape(double *x, double *par);
0049   std::string s_outfilename;
0050   TProfile *hp_all_particle_fine;
0051   TH2D *h2_all_particle_fine;
0052   int nsamples;
0053   int m_packet_low;
0054   int m_packet_high;
0055   int m_nchannels;
0056   double target_hm;
0057   int binscale = 8;
0058 
0059 
0060 };
0061 
0062 #endif // TEMPLATECREATION_H