ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
Trk::CaloCellSelectorRoughdR Class Reference

#include <CaloCellSelectorRoughdR.h>

Inheritance diagram for Trk::CaloCellSelectorRoughdR:
Collaboration diagram for Trk::CaloCellSelectorRoughdR:

Public Member Functions

 CaloCellSelectorRoughdR (double coneSize)
 
 ~CaloCellSelectorRoughdR ()
 
bool preSelectAction (const Trk::CaloExtension &caloExtension)
 Initialize selector wtih CaloExtension, returns false if the selection cannot be performed for the given input. More...
 
bool select (const CaloCell &cell) const
 Method to determine if a cell is to be selected or not. More...
 
virtual bool preSelectActionCells (const Rec::ParticleCellAssociation &cellAssociation)
 Initialize selector wtih ParticleCellAssociation, returns false if the selection cannot be performed for the given input
More...
 

Private Attributes

double m_coneSize
 
double m_midEta
 
double m_midPhi
 
double m_maxDiff
 
CaloExtensionHelpers::EntryExitPerLayerVector m_crossPoints
 

Detailed Description

Definition at line 22 of file CaloCellSelectorRoughdR.h.

Constructor & Destructor Documentation

◆ CaloCellSelectorRoughdR()

Trk::CaloCellSelectorRoughdR::CaloCellSelectorRoughdR ( double  coneSize)

Definition at line 17 of file CaloCellSelectorRoughdR.cxx.

◆ ~CaloCellSelectorRoughdR()

Trk::CaloCellSelectorRoughdR::~CaloCellSelectorRoughdR ( )
default

Member Function Documentation

◆ preSelectAction()

bool Trk::CaloCellSelectorRoughdR::preSelectAction ( const Trk::CaloExtension caloExtension)
virtual

Initialize selector wtih CaloExtension, returns false if the selection cannot be performed for the given input.

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Reimplemented from Trk::ICaloCellSelector.

Definition at line 21 of file CaloCellSelectorRoughdR.cxx.

21  {
22  if (caloExtension.caloLayerIntersections().empty()) return false;
23 
26  // get mean direction of the calo crossings
27  Amg::Vector3D meanPos(0., 0., 0.);
28  for (auto entry : m_crossPoints) {
29  int code = std::get<0>(entry);
30  if (code < 0 || code >= 24) { continue; } // not a intersection with a calo layer
31  meanPos += std::get<1>(entry).unit();
32  }
33 
34  m_midEta = meanPos.eta();
35  m_midPhi = meanPos.phi();
36 
37  // get individual crossings max deviation from the mean direction as tolerance
38  m_maxDiff = 0.;
39  for (auto entry : m_crossPoints) {
40  int code = std::get<0>(entry);
41  if (code < 0 || code >= 24) { continue; } // not a intersection with a calo layer
42  Amg::Vector3D pos = std::get<1>(entry);
43  double rDiff = Utils::deltaR(pos.eta(), m_midEta, pos.phi(), m_midPhi);
44  if (rDiff > m_maxDiff) m_maxDiff = rDiff;
45  }
47  m_maxDiff *= m_maxDiff; // do comparison in dR*dR
49 
50  // const std::vector<const CurvilinearParameters*>& intersections = caloExtension.caloLayerIntersections();
51  // int nPts = intersections.size();
52 
53  // Amg::Vector3D meanPos(0., 0., 0.);
54  // m_maxDiff = 0.;
55 
57  // for (int i=0;i<nPts;++i){
58  // //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
59  // int code = parsIdHelper.caloSample(intersections[i]->cIdentifier());
60  // if (!parsIdHelper.isEntryToVolume(intersections[i]->cIdentifier())) code = -code;
61  // //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
62  // if ( !(code >= 0 && code < 24) ) { continue; } // not a intersection with a calo layer
63  // meanPos += intersections[i]->position().unit();
64  //}
65 
66  // m_midEta = meanPos.eta();
67  // m_midPhi = meanPos.phi();
68 
70  // for (int i=0;i<nPts;++i){
71  // //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
72  // int code = parsIdHelper.caloSample(intersections[i]->cIdentifier());
73  // if (!parsIdHelper.isEntryToVolume(intersections[i]->cIdentifier())) code = -code;
74  // //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
75  // if ( !(code >= 0 && code < 24) ) { continue; } // not a intersection with a calo layer
76  // Amg::Vector3D pos = intersections[i]->position();
77  // double rDiff = Utils::deltaR(pos.eta(), m_midEta, pos.phi(), m_midPhi);
78  // if (rDiff>m_maxDiff) m_maxDiff = rDiff;
79  //}
80 
82  // m_maxDiff += m_coneSize;
83  // m_maxDiff *= m_maxDiff; //do comparison in dR*dR
84 
85  return true;
86  }

◆ preSelectActionCells()

bool ICaloCellSelector::preSelectActionCells ( const Rec::ParticleCellAssociation cellAssociation)
inlinevirtualinherited

Initialize selector wtih ParticleCellAssociation, returns false if the selection cannot be performed for the given input

Definition at line 44 of file Reconstruction/RecoTools/RecoToolInterfaces/RecoToolInterfaces/ICaloCellSelector.h.

44  {
45  return preSelectAction(cellAssociation.caloExtension());
46  }

◆ select()

bool Trk::CaloCellSelectorRoughdR::select ( const CaloCell cell) const
virtual

Method to determine if a cell is to be selected or not.

Parameters
CaloCell
Returns
bool

Implements Trk::ICaloCellSelector.

Definition at line 88 of file CaloCellSelectorRoughdR.cxx.

88  {
89  const CaloDetDescrElement* dde = cell.caloDDE();
90  if (!dde) return false;
91  return Utils::deltaR2(m_midEta, dde->eta(), m_midPhi, dde->phi()) < m_maxDiff;
92  }

Member Data Documentation

◆ m_coneSize

double Trk::CaloCellSelectorRoughdR::m_coneSize
private

Definition at line 32 of file CaloCellSelectorRoughdR.h.

◆ m_crossPoints

CaloExtensionHelpers::EntryExitPerLayerVector Trk::CaloCellSelectorRoughdR::m_crossPoints
private

Definition at line 38 of file CaloCellSelectorRoughdR.h.

◆ m_maxDiff

double Trk::CaloCellSelectorRoughdR::m_maxDiff
private

Definition at line 35 of file CaloCellSelectorRoughdR.h.

◆ m_midEta

double Trk::CaloCellSelectorRoughdR::m_midEta
private

Definition at line 33 of file CaloCellSelectorRoughdR.h.

◆ m_midPhi

double Trk::CaloCellSelectorRoughdR::m_midPhi
private

Definition at line 34 of file CaloCellSelectorRoughdR.h.


The documentation for this class was generated from the following files:
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
Trk::CaloCellSelectorRoughdR::m_crossPoints
CaloExtensionHelpers::EntryExitPerLayerVector m_crossPoints
Definition: CaloCellSelectorRoughdR.h:38
Trk::CaloCellSelectorRoughdR::m_coneSize
double m_coneSize
Definition: CaloCellSelectorRoughdR.h:32
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
Trk::CaloCellSelectorRoughdR::m_midPhi
double m_midPhi
Definition: CaloCellSelectorRoughdR.h:34
Trk::CaloCellSelectorRoughdR::m_midEta
double m_midEta
Definition: CaloCellSelectorRoughdR.h:33
Rec::ParticleCaloAssociation::caloExtension
const Trk::CaloExtension & caloExtension() const
return calo extension
Definition: ParticleCaloAssociation.h:73
Utils::deltaR
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: CaloCellSelectorUtils.cxx:23
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
Trk::ICaloCellSelector::preSelectAction
virtual bool preSelectAction(const Trk::CaloExtension &caloExtension)
Initialize selector wtih CaloExtension, returns false if the selection cannot be performed for the gi...
Definition: Reconstruction/RecoTools/RecoToolInterfaces/RecoToolInterfaces/ICaloCellSelector.h:40
pmontree.code
code
Definition: pmontree.py:443
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
CaloExtensionHelpers::entryExitPerLayerVector
void entryExitPerLayerVector(const Trk::CaloExtension &extension, EntryExitPerLayerVector &result, const LayersToSelect *selection=nullptr)
Definition: CaloExtensionHelpers.h:178
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
Trk::CaloCellSelectorRoughdR::m_maxDiff
double m_maxDiff
Definition: CaloCellSelectorRoughdR.h:35
CaloDetDescrElement::eta
float eta() const
cell eta
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:344
CaloDetDescrElement::phi
float phi() const
cell phi
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:346
Trk::CaloExtension::caloLayerIntersections
const std::vector< CurvilinearParameters > & caloLayerIntersections() const
access to the intersections with the calorimeter layers.
Definition: CaloExtension.h:76
xAOD::Iso::coneSize
float coneSize(IsolationConeSize type)
convert Isolation Size into cone size
Definition: IsolationHelpers.h:27
Utils::deltaR2
double deltaR2(double eta1, double eta2, double phi1, double phi2)
Definition: CaloCellSelectorUtils.cxx:17