ATLAS Offline Software
VertexCaloIsolation.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // VertexCaloIsolation.cxx by Matteo Bedognetti
6 //
7 // This code is based on CaloIsolationTool of IsolationTools package
8 //
9 // Etcone is determined as a topoCluster-isolation value minus Energy Density (ED) correction and minus the energy depositions of the muons
10 // Muon's energy deposition is already stored in side the xAOD::Muon objects, but the muon-clusters are used to correct for the fact that they muons may have overlapping clusters
11 // The muon-clusters are stored as well in connection with the muons themselves
12 //
13 // The idea of comparing topoClusters with muon-clusters to decide what part of the muon's deposition is of
14 // importance had to be abandoned because topCluster cells are not present in xAOD
15 //
16 // It enforces the fact that for muons no core-surface is removed for the energy-density correction (thus the corrections are independent from each other)
17 //
18 // "isReliable" flag reports of each isolation value if all particles crossing the cone have been correctly corrected for.
19 // In the case of 2mu+ 1 track it mirrors the fact that the track does not extrapolate into the cone (as tracks have no muon-cluster from which to determine the core-correction)
20 //
21 
22 
23 
24 
26 
27 #include <vector>
28 #include <string>
29 #include "TVector3.h"
30 
33 #include "xAODBPhys/BPhysHelper.h"
36 
37 //#include "IsolationTool/CaloIsolationTool.h"
38 //#include "IsolationTool/CaloIsolationTool.h"
39 
41 
42 //#include "IsolationTool/IsolationHelper.h"
43 //#include "InDetTrackSelectionTool/InDetTrackSelectionTool.h"
44 #include "CaloEvent/CaloCell.h" //Is used (though shown as auto)
45 //#include "TrkParameters/TrackParameters.h"
47 //#include "CaloUtils/CaloClusterStoreHelper.h"
48 //#include "CaloUtils/CaloCellList.h"
49 //#include "CaloEvent/CaloCellContainer.h"
53 #include <set>
54 
55 //#include "Identifier/Identifier32.h"
56 using namespace std;
57 namespace DerivationFramework {
58 
59  VertexCaloIsolation::VertexCaloIsolation(const std::string& t,
60  const std::string& n,
61  const IInterface* p) :
62  AthAlgTool(t,n,p),
63  m_caloIsoTool("xAOD::CaloIsolationTool/CaloIsolationTool"),
64  m_trackContainerName("InDetTrackParticles"),
65  m_vertexContainerName("NONE"),
66  m_caloClusterContainerName("CaloCalTopoClusters"),
67  m_muonContainerName("Muons"),
68  m_caloExtTool("Trk::ParticleCaloExtensionTool/ParticleCaloExtensionTool"),
69  m_cones(),
70  m_sigmaCaloNoiseCut(3.4),
71  m_vertexType(7)
72  {
73  ATH_MSG_DEBUG("in constructor");
74  declareInterface<DerivationFramework::IAugmentationTool>(this);
75 
76  // Declare tools
77  declareProperty("CaloIsoTool" , m_caloIsoTool);
78  declareProperty("TrackContainer" , m_trackContainerName);
79  declareProperty("InputVertexContainer" , m_vertexContainerName);
80  declareProperty("CaloClusterContainer" , m_caloClusterContainerName);
81  declareProperty("ParticleCaloExtensionTool", m_caloExtTool);
82  declareProperty("MuonContainer", m_muonContainerName);
83  declareProperty("PassFlags" , m_passFlags);
84  declareProperty("IsolationTypes" , m_cones);
85  declareProperty("DoVertexTypes" , m_vertexType);
86 
87 
88 
89  }
90 
91  // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
92 
94  {
95 
96  ATH_MSG_DEBUG("in initialize()");
97 
98  // retrieve CaloIsolationTool
99  CHECK( m_caloIsoTool.retrieve() );
100 
101  // retrieve CaloIsolationTool
102  CHECK( m_caloExtTool.retrieve() );
103 
104  //Check that flags were given to tag the correct vertices
105  if(m_passFlags.empty()){
106  ATH_MSG_WARNING("As no pass-flags are given, no vertices will be decorated");
107  }
108 
109  // Control the IsolationType sequence
110  if(m_cones.empty()){
111  m_cones.push_back(xAOD::Iso::etcone40);
112  m_cones.push_back(xAOD::Iso::etcone30);
113  m_cones.push_back(xAOD::Iso::etcone20);
114  }
115 
116  return StatusCode::SUCCESS;
117 
118  }
119 
120  // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
121 
123  {
124  // everything all right
125  return StatusCode::SUCCESS;
126  }
127 
128  // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
129 
131 
132 
133  // There is also the "MuonClusterCollection" which may already contain all the muon's clusters
134 
135  const xAOD::TrackParticleContainer* idTrackParticleContainer = NULL;
136  const xAOD::VertexContainer* vertexContainer = NULL;
137 
138  Rec::CaloCellCollector cellCollector; //To keep private dependence for this package it is used here
139 
140 
141  const xAOD::MuonContainer* muons = NULL;
142 
143 
144  //Load InDetTrackParticles
145  if(evtStore()->contains<xAOD::TrackParticleContainer>(m_trackContainerName)) {
146  CHECK( evtStore()->retrieve(idTrackParticleContainer, m_trackContainerName) );
147  }
148  else{ATH_MSG_ERROR("Failed loading IdTrackparticleContainer container");
149  return StatusCode::FAILURE;
150  }
151 
152  // load vertices
153  if(evtStore()->contains<xAOD::VertexContainer>(m_vertexContainerName)) {
154  CHECK( evtStore()->retrieve(vertexContainer, m_vertexContainerName) );
155  }
156  else{ATH_MSG_ERROR("Failed loading vertex container");
157  return StatusCode::FAILURE;
158  }
159 
160 
161  const xAOD::CaloClusterContainer* caloClusterContainer = NULL;
162  // load CaloCalTopoClusters
163  if(evtStore()->contains<xAOD::CaloClusterContainer>(m_caloClusterContainerName)) {
164  CHECK( evtStore()->retrieve(caloClusterContainer, m_caloClusterContainerName) );
165  }
166  else{ATH_MSG_ERROR("Failed loading vertex container");
167  return StatusCode::FAILURE;
168  }
169 
170 
171  //Retrieve muon container
172  if(evtStore()->contains<xAOD::MuonContainer>(m_muonContainerName)) {
174  }
175  else{ATH_MSG_ERROR("Failed loading muon contianer");
176  return StatusCode::FAILURE;
177  }
178 
179 
180 //-------------------------------------------------
181 
182  std::vector<xAOD::Iso::IsolationType> cones; cones.resize(m_cones.size());
183 
184 // for(unsigned int cone : m_cones)
185 // cones.push_back(xAOD::Iso::IsolationType(cone));
186 
187  for (unsigned int i =0; i< m_cones.size(); i++)
188  cones[i] = xAOD::Iso::IsolationType(m_cones[i]);
189 
190 
191 
192  //Loop over vertices
193  for(auto vertex : *vertexContainer){
194 
195  bool passed = false;
196  for(std::vector<std::string>::const_iterator flagItr = m_passFlags.begin(); flagItr!=m_passFlags.end(); ++flagItr) {
197  SG::AuxElement::Accessor<Char_t> flagAcc(*flagItr);
198  if(flagAcc.isAvailable(*vertex) && flagAcc(*vertex) != 0) {
199  passed = true;
200  break;
201  }
202  } // end of loop over flags
203  if(passed){
204  ATH_MSG_DEBUG("Entered loop over vertices");
205  if(vertex->trackParticleLinks().size() != 3)ATH_MSG_WARNING("Vertex without 3 tracks, it has "<< vertex->trackParticleLinks().size() <<" instead");
206 
207  TLorentzVector candidate;
208 
209  std::set<const xAOD::TrackParticle*> exclusionset;
210 
211  for(auto part : vertex->trackParticleLinks()){ //Loop over tracks linked to vertex
212  candidate += (*part)->p4();
213  exclusionset.insert( *part ); //If it crashes use the direct TP from the vertex
214  }
215 
216  //List of corrections: only the pileup correction is applied within the tool
217  xAOD::CaloCorrection corrlist;
218  corrlist.calobitset.set(static_cast<unsigned int>(xAOD::Iso::pileupCorrection));
219 
220 
221 
222  std::vector<const xAOD::Muon*> vtxMuons;
223  std::vector<TLorentzVector> extrVtxMuons ;
224  std::vector<const xAOD::CaloCluster*> vtxMuonCluster;
225 
226  std::vector<const xAOD::TrackParticle*> usedVtxTracks;
227  //The information whether we are missing some core-corrections in the final isolation value
228  map<xAOD::Iso::IsolationType, bool> is_reliable;
229 
230 
231  TLorentzVector muonref; //Place holder for the extrapolated position
232  //Load the caloclusters of the various muons (which you need to load from here)
233  const xAOD::MuonContainer* muons = 0;
234  CHECK( evtStore()->retrieve( muons, "Muons" ) );
235  for ( auto muon : *muons ) {
236  //I ask for all information to be fine before filling in an entry (so all containers will have the same -matching- objects)
237  if(muon->inDetTrackParticleLink().isValid() && exclusionset.find(*muon->inDetTrackParticleLink() ) != exclusionset.end() ){
238  const xAOD::CaloCluster* clus = muon->cluster();
239  if(clus && extrapolateMuon(muonref, clus)){
240  // have a muon, an extrapolation and a cluster (hurray)
241  vtxMuonCluster.push_back(clus);
242  vtxMuons.push_back(muon);
243  usedVtxTracks.push_back( *muon->inDetTrackParticleLink() );
244  extrVtxMuons.push_back(muonref);
245  }else{
246  ATH_MSG_DEBUG("Cannot find clusters. Would need a consistent set of Trk::Tracks to run extrapolation.");
247 
248  // //If working with the cluster failed, try extrapolating the track
249  // if(extrapolateTrack(muonref, *muon)){ //This does not use the muonic cluster, but uses both its tracks to determine a precise position
250  // vtxMuonCluster.push_back(clus); //Note clus can also be NULL (for if it's not in the cone there is no point to fret)
251  // vtxMuons.push_back(muon);
252  // usedVtxTracks.push_back( *muon->inDetTrackParticleLink() );
253  // extrVtxMuons.push_back(muonref);
254  //}
255  }
256  }
257  }
258 
259 
260  //What if there was a track and not a muon??
261  //Should be treated like the muon-without-cluster case
262 
263  if(vtxMuonCluster.size() !=3){ //remember that some of the ctxMuonCluster elements may be NULL
264  ATH_MSG_DEBUG( "Attempt at extrapolating the IDtrack" );
265 
266  //Attempt extrapolating the IDtrack for the missing cases
267  for(const xAOD::TrackParticle* missingTrk : exclusionset){
268  if(std::find(usedVtxTracks.begin(), usedVtxTracks.end(), missingTrk) == usedVtxTracks.end()){
269  if(extrapolateTrack(muonref, *missingTrk)){
270  vtxMuonCluster.push_back(NULL); //Null, for we didn't start from a muon
271  usedVtxTracks.push_back( missingTrk );
272  extrVtxMuons.push_back(muonref);
273  }
274  }
275  }
276 
277  //If there are still missing ones values cannot be guaranteed to be reliable
278  if(vtxMuonCluster.size() !=3){
279  ATH_MSG_DEBUG( "For this vertex there were less than 3 muons found (or extrapolated)" );
280  for(xAOD::Iso::IsolationType isoCone : cones) is_reliable[isoCone] = false;
281  }
282  }
283  else{
284  for(xAOD::Iso::IsolationType isoCone : cones)
285  is_reliable[isoCone] = true;
286  }
287 
288 
289  // Adapt this loop!
290 
291  for(unsigned int vertex_type = 0 ; vertex_type<= xAOD::BPhysHelper::PV_MIN_Z0 ; vertex_type++ ){
292 
293  if((m_vertexType & (1 << vertex_type ) ) == 0)continue; //Stop if the type of vertex is not required
294 
295  //This can be in an inside loop
296 
297  xAOD::BPhysHelper::pv_type this_type = static_cast<xAOD::BPhysHelper::pv_type>( vertex_type );
298 
299  xAOD::TrackParticle candidate_slyTrack;
300  makeSlyTrack(candidate_slyTrack, candidate, vertex, this_type);
301 
302 
304 
305  ATH_MSG_DEBUG("Check if the caloclus container has to be given or not... see line from 755 on of CaloIsolationTool");
306 
307  bool successful = m_caloIsoTool->caloTopoClusterIsolation(result, candidate_slyTrack, cones, corrlist, caloClusterContainer);
308  if( !successful ) {
309  ATH_MSG_DEBUG("Calculation of caloTopoClusterIsolation failed");
310  return StatusCode::FAILURE;
311  }
312 
313  // Make the extension to the calorimeter, as it is done inside the other tools...
314  TLorentzVector extr_candidate;
315  if( !extrapolateTrack(extr_candidate, candidate_slyTrack) ){
316  ATH_MSG_WARNING("Failure extrapolating the slyTrack "<<"pt="<<candidate_slyTrack.pt()<<" eta="<<candidate_slyTrack.eta()<<" phi="<<candidate_slyTrack.phi());
317  ATH_MSG_WARNING("Taking the original coordinates");
318  }
319 
320 
321  std::map<xAOD::Iso::IsolationType,float> coreCorrections;
322 
323  //See if this is inside the cone, to determine the correct correction ^^
324  for(xAOD::Iso::IsolationType isoType : cones){
325 
326  double conesize = xAOD::Iso::coneSize(isoType);
327  //check what is inside the cone
328  std::vector<xAOD::CaloCluster> clustersInCone;
329 
330  for(unsigned int j=0; j < vtxMuonCluster.size(); j++){
331  auto mucluster = vtxMuonCluster[j];
332  // I should use the propagated values here, though the variation is very small, coming from the vertex position
333  float dr=extrVtxMuons[j].DeltaR(extr_candidate);
334 
335 
336 
337  ATH_MSG_DEBUG("Cone size: "<<conesize<<" dr="<<dr);
338  ATH_MSG_DEBUG(extrVtxMuons[j].Eta() <<" - "<<extr_candidate.Eta()<<" and "<<extrVtxMuons[j].Phi() <<" - "<<extr_candidate.Phi());
339 
340  if( dr < conesize ){ //This makes a copy, such that I can remove some cells if needed
341 
342 
343  //here do the check for the cluster, if it should go in, then prevent and set the bad for this cone
344  if(mucluster != NULL) clustersInCone.push_back( xAOD::CaloCluster(*mucluster) );
345  else is_reliable[isoType] = false;
346 
347 
348 
349  }
350  }
351 
352  // ATH_MSG_DEBUG("Muon clusters in cone "<<xAOD::Iso::toString(isoType)<<" "<< clustersInCone.size());
353  // if( msgLvl(MSG::DEBUG) ){
354  // for(auto muon : vtxMuons)
355  // if(muon->isAvailable<float>("ET_Core")) ATH_MSG_DEBUG("ET_core stored inside: "<< muon->auxdataConst<float>("ET_Core") );
356  // }
357  //remove eventually doubles in cells
358  if(clustersInCone.size() == 2){
359  for(auto cell : clustersInCone[0]){
360  clustersInCone[1].removeCell(cell);
361  }
362  }
363  if(clustersInCone.size() == 3){
364  for(auto cell : clustersInCone[0]){
365  clustersInCone[1].removeCell(cell);
366  clustersInCone[2].removeCell(cell);
367  }
368  for(auto cell : clustersInCone[1]){
369  clustersInCone[2].removeCell(cell);
370  }
371  }
372 
373  //Calculate the core-correction
374  std::vector<float> etcore(4, 0.);
375  float coreCorr=0.;
376  for(auto cl : clustersInCone){
377  if(cl.size() != 0){ //Maybe two muons have a full cluster overlap??
378  ATH_MSG_DEBUG("Cells in this cluster: "<< cl.size());
379 
380  cellCollector.collectEtCore( cl, etcore, nullptr, m_sigmaCaloNoiseCut );
381  coreCorr += etcore[Rec::CaloCellCollector::ET_Core];
382  ATH_MSG_DEBUG("Their core-energy: "<< etcore[Rec::CaloCellCollector::ET_Core]);
383 
384  }
385  }
386 
387  //Store the core-correction
388  coreCorrections[isoType] = coreCorr;
389 
390  }
391 
392  //For a pion I have no such cone energy, do I? But then I should also see what the original vertex was
393  //If something is not a muon there is no way the calocluster was stored, I think
394  //Would need further study
395 
396 
397  //Collect all the required information
398  string ED("_EDcorr");
399  string core("_COREcorr");
400  string reliable("_isReliable");
401 
402 
403  string vtx_type[3] = {"SumPt", "A0", "Z0"};
404 
405  string vtx = vtx_type[ vertex_type ];
406 
407  ATH_MSG_DEBUG("Detailed: ");
408  for(unsigned int i=0; i< cones.size(); i++){
409  xAOD::Iso::IsolationType isoType = cones[i];
410  result.etcones[i] -= coreCorrections[isoType]; //Finish correcting the energy
411 
412 
413  // if(fabs(result.etcones[i]) < 0.1){
414  //
415  // ATH_MSG_INFO("Isolation: "<<xAOD::Iso::toString(isoType) ); // The name of the isolation
416  // ATH_MSG_ERROR(result.etcones[i]<<" + "<<(result.noncoreCorrections[xAOD::Iso::pileupCorrection])[i]<<" + "<<coreCorrections[isoType] );
417  // }
418 
419  //Here do the decoration (store all, and as well if three muons are found)
420 
421 
422  string variableName = xAOD::Iso::toString(isoType) + vtx; //I corrected for the closest vertex in A0
423  SG::AuxElement::Decorator<float> isolation(variableName);
424  isolation(*vertex) = result.etcones[i];
425 
426  isolation = SG::AuxElement::Decorator<float>(variableName + ED);
427  isolation(*vertex) = (result.noncoreCorrections[xAOD::Iso::pileupCorrection])[i];
428 
429  isolation = SG::AuxElement::Decorator<float>(variableName + core);
430  isolation(*vertex) = coreCorrections[isoType];
431 
432  //This variable contains the info whether 3 caloclusters have been found in the muons
433  //Future would be to see if their extrapolations are of interest anyhow (if not missing them is no issue)
434  //Fore some reason these seem to become chars (instead of bools) in the output
435  SG::AuxElement::Decorator<bool> reliability(variableName + reliable);
436  reliability(*vertex) = is_reliable[isoType];
437 
438  }
439  } //Loop over primaryVertex choice
440 
441  //Decorate the candidate with the new information
442 
443 
444 // return StatusCode::SUCCESS;
445 //
446 // ///////////////////////////////////
447 
448  }
449 
450 //END OF NEW PART
451  }//End of loop over vertices
452  return StatusCode::SUCCESS;
453  }
454 
455  //Note that the full version had a different method for muons!!!! Maybe I should use that one instead!
456 
457  //This is almost a perfect copy of CaloIsolationTool::GetExtrapEtaPhi, but only for the part relative to tracks
458  bool VertexCaloIsolation::extrapolateTrack(TLorentzVector& extr_tp, const xAOD::IParticle& tp) const{
459  extr_tp = tp.p4(); //Pre-set the output TLorentzVector to the input's 4-momentum
460  ATH_MSG_ERROR("VertexCaloIsolation::extrapolateTrack needs to be rewritten because of changes to the caloExtension");
461  throw std::runtime_error("VertexCaloIsolation::extrapolateTrack needs to be rewritten because of changes to the caloExtension");
462 /*
463 
464 
465  const Trk::CaloExtension* caloExtension = 0;
466  if(!m_caloExtTool->caloExtension(tp,caloExtension)){
467  ATH_MSG_WARNING("Can not get caloExtension.");
468  return false;
469  }
470 
471  const std::vector<const Trk::CurvilinearParameters*>& intersections = caloExtension->caloLayerIntersections();
472  if (intersections.size()>0) {
473  Amg::Vector3D avePoint(0,0,0);
474  for (unsigned int i = 0; i < intersections.size(); ++i){
475  const Amg::Vector3D& point = intersections[i]->position();
476  avePoint += point;
477  }
478  avePoint = (1./intersections.size())*avePoint;
479 
480 
481  extr_tp.SetPtEtaPhiE(1., avePoint.eta(), avePoint.phi(), 10.); //Using the three-vector constructor
482  //eta = avePoint.eta();
483  //phi = avePoint.phi();
484  ATH_MSG_DEBUG("Successfully extrapolated candidate eta/phi : "<<tp.eta()<<"/"<<tp.phi()<<" --> "<< extr_tp.Eta()<<"/"<<extr_tp.Phi());
485 
486  }
487  else{ //This is very unlikely, it happens if a few cases in MC
488  ATH_MSG_WARNING("Candidate extrapolation failed. Keeping track's eta/phi values");
489  return false;
490 
491  }
492 
493  return true;
494 */
495 
496  }
497 
498  //Version for the muons
499  bool VertexCaloIsolation::extrapolateMuon(TLorentzVector& extr_tp, const xAOD::CaloCluster* cluster) const
500  {
501  //auto cluster = mu->cluster(); //done outside
502  if(cluster){
503  float etaT = 0, phiT = 0;
504  int nSample = 0;
505  for(unsigned int i=0; i<CaloSampling::Unknown; i++) // dangerous?
506  {
507  auto s = static_cast<CaloSampling::CaloSample>(i);
508  if(!cluster->hasSampling(s)) continue;
509  //ATH_MSG_DEBUG("Sampling: " << i << "eta-phi (" << cluster->etaSample(s) << ", " << cluster->phiSample(s) << ")");
510  etaT += cluster->etaSample(s);
511  phiT += cluster->phiSample(s);
512  nSample++;
513  }
514  if(nSample>0){
515 
516  extr_tp.SetPtEtaPhiE(1., etaT/nSample, phiT/nSample, 10.); //Using the three-vector constructor
517  return true ;
518 
519  }else{
520  ATH_MSG_WARNING("Muon calo cluster is empty????");
521  return false;
522  }
523  }else{
524  ATH_MSG_WARNING("Muon calo cluster not found. Calo extension can not be obtained!!!");
525  return false;
526  }
527  }
528 
529  //Make a sly track to be fed to the CaloIsolationTool
531 
532  candidate_slyTrack.makePrivateStore();
533  candidate_slyTrack.setDefiningParameters(0, 0., candidate.Phi(), candidate.Theta(), 0. ); // avoided q/p = 1./candidate.P()
534 
535  //I should set the correct d0 and z0, while setting momentum to enormous, to obtain a straight line
536  //I fear that q/p == 0 might cause some divide by 0, though.
537 
538  //Somewhere this information will be checked, so I need to provide it
539  SG::AuxElement::Decorator<uint8_t> hypothesis("particleHypothesis");
540  hypothesis(candidate_slyTrack) = xAOD::undefined; //Value 99 as none of the common types (muon, pion, kaon, etc.)
541  SG::AuxElement::Decorator<std::vector<float> > covmat( "definingParametersCovMatrix" );
542  covmat(candidate_slyTrack) = std::vector<float>(25, 0.); // I am saying that there are no errors on my parameters
543  //The precision goes down a bit, but it's a matter of 10e-7 with our values of interest
544 
545  xAOD::BPhysHelper vertex_h(vertex); //Use the BPhysHelper to access vertex quantities
546 
548  vx(candidate_slyTrack) = vertex_h.pv(vertexType)->x();
549 
551  vy(candidate_slyTrack) = vertex_h.pv(vertexType)->y();
552 
554  vz(candidate_slyTrack) = vertex_h.pv(vertexType)->z();
555  //The precision goes down a bit, but it's a matter of 10e-7 with our values of interest
556 
557  return candidate_slyTrack;
558 
559 
560  }
561 
562 
563 
564 
565 }//End of namespace DerivationFramework
566 
567 
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::TrackParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TrackParticle_v1.cxx:73
GetLCDefs::Unknown
@ Unknown
Definition: GetLCDefs.h:21
xAOD::Vertex_v1::x
float x() const
Returns the x position.
V0Tools.h
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:195
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
get_generator_info.result
result
Definition: get_generator_info.py:21
xAOD::BPhysHelper
Definition: BPhysHelper.h:71
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
TrigCompositeUtils::passed
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
Definition: TrigCompositeUtilsRoot.cxx:117
CaloCellCollector.h
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
xAOD::Iso::toString
std::string toString(const IsoType &iso)
Definition: IsolationHelpers.h:59
xAOD::TrackParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TrackParticle_v1.cxx:77
DerivationFramework::VertexCaloIsolation::m_caloClusterContainerName
std::string m_caloClusterContainerName
Definition: VertexCaloIsolation.h:66
plotBeamSpotVxVal.covmat
covmat
Definition: plotBeamSpotVxVal.py:206
DerivationFramework::VertexCaloIsolation::m_vertexContainerName
std::string m_vertexContainerName
Definition: VertexCaloIsolation.h:65
CaloExtension.h
xAOD::Iso::etcone40
@ etcone40
Definition: IsolationType.h:34
ParticleTest.tp
tp
Definition: ParticleTest.py:25
CaloCell.h
xAOD::TrackParticle_v1::setDefiningParameters
void setDefiningParameters(float d0, float z0, float phi0, float theta, float qOverP)
Set the defining parameters.
Definition: TrackParticle_v1.cxx:177
DerivationFramework::VertexCaloIsolation::initialize
StatusCode initialize()
Definition: VertexCaloIsolation.cxx:93
DerivationFramework::VertexCaloIsolation::m_caloIsoTool
ToolHandle< xAOD::ICaloTopoClusterIsolationTool > m_caloIsoTool
Definition: VertexCaloIsolation.h:63
xAOD::BPhysHelper::PV_MIN_Z0
@ PV_MIN_Z0
Definition: BPhysHelper.h:475
xAOD::Iso::etcone30
@ etcone30
Definition: IsolationType.h:33
python.TurnDataReader.dr
dr
Definition: TurnDataReader.py:112
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
DerivationFramework::VertexCaloIsolation::m_passFlags
std::vector< std::string > m_passFlags
Definition: VertexCaloIsolation.h:71
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:41
Rec::CaloCellCollector
Definition: CaloCellCollector.h:25
DerivationFramework::VertexCaloIsolation::m_trackContainerName
std::string m_trackContainerName
Definition: VertexCaloIsolation.h:64
DerivationFramework::VertexCaloIsolation::m_vertexType
int m_vertexType
Definition: VertexCaloIsolation.h:77
successful
bool successful(bool arg)
Definition: fbtTestBasics.cxx:36
ICaloTopoClusterIsolationTool.h
DerivationFramework::VertexCaloIsolation::m_sigmaCaloNoiseCut
float m_sigmaCaloNoiseCut
Number of sigma for calo cell noise cut.
Definition: VertexCaloIsolation.h:75
xAOD::CaloCluster_v1::etaSample
float etaSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
Definition: CaloCluster_v1.cxx:532
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
xAOD::CaloIsolation
Definition: IsolationCommon.h:22
DerivationFramework::VertexCaloIsolation::finalize
StatusCode finalize()
Definition: VertexCaloIsolation.cxx:122
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
xAOD::BPhysHelper::pv_type
pv_type
: Enum type of the PV
Definition: BPhysHelper.h:475
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
SG::Decorator
Helper class to provide type-safe access to aux data.
Definition: Decorator.h:59
DerivationFramework::VertexCaloIsolation::extrapolateMuon
bool extrapolateMuon(TLorentzVector &extr_tp, const xAOD::CaloCluster *cluster) const
Definition: VertexCaloIsolation.cxx:499
lumiFormat.i
int i
Definition: lumiFormat.py:85
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
beamspotman.n
n
Definition: beamspotman.py:731
xAOD::Iso::etcone20
@ etcone20
Calorimeter isolation.
Definition: IsolationType.h:32
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
BPhysHypoHelper.h
: B-physcis xAOD helpers.
xAOD::Iso::IsolationType
IsolationType
Overall enumeration for isolation types in xAOD files.
Definition: IsolationType.h:26
DerivationFramework::VertexCaloIsolation::extrapolateTrack
bool extrapolateTrack(TLorentzVector &extr_tp, const xAOD::IParticle &tp) const
Definition: VertexCaloIsolation.cxx:458
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
Rec::CaloCellCollector::ET_Core
@ ET_Core
Definition: CaloCellCollector.h:29
xAOD::CaloCluster_v1::phiSample
float phiSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
Definition: CaloCluster_v1.cxx:547
xAOD::Vertex_v1::z
float z() const
Returns the z position.
DerivationFramework
THE reconstruction tool.
Definition: ParticleSortingAlg.h:24
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
Rec::CaloCellCollector::collectEtCore
void collectEtCore(const xAOD::CaloCluster &cluster, std::vector< float > &et_core, const CaloNoise *caloNoise, float sigmaNoiseCut=3.4) const
Definition: CaloCellCollector.cxx:259
DerivationFramework::VertexCaloIsolation::makeSlyTrack
xAOD::TrackParticle & makeSlyTrack(xAOD::TrackParticle &, const TLorentzVector &candidate, const xAOD::Vertex *vertex, xAOD::BPhysHelper::pv_type vertexType) const
Definition: VertexCaloIsolation.cxx:530
DerivationFramework::VertexCaloIsolation::addBranches
StatusCode addBranches() const
Pass the thinning service
Definition: VertexCaloIsolation.cxx:130
xAOD::vertexType
vertexType
Definition: Vertex_v1.cxx:166
SG::AuxElement::makePrivateStore
void makePrivateStore()
Create a new (empty) private store for this object.
Definition: AuxElement.cxx:192
VertexCaloIsolation.h
BPhysHelper.h
: B-physics xAOD helpers.
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
VertexContainer.h
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
DerivationFramework::VertexCaloIsolation::m_caloExtTool
ToolHandle< Trk::IParticleCaloExtensionTool > m_caloExtTool
Definition: VertexCaloIsolation.h:69
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
DerivationFramework::VertexCaloIsolation::m_cones
std::vector< unsigned int > m_cones
Definition: VertexCaloIsolation.h:70
xAOD::CaloCorrection
Definition: IsolationCommon.h:14
IsolationHelpers.h
xAOD::Vertex_v1::y
float y() const
Returns the y position.
xAOD::BPhysHelper::pv
const xAOD::Vertex * pv(const pv_type vertexType=BPhysHelper::PV_MIN_A0)
Get the refitted collision vertex of type pv_type.
Definition: BPhysHelper.cxx:796
DerivationFramework::VertexCaloIsolation::m_muonContainerName
std::string m_muonContainerName
Definition: VertexCaloIsolation.h:68
SG::ConstAccessor< T, AuxAllocator_t< T > >::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
AthAlgTool
Definition: AthAlgTool.h:26
xAOD::CaloCluster_v1::hasSampling
bool hasSampling(const CaloSample s) const
Checks if certain smapling contributes to cluster.
Definition: CaloCluster_v1.h:890
xAOD::Iso::coneSize
float coneSize(IsolationConeSize type)
convert Isolation Size into cone size
Definition: IsolationHelpers.h:27
dq_make_web_display.cl
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Definition: dq_make_web_display.py:26
xAOD::undefined
@ undefined
Definition: TrackingPrimitives.h:205
TrackingPrimitives.h
Eta
@ Eta
Definition: RPCdef.h:8
xAOD::CaloCorrection::calobitset
Iso::IsolationCaloCorrectionBitset calobitset
Definition: IsolationCommon.h:15
VertexAuxContainer.h
xAOD::TrackParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
xAOD::Iso::pileupCorrection
@ pileupCorrection
fully corrected
Definition: Event/xAOD/xAODPrimitives/xAODPrimitives/IsolationCorrection.h:35