|
ATLAS Offline Software
|
Go to the documentation of this file.
11 #include "Identifier/Identifier.h"
19 #include "GaudiKernel/StatusCode.h"
20 #include "GaudiKernel/ThreadLocalContext.h"
30 ONE_D_LOCATION=1, TWO_D_LOCATION=3, TRACK_SEGMENT=11, OLD_PARAMETERS_VECTOR=31
35 etaRegion(
const float eta) {
37 static const float etaBoundary(1.0);
39 if (
eta < -etaBoundary) {
42 if (
eta > etaBoundary) {
76 std::bitset<N_TRIGGER_TYPES> firedTriggers{0};
81 if (not tracks.isValid()) {
83 return StatusCode::SUCCESS;
87 ATH_MSG_DEBUG(
"Begin loop over " << tracks->size() <<
" tracks");
96 int scthits_on_trk{0};
98 if (trkSum==
nullptr) {
112 if (
track->fitQuality()->numberDoF() > 0.) {
114 fill(
"SCTTracksMonitor", trk_chi2Acc);
116 if (
track->perigeeParameters() ==
nullptr) {
119 double trackPerigeeTheta{
track->perigeeParameters()->parameters()[
Trk::theta]};
120 double trackPerigeeEta{-
log(
tan(0.5 * trackPerigeeTheta))};
123 fill(
"SCTTracksMonitor", tracksPerRegionAcc);
126 fill(
"SCTTracksMonitor", trk_etaAcc);
130 fill(
"SCTTracksMonitor", trk_ptAcc);
133 fill(
"SCTTracksMonitor", trk_d0Acc);
135 fill(
"SCTTracksMonitor", trk_z0Acc);
137 fill(
"SCTTracksMonitor", trk_phiAcc);
143 fill(
"SCTTracksMonitor", trackTriggerAcc);
152 if (not trackStates) {
153 ATH_MSG_ERROR(
"for current track, TrackStateOnSurfaces == Null, no data will be written for this track");
161 if (RawDataClus==
nullptr) {
164 if (RawDataClus->detectorElement()->isSCT()) {
168 const bool doThisDetector{doThisSubsystem[subsystemIndex]};
169 hasHits[subsystemIndex] =
true;
170 std::unique_ptr<const Trk::TrackParameters> trkParameters(
nullptr);
179 trkParameters =
m_updator->removeFromState(*trkParam,
180 rio->localParameters(),
181 rio->localCovariance());
185 trkParam = trkParameters.get();
193 const AmgVector(5) LocalTrackParameters{trkParam->parameters()};
199 std::optional<Trk::ResidualPull> residualPull{
204 if (not residualPull) {
206 return StatusCode::SUCCESS;
208 double local_residual{residualPull->residual()[
Trk::locX]};
209 double local_pull{residualPull->pull()[
Trk::locX]};
210 if (doThisDetector) {
212 fill(
"SCTTracksMonitor", residualAcc);
215 fill(
"SCTTracksMonitor", pullAcc);
221 ATH_MSG_WARNING(
"No measured local parameters, pull won't be calculated");
229 fill(
"SCTTracksMonitor", local_hitsAcc);
232 for (
unsigned int region{0}; region <
N_REGIONS; ++region) {
235 fill(
"SCTTracksMonitor", regionAcc,hitsAcc);
240 fill(
"SCTTracksMonitor", goodTrks_NAcc);
241 return StatusCode::SUCCESS;
250 float ErrorSum{sqrt(trkErr * trkErr + hitErr * hitErr)};
252 if (ErrorSum > 1.0
e-20) {
255 ATH_MSG_DEBUG(
"Error on Track and Cluster are 0. Returning Pull value 0.");
263 const EventContext& ctx = Gaudi::Hive::currentContext();
268 return StatusCode::SUCCESS;
270 return StatusCode::FAILURE;
275 return ((trigger <
N_TRIGGER_TYPES) ? firedTriggers.test(trigger) :
false);
def retrieve(aClass, aKey=None)
float calculatePull(const float, const float, const float) const
Calculate Pull value for MeasuredAtPlane TrackStates.
unsigned int bec2Index(const int bec)
BooleanProperty m_doTrigger
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
StatusCode checkTriggers(std::bitset< N_TRIGGER_TYPES > &firedTriggers) const
Fill the m_firedTriggers bitset according to event information.
const std::string m_regionNames[3]
Scalar eta() const
pseudorapidity method
@ Unbiased
RP with track state that has measurement not included.
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
bool hasTriggerFired(const unsigned int trigger, const std::bitset< N_TRIGGER_TYPES > &firedTriggers) const
Get the status of a particular trigger bit (trigger bit 0-7)
IntegerProperty m_trackHitCut
Cut on number of SCT hits on track.
virtual StatusCode initialize() override final
initialize
BooleanProperty m_doUnbiasedCalc
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Base class for Athena Monitoring Algorithms.
::StatusCode StatusCode
StatusCode definition for legacy code.
@ numberOfSCTHits
number of SCT holes
unsigned int bec2Index(const int becVal)
Conversion bec->index.
virtual StatusCode fillHistograms(const EventContext &ctx) const override final
adds event to the monitoring histograms
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.
SG::ReadHandle< xAOD::EventInfo > GetEventInfo(const EventContext &) const
Return a ReadHandle for an EventInfo object (get run/event numbers, etc.)
Header file to be included by clients of the Monitored infrastructure.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
represents the track state (measurement, material, fit parameters and quality) at a surface.
Helpers for checking error return status codes and reporting errors.
ToolHandle< Trk::IUpdator > m_updator
virtual StatusCode initialize() override
initialize
An STL vector of pointers that by default owns its pointed-to elements.
@ Biased
RP with track state including the hit.
#define ATH_MSG_WARNING(x)
uint16_t level1TriggerType() const
The Level-1 trigger type.
SCTTracksMonAlg(const std::string &name, ISvcLocator *pSvcLocator)
BooleanProperty m_doNegativeEndcap
ToolHandle< Trk::ITrackSummaryTool > m_trackSummaryTool
int get(const SummaryType &type) const
returns the summary information for the passed SummaryType.
Declare a monitored scalar variable.
Handle class for reading from StoreGate.
SG::ReadHandleKey< TrackCollection > m_tracksName
Name of the Track collection to use.
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
BooleanProperty m_doPositiveEndcap
ToolHandle< Trk::IResidualPullCalculator > m_residualPullCalculator
Kalman Updator for SCT Unbiased states in Residual calculation.
const SCT_ID * m_pSCTHelper
SCT Helper class.