Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
41 using namespace TestCB;
50 if(
env.ReadFile(
conf, kEnvAll) != 0){
52 return StatusCode::FAILURE;
55 MuonIso =
env.GetValue(
"MuonIso",
"PflowTight_FixedRad");
68 return StatusCode::SUCCESS;
74 const Container* InCont(0);
77 return StatusCode::FAILURE;
80 Aux = shallowcopy.second;
81 C = shallowcopy.first;
83 ANA_MSG_ERROR(
"RetrieveContainer() Failed to set Object links to " <<
Key.c_str());
85 return StatusCode::FAILURE;
87 return StatusCode::SUCCESS;
104 TString outputTree =
"testIsoCloseByTool_out.root";
110 std::unique_ptr< TFile >
ifile( TFile::Open(
fileName,
"READ" ) );
111 if( !
ifile.get() )
return EXIT_FAILURE;
124 ANA_MSG_INFO(
"Initialize instance of the IsolationSelectionTool");
133 ANA_MSG_INFO(
"Initialize instance of the IsolationCloseByCorrectionTool");
155 ofile = TFile::Open(outputTree,
"RECREATE");
157 TTree *
tree =
new TTree(
"otree",
"otree");
162 Long64_t maxEVT = atoll(
argv[ 3 ] );
163 Long64_t
entries =
event.getEntries();
164 if ((
entries < maxEVT) || (maxEVT <= 0)) {
169 const int INTERVAL = maxEVT > 20000 ? 10000 : maxEVT / 10;
181 event.getEntry(
entry);
186 if (
entry % INTERVAL == 0)
194 for(
const auto el : *Electrons) {
196 const char passIsol = IsoSelectionTool->
accept(*
el) ? 1 : 0;
197 dec_PassIsol(*
el) = passIsol;
200 dec_PassQuality(*
el) = passQuality;
202 for(
const auto ph : *Photons) {
204 const char passIsol = IsoSelectionTool->
accept(*ph) ? 1 : 0;
205 dec_PassIsol(*ph) = passIsol;
207 const char passQuality = (ph->pt() >
PhotonPt && std::abs(ph->eta()) <
PhotonEta) ? 1 : 0;
208 dec_PassQuality(*ph) = passQuality;
212 const char passIsol = IsoSelectionTool->
accept(*
mu) ? 1 : 0;
213 dec_PassIsol(*
mu) = passIsol;
215 const char passQuality = (
mu->pt() >
MuonPt && std::abs(
mu->eta()) <
MuonEta) ? 1 : 0;
216 dec_PassQuality(*
mu) = passQuality;
243 ANA_MSG_INFO(Form(
"Ran on %i event for testing %s",(
int)maxEVT, std::ctime(&
end)));
uint64_t eventNumber() const
The current event's event number.
Class creating a shallow copy of an existing auxiliary container.
@ kClassAccess
Access auxiliary data using the aux containers.
uint32_t runNumber() const
The current event's run number.
@ Error
Some error happened during the object correction.
StatusCode readFrom(TFile *file)
POOL::TEvent event(POOL::TEvent::kClassAccess)
Helper class to provide type-safe access to aux data.
ErrorCode code() const noexcept
The code stored internally.
::StatusCode StatusCode
StatusCode definition for legacy code.
std::pair< std::unique_ptr< T >, std::unique_ptr< ShallowAuxContainer > > shallowCopyContainer(const T &cont, [[maybe_unused]] const EventContext &ctx)
Function making a shallow copy of a constant container.
Class describing the basic event information.
A relatively simple transient store for objects created in analysis.
def time(flags, cells_name, *args, **kw)
StatusCode retrieve(const T *&obj)
bool setOriginalObjectLink(const IParticle &original, IParticle ©)
This function should be used by CP tools when they make a deep copy of an object in their correctedCo...
StatusCode retrieve(const T *&obj, const std::string &key)
Retrieve either an input or an output object from the event.
Tool for accessing xAOD files outside of Athena.
StatusCode Fill(const xAOD::IParticleContainer *Particles)
StatusCode Init(const char *appname)
Function initialising ROOT/PyROOT for using the ATLAS EDM.