36 std::cout <<
"============================================================================" << std::endl;
37 std::cout <<
"DoCastorAnalysis:: Initialized as observer" << std::endl;
39 std::cout <<
" Castor Tree will be created" << std::endl;
40 std::cout <<
" Castor Tree will be in file: " << TreeFileName << std::endl;
44 std::cout <<
"============================================================================" << std::endl;
48 std::cout <<
"DoCastorAnalysis: output event root file created" << std::endl;
75 std::cout <<
"DoCastorAnalysis: Ntuple event written" << std::endl;
79 std::cout <<
"DoCastorAnalysis: Event file closed" << std::endl;
84 std::cout << std::endl <<
"DoCastorAnalysis: end of process" << std::endl;
97 std::cout << std::endl <<
"DoCastorAnalysis: Starting Run" << std::endl;
117 G4HCofThisEvent* allHC = (*evt)()->GetHCofThisEvent();
119 int CAFIid = G4SDManager::GetSDMpointer()->GetCollectionID(
"CastorFI");
124 unsigned int volumeID = 0;
127 int nentries = theCAFI->entries();
129 std::cout <<
"nentries in CAFI: " << nentries << std::endl;
172 for (
int ihit = 0; ihit < nentries; ihit++) {
177 int zside, sector, zmodule;
179 theCastorNumScheme->
unpackIndex(volumeID, zside, sector, zmodule);
185 double theta = pos.theta();
187 double phi = pos.phi();
204 std::cout <<
"hit " << ihit + 1 <<
" : x = " << (*psimhit_x)[ihit] <<
" , eta = " << (*psimhit_eta)[ihit]
205 <<
" , phi = " << (*psimhit_phi)[ihit] <<
" , energy = " << (*psimhit_energy)[ihit] << std::endl;
214 delete theCastorNumScheme;
std::vector< double > * psimhit_z
T getParameter(std::string const &) const
math::XYZPoint getPosition() const
std::vector< double > simhit_eta
std::vector< double > * psimhit_x
std::vector< double > simhit_x
std::vector< double > * psimhit_energy
void update(const BeginOfJob *run) override
This routine will be called when the appropriate signal arrives.
std::vector< double > * psimhit_phi
Geom::Theta< T > theta() const
DoCastorAnalysis(const edm::ParameterSet &p)
~DoCastorAnalysis() override
std::vector< double > simhit_phi
static void unpackIndex(const uint32_t &idx, int &z, int §or, int &zmodule)
std::vector< double > * psimhit_y
std::vector< double > simhit_y
std::vector< double > * psimhit_eta
Tan< T >::type tan(const T &t)
TFile * CastorOutputEventFile
std::vector< int > simhit_sector
XYZPointD XYZPoint
point in space with cartesian internal representation
std::vector< int > * psimhit_sector
G4THitsCollection< CaloG4Hit > CaloG4HitCollection
std::vector< double > simhit_energy
uint32_t getUnitID() const
std::vector< int > * psimhit_module
double getEnergyDeposit() const
std::vector< int > simhit_module
std::vector< double > simhit_z