9#include <dqm/modules/PhysicsObjectsMiraBelle/PhysicsObjectsMiraBelleBhabhaModule.h>
10#include <analysis/dataobjects/ParticleList.h>
11#include <analysis/variables/ContinuumSuppressionVariables.h>
12#include <analysis/variables/TrackVariables.h>
13#include <analysis/utility/PCmsLabTransform.h>
14#include <framework/datastore/StoreObjPtr.h>
15#include <framework/datastore/StoreArray.h>
16#include <mdst/dataobjects/Track.h>
17#include <mdst/dataobjects/TrackFitResult.h>
18#include <mdst/dataobjects/KLMCluster.h>
19#include <mdst/dataobjects/HitPatternCDC.h>
20#include <mdst/dataobjects/HitPatternVXD.h>
21#include <mdst/dataobjects/EventLevelTrackingInfo.h>
22#include <mdst/dataobjects/PIDLikelihood.h>
23#include <top/variables/TOPDigitVariables.h>
24#include <arich/modules/arichDQM/ARICHDQMModule.h>
25#include <arich/dataobjects/ARICHLikelihood.h>
26#include <mdst/dataobjects/SoftwareTriggerResult.h>
27#include <TDirectory.h>
41 "Trigger identifier string used to select events for the histograms", std::string(
"software_trigger_cut&skim&accept_bhabha_all"));
42 addParam(
"ePListName",
m_ePListName,
"Name of the electron particle list", std::string(
"e+:physMiraBelle"));
43 addParam(
"bhabhaPListName",
m_bhabhaPListName,
"Name of the bhabha events particle list", std::string(
"Upsilon:ephysMiraBelle"));
49 TDirectory* oldDir = gDirectory;
50 oldDir->mkdir(
"PhysicsObjectsMiraBelleBhabha");
51 oldDir->cd(
"PhysicsObjectsMiraBelleBhabha");
53 m_h_npxd =
new TH1F(
"hist_npxd",
"hist_npxd", 100, 0, 5);
55 m_h_nsvd =
new TH1F(
"hist_nsvd",
"hist_nsvd", 100, 0, 16);
57 m_h_ncdc =
new TH1F(
"hist_ncdc",
"hist_ncdc", 100, 0, 80);
59 m_h_topdig =
new TH1F(
"hist_topdig",
"hist_topdig", 120, 0, 120);
61 m_h_DetPhotonARICH =
new TH1F(
"hist_DetPhotonARICH",
"hist_DetPhotonARICH", 70, 0, 70);
63 m_h_Pval =
new TH1F(
"hist_Pval",
"hist_Pval", 100, 0, 1);
65 m_h_dD0 =
new TH1F(
"hist_dD0",
"hist_dD0", 100, -0.02, 0.02);
67 m_h_dZ0 =
new TH1F(
"hist_dZ0",
"hist_dZ0", 100, -0.05, 0.05);
69 m_h_dPtcms =
new TH1F(
"hist_dPtcms",
"hist_dPtcms", 100, -0.5, 0.5);
71 m_h_nExtraCDCHits =
new TH1F(
"hist_nExtraCDCHits",
"hist_nExtraCDCHits", 500, 0, 5000);
73 m_h_nECLClusters =
new TH1F(
"hist_nECLClusters",
"hist_nECLClusters", 100, 0, 60);
75 m_h_electronid =
new TH1F(
"hist_electronid",
"hist_electronid", 20, 0, 1);
77 m_h_inv_p =
new TH1F(
"hist_inv_p",
"hist_inv_p", 400, 0, 12);
79 m_h_ndf =
new TH1F(
"hist_ndf",
"hist_ndf", 100, 0, 80);
81 m_h_D0 =
new TH1F(
"hist_D0",
"hist_D0", 100, -0.1, 0.1);
82 m_h_D0->SetXTitle(
"hist_D0");
83 m_h_Z0 =
new TH1F(
"hist_Z0",
"hist_Z0", 100, -0.3, 0.3);
84 m_h_Z0->SetXTitle(
"hist_Z0");
85 m_h_theta =
new TH1F(
"hist_theta",
"hist_theta in CMS", 32, 10, 170);
87 m_h_theta_lab =
new TH1F(
"hist_theta_lab",
"hist_theta in lab frame", 180, 0, 180);
89 m_h_Phi0 =
new TH1F(
"hist_Phi0",
"hist_Phi0 in lab frame", 72, -180, 180);
91 m_h_Pt =
new TH1F(
"hist_Pt",
"hist_Pt", 100, 0, 10);
92 m_h_Pt->SetXTitle(
"hist_Pt");
93 m_h_Mom =
new TH1F(
"hist_Mom",
"hist_Mom", 100, 0, 10);
95 m_h_dPhicms =
new TH1F(
"hist_dPhicms",
"hist_dPhicms: 180#circ - |#phi_{1} - #phi_{2}|", 100, -10, 10);
97 m_h_dThetacms =
new TH1F(
"hist_dThetacms",
"hist_dThetacms: |#theta_{1} + #theta_{2}| - 180#circ", 100, -10, 10);
143 if (!result.isValid()) {
144 B2WARNING(
"SoftwareTriggerResult object not available but needed to select events for the histograms.");
148 const std::map<std::string, int>& results = result->getResults();
150 B2WARNING(
"PhysicsObjectsMiraBelleBhabha: Can't find trigger identifier: " <<
m_triggerIdentifier);
156 if (accepted ==
false)
return;
161 double ptcms[2] = {};
162 double phicms[2] = {};
163 double thetacms[2] = {};
168 for (
unsigned int i = 0; i < UpsParticles->getListSize(); i++) {
169 Particle* Ups = UpsParticles->getParticle(i);
176 for (
unsigned int i = 0; i < electronParticles->getListSize(); i++) {
177 Particle* electron = electronParticles->getParticle(i);
184 m_h_npxd->Fill(Belle2::Variable::trackNPXDHits(electron));
185 m_h_nsvd->Fill(Belle2::Variable::trackNSVDHits(electron));
186 m_h_ncdc->Fill(Belle2::Variable::trackNCDCHits(electron));
187 m_h_topdig->Fill(Belle2::Variable::TOPVariable::topDigitCount(electron));
207 d0[index] = fitresult->
getD0();
208 z0[index] = fitresult->
getZ0();
226 m_h_dPhicms->Fill(180 - abs(phicms[0] - phicms[1]));
234 double neclClusters = -1.;
237 const unsigned int numberOfECLClusters = std::count_if(eclClusters.
begin(), eclClusters.
end(),
239 return (eclcluster.hasHypothesis(ECLCluster::EHypothesisBit::c_nPhotons)
240 and eclcluster.getEnergy(ECLCluster::EHypothesisBit::c_nPhotons) > 0.1);
242 neclClusters = numberOfECLClusters;
This is a class to store ARICH likelihoods in the datastore.
float getDetPhot() const
Return number of detected photons for a given particle.
static const ChargedStable pion
charged pion particle
static const ChargedStable electron
electron particle
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Class to collect log likelihoods from TOP, ARICH, dEdx, ECL and KLM aimed for output to mdst includes...
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...
Class to store reconstructed particles.
const Track * getTrack() const
Returns the pointer to the Track object that was used to create this Particle (ParticleType == c_Trac...
double getMass() const
Returns invariant mass (= nominal for FS particles)
TH1F * m_h_dZ0
histogram for Z0 difference between e+ and e-
TH1F * m_h_D0
histogram for D0 of electron track
TH1F * m_h_Pt
histogram for Pt of electron track
TH1F * m_h_DetPhotonARICH
histogram for number of photon in ARICH associated with electron track
void initialize() override
Initializer.
TH1F * m_h_dPhicms
histogram for phi difference between e+ and e- in CMS
std::string m_ePListName
Name of the e+ particle list.
TH1F * m_h_Mom
histogram for Momentum of electron track
void event() override
This method is called for each event.
TH1F * m_h_dPtcms
histogram for Pt difference between e+ and e-
TH1F * m_h_theta
histogram for theta of electron track
TH1F * m_h_ncdc
histogram for number of CDC hits associated with electron track
TH1F * m_h_ndf
histogram for n.d.f.
void endRun() override
This method is called if the current run ends.
TH1F * m_h_npxd
histogram for number of PXD hits associated with electron track
PhysicsObjectsMiraBelleBhabhaModule()
Constructor.
void terminate() override
This method is called at the end of the event processing.
std::string m_triggerIdentifier
Trigger identifier string used to select events for the histograms.
TH1F * m_h_dThetacms
histogram for theta difference between e+ and e- in CMS
void beginRun() override
Called when entering a new run.
TH1F * m_h_theta_lab
histogram for theta of electron track in lab frame
TH1F * m_h_nsvd
histogram for number of SVD hits associated with electron track
TH1F * m_h_Z0
histogram for Z0 of electron track
TH1F * m_h_nExtraCDCHits
histogram for number of CDC hits not associated with any tracks
TH1F * m_h_dD0
histogram for D0 difference between e+ and e-
TH1F * m_h_topdig
histogram for TOP digits associated with electron track
TH1F * m_h_inv_p
histogram for invariant mass of di-electron
TH1F * m_h_Pval
histogram for Pvalue of tracks in CDC
TH1F * m_h_Phi0
histogram for phi of electron track
TH1F * m_h_nECLClusters
histogram for ECL clusters
TH1F * m_h_electronid
histogram for electron ID
std::string m_bhabhaPListName
Name of the e+e- (Upsilon) particle list.
void defineHisto() override
Definition of the histograms.
Accessor to arrays stored in the data store.
bool isValid() const
Check wether the array was registered.
iterator end()
Return iterator to last entry +1.
iterator begin()
Return iterator to first entry.
Type-safe access to single objects in the data store.
bool isValid() const
Check whether the object was created.
Values of the result of a track fit with a given particle hypothesis.
short getChargeSign() const
Return track charge (1 or -1).
double getPValue() const
Getter for Chi2 Probability of the track fit.
ROOT::Math::PxPyPzEVector get4Momentum() const
Getter for the 4Momentum at the closest approach of the track in the r/phi projection.
double getD0() const
Getter for d0.
double getZ0() const
Getter for z0.
Class that bundles various TrackFitResults.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
double sqrt(double a)
sqrt for double
@ c_accept
Accept this event.
Abstract base class for different kinds of events.