Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-10 10:18:06

0001 #pragma once
0002 
0003 #include <TTree.h>
0004 
0005 #include "CherenkovEvent.h"
0006 
0007 #define _MOMENTUM_CUTOFF_DEFAULT_ (0.010)
0008 
0009 namespace IRT2 {
0010 
0011 class CherenkovDetectorCollection;
0012 class CherenkovDetector;
0013 
0014 class GeantImport {
0015  public:
0016   GeantImport(const char *dfname = 0, const char *cfname = 0, const char *dname = 0);
0017   // FIXME: do it all better later;
0018   GeantImport(CherenkovDetectorCollection *geometry, CherenkovDetector *cdet, CherenkovEvent *event):
0019     m_Tree(0),
0020     m_IrtGeometry(geometry),
0021     m_RICH(cdet),
0022     m_Event(event),
0023     m_PurgeSecondaries(true),
0024     m_MomentumCutoff(_MOMENTUM_CUTOFF_DEFAULT_) {};
0025   ~GeantImport() {};
0026 
0027   CherenkovDetector *GetMyRICH( void )    const { return m_RICH; }
0028   CherenkovEvent *Event( void )           const { return m_Event; };
0029   void GetInputTreeEntry(unsigned ev)     const;// { if (m_Tree) m_Tree->GetEntry(ev); };
0030   unsigned GetInputTreeEntryCount( void ) const { return m_Tree ? m_Tree->GetEntries() : 0; };
0031  
0032   void AccountSecondaries( void )               { m_PurgeSecondaries = false; };
0033   void SetMomentumCutoff(double value)          { m_MomentumCutoff = value; };
0034 
0035   CherenkovDetectorCollection *GetIrtGeometry( void ) const { return m_IrtGeometry; };
0036 
0037 protected:
0038   // Input TTree with GEANT simulated data;
0039   TTree *m_Tree;
0040   
0041  private:
0042   CherenkovDetectorCollection *m_IrtGeometry;
0043   
0044   // "pfRICH" or "dRICH" structure pointer;
0045   CherenkovDetector *m_RICH;
0046 
0047   // Input (GEANT) / output(Reco) event structure;
0048   CherenkovEvent *m_Event;
0049 
0050   bool m_PurgeSecondaries;
0051   double m_MomentumCutoff;
0052 };
0053 
0054 } // namespace IRT2