Project
Loading...
Searching...
No Matches
Efficiency.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
16
18
20
21namespace o2
22{
23namespace mid
24{
25
26void Efficiency::process(gsl::span<const mid::Track> midTracks)
27{
28
29 for (auto& track : midTracks) {
30 auto deIdMT11 = track.getFiredDEId();
31 auto isRight = detparams::isRightSide(deIdMT11);
32 auto rpcLine = detparams::getRPCLine(deIdMT11);
33 auto effFlag = track.getEfficiencyFlag();
34 if (effFlag < 0) {
35 continue;
36 }
37
38 for (int ich = 0; ich < 4; ++ich) {
39 bool isFiredBP = track.isFiredChamber(ich, 0);
40 bool isFiredNBP = track.isFiredChamber(ich, 1);
41 mEff[static_cast<int>(ElementType::Plane)].addEntry(isFiredBP, isFiredNBP, ich, 0, 0);
42 if (effFlag < 2) {
43 continue;
44 }
45 auto deId = detparams::getDEId(isRight, ich, rpcLine);
46 mEff[static_cast<int>(ElementType::RPC)].addEntry(isFiredBP, isFiredNBP, deId, 0, 0);
47 if (effFlag < 3) {
48 continue;
49 }
50 mEff[static_cast<int>(ElementType::Board)].addEntry(isFiredBP, isFiredNBP, deId, track.getFiredColumnId(), track.getFiredLineId());
51 }
52 }
53}
54
55} // namespace mid
56} // namespace o2
Useful detector parameters for MID.
Computes the MID chamber efficiency.
void process(gsl::span< const mid::Track > midTracks)
Fill the counters to estimate the chamber efficiency.
@ Plane
Efficiency per RPC.
@ RPC
Efficiency per board.
bool isRightSide(int deId)
int getDEId(bool isRight, int chamber, int rpc)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...