42 unsigned int idx=(det&15)<<28;
43 idx+=(((z+1)/2)&1)<<20;
47 G4cout <<
" ECAL packing " << det <<
" " << z <<
" " << eta <<
" " << phi
48 <<
" into " << idx <<
G4endl;
60 unsigned int idx=(det&15)<<28;
66 G4cout <<
" HCAL packing " << det <<
" " << depth <<
" " << z <<
" " << eta
67 <<
" " << phi <<
" into " << idx <<
G4endl;
97 G4int UnitWithMaxEnergy = 0;
100 for(std::map<
G4int,
G4float,std::less<G4int> >::iterator iter = themap.begin();
101 iter != themap.end(); iter++){
103 if( maxEnergy < (*iter).second) {
104 maxEnergy = (*iter).second;
105 UnitWithMaxEnergy = (*iter).first;
109 G4cout <<
" *** max energy of " << maxEnergy <<
" MeV was found in Unit id "
110 << UnitWithMaxEnergy;
113 G4cout <<
" corresponding to z= " << z <<
" eta= " << eta <<
" phi = " << phi
116 return UnitWithMaxEnergy;
122 G4int crystalWithMaxEnergy,
126 this->
unpackindex(crystalWithMaxEnergy, det, z, eta, phi);
129 G4int goBackInEta = nCellInEta/2;
130 G4int goBackInPhi = nCellInPhi/2;
131 G4int startEta = eta-goBackInEta;
132 G4int startPhi = phi-goBackInPhi;
136 for(
G4int ieta=startEta; ieta<startEta+nCellInEta; ieta++){
137 for(
G4int iphi=startPhi; iphi<startPhi+nCellInPhi; iphi++){
140 totalEnergy += themap[index];
143 G4cout <<
"ieta - iphi - E = " << ieta <<
" " << iphi <<
" "
144 << themap[index] <<
G4endl;
150 G4cout <<
"Energy in " << nCellInEta <<
" cells in eta times "
151 << nCellInPhi <<
" cells in phi matrix = " << totalEnergy
152 <<
" for " << ncristals <<
" crystals" <<
G4endl;