![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
16 #include "Identifier/Identifier.h"
24 #include "GaudiKernel/IToolSvc.h"
25 #include "GaudiKernel/ListItem.h"
26 #include "GaudiKernel/StatusCode.h"
31 #include "TProfile2D.h"
40 ONE_D_LOCATION=1, TWO_D_LOCATION=3, TRACK_SEGMENT=11, OLD_PARAMETERS_VECTOR=31
45 etaRegion(
const float eta) {
47 static const float etaBoundary(1.0);
49 if (
eta < -etaBoundary) {
52 if (
eta > etaBoundary) {
60 "RNDM",
"BPTX",
"L1CAL",
"TGC",
"RPC",
"MBTS",
"COSM",
"Calib"
72 const std::string&
name,
105 return StatusCode::SUCCESS;
122 return StatusCode::SUCCESS;
134 const bool doThisSubsystem[
N_REGIONS] = {
138 std::bitset<N_TRIGGER_TYPES> firedTriggers{0};
144 if (not tracks.isValid()) {
146 return StatusCode::SUCCESS;
150 if (tracks->size()==0) {
156 ATH_MSG_DEBUG(
"Begin loop over " << tracks->size() <<
" tracks");
159 if (
track==
nullptr) {
163 int local_scthits{0};
164 int scthits_on_trk{0};
176 if (
track->fitQuality()->numberDoF() > 0.) {
179 if (
track->perigeeParameters() ==
nullptr) {
182 double trackPerigeeTheta{
track->perigeeParameters()->parameters()[
Trk::theta]};
205 if (not trackStates) {
206 ATH_MSG_ERROR(
"for current track, TrackStateOnSurfaces == Null, no data will be written for this track");
214 if (RawDataClus==
nullptr) {
217 if (RawDataClus->detectorElement()->isSCT()) {
218 const Identifier sct_id{clus->
identify()};
221 const bool doThisDetector{doThisSubsystem[subsystemIndex]};
222 hasHits[subsystemIndex] =
true;
223 std::unique_ptr<const Trk::TrackParameters> trkParameters(
nullptr);
232 trkParameters =
m_updator->removeFromState(
233 *trkParam, rio->localParameters(), rio->localCovariance());
236 trkParam = trkParameters.get();
244 const AmgVector(5) LocalTrackParameters{trkParam->parameters()};
250 std::optional<Trk::ResidualPull> residualPull{
255 if (not residualPull) {
257 return StatusCode::SUCCESS;
259 double local_residual{residualPull->residual()[
Trk::locX]};
260 double local_pull{residualPull->pull()[
Trk::locX]};
261 if (doThisDetector) {
268 ATH_MSG_WARNING(
"No measured local parameters, pull won't be calculated");
277 for (
unsigned int region{0}; region <
N_REGIONS; ++region) {
278 m_trackRate->Fill(
static_cast<float>(region),
static_cast<float>(hasHits[region]));
286 ATH_MSG_DEBUG(
"Calling checkHists(false); false := during run");
302 latest_nTracks_pos = 0;
314 latest_nTracks_pos++;
316 latest_nTracks_pos = 0;
324 return StatusCode::SUCCESS;
335 ATH_MSG_DEBUG(
"Calling checkHists(true); true := end of run");
341 return StatusCode::SUCCESS;
347 return StatusCode::SUCCESS;
355 float errorSum{std::sqrt(trkErr * trkErr + hitErr * hitErr)};
357 if (errorSum > 1.0
e-20) {
360 ATH_MSG_DEBUG(
"Error on Track and Cluster are 0. Returning Pull value 0.");
371 std::string stem{
m_gpath +
"/SCT/GENERAL/tracks/"};
374 const std::string regionNames[
N_REGIONS]{
"EndCapC",
"Barrel",
"EndCapA"};
378 for (
unsigned int iReg{0}; iReg<
N_REGIONS; iReg++) {
382 for(
unsigned int iReg{0}; iReg<
N_REGIONS; iReg++) {
384 (
"Overall Residual Distribution for the "+regionNames[iReg]).c_str(),
389 m_totalPull[iReg] =
new TH1F((
"total"+regionNames[iReg]+
"Pull").c_str(),
390 (
"Overall Pull Distribution for the "+regionNames[iReg]).c_str(),
405 m_trackRate =
new TProfile(
"SCTTrackRate",
"Track per event for SCT regions", 3, 0.0, 3.0);
406 for(
unsigned int iReg{0}; iReg<
N_REGIONS; iReg++) {
407 m_trackRate->GetXaxis()->SetBinLabel(iReg+1, regionNames[iReg].c_str());
417 m_trk_chi2 =
new TH1F(
"trk_chi2",
"Track #chi^{2} div ndf", 150, 0., 150.);
418 m_trk_chi2->GetXaxis()->SetTitle(
"Number of track #chi^{2}/NDF");
421 m_trk_N =
new TH1F(
"trk_N",
"Number of tracks", 400, 0, 4000);
422 m_trk_N->GetXaxis()->SetTitle(
"Number of tracks");
426 m_trk_pt =
new TH1F(
"trk_pt",
"Track P_{T}", 150, 0., 150.);
427 m_trk_pt->GetXaxis()->SetTitle(
"P_{T} [GeV]");
430 m_trk_d0 =
new TH1F(
"trk_d0",
"Track d0", 160, -40., 40.);
431 m_trk_d0->GetXaxis()->SetTitle(
"d0 [mm]");
434 m_trk_z0 =
new TH1F(
"trk_z0",
"Track z0", 200, -200., 200.);
435 m_trk_z0->GetXaxis()->SetTitle(
"z0 [mm]");
439 m_trk_phi->GetXaxis()->SetTitle(
"#phi [rad]");
448 m_nTracks->GetXaxis()->SetTitle(
"Event Number");
449 m_nTracks->GetYaxis()->SetTitle(
"Num of Tracks");
455 return StatusCode::SUCCESS;
461 std::vector<TH1F*>& storageVector)
const {
462 static const unsigned int nbins{100};
463 const float lo{-extent};
464 const float hi{extent};
468 storageVector.push_back(
tmp);
469 return StatusCode::SUCCESS;
475 if (evtInfo.isValid()) {
476 firedTriggers = evtInfo->level1TriggerType();
478 return StatusCode::SUCCESS;
480 return StatusCode::FAILURE;
def retrieve(aClass, aKey=None)
unsigned int bec2Index(const int bec)
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
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)
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
std::vector< const xAOD::TrackParticle * > Tracks
def TProfile(*args, **kwargs)
::StatusCode StatusCode
StatusCode definition for legacy code.
@ numberOfSCTHits
number of SCT holes
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Identifier identify() const
return the identifier
represents the track state (measurement, material, fit parameters and quality) at a surface.
A summary of the information contained by a track.
Helpers for checking error return status codes and reporting errors.
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)
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Handle class for reading from StoreGate.
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.