Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-09 08:29:23

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 /// \file LXeHistoManager.cc
0027 /// \brief Implementation of the LXeHistoManager class
0028 
0029 #include "LXeHistoManager.hh"
0030 
0031 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0032 
0033 LXeHistoManager::LXeHistoManager() : fFileName("lxe")
0034 {
0035   Book();
0036 }
0037 
0038 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0039 
0040 void LXeHistoManager::Book()
0041 {
0042   // Create or get analysis manager
0043   G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
0044   analysisManager->SetDefaultFileType("root");
0045   analysisManager->SetFileName(fFileName);
0046   analysisManager->SetVerboseLevel(1);
0047   analysisManager->SetActivation(true);  // enable inactivation of histograms
0048 
0049   // Define histogram indices, titles
0050 
0051   // Default values (to be reset via /analysis/h1/set command)
0052   G4int nbins = 100;
0053   G4double vmin = 0.;
0054   G4double vmax = 100.;
0055 
0056   // 0
0057   analysisManager->CreateH1("0", "dummy", nbins, vmin, vmax);
0058   // 1
0059   analysisManager->CreateH1("hits per event", "hits per event", nbins, vmin, vmax);
0060   // 2
0061   analysisManager->CreateH1("hits above threshold", "hits per event above threshold", nbins, vmin,
0062                             vmax);
0063   // 3
0064   analysisManager->CreateH1("scintillation", "scintillation photons per event", nbins, vmin, vmax);
0065   // 4
0066   analysisManager->CreateH1("Cerenkov", "Cerenkov photons per event", nbins, vmin, vmax);
0067   // 5
0068   analysisManager->CreateH1("absorbed", "absorbed photons per event", nbins, vmin, vmax);
0069   // 6
0070   analysisManager->CreateH1("boundary absorbed", "photons absorbed at boundary per event", nbins,
0071                             vmin, vmax);
0072   // 7
0073   analysisManager->CreateH1("E dep", "energy deposition in scintillator per event", nbins, vmin,
0074                             vmax);
0075 
0076   // Create all histograms as inactivated
0077   for (G4int i = 0; i < analysisManager->GetNofH1s(); ++i) {
0078     analysisManager->SetH1Activation(i, false);
0079   }
0080 }