  | 
  
    ATLAS Offline Software
    
   | 
 
 
 
 
Go to the documentation of this file.
    8 #include "GaudiKernel/IToolSvc.h" 
   15 #include "GaudiKernel/NTuple.h" 
   16 #include "GaudiKernel/INTupleSvc.h" 
   17 #include "GaudiKernel/SmartDataPtr.h" 
   34   NTupleFilePtr file1(
ntupleSvc(), 
"/NTUPLES/FILE");
 
   40     nt = 
ntupleSvc()->book (
"/NTUPLES/FILE/AOD", CLID_ColumnWiseTuple, 
"Readed info from aod container");
 
   48       if( sc.isFailure() ) 
msg(MSG::ERROR) << 
"Can not create ntuple entry for eta" << 
endmsg;
 
   50       if( sc.isFailure() ) 
msg(MSG::ERROR) << 
"Can not create ntuple entry for erec" << 
endmsg;
 
   52       if( sc.isFailure() ) 
msg(MSG::ERROR) << 
"Can not create ntuple entry for pt" << 
endmsg;
 
   54       if( sc.isFailure() ) 
msg(MSG::ERROR) << 
"Can not create ntuple entry for e237" << 
endmsg;
 
   56       if( sc.isFailure() ) 
msg(MSG::ERROR) << 
"Can not create ntuple entry for e277" << 
endmsg;
 
   58       if( sc.isFailure() ) 
msg(MSG::ERROR) << 
"Can not create ntuple entry for weta1" << 
endmsg;
 
   60       if( sc.isFailure() ) 
msg(MSG::ERROR) << 
"Can not create ntuple entry for weta2" << 
endmsg;
 
   62       if( sc.isFailure() ) 
msg(MSG::ERROR) << 
"Can not create ntuple entry for e2tsts1" << 
endmsg;
 
   64       if( sc.isFailure() ) 
msg(MSG::ERROR) << 
"Can not create ntuple entry for emins1" << 
endmsg;
 
   66       if( sc.isFailure() ) 
msg(MSG::ERROR) << 
"Can not create ntuple entry for fracs1" << 
endmsg;
 
   68       if( sc.isFailure() ) 
msg(MSG::ERROR) << 
"Can not create ntuple entry for wtots1" << 
endmsg;
 
   70       if( sc.isFailure() ) 
msg(MSG::ERROR) << 
"Can not create ntuple entry for f1" << 
endmsg;
 
   72       if( sc.isFailure() ) 
msg(MSG::ERROR) << 
"Can not create ntuple entry for f1core" << 
endmsg;
 
   74       if( sc.isFailure() ) 
msg(MSG::ERROR) << 
"Can not create ntuple entry for ethad1" << 
endmsg;
 
   76       if( sc.isFailure() ) 
msg(MSG::ERROR) << 
"Can not create ntuple entry for et" << 
endmsg;
 
   79       if( sc.isFailure() ) 
msg(MSG::ERROR) << 
"Can not create ntuple entry for egen" << 
endmsg;
 
   81       if( sc.isFailure() ) 
msg(MSG::ERROR) << 
"Can not create ntuple entry for tr_px" << 
endmsg;
 
   83       if( sc.isFailure() ) 
msg(MSG::ERROR) << 
"Can not create ntuple entry for tr_py" << 
endmsg;
 
   85       if( sc.isFailure() ) 
msg(MSG::ERROR) << 
"Can not create ntuple entry for tr_pz" << 
endmsg;
 
   89     msg(MSG::ERROR) << 
"didn't manage to book ntuple" << 
endmsg;
 
   90     return StatusCode::FAILURE;
 
   96   return StatusCode::SUCCESS;
 
  102   return StatusCode::SUCCESS;
 
  111   sc=
evtStore()->retrieve( elecTES, 
"ElectronAODCollection");
 
  112   if( 
sc.isFailure()  ||  !elecTES ) {
 
  113     msg(MSG::WARNING) << 
"No AOD electron container found in TDS" << 
endmsg;
 
  120   if (( mcEvtColl = 
evtStore()->retrieve<const McEventCollection>() )) {
 
  123       msg(MSG::WARNING) << 
"Could not retrieve TruthParticleContainer" << 
endmsg;
 
  132       if (mcTrPart != mcEvtColl->
end()) {
 
  133           trPart = (*mcTrPart)->particles_size()?*
HepMC::begin(**mcTrPart):
nullptr;
 
  135               msg(MSG::WARNING) << 
"Not a single particle event. Truth information won't be available" << 
endmsg;
 
  138           msg(MSG::WARNING) << 
"Empty TruthParticleContainer. Truth information won't be available" << 
endmsg;
 
  147   for (; elecItr != elecItrE; ++elecItr) {
 
  148     if (((*elecItr)->author() & (8 + 1))  > 0) {
 
  149         primElec = (*elecItr);
 
  203   return StatusCode::SUCCESS;
 
  
Const iterator class for DataVector/DataList.
 
virtual double pt() const
transverse momentum
 
double e237() const
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 3x7
 
NTuple::Item< float > m_e2tsts1
 
virtual StatusCode finalize()
 
NTuple::Item< float > m_emins1
 
NTuple::Item< float > m_f1
 
double weta1() const
shower width using +/-3 strips around the one with the maximal energy deposit: w3 strips = sqrt{sum(E...
 
NTuple::Item< float > m_weta2
 
NTuple::Item< float > m_e277
 
NTuple::Item< float > m_truth_py
 
const T * detail(const std::string &name="", unsigned int index=0) const
retrieve eg-detail objects:
 
virtual double e() const
energy
 
NTuple::Item< float > m_e237
 
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
 
virtual StatusCode execute()
 
NTuple::Item< float > m_ethad1
 
::StatusCode StatusCode
StatusCode definition for legacy code.
 
double e277() const
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 7x7
 
double fracs1() const
shower shape in the shower core : [E(+/-3)-E(+/-1)]/E(+/-1), where E(+/-n) is the energy in +- n stri...
 
const CaloCluster * cluster() const
pointer to CaloCluster
 
NTuple::Item< float > m_truth_pz
 
NTuple::Item< float > m_weta1
 
NTuple::Item< float > m_energy
 
NTuple::Item< float > m_eta
 
virtual double eta() const
pseudo rapidity
 
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
 
double weta2() const
the lateral width is calculated with a window of 3x5 cells using the energy weighted sum over all cel...
 
NTuple::Item< float > m_et
 
double e2tsts1() const
energy of the cell corresponding to second energy maximum in the first sampling
 
const GenParticle * ConstGenParticlePtr
 
NTuple::Item< float > m_pt
 
NTuple::Item< float > m_fracs1
 
NTuple::Item< float > m_f1core
 
double wtots1() const
shower width is determined in a window detaxdphi = 0,0625 x~0,2, corresponding typically to 20 strips...
 
double emins1() const
energy reconstructed in the strip with the minimal value between the first and second maximum
 
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
 
double f1core() const
E1(3x1)/E = fraction of the energy reconstructed in the first longitudinal compartment of the electro...
 
NTuple::Item< float > m_wtots1
 
NTuple::Item< float > m_truth_px
 
GenEvent::particle_iterator begin(HepMC::GenEvent &e)
 
virtual double et() const
transverse energy defined to be e*sin(theta)
 
NTuple::Item< float > m_truth_energy
 
double ethad1() const
transverse energy in the first sampling of the hadronic calorimeters behind the cluster calculated fr...
 
AODReader(const std::string &name, ISvcLocator *pSvcLocator)
 
double f1() const
E1/E = fraction of energy reconstructed in the first sampling, where E1 is energy in all strips belon...
 
virtual StatusCode initialize()
 
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.