|
ATLAS Offline Software
|
Go to the documentation of this file.
22 #include "EventInfo/EventInfo.h"
71 std::string
mtime = ctime_r(&
t, buf);
81 if (std::abs(
p->pdg_id())==11 || std::abs(
p->pdg_id())==13 )
return 0;
82 if ( std::abs(
p->pdg_id())==pdg_id )
return p;
84 auto vertex =
p->production_vertex();
88 if (
vertex->particles_in().size() < 1 )
return 0;
96 for (
auto in:
vertex->particles_in()) {
104 if (
vertex->particles_in_size() < 1 )
return 0;
106 HepMC::GenVertex::particles_in_const_iterator in =
vertex->particles_in_const_begin();
107 HepMC::GenVertex::particles_in_const_iterator
end =
vertex->particles_in_const_end();
127 std::sort(
vec.begin(),
vec.end());
128 vec.erase(std::unique(
vec.begin(),
vec.end()),
vec.end());
135 std::vector<TrackTrigObject>&
objects,
const std::string&
key ) {
139 const std::vector< Trig::Feature<xAOD::JetContainer> > jetfeatures = citr->get<
xAOD::JetContainer>(
key, TrigDefs::alsoDeactivateTEs );
141 if ( jetfeatures.empty() )
return 0;
143 for (
size_t ifeature=0 ; ifeature<jetfeatures.size() ; ifeature++ ) {
146 if ( jetfeature.
empty() )
continue;
150 if (
jets == 0 )
continue;
154 for (
int j=0 ; jitr!=
jets->end() ; ++jitr, j++ ) {
158 long unsigned jetid = (
unsigned long)ajet;
177 <<
" compiled " << __DATE__ <<
" " << __TIME__ <<
"\t: " <<
date() <<
"[m" <<
endmsg;
204 if(
m_tdt->retrieve().isFailure() ) {
210 m_provider->
msg(MSG::INFO) <<
"[91;1m" <<
" Successfully retrived the TrigDecisionTool" <<
"[m" <<
endmsg;
212 m_provider->
msg(MSG::INFO) <<
"[91;1m" <<
" trying to create new ntple file" <<
"[m" <<
endmsg;
217 static std::atomic<bool> first_open =
true;
222 static std::atomic<int> file_index = 0;
226 sprintf( file_label,
"-%04d.root", file_index++ );
236 TTree* dataTree =
new TTree(
"dataTree",
"dataTree");
238 dataTree->Branch(
"ReleaseMetaData",
"TString", &
releaseData);
240 dataTree->Write(
"", TObject::kOverwrite);
244 m_Tree =
new TTree(
"tree",
"tree");
245 m_Tree->Branch(
"TIDA::Event",
"TIDA::Event",
m_event, 6400, 1 );
size_t get_jets(Trig::FeatureContainer::combination_const_iterator citr, std::vector< TrackTrigObject > &objects, const std::string &key="")
retrieve the jets from the Roi
std::vector< Combination >::const_iterator combination_const_iterator
Const iterator class for DataVector/DataList.
HepMC::ConstGenParticlePtr fromParent(int pdg_id, HepMC::ConstGenParticlePtr p, bool printout=false)
AthReentrantAlgorithm * m_provider
ToolHandle< Trig::TrigDecisionTool > * m_tdt
virtual double phi() const
The azimuthal angle ( ) of the particle.
std::vector< size_t > vec
void remove_duplicates(std::vector< T > &vec)
bool empty() const
test method to check if the object is truly there
std::string m_analysisInstanceName
class to keep a directory for each object in a root sort of way, but needed to keep the root objects ...
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
virtual Type::ObjectType type() const
The type of the object as a simple enumeration.
std::string releaseData() const
virtual void finalize()
finalise the analysis - take ratios for efficiencies etc
virtual double eta() const
The pseudorapidity ( ) of the particle.
const GenParticle * ConstGenParticlePtr
virtual void book()
setup the analysis the analysis, retrieve the tools etc
def time(flags, cells_name, *args, **kw)
std::string date()
sadly, includes a return at the end
const std::string name() const
virtual double pt() const
The transverse momentum ( ) of the particle.
std::string m_outputFileName
const T * cptr() const
explicit conversion to object
std::string m_releaseData