4 #include <fmt/printf.h> 162 "CosThetaCS",
"DeltaEta",
"EtaMinus",
"EtaPlus",
"PhiCS",
"PhiMinus",
"PhiPlus",
"Pt"};
180 for (reco::TrackCollection::const_iterator track1 = tC.begin(); track1 != tC.end(); track1++) {
186 for (reco::TrackCollection::const_iterator track2 = track1 + 1; track2 != tC.end(); track2++) {
187 if (track1->charge() == track2->charge()) {
192 track2->px(), track2->py(), track2->pz(),
sqrt((track2->p() * track2->p()) +
mu_mass2_));
194 LV_mother = LV_track1 + LV_track2;
195 double mother_mass = LV_mother.M();
198 double mother_pt = LV_mother.Pt();
200 int charge1 = track1->charge();
201 double etaMu1 = track1->eta();
202 double phiMu1 = track1->phi();
203 double ptMu1 = track1->pt();
205 int charge2 = track2->charge();
206 double etaMu2 = track2->eta();
207 double phiMu2 = track2->phi();
208 double ptMu2 = track2->pt();
224 double muplus = 1.0 /
sqrt(2.0) * (LV_track1.E() + LV_track1.Z());
225 double muminus = 1.0 /
sqrt(2.0) * (LV_track1.E() - LV_track1.Z());
226 double mubarplus = 1.0 /
sqrt(2.0) * (LV_track2.E() + LV_track2.Z());
227 double mubarminus = 1.0 /
sqrt(2.0) * (LV_track2.E() - LV_track2.Z());
229 double costhetaCS = 2.0 / LV_mother.mag() /
sqrt(
pow(LV_mother.mag(), 2) +
pow(LV_mother.Pt(), 2)) *
233 auto R = Pbeam.Vect().Cross(LV_mother.Vect());
234 auto Runit =
R.Unit();
235 auto Qt = LV_mother.Vect();
237 auto Qtunit = Qt.Unit();
242 sqrt(
pow(LV_mother.mag(), 2) +
pow(LV_mother.Pt(), 2)) / LV_mother.mag() * Dt.Dot(Runit) / Dt.Dot(Qtunit);
243 double phiCS = atan(tanphi);
266 th1f_mass =
fs->make<TH1F>(
"hMass",
"mass;m_{#mu#mu} [GeV];events", 200, 0., 200.);
284 desc.setComment(
"Validates alignment payloads by evaluating bias in Z->mm mass distributions");
285 desc.addUntracked<
int>(
"compressionSettings", -1);
287 desc.add<
double>(
"eBeam", 3500.)->setComment(
"beam energy in GeV");
290 desc.add<
double>(
"Pair_mass_min", 60);
291 desc.add<
double>(
"Pair_mass_max", 120);
292 desc.add<
int>(
"Pair_mass_nbins", 120);
293 desc.add<
double>(
"Pair_etaminpos", -2.4);
294 desc.add<
double>(
"Pair_etamaxpos", 2.4);
295 desc.add<
double>(
"Pair_etaminneg", -2.4);
296 desc.add<
double>(
"Pair_etamaxneg", 2.4);
298 desc.add<
double>(
"Variable_CosThetaCS_xmin", -1.);
299 desc.add<
double>(
"Variable_CosThetaCS_xmax", 1.);
300 desc.add<
int>(
"Variable_CosThetaCS_nbins", 20);
302 desc.add<
double>(
"Variable_DeltaEta_xmin", -4.8);
303 desc.add<
double>(
"Variable_DeltaEta_xmax", 4.8);
304 desc.add<
int>(
"Variable_DeltaEta_nbins", 20);
306 desc.add<
double>(
"Variable_EtaMinus_xmin", -2.4);
307 desc.add<
double>(
"Variable_EtaMinus_xmax", 2.4);
308 desc.add<
int>(
"Variable_EtaMinus_nbins", 12);
310 desc.add<
double>(
"Variable_EtaPlus_xmin", -2.4);
311 desc.add<
double>(
"Variable_EtaPlus_xmax", 2.4);
312 desc.add<
int>(
"Variable_EtaPlus_nbins", 12);
314 desc.add<
double>(
"Variable_PhiCS_xmin", -
M_PI / 2);
315 desc.add<
double>(
"Variable_PhiCS_xmax",
M_PI / 2);
316 desc.add<
int>(
"Variable_PhiCS_nbins", 20);
318 desc.add<
double>(
"Variable_PhiMinus_xmin", -
M_PI);
319 desc.add<
double>(
"Variable_PhiMinus_xmax",
M_PI);
320 desc.add<
int>(
"Variable_PhiMinus_nbins", 16);
322 desc.add<
double>(
"Variable_PhiPlus_xmin", -
M_PI);
323 desc.add<
double>(
"Variable_PhiPlus_xmax",
M_PI);
324 desc.add<
int>(
"Variable_PhiPlus_nbins", 16);
326 desc.add<
double>(
"Variable_PairPt_xmin", 0.);
327 desc.add<
double>(
"Variable_PairPt_xmax", 100.);
328 desc.add<
int>(
"Variable_PairPt_nbins", 100);
double variable_PhiMinus_xmax_
int variable_CosThetaCS_nbins_
static const std::string kSharedResource
int variables_bins_number_[varNumber_]
int variable_DeltaEta_nbins_
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
int variable_EtaPlus_nbins_
double variable_PairPt_xmax_
DiMuonValidation(const edm::ParameterSet &pset)
static constexpr double mu_mass2_
TH2D * th2d_mass_variables_[varNumber_]
double variable_EtaPlus_xmin_
double variable_DeltaEta_xmax_
double variable_CosThetaCS_xmax_
std::vector< Track > TrackCollection
collection of Tracks
double variables_min_[varNumber_]
double variable_PhiMinus_xmin_
double variable_PhiPlus_xmin_
int variable_PhiMinus_nbins_
void swap(Association< C > &lhs, Association< C > &rhs)
int variable_PairPt_nbins_
double variable_CosThetaCS_xmin_
double variable_EtaMinus_xmin_
std::string variables_name_[varNumber_]
double variable_PhiCS_xmax_
#define DEFINE_FWK_MODULE(type)
double variable_PairPt_xmin_
double variable_EtaPlus_xmax_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
DecomposeProduct< arg, typename Div::arg > D
int variable_EtaMinus_nbins_
double variables_max_[varNumber_]
double variable_PhiCS_xmin_
int variable_PhiCS_nbins_
void analyze(const edm::Event &, const edm::EventSetup &) override
static constexpr int varNumber_
reco::Particle::LorentzVector LV
edm::EDGetTokenT< reco::TrackCollection > theTrackCollectionToken_
~DiMuonValidation() override=default
int variable_PhiPlus_nbins_
double variable_DeltaEta_xmin_
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Power< A, B >::type pow(const A &a, const B &b)
double variable_PhiPlus_xmax_
double variable_EtaMinus_xmax_