44 #ifndef CEXMC_HISTO_MANAGER_HH 
   45 #define CEXMC_HISTO_MANAGER_HH 
   52 #include <G4String.hh> 
   58 #ifdef CEXMC_USE_ROOTQT 
   61 class  CexmcHistoManagerMessenger;
 
   66     CexmcMomentumBP_TPT_Histo,
 
   67     CexmcMomentumBP_RT_Histo,
 
   68     CexmcMomentumIP_TPT_Histo,
 
   69     CexmcTPInMonitor_TPT_Histo,
 
   70     CexmcTPInTarget_TPT_Histo,
 
   71     CexmcTPInTarget_RT_Histo,
 
   72     CexmcRecMasses_EDT_Histo,
 
   73     CexmcRecMasses_RT_Histo,
 
   74     CexmcAbsorbedEnergy_EDT_Histo,
 
   75     CexmcAbsorbedEnergy_RT_Histo,
 
   76     CexmcHistoType_ARReal_START,
 
   77     CexmcRecMassOP_ARReal_RT_Histo = CexmcHistoType_ARReal_START,
 
   78     CexmcRecMassNOP_ARReal_RT_Histo,
 
   79     CexmcOPDPAtLeftCalorimeter_ARReal_EDT_Histo,
 
   80     CexmcOPDPAtRightCalorimeter_ARReal_EDT_Histo,
 
   81     CexmcOPDPAtLeftCalorimeter_ARReal_RT_Histo,
 
   82     CexmcOPDPAtRightCalorimeter_ARReal_RT_Histo,
 
   83     CexmcRecOPDPAtLeftCalorimeter_ARReal_EDT_Histo,
 
   84     CexmcRecOPDPAtRightCalorimeter_ARReal_EDT_Histo,
 
   85     CexmcRecOPDPAtLeftCalorimeter_ARReal_RT_Histo,
 
   86     CexmcRecOPDPAtRightCalorimeter_ARReal_RT_Histo,
 
   87     CexmcKinEnAtLeftCalorimeter_ARReal_TPT_Histo,
 
   88     CexmcKinEnAtRightCalorimeter_ARReal_TPT_Histo,
 
   89     CexmcKinEnAtLeftCalorimeter_ARReal_RT_Histo,
 
   90     CexmcKinEnAtRightCalorimeter_ARReal_RT_Histo,
 
   91     CexmcAbsEnInLeftCalorimeter_ARReal_EDT_Histo,
 
   92     CexmcAbsEnInRightCalorimeter_ARReal_EDT_Histo,
 
   93     CexmcAbsEnInLeftCalorimeter_ARReal_RT_Histo,
 
   94     CexmcAbsEnInRightCalorimeter_ARReal_RT_Histo,
 
   95     CexmcMissEnFromLeftCalorimeter_ARReal_RT_Histo,
 
   96     CexmcMissEnFromRightCalorimeter_ARReal_RT_Histo,
 
   97     CexmcKinEnOP_LAB_ARReal_TPT_Histo,
 
   98     CexmcKinEnOP_LAB_ARReal_RT_Histo,
 
   99     CexmcAngleOP_SCM_ARReal_TPT_Histo,
 
  100     CexmcAngleOP_SCM_ARReal_RT_Histo,
 
  101     CexmcRecAngleOP_SCM_ARReal_RT_Histo,
 
  102     CexmcDiffAngleOP_SCM_ARReal_RT_Histo,
 
  103     CexmcOpenAngle_ARReal_TPT_Histo,
 
  104     CexmcOpenAngle_ARReal_RT_Histo,
 
  105     CexmcRecOpenAngle_ARReal_RT_Histo,
 
  106     CexmcDiffOpenAngle_ARReal_RT_Histo,
 
  107     CexmcTPInTarget_ARReal_TPT_Histo,
 
  108     CexmcTPInTarget_ARReal_RT_Histo,
 
  109     CexmcHistoType_ARReal_END = CexmcTPInTarget_ARReal_RT_Histo,
 
  114 class  CexmcHistoManager
 
  117         typedef std::vector< TH1 * >                          CexmcHistoVector;
 
  119         typedef std::map< CexmcHistoType, CexmcHistoVector >  CexmcHistosMap;
 
  121         typedef CexmcHistosMap::value_type                    CexmcHistoPair;
 
  123         struct  CexmcHistoAxisData
 
  125             CexmcHistoAxisData() : nBins( 0 ), nBinsMin( 0 ), nBinsMax( 0 )
 
  130                 nBins( nBins ), nBinsMin( nBinsMin ), nBinsMax( nBinsMax )
 
  140         typedef std::vector< CexmcHistoAxisData >             CexmcHistoAxes;
 
  149         struct  CexmcHistoData
 
  152                 type( CexmcHistoType_SIZE ), impl( Cexmc_TH1F ),
 
  153                 isARHisto( false ), isARRec( false ), triggerType( 
CexmcTPT )
 
  156             CexmcHistoData( CexmcHistoType  type, CexmcHistoImpl  impl,
 
  157                             bool  isARHisto, 
bool  isARRec,
 
  160                             const CexmcHistoAxes &  axes ) :
 
  161                 type( type ), impl( impl ), isARHisto( isARHisto ),
 
  162                 isARRec( isARRec ), triggerType( triggerType ), name( name ),
 
  163                 title( title ), axes( axes )
 
  184         static CexmcHistoManager *  Instance( 
void );
 
  186         static void                 Destroy( 
void );
 
  191         ~CexmcHistoManager();
 
  200         void  Add( CexmcHistoType  histoType, 
unsigned int  index,
 
  203         void  Add( CexmcHistoType  histoType, 
unsigned int  index, 
G4double  x,
 
  206         void  Add( CexmcHistoType  histoType, 
unsigned int  index, 
G4double  x,
 
  209         void  Add( CexmcHistoType  histoType, 
unsigned int  index, 
G4int  binX,
 
  212         void  List( 
void ) 
const;
 
  216 #ifdef CEXMC_USE_ROOTQT 
  217         void  Draw( 
const G4String &  histoName,
 
  218                     const G4String &  histoDrawOptions = 
"" );
 
  222         void   SetVerboseLevel( 
G4int  value );
 
  224         G4int  GetVerboseLevel( 
void ) 
const;
 
  227         void  AddHisto( 
const CexmcHistoData &  data,
 
  230         void  CreateHisto( CexmcHistoVector &  histoVector,
 
  233                            const CexmcHistoAxes &  axes );
 
  239         CexmcHistosMap                histos;
 
  253 #ifdef CEXMC_USE_ROOTQT 
  256         TQtWidget *                   rootCanvas;
 
  260         CexmcHistoManagerMessenger *  messenger;
 
  263         static CexmcHistoManager *    
instance;
 
  267 inline void  CexmcHistoManager::SetVerboseLevel( 
G4int  value )
 
  269     verboseLevel = value;
 
  273 inline G4int  CexmcHistoManager::GetVerboseLevel( 
void )
 const 
std::vector< CexmcAngularRange > CexmcAngularRangeList
 
static MCTruthManager * instance
 
G4bool isInitialized()
Check if the generator is initialized. 
 
void Add(G4int Elements, T *To, T *A1, T *A2=NULL)
Add two arrays together. 
 
void Print(G4Element &ele)