ATLAS Offline Software
VP1RawDataColl_TRT_RDO.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
7 // //
8 // Implementation of class VP1RawDataColl_TRT_RDO //
9 // //
10 // Author: Thomas H. Kittelmann (Thomas.Kittelmann@cern.ch) //
11 // Initial version: January 2009 //
12 // //
14 
25 
26 //____________________________________________________________________
28 {
30 }
31 
32 //____________________________________________________________________
34 public:
36  bool requireHT = false;
38 };
39 
40 
41 //____________________________________________________________________
44 {
45  m_d->requireHT = true;
48 
49  connect(common->controller(),SIGNAL(trtAllowedToTChanged(const VP1Interval&)),
50  this,SLOT(setAllowedToT(const VP1Interval&)));
51  setAllowedToT(common->controller()->trtAllowedToT());
52 
53  connect(common->controller(),SIGNAL(trtRequireHTChanged(bool)),
54  this,SLOT(setRequireHT(bool)));
55  setRequireHT(common->controller()->trtRequireHT());
56 
57  connect(common->controller(),SIGNAL(useSpecialTRTHTMaterialChanged(bool)),
58  this,SLOT(setUseSpecialTRTHTMaterial(bool)));
59  setUseSpecialTRTHTMaterial(common->controller()->useSpecialTRTHTMaterial());
60 }
61 
62 //____________________________________________________________________
64 {
65  delete m_d;
66 }
67 
68 //____________________________________________________________________
70 {
71  VP1MaterialButton::setMaterialParameters( m, 0.85, 0.85, 0.85, 0.1 );
72 }
73 
74 //____________________________________________________________________
76 {
78  message("TRT geometry not configured in job");
79  return false;
80  }
81  const TRT_RDO_Container* rdoContainer;
82  if (!VP1SGAccessHelper(systemBase()).retrieve(rdoContainer,text())) {
83  message("Problems retrieving container with key "+text());
84  return false;
85  }
86  TRT_RDO_Container::const_iterator itColl(rdoContainer->begin()), itCollE(rdoContainer->end());
87  for (;itColl!=itCollE;++itColl) {
88  if (!*itColl||(*itColl)->empty())
89  continue;
90  TRT_RDO_Collection::const_iterator itRDO((*itColl)->begin()), itRDOE((*itColl)->end());
91  for (;itRDO!=itRDOE;++itRDO) {
92  const TRT_LoLumRawData * rdo = dynamic_cast<const TRT_LoLumRawData *>(*itRDO);
93  if (rdo)
94  addHandle(new VP1RawDataHandle_TRT_RDO(this,rdo));
95  }
96  }
97 
98 // recheckCutStatusOfAllHandles();
99  return true;
100 }
101 
102 //____________________________________________________________________
104 {
105 
106  if (m_d->requireHT && !static_cast<VP1RawDataHandle_TRT_RDO*>(handle)->highThreshold())
107  return false;
108  return m_d->allowedToT.contains(static_cast<VP1RawDataHandle_TRT_RDO*>(handle)->timeOverThreshold());
109 }
110 
111 //____________________________________________________________________
113 {
114  if (m_d->allowedToT==i)
115  return;
116  bool relaxed(i.contains(m_d->allowedToT));
117  bool tightened(m_d->allowedToT.contains(i));
118  m_d->allowedToT=i;
119  if (relaxed)
121  else if (tightened)
123  else
125 }
126 
127 //____________________________________________________________________
129 {
130  if (m_d->requireHT==b)
131  return;
132  m_d->requireHT=b;
133  if (b)
135  else
137 }
138 
139 //____________________________________________________________________
141 {
143  return;
145 
147  for (;it!=itE;++it) {
148  if (static_cast<VP1RawDataHandle_TRT_RDO*>(*it)->highThreshold())
149  (*it)->update3DObjects();
150  }
151 
152 }
153 
154 //____________________________________________________________________
156 {
158 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
VP1RawDataColl_TRT_RDO::setRequireHT
void setRequireHT(bool)
Definition: VP1RawDataColl_TRT_RDO.cxx:128
VP1RawDataColl_TRT_RDO::useSpecialHTMat
bool useSpecialHTMat()
Definition: VP1RawDataColl_TRT_RDO.cxx:155
VP1RawDataHandle_TRT_RDO
Definition: VP1RawDataHandle_TRT_RDO.h:25
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
VP1RawDataColl_TRT_RDO.h
VP1RawDataCollBase::addHandle
void addHandle(VP1RawDataHandleBase *)
Definition: VP1RawDataCollBase.cxx:150
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
TRT_RDO_Container.h
VP1RawDataHandleBase
Definition: VP1RawDataHandleBase.h:34
VP1RawDataHandle_TRT_RDO::highThreshold
bool highThreshold() const
Definition: VP1RawDataHandle_TRT_RDO.cxx:142
VP1RawDataColl_TRT_RDO::~VP1RawDataColl_TRT_RDO
virtual ~VP1RawDataColl_TRT_RDO()
Definition: VP1RawDataColl_TRT_RDO.cxx:63
VP1RawDataColl_TRT_RDO::availableCollections
static QStringList availableCollections(IVP1System *)
Definition: VP1RawDataColl_TRT_RDO.cxx:27
VP1MaterialButton.h
TRT_LoLumRawData
Definition: TRT_LoLumRawData.h:25
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
VP1RawDataColl_TRT_RDO::VP1RawDataColl_TRT_RDO
VP1RawDataColl_TRT_RDO(VP1RawDataCommonData *, const QString &key)
Definition: VP1RawDataColl_TRT_RDO.cxx:42
VP1RawDataCollBase
Definition: VP1RawDataCollBase.h:29
VP1RawDataCollBase::recheckCutStatusOfAllNotVisibleHandles
void recheckCutStatusOfAllNotVisibleHandles()
Definition: VP1RawDataCollBase.cxx:228
InDetRawDataContainer
Definition: InDetRawDataContainer.h:27
VP1RawDataColl_TRT_RDO::cut
bool cut(VP1RawDataHandleBase *)
Definition: VP1RawDataColl_TRT_RDO.cxx:103
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
TruthTest.itE
itE
Definition: TruthTest.py:25
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
VP1RawDataColl_TRT_RDO::Imp::requireHT
bool requireHT
Definition: VP1RawDataColl_TRT_RDO.cxx:36
VP1SGContentsHelper::getKeys
QStringList getKeys() const
Definition: VP1SGContentsHelper.h:55
VP1RawDataCollBase::recheckCutStatusOfAllVisibleHandles
void recheckCutStatusOfAllVisibleHandles()
Definition: VP1RawDataCollBase.cxx:211
VP1RawDataCollBase::recheckCutStatusOfAllHandles
void recheckCutStatusOfAllHandles()
Definition: VP1RawDataCollBase.cxx:194
IVP1System
Definition: IVP1System.h:36
VP1RawDataCollBase::getHandles
std::vector< VP1RawDataHandleBase * > & getHandles()
Definition: VP1RawDataCollBase.cxx:242
VP1RawDataColl_TRT_RDO::m_d
Imp * m_d
Definition: VP1RawDataColl_TRT_RDO.h:53
lumiFormat.i
int i
Definition: lumiFormat.py:85
VP1RawDataColl_TRT_RDO::Imp::useSpecialTRTHTMaterial
bool useSpecialTRTHTMaterial
Definition: VP1RawDataColl_TRT_RDO.cxx:37
VP1MaterialButton::setMaterialParameters
static void setMaterialParameters(SoMaterial *m, const QColor &, const double &brightness=0.0, const double &transp=0.0)
Definition: VP1MaterialButton.cxx:802
VP1RawDataSysController.h
IdentifiableContainerMT::end
const_iterator end() const
return const_iterator for end of container
Definition: IdentifiableContainerMT.h:242
VP1StdCollection::text
QString text() const
Definition: VP1StdCollection.cxx:132
IdentifiableContainerMT::const_iterator
Definition: IdentifiableContainerMT.h:82
IdentifiableContainerMT::begin
const_iterator begin() const
return const_iterator for first entry
Definition: IdentifiableContainerMT.h:236
VP1JobConfigInfo::hasTRTGeometry
static bool hasTRTGeometry()
Definition: VP1JobConfigInfo.cxx:129
VP1RawDataCommonData.h
VP1HelperClassBase::systemBase
IVP1System * systemBase() const
Definition: VP1HelperClassBase.h:50
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
VP1Interval::contains
bool contains(const double &x) const
VP1SGContentsHelper
Definition: VP1SGContentsHelper.h:26
VP1RawDataColl_TRT_RDO::Imp
Definition: VP1RawDataColl_TRT_RDO.cxx:33
VP1Interval
Definition: VP1Interval.h:23
VP1RawDataHandle_TRT_RDO.h
VP1RawDataColl_TRT_RDO::assignDefaultMaterial
void assignDefaultMaterial(SoMaterial *) const
Definition: VP1RawDataColl_TRT_RDO.cxx:69
VP1RawDataCommonData
Definition: VP1RawDataCommonData.h:31
VP1HelperClassBase::message
void message(const QString &) const
Definition: VP1HelperClassBase.cxx:49
timeOverThreshold
double timeOverThreshold(unsigned int m_word)
Definition: driftCircle.h:116
VP1JobConfigInfo.h
VP1SGAccessHelper
Definition: VP1SGAccessHelper.h:25
VP1RawDataColl_TRT_RDO::Imp::allowedToT
VP1Interval allowedToT
Definition: VP1RawDataColl_TRT_RDO.cxx:35
VP1SGAccessHelper.h
VP1RawDataColl_TRT_RDO::load
bool load()
Definition: VP1RawDataColl_TRT_RDO.cxx:75
common
Definition: common.py:1
VP1SGContentsHelper.h
VP1RawDataColl_TRT_RDO::setAllowedToT
void setAllowedToT(const VP1Interval &)
Definition: VP1RawDataColl_TRT_RDO.cxx:112
TRT_LoLumRawData.h
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
VP1RawDataColl_TRT_RDO::setUseSpecialTRTHTMaterial
void setUseSpecialTRTHTMaterial(bool)
Definition: VP1RawDataColl_TRT_RDO.cxx:140