4 #include <fmt/printf.h> 106 static constexpr
double mu_mass2_ = 0.105658 * 0.105658;
160 "CosThetaCS",
"DeltaEta",
"EtaMinus",
"EtaPlus",
"PhiCS",
"PhiMinus",
"PhiPlus",
"Pt"};
179 for (
const auto& track1 : tC) {
185 for (
const auto& track2 : tC) {
186 if (&track1 == &track2) {
190 if (track1.charge() == track2.charge()) {
196 LV_mother = LV_track1 + LV_track2;
197 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);
282 desc.setComment(
"Validates alignment payloads by evaluating bias in Z->mm mass distributions");
283 desc.addUntracked<
int>(
"compressionSettings", -1);
285 desc.add<
double>(
"eBeam", 3500.)->setComment(
"beam energy in GeV");
288 desc.add<
double>(
"Pair_mass_min", 60);
289 desc.add<
double>(
"Pair_mass_max", 120);
290 desc.add<
int>(
"Pair_mass_nbins", 120);
291 desc.add<
double>(
"Pair_etaminpos", 60);
292 desc.add<
double>(
"Pair_etamaxpos", 60);
293 desc.add<
double>(
"Pair_etaminneg", 60);
294 desc.add<
double>(
"Pair_etamaxneg", 60);
296 desc.add<
double>(
"Variable_CosThetaCS_xmin", -1.);
297 desc.add<
double>(
"Variable_CosThetaCS_xmax", 1.);
298 desc.add<
int>(
"Variable_CosThetaCS_nbins", 20);
300 desc.add<
double>(
"Variable_DeltaEta_xmin", -4.8);
301 desc.add<
double>(
"Variable_DeltaEta_xmax", 4.8);
302 desc.add<
int>(
"Variable_DeltaEta_nbins", 20);
304 desc.add<
double>(
"Variable_EtaMinus_xmin", -2.4);
305 desc.add<
double>(
"Variable_EtaMinus_xmax", 2.4);
306 desc.add<
int>(
"Variable_EtaMinus_nbins", 12);
308 desc.add<
double>(
"Variable_EtaPlus_xmin", -2.4);
309 desc.add<
double>(
"Variable_EtaPlus_xmax", 2.4);
310 desc.add<
int>(
"Variable_EtaPlus_nbins", 12);
312 desc.add<
double>(
"Variable_PhiCS_xmin", -
M_PI / 2);
313 desc.add<
double>(
"Variable_PhiCS_xmax",
M_PI / 2);
314 desc.add<
int>(
"Variable_PhiCS_nbins", 20);
316 desc.add<
double>(
"Variable_PhiMinus_xmin", -
M_PI);
317 desc.add<
double>(
"Variable_PhiMinus_xmax",
M_PI);
318 desc.add<
int>(
"Variable_PhiMinus_nbins", 16);
320 desc.add<
double>(
"Variable_PhiPlus_xmin", -
M_PI);
321 desc.add<
double>(
"Variable_PhiPlus_xmax",
M_PI);
322 desc.add<
int>(
"Variable_PhiPlus_nbins", 16);
324 desc.add<
double>(
"Variable_PairPt_xmin", 0.);
325 desc.add<
double>(
"Variable_PairPt_xmax", 100.);
326 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_
int variable_PairPt_nbins_
double variable_CosThetaCS_xmin_
double variable_EtaMinus_xmin_
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
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_