|
ATLAS Offline Software
|
Go to the documentation of this file.
31 }
else if (em > -7 && em < 6) {
56 int iFE,
float value) {
67 m_pm[
layer].push_back(m_host.m_pixelid->phi_module(
id) * 2 + iFE / 8);
69 m_pm[
layer].push_back(m_host.m_pixelid->phi_module(
id) * 2 + 1 - iFE / 8);
73 int ld = m_host.m_pixelid->layer_disk(
id);
77 if (iFE < 8) em += (7 - iFE % 8);
82 if (m_host.m_pixelid->barrel_ec(
id) == 0) {
84 em = m_host.m_pixelid->eta_module(
id);
88 }
else if (em > -7 && em < 6) {
95 em = m_host.m_pixelid->eta_module(
id) * 8 - 4;
96 if (iFE < 8) em += (7 - iFE % 8);
100 m_em[
layer].push_back(em);
105 ATH_CHECK(
m_pixelCondSummaryTool.retrieve( DisableTool{ !m_pixelDetElStatus.empty() && !m_pixelDetElStatusActiveOnly.empty() && !VALIDATE_STATUS_ARRAY_ACTIVATED} ) );
112 return StatusCode::SUCCESS;
121 for (
const auto& itr : accumulator.
m_pm) {
123 int layer = itr.first;
140 for (
const auto& itr : accumulator.
m_pm) {
141 int layer = itr.first;
145 auto pi = pm_v.begin();
146 auto ei = em_v.begin();
147 auto vi = val_v.begin();
148 while (
pi!=pm_v.end() and ei!=em_v.end() and vi!=val_v.end() )
151 auto em = em_offsets[
layer] + *ei++;
175 for (
int i = i_start;
i < i_end;
i++) {
210 const std::string& name2DMap)
const {
213 const float weightPix = 1.0 / 46080.0;
214 const float weightIBL = 1.0 / 26880.0;
216 bool fillPP0only(name2DMap ==
"");
217 std::string pospp0varx = namePP0 +
"_pospp0x";
218 std::string valvarp = namePP0 +
"_val";
219 std::string posvarx = name2DMap +
"_em";
220 std::string posvary = name2DMap +
"_pm";
221 std::string valvarm = name2DMap +
"_val";
237 if (pixarrays.
DA[
a][
b] > -1) {
238 fill(
"ECA", pospp0x, valp);
239 if (!fillPP0only)
fill(
"ECA", posx, posy, valm);
241 valp = pixarrays.
DC[
a][
b];
242 valm = pixarrays.
DC[
a][
b] * weightPix;
243 if (pixarrays.
DC[
a][
b] > -1) {
244 fill(
"ECC", pospp0x, valp);
245 if (!fillPP0only)
fill(
"ECC", posx, posy, valm);
261 if (pixarrays.
B0[
a][
b] > -1) {
262 fill(
"BLayer", pospp0x, valp);
263 if (!fillPP0only)
fill(
"BLayer", posx, posy, valm);
271 if (pixarrays.
B1[
a][
b] > -1) {
272 fill(
"Layer1", pospp0x, valp);
273 if (!fillPP0only)
fill(
"Layer1", posx, posy, valm);
281 if (pixarrays.
B2[
a][
b] > -1) {
282 fill(
"Layer2", pospp0x, valp);
283 if (!fillPP0only)
fill(
"Layer2", posx, posy, valm);
289 for (
unsigned int a = 0;
a < nbina; ++
a) {
292 for (
unsigned int b = 0;
b < nbinb; ++
b) {
299 if (pixarrays.
IBL[
a][
b] > -1) {
300 if (
b > (0.5 * nbinb - 1)) {
301 fill(
"IBLA", pospp0x, valp);
303 fill(
"IBLC", pospp0x, valp);
305 if (!fillPP0only)
fill(
"IBL", posx, posy, valm);
322 }
else if (ec == -2) {
324 }
else if (ec == 0) {
338 if ( hashID>=156 && hashID<=435 )
340 int module = (hashID-156) % 20;
356 if ( hashID>=156 && hashID<=435 )
358 int module = (hashID-156) % 20;
359 if (module<4 || module>15)
389 bool& copyFE)
const {
397 if (layerDisk == 0) {
419 return binary_search(RDOIDs.begin(), RDOIDs.end(),
id);
432 double> >
const& ClusterIDs)
const {
433 bool onTrack =
false;
435 std::pair<Identifier, double> searchVal = std::make_pair(
id, -1.0);
436 onTrack = std::binary_search(ClusterIDs.begin(), ClusterIDs.end(), searchVal,
437 [](std::pair<Identifier, double>
l, std::pair<Identifier, double>
r) ->
bool {
438 return l.first < r.first;
449 double> >
const& ClusterIDs,
450 double& cosalpha)
const {
453 std::pair<Identifier, double> searchVal = std::make_pair(
id, -1.0);
454 auto it = std::lower_bound(ClusterIDs.begin(), ClusterIDs.end(), searchVal,
455 [](std::pair<Identifier, double>
l, std::pair<Identifier, double>
r) ->
bool {
456 return l.first < r.first;
459 if (
it != ClusterIDs.end() && !(
id < (*it).first)) {
461 cosalpha = (*it).second;
def retrieve(aClass, aKey=None)
int getPixLayersID(int ec, int ld) const
helper function to get layers ID
const PixelID * m_pixelid
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
SG::ReadHandleKey< InDet::SiDetectorElementStatus > m_pixelDetElStatusActiveOnly
Optional read handle to get status data to test whether a pixel detector element is active.
const std::string pixLayersLabel[PixLayers::COUNT]
ToolHandle< IInDetConditionsTool > m_pixelCondSummaryTool
const unsigned int kNumFEsIBL
virtual StatusCode initialize() override
initialize
SG::ReadHandleKey< InDet::SiDetectorElementStatus > m_pixelDetElStatus
Optional read handle to get status data to test whether a pixel detector element is good.
ServiceHandle< InDetDD::IPixelReadoutManager > m_pixelReadout
const unsigned int kNumModulesDisk
std::unordered_map< int, std::vector< int > > m_em
bool isHitOnTrack(Identifier id, std::vector< Identifier > const &RDOIDs) const
checks if hit is on track
#define ATH_MSG_VERBOSE(x)
bool empty() const
Test if the key is blank.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
std::unordered_map< int, std::vector< float > > m_val
void fill2DProfLayerAccum(const VecAccumulator2DMap &accumulator) const
take VecAccumulator2DMap and fill the corresponding group
bool isIBL3D(int hashID) const
helper function to check if module is IBL 3D based on pixel hash ID
bool isIBL2D(int hashID) const
helper function to check if module is IBL planar based on pixel hash ID
::StatusCode StatusCode
StatusCode definition for legacy code.
int DC[PixMon::kNumModulesDisk][PixMon::kNumLayersDisk]
#define VALIDATE_STATUS_ARRAY_ACTIVATED
int eta_index(const Identifier &id) const
const unsigned int kNumStavesL2
const PixelAthMonitoringBase & m_host
void fill(const ToolHandle< GenericMonitoringTool > &groupHandle, std::vector< std::reference_wrapper< Monitored::IMonitoredVariable >> &&variables) const
Fills a vector of variables to a group by reference.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
void fill2DProfLumiLayers(const std::string &prof2Dname, int lb, float(*weights)[PixLayers::COUNT], const int *nCategories) const
filling 2DProf per-lumi per-layer histograms ["ECA","ECC","BLayer","Layer1","Layer2",...
void fill1DProfLumiLayers(const std::string &prof1Dname, int lb, float *weights, int nlayers=PixLayers::COUNT) const
filling 1DProf per-lumi per-layer histograms ["ECA","ECC","BLayer","Layer1","Layer2",...
const int pixPhiSteps[PixLayers::NBASELAYERS]
bool isClusterOnTrack(Identifier id, std::vector< std::pair< Identifier, double > > const &ClusterIDs) const
checks if cluster is on track
ToolHandleArray< GenericMonitoringTool > m_tools
Array of Generic Monitoring Tools.
int layer_disk(const Identifier &id) const
int DA[PixMon::kNumModulesDisk][PixMon::kNumLayersDisk]
int eta_module(const Identifier &id) const
const unsigned int kNumStavesL0
const unsigned int kNumModulesBarrel
int B1[PixMon::kNumStavesL1][PixMon::kNumModulesBarrel]
virtual StatusCode initialize() override
initialize
std::unordered_map< int, std::vector< int > > m_pm
void getPhiEtaMod(Identifier &id, int &phiMod, int &etaMod, bool ©FE) const
helper function to get eta phi coordinates of per-layer arrays
helper class to accumulate points to fill a 2D plot with
void add(const int layer, const Identifier &id, float value=1.0)
helper class to accumulate points to fill a 2D per-module plot with
void fillFromArrays(const std::string &namePP0, AccumulatorArrays &pixarrays, const std::string &name2DMap="") const
filling 1DProfile per-pp0(ROD) histograms for ["ECA","ECC","BLayer","Layer1","Layer2",...
const std::string pixBaseLayersLabel[PixLayers::NBASELAYERS]
const unsigned int kNumStavesIBL
void fill1DModProfAccum(const VecAccumulator2DMap &accumulator, int lumiblock) const
take VecAccumulator2DMap and fill 3D arrays [layer, pm, em] with its values and lumiblock
std::vector< int > m_modData[PixLayers::NBASELAYERS]
int getNumberOfFEs(int pixlayer, int etaMod) const
helper function to get number of FEs per module
Declare a monitored scalar variable.
const unsigned int kNumLayersDisk
int phi_module(const Identifier &id) const
int B0[PixMon::kNumStavesL0][PixMon::kNumModulesBarrel]
int B2[PixMon::kNumStavesL2][PixMon::kNumModulesBarrel]
int IBL[PixMon::kNumStavesIBL][PixMon::kNumFEsIBL]
const unsigned int kNumStavesL1