ATLAS Offline Software
PRDCollHandle_SCT.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
9 #include <QColor>
10 
14 
15 //____________________________________________________________________
17 {
19 }
20 
21 //____________________________________________________________________
23 public:
24  std::set<const InDetDD::SiDetectorElement*> touchedelements;
25 
26  PRDCommonFlags::InDetPartsFlags indetpartsflags;
28 };
29 
30 //____________________________________________________________________
33 {
36 }
37 
38 //____________________________________________________________________
40 {
41  delete m_d;
42 }
43 
44 //____________________________________________________________________
46 {
47  return QColor::fromRgbF(1.0, 1.0, 0.5 );//light yellow
48 }
49 
50 //____________________________________________________________________
52 {
53  assert(dynamic_cast<const InDet::SCT_Cluster*>(prd));
54  return new PRDHandle_SCT(this,static_cast<const InDet::SCT_Cluster*>(prd));
55 }
56 
57 //____________________________________________________________________
59 {
61  for (;it!=itE;++it)
62  m_d->touchedelements.insert(static_cast<PRDHandle_SCT*>(*it)->cluster()->detectorElement());
63  m_d->touchedelements.insert(0);//To always show clusters whose elements have no otherSide() pointer.
64 }
65 
66 //____________________________________________________________________
68 {
69  m_d->touchedelements.clear();
70 }
71 
72 //____________________________________________________________________
74 {
75  PRDHandle_SCT * handle = static_cast<PRDHandle_SCT*>(handlebase);
76  assert(handle);
77 
79  if (handle->isBarrel()) {
81  return false;
82  } else {
84  return false;
85  }
86  }
87 
89  if (!m_d->touchedelements.count(handle->cluster()->detectorElement()->otherSide()))
90  return false;
91  }
92 
93  return true;
94 }
95 
96 //____________________________________________________________________
97 void PRDCollHandle_SCT::setPartsFlags(PRDCommonFlags::InDetPartsFlags flags ) {
98  //NB: The code is this method is very similar in PRDCollHandle_Pixel::setPartsFlags, PRDCollHandle_SCT::setPartsFlags,
99  //PRDCollHandle_TRT::setPartsFlags and and PRDCollHandle_SpacePoints::setPartsFlags
100  //Fixme: base decision to recheck on visibility also!
101 
102  if (m_d->indetpartsflags==flags)
103  return;
104 
109  bool barrelChanged = (barrelPosChanged || barrelNegChanged);
110  bool endcapChanged = (endcapPosChanged || endcapNegChanged);
112 
115  for (;it!=itE;++it) {
116  PRDHandle_SCT* handle = static_cast<PRDHandle_SCT*>(*it);
117  if (handle->isBarrel()) {
118  if (barrelChanged&&(handle->isPositiveZ()?barrelPosChanged:barrelNegChanged))
119  recheckCutStatus(handle);
120  } else {
121  if (endcapChanged&&(handle->isPositiveZ()?endcapPosChanged:endcapNegChanged))
122  recheckCutStatus(handle);
123  }
124  }
125  largeChangesEnd();
126 
127 }
128 
129 //____________________________________________________________________
131 {
132  if (m_d->excludeisolatedclusters==excludeisolated)
133  return;
134  m_d->excludeisolatedclusters=excludeisolated;
135  if (excludeisolated)
137  else
139 }
140 
141 //____________________________________________________________________
143 {
144  connect(controller,SIGNAL(inDetPartsFlagsChanged(PRDCommonFlags::InDetPartsFlags)),this,SLOT(setPartsFlags(PRDCommonFlags::InDetPartsFlags)));
145  setPartsFlags(controller->inDetPartsFlags());
146 
147  connect(controller,SIGNAL(sctExcludeIsolatedClustersChanged(bool)),this,SLOT(setExcludeIsolatedClusters(bool)));
149 }
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
PRDCollHandle_SCT::Imp::indetpartsflags
PRDCommonFlags::InDetPartsFlags indetpartsflags
Definition: PRDCollHandle_SCT.cxx:26
AthenaPoolTestRead.flags
flags
Definition: AthenaPoolTestRead.py:8
PRDCollHandleBase::recheckCutStatus
void recheckCutStatus(PRDHandleBase *)
Definition: PRDCollHandleBase.cxx:519
PRDCollHandle_SCT::defaultColor
virtual QColor defaultColor() const override
Definition: PRDCollHandle_SCT.cxx:45
PRDCollHandle_SCT::setPartsFlags
void setPartsFlags(PRDCommonFlags::InDetPartsFlags)
Definition: PRDCollHandle_SCT.cxx:97
PRDSystemController
Definition: PRDSystemController.h:34
fillPileUpNoiseLumi.connect
string connect
Definition: fillPileUpNoiseLumi.py:70
CSV_InDetExporter.new
new
Definition: CSV_InDetExporter.py:145
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
skel.it
it
Definition: skel.GENtoEVGEN.py:396
InDet::SCT_ClusterContainer
Trk::PrepRawDataContainer< SCT_ClusterCollection > SCT_ClusterContainer
Definition: SCT_ClusterContainer.h:27
VP1StdCollection::largeChangesBegin
virtual void largeChangesBegin()
Definition: VP1StdCollection.cxx:228
PRDCollHandle_SCT::addPRD
virtual PRDHandleBase * addPRD(const Trk::PrepRawData *) override
Definition: PRDCollHandle_SCT.cxx:51
PRDSystemController::sctExcludeIsolatedClusters
bool sctExcludeIsolatedClusters() const
Definition: PRDSystemController.cxx:428
PRDCollHandle_SCT::m_d
Imp * m_d
Definition: PRDCollHandle_SCT.h:38
PRDSysCommonData
Definition: PRDSysCommonData.h:35
PRDCollHandle_SCT::Imp::touchedelements
std::set< const InDetDD::SiDetectorElement * > touchedelements
Definition: PRDCollHandle_SCT.cxx:24
PRDCollHandle_SCT::setExcludeIsolatedClusters
void setExcludeIsolatedClusters(bool)
Definition: PRDCollHandle_SCT.cxx:130
SCT_Cluster.h
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
TruthTest.itE
itE
Definition: TruthTest.py:25
PRDHandle_SCT::isPositiveZ
bool isPositiveZ() const
Definition: PRDHandle_SCT.h:25
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
VP1SGContentsHelper::getKeys
QStringList getKeys() const
Definition: VP1SGContentsHelper.h:55
PRDCollHandleBase
Definition: PRDCollHandleBase.h:25
PRDCollHandle_SCT::eraseEventDataSpecific
virtual void eraseEventDataSpecific() override
Definition: PRDCollHandle_SCT.cxx:67
IVP1System
Definition: IVP1System.h:36
PRDCollHandle_SCT::cut
virtual bool cut(PRDHandleBase *) override
Definition: PRDCollHandle_SCT.cxx:73
VP1JobConfigInfo::hasSCTGeometry
static bool hasSCTGeometry()
Definition: VP1JobConfigInfo.cxx:128
PRDCommonFlags::All
@ All
Definition: PRDCommonFlags.h:30
PRDCollHandle_SCT::Imp
Definition: PRDCollHandle_SCT.cxx:22
InDet::SCT_Cluster
Definition: InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SCT_Cluster.h:34
PRDCollHandle_SCT::PRDCollHandle_SCT
PRDCollHandle_SCT(PRDSysCommonData *, const QString &key)
Definition: PRDCollHandle_SCT.cxx:31
PRDHandle_SCT::isBarrel
bool isBarrel() const
Definition: PRDHandle_SCT.h:24
PRDCollHandleBase::recheckCutStatusOfAllNotVisibleHandles
void recheckCutStatusOfAllNotVisibleHandles()
Definition: PRDCollHandleBase.cxx:603
InDet::SiCluster::detectorElement
virtual const InDetDD::SiDetectorElement * detectorElement() const override final
return the detector element corresponding to this PRD The pointer will be zero if the det el is not d...
PRDDetType
Definition: PRDDetTypes.h:10
SCT
Definition: SCT_ChipUtils.h:14
Trk::PrepRawData
Definition: PrepRawData.h:62
InDetDD::SiDetectorElement::otherSide
const SiDetectorElement * otherSide() const
Useful for SCT only.
PRDSystemController.h
PRDHandle_SCT.h
VP1SGContentsHelper
Definition: VP1SGContentsHelper.h:26
PRDCollHandle_SCT::~PRDCollHandle_SCT
virtual ~PRDCollHandle_SCT()
Definition: PRDCollHandle_SCT.cxx:39
VP1StdCollection::largeChangesEnd
virtual void largeChangesEnd()
Definition: VP1StdCollection.cxx:239
PRDHandle_SCT::cluster
const InDet::SCT_Cluster * cluster() const
Definition: PRDHandle_SCT.h:22
PRDCommonFlags::BarrelPositive
@ BarrelPositive
Definition: PRDCommonFlags.h:24
PRDCommonFlags::BarrelNegative
@ BarrelNegative
Definition: PRDCommonFlags.h:25
PRDCommonFlags::EndCapPositive
@ EndCapPositive
Definition: PRDCommonFlags.h:26
PRDCollHandleBase::recheckCutStatusOfAllVisibleHandles
void recheckCutStatusOfAllVisibleHandles()
Definition: PRDCollHandleBase.cxx:585
PRDSystemController::inDetPartsFlags
PRDCommonFlags::InDetPartsFlags inDetPartsFlags() const
Definition: PRDSystemController.cxx:378
SCT_ClusterContainer.h
PRDCollHandle_SCT::availableCollections
static QStringList availableCollections(IVP1System *)
Definition: PRDCollHandle_SCT.cxx:16
calibdata.cd
cd
Definition: calibdata.py:51
VP1JobConfigInfo.h
PRDHandleBase
Definition: PRDHandleBase.h:35
PRDCollHandle_SCT::postLoadInitialisation
virtual void postLoadInitialisation() override
Definition: PRDCollHandle_SCT.cxx:58
PRDCollHandle_SCT::setupSettingsFromControllerSpecific
virtual void setupSettingsFromControllerSpecific(PRDSystemController *) override
Definition: PRDCollHandle_SCT.cxx:142
PRDCommonFlags::EndCapNegative
@ EndCapNegative
Definition: PRDCommonFlags.h:27
PRDCollHandleBase::getPrdHandles
std::vector< PRDHandleBase * > & getPrdHandles()
Definition: PRDCollHandleBase.cxx:507
PRDCollHandle_SCT.h
PRDCollHandle_SCT::Imp::excludeisolatedclusters
bool excludeisolatedclusters
Definition: PRDCollHandle_SCT.cxx:27
PRDHandle_SCT
Definition: PRDHandle_SCT.h:13
VP1SGContentsHelper.h
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37