#include <CCaloOrganization.hh>
 | 
|   | CCaloOrganization () | 
|   | 
| virtual  | ~CCaloOrganization () | 
|   | 
| unsigned int  | packindex (int det, int z, int eta, int phi) const  | 
|   | 
| unsigned int  | packindex (int det, int depth, int z, int eta, int phi) const  | 
|   | 
| void  | unpackindex (const unsigned int &idx, int &det, int &z, int &eta, int &phi) const  | 
|   | 
| void  | unpackindex (const unsigned int &idx, int &det, int &depth, int &z, int &eta, int &phi) const  | 
|   | 
| int  | getUnitWithMaxEnergy (std::map< int, float, std::less< int > > &themap) | 
|   | 
| float  | energyInMatrix (int nCellInEta, int nCellInPhi, int crystalWithMaxEnergy, std::map< int, float, std::less< int > > &themap) | 
|   | 
Definition at line 38 of file CCaloOrganization.hh.
 
  
  
      
        
          | CCaloOrganization::CCaloOrganization  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
  
  
      
        
          | virtual CCaloOrganization::~CCaloOrganization  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inlinevirtual   | 
  
 
 
      
        
          | float CCaloOrganization::energyInMatrix  | 
          ( | 
          int  | 
          nCellInEta,  | 
        
        
           | 
           | 
          int  | 
          nCellInPhi,  | 
        
        
           | 
           | 
          int  | 
          crystalWithMaxEnergy,  | 
        
        
           | 
           | 
          std::map< int, float, std::less< int > > &  | 
          themap  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 121 of file CCaloOrganization.cc.
  126   this->
unpackindex(crystalWithMaxEnergy, det, z, eta, phi);
 
  129   int goBackInEta = nCellInEta/2;
 
  130   int goBackInPhi = nCellInPhi/2;
 
  131   int startEta = eta-goBackInEta;
 
  132   int startPhi = phi-goBackInPhi;
 
  134   float totalEnergy = 0.;
 
  136   for(
int ieta=startEta; ieta<startEta+nCellInEta; ieta++){
 
  137     for(
int iphi=startPhi; iphi<startPhi+nCellInPhi; iphi++){
 
  139       int index = this->
packindex(det,z,ieta,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;
 
void unpackindex(const unsigned int &idx, int &det, int &z, int &eta, int &phi) const 
 
unsigned int packindex(int det, int z, int eta, int phi) const 
 
G4GLOB_DLL std::ostream G4cout
 
 
 
 
      
        
          | int CCaloOrganization::getUnitWithMaxEnergy  | 
          ( | 
          std::map< int, float, std::less< int > > &  | 
          themap | ) | 
           | 
        
      
 
Definition at line 94 of file CCaloOrganization.cc.
   97   int UnitWithMaxEnergy = 0;
 
  100   for(std::map<
int,
float,std::less<int> >::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;
 
void unpackindex(const unsigned int &idx, int &det, int &z, int &eta, int &phi) const 
 
G4GLOB_DLL std::ostream G4cout
 
 
 
 
      
        
          | unsigned int CCaloOrganization::packindex  | 
          ( | 
          int  | 
          det,  | 
        
        
           | 
           | 
          int  | 
          z,  | 
        
        
           | 
           | 
          int  | 
          eta,  | 
        
        
           | 
           | 
          int  | 
          phi  | 
        
        
           | 
          ) | 
           |  const | 
        
      
 
Definition at line 35 of file CCaloOrganization.cc.
   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;
 
G4GLOB_DLL std::ostream G4cout
 
 
 
 
      
        
          | unsigned int CCaloOrganization::packindex  | 
          ( | 
          int  | 
          det,  | 
        
        
           | 
           | 
          int  | 
          depth,  | 
        
        
           | 
           | 
          int  | 
          z,  | 
        
        
           | 
           | 
          int  | 
          eta,  | 
        
        
           | 
           | 
          int  | 
          phi  | 
        
        
           | 
          ) | 
           |  const | 
        
      
 
Definition at line 53 of file CCaloOrganization.cc.
   60   unsigned int idx=(det&15)<<28;  
 
   66   G4cout << 
" HCAL packing " << det << 
" " << depth << 
" " << 
z << 
" " << eta 
 
   67      << 
" " << phi  << 
"  into " << idx << 
G4endl;
 
G4GLOB_DLL std::ostream G4cout
 
 
 
 
      
        
          | void CCaloOrganization::unpackindex  | 
          ( | 
          const unsigned int &  | 
          idx,  | 
        
        
           | 
           | 
          int &  | 
          det,  | 
        
        
           | 
           | 
          int &  | 
          z,  | 
        
        
           | 
           | 
          int &  | 
          eta,  | 
        
        
           | 
           | 
          int &  | 
          phi  | 
        
        
           | 
          ) | 
           |  const | 
        
      
 
 
      
        
          | void CCaloOrganization::unpackindex  | 
          ( | 
          const unsigned int &  | 
          idx,  | 
        
        
           | 
           | 
          int &  | 
          det,  | 
        
        
           | 
           | 
          int &  | 
          depth,  | 
        
        
           | 
           | 
          int &  | 
          z,  | 
        
        
           | 
           | 
          int &  | 
          eta,  | 
        
        
           | 
           | 
          int &  | 
          phi  | 
        
        
           | 
          ) | 
           |  const | 
        
      
 
 
The documentation for this class was generated from the following files: