#include "ISF_FastCaloSimParametrization/CaloGeometry.h"
#include <TTree.h>
#include <TVector2.h>
#include <TRandom.h>
#include <TCanvas.h>
#include <TH2D.h>
#include <TGraphErrors.h>
#include <TVector3.h>
#include <TLegend.h>
#include <fstream>
#include <sstream>
#include "CaloDetDescr/CaloDetDescrElement.h"
#include "CaloGeoHelpers/CaloSampling.h"
#include "ISF_FastCaloSimEvent/FastCaloSim_CaloCell_ID.h"
Go to the source code of this file.
◆ ATLAS_NOT_THREAD_SAFE()
      
        
          | void CaloGeometry::Validate ATLAS_NOT_THREAD_SAFE | ( | int | nrnd | ) |  | 
      
 
Definition at line 655 of file CaloGeometry.cxx.
  659   cout<<
"start CaloGeometry::Validate()"<<endl;
 
  662     int sampling=
cell->getSampling();
 
  665     if(m_debug_identify==
cell->identify()) {
 
  666       cout<<
"CaloGeometry::Validate(), cell "<<ntest<<
" id="<<
cell->identify()<<endl; 
 
  670     for(
int irnd=0;irnd<nrnd;++irnd) {
 
  671       std::stringstream 
pos;
 
  672       std::stringstream cellpos;
 
  673       std::stringstream foundcellpos;
 
  677       bool is_inside_foundcell=
false;
 
  680         float eta=
cell->eta()+1.95*(gRandom->Rndm()-0.5)*
cell->deta();
 
  681         float phi=
cell->phi()+1.95*(gRandom->Rndm()-0.5)*
cell->dphi();
 
  685         cellpos<<
"eta="<<
cell->eta()<<
" eta_raw="<<
cell->eta_raw()<<
" deta="<<
cell->deta()
 
  686                <<
" ("<<(
cell->eta_raw()-
cell->eta())/
cell->deta()<<
") ; " 
  687                <<
"phi="<<
cell->phi()<<
" phi_raw="<<
cell->phi_raw()<<
" dphi="<<
cell->dphi()
 
  688                <<
" ("<<(
cell->phi_raw()-
cell->phi())/
cell->dphi()<<
")";
 
  690           foundcellpos<<
"eta="<<foundcell->
eta()<<
" eta_raw="<<foundcell->
eta_raw()<<
" deta="<<foundcell->
deta()
 
  691                       <<
" ("<<(foundcell->
eta_raw()-foundcell->
eta())/foundcell->
deta()<<
") ; " 
  692                       <<
"phi="<<foundcell->
phi()<<
" phi_raw="<<foundcell->
phi_raw()<<
" dphi="<<foundcell->
dphi()
 
  693                       <<
" ("<<(foundcell->
phi_raw()-foundcell->
phi())/
cell->dphi()<<
")";
 
  694           is_inside_foundcell=TMath::Abs( (
eta-foundcell->
eta())/foundcell->
deta() )<0.55 && TMath::Abs( (
phi-foundcell->
phi())/foundcell->
dphi() )<0.55;
 
  696         is_inside=TMath::Abs( (
eta-
cell->eta())/
cell->deta() )<0.49 && TMath::Abs( (
phi-
cell->phi())/
cell->dphi() )<0.49;
 
  698         float x=
cell->x()+1.95*(gRandom->Rndm()-0.5)*
cell->dx();
 
  699         float y=
cell->y()+1.95*(gRandom->Rndm()-0.5)*
cell->dy();
 
  701         foundcell=getFCalDDE(sampling,
x,
y,
z);
 
  703         pos<<
"x="<<
x<<
" y="<<
y<<
" z="<<
z;
 
  704         cellpos<<
"x="<<
cell->x()<<
" x_raw="<<
cell->x_raw()<<
" dx="<<
cell->dx()
 
  706                <<
"y="<<
cell->y()<<
" y_raw="<<
cell->y_raw()<<
" dy="<<
cell->dy()
 
  709           foundcellpos<<
"x="<<foundcell->
x()<<
" x_raw="<<foundcell->
x_raw()<<
" dx="<<foundcell->
dx()
 
  710                       <<
" ("<<(foundcell->
x_raw()-foundcell->
x())/foundcell->
dx()<<
") ; " 
  711                       <<
"y="<<foundcell->
y()<<
" y_raw="<<foundcell->
y_raw()<<
" dy="<<foundcell->
dy()
 
  712                       <<
" ("<<(foundcell->
y_raw()-foundcell->
y())/
cell->dy()<<
")";
 
  713           is_inside_foundcell=TMath::Abs( (
x-foundcell->
x())/foundcell->
dx() )<0.75 && TMath::Abs( (
y-foundcell->
y())/foundcell->
dy() )<0.75;
 
  715         is_inside=TMath::Abs( (
x-
cell->x())/
cell->dx() )<0.49 && TMath::Abs( (
y-
cell->y())/
cell->dy() )<0.49;
 
  719       if(m_debug && foundcell) {
 
  720         cout<<
"CaloGeometry::Validate(), irnd="<<irnd<<
": cell id="<<
cell->identify()<<
", sampling="<<sampling
 
  721                                                      <<
", foundcell id="<<foundcell->
identify()<<
", "<<
steps<<
" steps"<<endl; 
 
  722         cout<<
"  "<<cellpos.str()<<endl;
 
  724       if(
cell==foundcell) {
 
  726           cout<<
"cell id="<<
cell->identify()<<
", sampling="<<sampling<<
" found in "<<
steps<<
" steps, dist="<<
distance<<
" "<<
pos.str()<<endl;
 
  727           cout<<
"  "<<cellpos.str()<<endl;
 
  731           cout<<
"cell id="<<
cell->identify()<<
" not found!";
 
  732           cout<<
" No cell found in "<<
steps<<
" steps, dist="<<
distance<<
" "<<
pos.str()<<endl;
 
  733           cout<<
"  input sampling="<<sampling<<
" "<<cellpos.str()<<endl;
 
  736         if( is_inside && foundcell && !is_inside_foundcell) {
 
  737           cout<<
"cell id="<<
cell->identify()<<
" not found, but inside cell area!";
 
  739           cout<<
"  input sampling="<<sampling<<
" "<<cellpos.str()<<endl;
 
  740           cout<<
"  output sampling="<<foundcell->
getSampling()<<
" "<<foundcellpos.str()<<endl;
 
  746     if(ntest%25000==0) cout<<
"Validate cell "<<ntest<<
" with "<<nrnd<<
" random hits"<<endl;
 
  749   cout<<
"end CaloGeometry::Validate()"<<endl;
 
 
 
 
◆ CaloGeometry_calocol
      
        
          | const int CaloGeometry_calocol[24] | 
      
 
Initial value:={1,2,3,4, 
                                    1,2,3,4, 
                                    1,2,3,4, 
                                    1,2,3,   
                                    -42,-28,6, 
                                    1,2,3,   
                                    1,2,3    
}
Definition at line 27 of file CaloGeometry.cxx.