 |
Belle II Software
release-05-02-19
|
11 #include <dqm/modules/PhysicsObjectsMiraBelle/PhysicsObjectsMiraBelleModule.h>
12 #include <analysis/dataobjects/ParticleList.h>
13 #include <analysis/variables/ContinuumSuppressionVariables.h>
14 #include <analysis/variables/TrackVariables.h>
15 #include <analysis/utility/PCmsLabTransform.h>
16 #include <framework/datastore/StoreObjPtr.h>
17 #include <framework/datastore/StoreArray.h>
18 #include <mdst/dataobjects/Track.h>
19 #include <mdst/dataobjects/TrackFitResult.h>
20 #include <mdst/dataobjects/KLMCluster.h>
21 #include <mdst/dataobjects/HitPatternCDC.h>
22 #include <mdst/dataobjects/HitPatternVXD.h>
23 #include <mdst/dataobjects/EventLevelTrackingInfo.h>
24 #include <mdst/dataobjects/PIDLikelihood.h>
25 #include <top/variables/TOPDigitVariables.h>
26 #include <arich/modules/arichDQM/ARICHDQMModule.h>
27 #include <arich/dataobjects/ARICHLikelihood.h>
28 #include <klm/dataobjects/KLMMuidLikelihood.h>
29 #include <mdst/dataobjects/SoftwareTriggerResult.h>
30 #include <TDirectory.h>
39 setDescription(
"Monitor Physics Objects Quality");
40 setPropertyFlags(c_ParallelProcessingCertified);
42 addParam(
"TriggerIdentifier", m_triggerIdentifier,
43 "Trigger identifier string used to select events for the histograms", std::string(
"software_trigger_cut&skim&accept_mumutight"));
44 addParam(
"MuPListName", m_muPListName,
"Name of the muon particle list", std::string(
"mu+:physMiraBelle"));
49 TDirectory* oldDir = gDirectory;
50 oldDir->mkdir(
"PhysicsObjectsMiraBelle")->cd();
52 m_h_npxd =
new TH1F(
"hist_npxd",
"hist_npxd", 100, 0, 5);
54 m_h_nsvd =
new TH1F(
"hist_nsvd",
"hist_nsvd", 100, 0, 16);
56 m_h_ncdc =
new TH1F(
"hist_ncdc",
"hist_ncdc", 100, 0, 80);
58 m_h_topdig =
new TH1F(
"hist_topdig",
"hist_topdig", 120, 0, 120);
60 m_h_DetPhotonARICH =
new TH1F(
"hist_DetPhotonARICH",
"hist_DetPhotonARICH", 70, 0, 70);
62 m_h_klmTotalHits =
new TH1F(
"hist_klmTotalHits",
"hist_klmTotalHits", 15, 0, 15);
64 m_h_Pval =
new TH1F(
"hist_Pval",
"hist_Pval", 100, 0, 1);
66 m_h_dD0 =
new TH1F(
"hist_dD0",
"hist_dD0", 100, -0.02, 0.02);
68 m_h_dZ0 =
new TH1F(
"hist_dZ0",
"hist_dZ0", 100, -0.05, 0.05);
70 m_h_dPtcms =
new TH1F(
"hist_dPtcms",
"hist_dPtcms", 100, -0.5, 0.5);
72 m_h_nExtraCDCHits =
new TH1F(
"hist_nExtraCDCHits",
"hist_nExtraCDCHits", 100, 0, 1600);
74 m_h_nECLClusters =
new TH1F(
"hist_nECLClusters",
"hist_nECLClusters", 100, 0, 60);
76 m_h_muid =
new TH1F(
"hist_muid",
"hist_muid", 20, 0, 1);
78 m_h_inv_p =
new TH1F(
"hist_inv_p",
"hist_inv_p", 100, 8, 12);
80 m_h_ndf =
new TH1F(
"hist_ndf",
"hist_ndf", 100, 0, 80);
82 m_h_D0 =
new TH1F(
"hist_D0",
"hist_D0", 100, -0.1, 0.1);
83 m_h_D0->SetXTitle(
"hist_D0");
84 m_h_Z0 =
new TH1F(
"hist_Z0",
"hist_Z0", 100, -0.3, 0.3);
85 m_h_Z0->SetXTitle(
"hist_Z0");
86 m_h_theta =
new TH1F(
"hist_theta",
"hist_theta", 36, 10, 170);
88 m_h_Phi0 =
new TH1F(
"hist_Phi0",
"hist_Phi0", 72, -180, 180);
90 m_h_Pt =
new TH1F(
"hist_Pt",
"hist_Pt", 100, 0, 10);
91 m_h_Pt->SetXTitle(
"hist_Pt");
92 m_h_Mom =
new TH1F(
"hist_Mom",
"hist_Mom", 100, 0, 10);
100 m_h_dPhicms =
new TH1F(
"hist_dPhicms",
"hist_dPhicms", 100, -1, 1);
148 if (!result.isValid()) {
149 B2WARNING(
"SoftwareTriggerResult object not available but needed to select events for the histograms.");
153 const std::map<std::string, int>& results = result->getResults();
155 B2WARNING(
"PhysicsObjectsMiraBelle: Can't find trigger identifier: " <<
m_triggerIdentifier);
161 if (accepted ==
false)
return;
166 double ptcms[2] = {};
167 double phicms[2] = {};
171 for (
unsigned int i = 0; i < muParticles->getListSize(); i++) {
172 Particle* mu = muParticles->getParticle(i);
179 m_h_npxd->Fill(Belle2::Variable::trackNPXDHits(mu));
180 m_h_nsvd->Fill(Belle2::Variable::trackNSVDHits(mu));
181 m_h_ncdc->Fill(Belle2::Variable::trackNCDCHits(mu));
182 m_h_topdig->Fill(Belle2::Variable::TOPVariable::topDigitCount(mu));
191 unsigned int bklm_hit = muid->getTotalBarrelHits();
192 unsigned int eklm_hit = muid->getTotalEndcapHits();
218 d0[index] = fitresult->
getD0();
219 z0[index] = fitresult->
getZ0();
232 m_h_dD0->Fill((d0[0] + d0[1]) / sqrt(2));
233 m_h_dZ0->Fill((z0[0] - z0[1]) / sqrt(2));
234 m_h_dPtcms->Fill((ptcms[0] - ptcms[1]) / sqrt(2));
235 m_h_dPhicms->Fill(180 - abs(phicms[0] - phicms[1]));
242 double neclClusters = -1.;
245 const unsigned int numberOfECLClusters = std::count_if(eclClusters.
begin(), eclClusters.
end(),
247 return (eclcluster.hasHypothesis(ECLCluster::EHypothesisBit::c_nPhotons)
248 and eclcluster.getEnergy(ECLCluster::EHypothesisBit::c_nPhotons) > 0.1);
250 neclClusters = numberOfECLClusters;
This is a class to store ARICH likelihoods in the datastore.
TH1F * m_h_Pt
histogram for Pt of muon track
TLorentzVector get4Momentum() const
Getter for the 4Momentum at the closest approach of the track in the r/phi projection.
TH1F * m_h_Z0
histogram for Z0 of muon track
void event() override
Function to process event record.
int getLayers() const
Get number of layers with hits.
TH1F * m_h_topdig
histogram for TOP digits associated with muon track
TH1F * m_h_dPhicms
histogram for phi difference between mu+ and mu- in CMS
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
void defineHisto() override
Function to define histograms.
TH1F * m_h_Mom
histogram for Momentum of muon track
TH1F * m_h_Phi0
histogram for phi of muon track
double getPValue() const
Getter for Chi2 Probability of the track fit.
TH1F * m_h_D0
histogram for D0 of muon track
TH1F * m_h_klmClusterLayers
histogram for number of KLM layers with cluster associated with muon track
TH1F * m_h_ncdc
histogram for number of CDC hits associated with muon track
TH1F * m_h_inv_p
histogram for invariant mass of di-muon
Class to collect log likelihoods from TOP, ARICH, dEdx, ECL and KLM aimed for output to mdst includes...
void terminate() override
Function to terminate module.
TH1F * m_h_muid
histogram for muon ID
std::string m_triggerIdentifier
Trigger identifier string used to select events for the histograms.
void beginRun() override
Function to process begin_run record.
TH1F * m_h_Pval
histogram for Pvalue of tracks in CDC
Values of the result of a track fit with a given particle hypothesis.
@ c_accept
Accept this event.
TH1F * m_h_ndf
histogram for n.d.f.
double getZ0() const
Getter for z0.
void endRun() override
Function to process end_run record.
TH1F * m_h_DetPhotonARICH
histogram for number of photon in ARICH associated with muon track
float getDetPhot() const
Return number of detected photons for a given particle.
TH1F * m_h_theta
histogram for theta of muon track
static const ChargedStable pion
charged pion particle
Abstract base class for different kinds of events.
TH1F * m_h_dD0
histogram for D0 difference between mu+ and mu-
Type-safe access to single objects in the data store.
iterator begin()
Return iterator to first entry.
bool isValid() const
Check wether the array was registered.
TH1F * m_h_klmTotalBarrelHits
histogram for number of BKLM hits associated with muon track
iterator end()
Return iterator to last entry +1.
TH1F * m_h_nExtraCDCHits
histogram for number of CDC hits not associated with any tracks
const Track * getTrack() const
Returns the pointer to the Track object that was used to create this Particle (ParticleType == c_Trac...
TH1F * m_h_nECLClusters
histogram for ECL clusters
Class to store reconstructed particles.
std::string m_muPListName
Name of the mu+ particle list.
static const ChargedStable muon
muon particle
Class that bundles various TrackFitResults.
Accessor to arrays stored in the data store.
TH1F * m_h_dZ0
histogram for Z0 difference between mu+ and mu-
Class to store the likelihoods from KLM with additional informations related to the extrapolation.
TH1F * m_h_nsvd
histogram for number of SVD hits associated with muon track
TH1F * m_h_klmTotalHits
histogram for number of KLM hits associated with muon track
short getChargeSign() const
Return track charge (1 or -1).
void initialize() override
Function for dynamic initialization of module.
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
double getProbability(const Const::ChargedStable &p1, const Const::ChargedStable &p2, Const::PIDDetectorSet set=Const::PIDDetectorSet::set()) const
Return combined likelihood probability for a particle being p1 and not p2, assuming equal prior proba...
double getD0() const
Getter for d0.
TH1F * m_h_dPtcms
histogram for Pt difference between mu+ and mu-
TH1F * m_h_npxd
histogram for number of PXD hits associated with muon track
TH1F * m_h_klmTotalEndcapHits
histogram for number of EKLM hits associated with muon track