38 std::cout<<
"============================================================================"<<std::endl;
39 std::cout <<
"DoCastorAnalysis:: Initialized as observer"<< std::endl;
41 std::cout <<
" Castor Tree will be created"<< std::endl;
42 std::cout <<
" Castor Tree will be in file: "<<TreeFileName<<std::endl;
45 std::cout<<
"============================================================================"<<std::endl;
49 std::cout <<
"DoCastorAnalysis: output event root file created"<< std::endl;
77 std::cout <<
"DoCastorAnalysis: Ntuple event written" << std::endl;
80 std::cout <<
"DoCastorAnalysis: Event file closed" << std::endl;
84 std::cout<<std::endl<<
"DoCastorAnalysis: end of process"<<std::endl;
94 std::cout <<
" Starting new job " << std::endl;
101 std::cout << std::endl <<
"DoCastorAnalysis: Starting Run"<< std::endl;
123 G4HCofThisEvent* allHC = (*evt)()->GetHCofThisEvent();
125 int CAFIid = G4SDManager::GetSDMpointer()->GetCollectionID(
"CastorFI");
130 unsigned int volumeID=0;
133 int nentries = theCAFI->entries();
177 for (
int ihit = 0; ihit < nentries; ihit++) {
182 int zside,sector,zmodule;
184 theCastorNumScheme->
unpackIndex(volumeID,zside,sector,zmodule);
190 double theta = pos.theta();
192 double phi = pos.phi();
208 if(
debug)
std::cout<<
"hit "<<ihit+1<<
" : x = "<<(*psimhit_x)[ihit]<<
" , eta = "<<(*psimhit_eta)[ihit]
209 <<
" , phi = "<<(*psimhit_phi)[ihit]<<
" , energy = "<<(*psimhit_energy)[ihit]<<std::endl;
217 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
std::vector< double > * psimhit_phi
Geom::Theta< T > theta() const
DoCastorAnalysis(const edm::ParameterSet &p)
virtual ~DoCastorAnalysis()
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
void update(const BeginOfJob *run)
This routine will be called when the appropriate signal arrives.
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