5#ifndef TGCRAWDATAMONITORING_TGCRAWDATAMONITORALGORITHM_H
6#define TGCRAWDATAMONITORING_TGCRAWDATAMONITORALGORITHM_H
9#include "GaudiKernel/ServiceHandle.h"
10#include "GaudiKernel/ToolHandle.h"
36 virtual StatusCode
fillHistograms(
const EventContext& ctx )
const override;
204 std::vector<TgcTrigTile*>
tile;
205 std::vector<TgcTrigNsw*>
nsw;
207 std::vector<TgcTrigRpc*>
rpc;
208 std::vector<TgcTrigEifi*>
eifi;
229 double getNswRindexFromEta(
const double&
eta)
const;
237 StringProperty
m_thrPatternList{
this,
"ThrPatternList",
"MU4,MU6,MU10,MU11,MU20,MU21",
"list of single L1MU items to be monitored by the threshold pattern"};
238 StringProperty
m_streamerFilter{
this,
"StreamerFilter",
"",
"Streamer filter such as HLT_noalg_MU14FCH"};
254 DoubleProperty
m_muonToPVdz{
this,
"MuonToPVdz",50.,
"Window size in deltaZ between muon track and primary vertex"};
255 DoubleProperty
m_muonToPVdzOffset{
this,
"MuonToPVdzOffset",0.,
"Offset of deltaZ between muon track and primary vertex"};
256 DoubleProperty
m_muonToPVdca{
this,
"MuonToPVdca",0.5,
"Distance to closest approach of muon track to primary vertex"};
258 StringProperty
m_packageName{
this,
"PackageName",
"TgcRawDataMonitor",
"group name for histograming"};
259 StringProperty
m_ctpDecMonList{
this,
"CtpDecisionMoniorList",
"Tit:L1_2MU4,Mul:2,HLT:HLT_2mu4,RPC:1,TGC:1;",
"list of L1MU items to be monitored for before/after CTP decision"};
261 BooleanProperty
m_printAvailableMuonTriggers{
this,
"PrintAvailableMuonTriggers",
false,
"debugging purpose. print out all available muon triggers in the event"};
262 BooleanProperty
m_TagAndProbe{
this,
"TagAndProbe",
true,
"switch to perform tag-and-probe method"};
263 BooleanProperty
m_TagAndProbeZmumu{
this,
"TagAndProbeZmumu",
false,
"switch to perform tag-and-probe method Z->mumu"};
264 BooleanProperty
m_tagMuonInDifferentSystem{
this,
"TagMuonInDifferentSystem",
false,
"restrict the tag muons to be only in the other system (barrel or endcap)"};
265 BooleanProperty
m_anaTgcPrd{
this,
"AnaTgcPrd",
false,
"switch to perform analysis on TGC PRD"};
266 BooleanProperty
m_anaTgcCoin{
this,
"AnaTgcCoin",
false,
"switch to perform analysis on TGC Coin"};
268 BooleanProperty
m_anaOfflMuon{
this,
"AnaOfflMuon",
true,
"switch to perform analysis on xAOD::Muon"};
272 BooleanProperty
m_anaMuonRoI{
this,
"AnaMuonRoI",
true,
"switch to perform analysis on xAOD::LVL1MuonRoI"};
273 DoubleProperty
m_trigMatchWindow{
this,
"TrigMatchingWindow",0.2,
"Window size in R for trigger matching"};
274 DoubleProperty
m_l1trigMatchWindowPt15{
this,
"L1TrigMatchingWindowPt15",0.15,
"Window size in R for L1 trigger matching for 15GeV muons"};
275 DoubleProperty
m_l1trigMatchWindowPt10a{
this,
"L1TrigMatchingWindowPt10a",0.3,
"Window size in R for L1 trigger matching for 10GeV(a) muons"};
276 DoubleProperty
m_l1trigMatchWindowPt10b{
this,
"L1TrigMatchingWindowPt10b",-0.01,
"Window size in R for L1 trigger matching for 10GeV(b) muons"};
277 DoubleProperty
m_l1trigMatchWindowPt0a{
this,
"L1TrigMatchingWindowPt0a",0.36,
"Window size in R for L1 trigger matching for 0GeV(a) muons"};
278 DoubleProperty
m_l1trigMatchWindowPt0b{
this,
"L1TrigMatchingWindowPt0b",-0.0016,
"Window size in R for L1 trigger matching for 0GeV(b) muons"};
279 DoubleProperty
m_isolationWindow{
this,
"IsolationWindow",1.0,
"Window size in R for isolation with other muons"};
280 BooleanProperty
m_requireIsolated{
this,
"RequireIsolated",
true,
"Probe muon should be isolated from other muons"};
291 DoubleProperty
m_pTCutOnTrigExtrapolation{
this,
"pTCutOnTrigExtrapolation",20000.,
"pT [in MeV] cut on the extrapolation tracks for trigger validation"};
292 DoubleProperty
m_M1_Z{
this,
"M1_Z",13436.5,
"z-position of TGC M1-station in mm for track extrapolate"};
293 DoubleProperty
m_M2_Z{
this,
"M2_Z",14728.2,
"z-position of TGC M2-station in mm for track extrapolate"};
294 DoubleProperty
m_M3_Z{
this,
"M3_Z",15148.2,
"z-position of TGC M3-station in mm for track extrapolate"};
295 DoubleProperty
m_EI_Z{
this,
"EI_Z",7364.7,
"z-position of TGC EI-station in mm for track extrapolate"};
296 DoubleProperty
m_FI_Z{
this,
"FI_Z",6978.2,
"z-position of TGC FI-station in mm for track extrapolate"};
298 DoubleProperty
m_zMass{
this,
"ZMass",91187.6,
"muon invariant mass in MeV"};
299 DoubleProperty
m_zMassWindow{
this,
"ZMassWindow",10000,
"muon invariant mass half-window in MeV"};
303 DoubleProperty
m_residualWindow{
this,
"ResidualWindow", 200.,
"Window size in mm between hit position and track-extrapolated position"};
304 DoubleProperty
m_dPhiCutOnM3{
this,
"dPhiCutOnM3", 0.2,
"Window size in delta phi on M3 between hit position and track-extrapolated position"};
305 DoubleProperty
m_dRCutOnM3{
this,
"dRCutOnM3", 3000.,
"Window size in delta R (radious) on M3 between hit position and track-extrapolated position"};
310 DoubleProperty
m_NswDeltaRCut{
this,
"NswDeltaRCut", 20.,
"Window size in delta R for NSW-TGC matching"};
317 using MonVariables=std::vector < std::reference_wrapper < Monitored::IMonitoredVariable >>;
319 const std::vector<TgcTrig>&,
323 const std::vector<TgcTrig>&,
324 const std::vector<ExtPos>&,
325 std::vector<ExtTrigInfo>&,
331 ToolHandle<Trk::IExtrapolator>
m_extrapolator{
this,
"TrackExtrapolator",
"Trk::Extrapolator/AtlasExtrapolator",
"Track extrapolator"};
332 ToolHandle<ITgcRawDataMonitorTool>
m_tgcMonTool{
this,
"TgcRawDataMonitorTool",
"TgcDawDataMonitorTool",
"TgcRawDataMonitorTool"};
333 ToolHandle<CP::IMuonSelectionTool>
m_muonSelectionTool{
this,
"MuonSelectionTool",
"CP::MuonSelectionTool/MuonSelectionTool",
"MuonSelectionTool"};
335 StatusCode printOutAvailableMuonTriggers()
const;
336 std::set<std::string> checkTriggerInfo()
const;
337 const xAOD::Vertex* getPrimaryVertex(
const EventContext& ctx)
const ;
338 std::vector<TgcRawDataMonitorAlgorithm::TimedMuonRoI> getRegionsOfInterest(
const EventContext& ctx)
const;
339 void fillRoiHistograms(
const std::vector<TgcRawDataMonitorAlgorithm::TimedMuonRoI> & roiVec,
const EventContext& ctx)
const;
340 void fillHistogramsAfterTriggerDecision(std::vector<TgcRawDataMonitorAlgorithm::TimedMuonRoI> & roiVec)
const;
341 void fillThresholdPatternHistograms(std::map<std::string,std::vector<const xAOD::MuonRoI*>> & menuAndRoIs,
const std::vector < TimedMuon > & mymuons,
const EventContext& ctx)
const;
343 void fillMuonRoisInThresholdPattern(std::map<
const xAOD::MuonRoI*,std::set<std::string>> &, std::map<std::string,std::vector<const xAOD::MuonRoI*>> &, std::vector<TimedMuonRoI> & AllBCMuonRoIs,
const EventContext & ctx)
const;
Scalar eta() const
pseudorapidity method
A number of constexpr particle constants to avoid hardcoding them directly in various places.
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid from which a ReadHandle is made.
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Monitoring of object collections (internal)
Declare a monitored scalar variable.
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid from which a ReadHandle is made.
DoubleProperty m_muonMass
DoubleProperty m_residualWindow
SG::ReadHandleKey< xAOD::MuonContainer > m_MuonContainerKey
DoubleProperty m_pTCutOnTrigExtrapolation
DoubleProperty m_zMassWindow
BooleanProperty m_tagMuonInDifferentSystem
BooleanProperty m_useMSTrackForExtrapolation
BooleanProperty m_monitorTriggerMultiplicity
StringProperty m_maskChannelFileName
SG::ReadHandleKey< xAOD::MuonRoIContainer > m_MuonRoIContainerBCm2Key
DoubleProperty m_endcapPivotPlaneMaximumRadius
BooleanProperty m_useIDTrackForExtrapolation
BooleanProperty m_useMSOnlyExtMSTrackForExtrapolation
BooleanProperty m_doExpressProcessing
BooleanProperty m_useCBTrackForExtrapolation
BooleanProperty m_offlMuonCutOnMuonType
DoubleProperty m_endcapPivotPlaneMinimumRadius
DoubleProperty m_muonToPVdzOffset
SG::ReadHandleKey< xAOD::MuonRoIContainer > m_MuonRoIContainerKey
BooleanProperty m_dumpFullChannelList
std::vector< CtpDecMonObj > m_CtpDecMonObj
void fillTgcCoinEff(const std::string &, const std::vector< TgcTrig > &, const std::vector< ExtPos > &, std::vector< ExtTrigInfo > &, std::vector< Monitored::ObjectsCollection< std::vector< ExtTrigInfo >, double > > &, MonVariables &) const
BooleanProperty m_printAvailableMuonTriggers
DoubleProperty m_muonToPVdz
DoubleProperty m_isolationWindow
virtual ~TgcRawDataMonitorAlgorithm()=default
IntegerProperty m_nHitsInOtherBWTGCStrip
SG::ReadHandleKey< xAOD::MuonRoIContainer > m_MuonRoIContainerBCm1Key
IntegerProperty m_nHitsInOtherBWTGCWire
DoubleProperty m_muonToPVdca
SG::ReadHandleKey< xAOD::VertexContainer > m_PrimaryVertexContainerKey
DoubleProperty m_l1trigMatchWindowPt10a
double getMatchingWindow(const xAOD::Muon *muon) const
DoubleProperty m_NswDeltaRCut
StringProperty m_thrPatternList
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
BooleanProperty m_anaTgcPrd
StringProperty m_streamerFilter
void fillTgcCoin(const std::string &, const std::vector< TgcTrig > &, std::vector< Monitored::ObjectsCollection< std::vector< TgcTrig >, double > > &, MonVariables &) const
DoubleProperty m_dPhiCutOnM3
SG::ReadHandleKey< xAOD::MuonRoIContainer > m_MuonRoIContainerBCp2Key
std::set< std::string > m_maskChannelList
DoubleProperty m_trigMatchWindow
SG::ReadHandleKey< xAOD::MuonRoIContainer > m_MuonRoIContainerBCp1Key
SG::ReadHandleKey< Muon::TgcCoinDataContainer > m_TgcCoinDataContainerNextNextBCKey
DoubleProperty m_l1trigMatchWindowPt15
SG::ReadHandleKey< Muon::TgcPrepDataContainer > m_TgcPrepDataContainerKey
BooleanProperty m_monitorThresholdPatterns
BooleanProperty m_requireIsolated
DoubleProperty m_dRCutOnM3
BooleanProperty m_anaMuonRoI
BooleanProperty m_offlMuonCutOnQuality
BooleanProperty m_offlMuonCutOnAuthor
SG::ReadHandleKey< TrigConf::L1Menu > m_L1MenuKey
StringProperty m_ctpDecMonList
BooleanProperty m_anaOfflMuon
SG::ReadHandleKey< Muon::TgcCoinDataContainer > m_TgcCoinDataContainerNextBCKey
SG::ReadDecorHandleKey< xAOD::MuonRoIContainer > m_thresholdPatternsKey
BooleanProperty m_TagAndProbeZmumu
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
SG::ReadHandleKey< Muon::TgcCoinDataContainer > m_TgcCoinDataContainerCurrBCKey
std::set< std::string > m_thrMonList
BooleanProperty m_useDirectPrimaryTrackForExtrapolation
BooleanProperty m_TagAndProbe
std::vector< double > m_extZposition
DoubleProperty m_l1trigMatchWindowPt10b
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
DoubleProperty m_l1trigMatchWindowPt0b
std::vector< std::reference_wrapper< Monitored::IMonitoredVariable > > MonVariables
BooleanProperty m_useMuonSelectorTool
BooleanProperty m_useExtMSTrackForExtrapolation
ToolHandle< CP::IMuonSelectionTool > m_muonSelectionTool
BooleanProperty m_useOnlyCombinedMuons
DoubleProperty m_l1trigMatchWindowPt0a
ToolHandle< ITgcRawDataMonitorTool > m_tgcMonTool
BooleanProperty m_anaTgcCoin
ToolHandle< IGoodRunsListSelectorTool > m_GoodRunsListSelectorTool
ToolHandle< Trk::IExtrapolator > m_extrapolator
DoubleProperty m_pTCutOnExtrapolation
BooleanProperty m_useOnlyMuidCoStacoMuons
BooleanProperty m_fillGapByGapHistograms
DoubleProperty m_barrelPivotPlaneHalfLength
StringProperty m_packageName
SG::ReadHandleKey< Muon::TgcCoinDataContainer > m_TgcCoinDataContainerPrevBCKey
Eigen::Matrix< double, 3, 1 > Vector3D
constexpr double muonMassInMeV
the mass of the muon (in MeV)
Vertex_v1 Vertex
Define the latest version of the vertex class.
Muon_v1 Muon
Reference the current persistent version:
long unsigned int multiplicity
std::set< std::string > chambersHasHit
std::set< std::string > passedChambers
std::map< std::string, std::set< double > > residuals
std::vector< TgcTrigNsw * > nsw
std::vector< TgcTrigNsw * > nsw_unique
std::vector< TgcTrigTile * > tile
std::vector< TgcTrigEifi * > eifi
std::vector< TgcTrigRpc * > rpc
TimedMuonRoI(const xAOD::MuonRoI *muonroi, int bcid=0)
const xAOD::MuonRoI * muonRoI
std::set< std::string > matchedL1Items
std::set< int > matchedL1ThrInclusive
std::set< int > matchedL1ThrExclusive
std::vector< double > extPosZ
std::vector< TVector3 > extPos
std::vector< TVector3 > extVec
std::set< int > matchedL1ThrExclusiveTGC
std::set< int > matchedL1ThrInclusiveTGC