|
ATLAS Offline Software
|
Go to the documentation of this file.
17 #include "GaudiKernel/ITHistSvc.h"
27 m_sc2ccMappingTool(
"CaloSuperCellIDTool"),
28 m_ccIdHelper(nullptr),
29 m_treeDigits(nullptr),
53 double etBins[11] = {0.1,0.25,0.5,0.75,1.,1.5,2.,3.,4.,5.,10.};
57 m_etReso.back()->SetDirectory(
nullptr);
69 m_tree =
new TTree(
"debug",
"debug");
87 return StatusCode::SUCCESS;
109 TGraph*
g =
new TGraph(graphPointsX.second.size(),&graphPointsX.second[0],&
m_graphsY[graphPointsX.first][0]);
110 g->SetTitle(graphPointsX.first);
111 g->SetMarkerStyle(6);
116 return StatusCode::SUCCESS;
131 return StatusCode::FAILURE;
135 for(
const auto *scell : *scells) {
141 double scellEt = scell->e()*scell->sinTh()*1
e-3;
144 std::vector<Identifier> ccellIds =
m_sc2ccMappingTool->superCellToOfflineID( scell->ID() );
147 for(
auto& ccellId : ccellIds) {
150 if(ccell->
e()>0) cellEt += ccell->
e()*ccell->
sinTh();
152 if(cellEt>0)
m_etReso[samplingEnum]->Fill(cellEt*1
e-3,scellEt*1000./cellEt);
154 if ( TMath::Abs(cellEt)>1 )
resolution = 100*(scellEt - cellEt*1
e-3 ) / (cellEt*1
e-3);
155 if ( TMath::Abs(cellEt)>150 ) {
165 double tscellEt = tscell->
e()*tscell->
sinTh()*1
e-3;
166 if(tscellEt>0)
m_etResoTruth[samplingEnum]->Fill(tscellEt,scellEt/tscellEt);
169 if( (tscellEt>1. && scellEt/tscellEt<0.25) || (scellEt>1. && tscellEt/scellEt<0.25) ) {
193 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
std::vector< TProfile * > m_etReso
std::vector< TH2F * > m_Linear_SCet_vs_et
IdentifierHash calo_cell_hash(const Identifier cellId) const
create hash id from 'global' cell id
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
virtual double e() const override final
get energy (data member) (synonym to method energy()
std::map< TString, std::vector< float > > m_graphsX
virtual StatusCode finalize()
TGraphErrors * GetEntries(TH2F *histo)
int calo_sample(const Identifier id) const
returns an int taken from Sampling enum and describing the subCalo to which the Id belongs.
SuperCellVsCaloCellTestAlg(const std::string &name, ISvcLocator *pSvcLocator)
const std::string & key() const
Return the StoreGate ID for the referenced object.
virtual StatusCode initialize()
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
double resolution[nGasTypes][nParametersResolution]
value_type get_compact() const
Get the compact id.
std::vector< TH2F * > m_Reso_et_vs_eta
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
std::map< TString, std::vector< float > > m_graphsY
std::vector< TProfile * > m_etResoTruth
def TProfile(*args, **kwargs)
std::vector< short int > * m_treeDigits
::StatusCode StatusCode
StatusCode definition for legacy code.
std::vector< TH1F * > m_Reso_et
#define CHECK(...)
Evaluate an expression and check for errors.
ToolHandle< ICaloSuperCellIDTool > m_sc2ccMappingTool
const CaloCell * findCell(const IdentifierHash theHash) const
fast find method given identifier hash.
StatusCode initialize(bool used=true)
static constexpr unsigned int getNumberOfSamplings()
Get number of available samplings.
Container class for CaloCell.
virtual StatusCode execute()
Data object for each calorimeter readout cell.
#define ATH_MSG_WARNING(x)
Container class for LArDigit.
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
static std::string getSamplingName(CaloSample theSample)
Returns a string (name) for each CaloSampling.
const CaloCell_ID * m_ccIdHelper
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
virtual ~SuperCellVsCaloCellTestAlg()
virtual double sinTh() const override final
get sin(theta) (through CaloDetDescrElement)
std::vector< TH2F * > m_Reso_et_vs_et