CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
DiMuonValidation Class Reference
Inheritance diagram for DiMuonValidation:
edm::one::EDAnalyzer< edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Types

enum  Variable {
  CosThetaCS = 0, DeltaEta = 1, EtaMinus = 2, EtaPlus = 3,
  PhiCS = 4, PhiMinus = 5, PhiPlus = 6, Pt = 7,
  VarNumber = 8
}
 
- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

 DiMuonValidation (const edm::ParameterSet &pset)
 
 ~DiMuonValidation () override=default
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::SharedResources >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Static Public Attributes

static constexpr double mu_mass2_ = 0.105658 * 0.105658
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 

Private Attributes

int compressionSettings_
 
float eBeam_
 
DiLeptonHelp::PlotsVsDiLeptonRegion InvMassInEtaBins = DiLeptonHelp::PlotsVsDiLeptonRegion(1.5)
 
DiLeptonHelp::PlotsVsDiLeptonRegion InvMassVsCosThetaCSInEtaBins = DiLeptonHelp::PlotsVsDiLeptonRegion(1.5)
 
DiLeptonHelp::PlotsVsDiLeptonRegion InvMassVsPhiMinusInEtaBins = DiLeptonHelp::PlotsVsDiLeptonRegion(1.5)
 
DiLeptonHelp::PlotsVsDiLeptonRegion InvMassVsPhiPlusInEtaBins = DiLeptonHelp::PlotsVsDiLeptonRegion(1.5)
 
double pair_etamaxneg_
 
double pair_etamaxpos_
 
double pair_etaminneg_
 
double pair_etaminpos_
 
double pair_mass_max_
 
double pair_mass_min_
 
int pair_mass_nbins_
 
TH1F * th1f_mass
 
TH2D * th2d_mass_variables_ [Variable::VarNumber]
 
edm::EDGetTokenT< reco::TrackCollectiontheTrackCollectionToken_
 
std::string TkTag_
 
int variable_CosThetaCS_nbins_
 
double variable_CosThetaCS_xmax_
 
double variable_CosThetaCS_xmin_
 
int variable_DeltaEta_nbins_
 
double variable_DeltaEta_xmax_
 
double variable_DeltaEta_xmin_
 
int variable_EtaMinus_nbins_
 
double variable_EtaMinus_xmax_
 
double variable_EtaMinus_xmin_
 
int variable_EtaPlus_nbins_
 
double variable_EtaPlus_xmax_
 
double variable_EtaPlus_xmin_
 
int variable_PairPt_nbins_
 
double variable_PairPt_xmax_
 
double variable_PairPt_xmin_
 
int variable_PhiCS_nbins_
 
double variable_PhiCS_xmax_
 
double variable_PhiCS_xmin_
 
int variable_PhiMinus_nbins_
 
double variable_PhiMinus_xmax_
 
double variable_PhiMinus_xmin_
 
int variable_PhiPlus_nbins_
 
double variable_PhiPlus_xmax_
 
double variable_PhiPlus_xmin_
 
int variables_bins_number_ [Variable::VarNumber]
 
double variables_max_ [Variable::VarNumber]
 
double variables_min_ [Variable::VarNumber]
 
std::string variables_name_ [Variable::VarNumber]
 

Additional Inherited Members

- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 35 of file DiMuonValidation.cc.

Member Enumeration Documentation

◆ Variable

Enumerator
CosThetaCS 
DeltaEta 
EtaMinus 
EtaPlus 
PhiCS 
PhiMinus 
PhiPlus 
Pt 
VarNumber 

Definition at line 108 of file DiMuonValidation.cc.

Constructor & Destructor Documentation

◆ DiMuonValidation()

DiMuonValidation::DiMuonValidation ( const edm::ParameterSet pset)
inlineexplicit

Definition at line 37 of file DiMuonValidation.cc.

References HLT_2024v12_cff::DeltaEta, TFileService::kSharedResource, theTrackCollectionToken_, TkTag_, variable_CosThetaCS_nbins_, variable_CosThetaCS_xmax_, variable_CosThetaCS_xmin_, variable_DeltaEta_nbins_, variable_DeltaEta_xmax_, variable_DeltaEta_xmin_, variable_EtaMinus_nbins_, variable_EtaMinus_xmax_, variable_EtaMinus_xmin_, variable_EtaPlus_nbins_, variable_EtaPlus_xmax_, variable_EtaPlus_xmin_, variable_PairPt_nbins_, variable_PairPt_xmax_, variable_PairPt_xmin_, variable_PhiCS_nbins_, variable_PhiCS_xmax_, variable_PhiCS_xmin_, variable_PhiMinus_nbins_, variable_PhiMinus_xmax_, variable_PhiMinus_xmin_, variable_PhiPlus_nbins_, variable_PhiPlus_xmax_, variable_PhiPlus_xmin_, variables_bins_number_, variables_max_, and variables_min_.

38  : eBeam_(pset.getParameter<double>("eBeam")),
39  compressionSettings_(pset.getUntrackedParameter<int>("compressionSettings", -1)),
40  TkTag_(pset.getParameter<std::string>("TkTag")),
41  pair_mass_min_(pset.getParameter<double>("Pair_mass_min")),
42  pair_mass_max_(pset.getParameter<double>("Pair_mass_max")),
43  pair_mass_nbins_(pset.getParameter<int>("Pair_mass_nbins")),
44  pair_etaminpos_(pset.getParameter<double>("Pair_etaminpos")),
45  pair_etamaxpos_(pset.getParameter<double>("Pair_etamaxpos")),
46  pair_etaminneg_(pset.getParameter<double>("Pair_etaminneg")),
47  pair_etamaxneg_(pset.getParameter<double>("Pair_etamaxneg")),
48  variable_CosThetaCS_xmin_(pset.getParameter<double>("Variable_CosThetaCS_xmin")),
49  variable_CosThetaCS_xmax_(pset.getParameter<double>("Variable_CosThetaCS_xmax")),
50  variable_CosThetaCS_nbins_(pset.getParameter<int>("Variable_CosThetaCS_nbins")),
51  variable_DeltaEta_xmin_(pset.getParameter<double>("Variable_DeltaEta_xmin")),
52  variable_DeltaEta_xmax_(pset.getParameter<double>("Variable_DeltaEta_xmax")),
53  variable_DeltaEta_nbins_(pset.getParameter<int>("Variable_DeltaEta_nbins")),
54  variable_EtaMinus_xmin_(pset.getParameter<double>("Variable_EtaMinus_xmin")),
55  variable_EtaMinus_xmax_(pset.getParameter<double>("Variable_EtaMinus_xmax")),
56  variable_EtaMinus_nbins_(pset.getParameter<int>("Variable_EtaMinus_nbins")),
57  variable_EtaPlus_xmin_(pset.getParameter<double>("Variable_EtaPlus_xmin")),
58  variable_EtaPlus_xmax_(pset.getParameter<double>("Variable_EtaPlus_xmax")),
59  variable_EtaPlus_nbins_(pset.getParameter<int>("Variable_EtaPlus_nbins")),
60  variable_PhiCS_xmin_(pset.getParameter<double>("Variable_PhiCS_xmin")),
61  variable_PhiCS_xmax_(pset.getParameter<double>("Variable_PhiCS_xmax")),
62  variable_PhiCS_nbins_(pset.getParameter<int>("Variable_PhiCS_nbins")),
63  variable_PhiMinus_xmin_(pset.getParameter<double>("Variable_PhiMinus_xmin")),
64  variable_PhiMinus_xmax_(pset.getParameter<double>("Variable_PhiMinus_xmax")),
65  variable_PhiMinus_nbins_(pset.getParameter<int>("Variable_PhiMinus_nbins")),
66  variable_PhiPlus_xmin_(pset.getParameter<double>("Variable_PhiPlus_xmin")),
67  variable_PhiPlus_xmax_(pset.getParameter<double>("Variable_PhiPlus_xmax")),
68  variable_PhiPlus_nbins_(pset.getParameter<int>("Variable_PhiPlus_nbins")),
69  variable_PairPt_xmin_(pset.getParameter<double>("Variable_PairPt_xmin")),
70  variable_PairPt_xmax_(pset.getParameter<double>("Variable_PairPt_xmax")),
71  variable_PairPt_nbins_(pset.getParameter<int>("Variable_PairPt_nbins")) {
72  usesResource(TFileService::kSharedResource);
73  theTrackCollectionToken_ = consumes<reco::TrackCollection>(TkTag_);
74 
75  variables_min_[Variable::CosThetaCS] = variable_CosThetaCS_xmin_;
77  variables_min_[Variable::EtaMinus] = variable_EtaMinus_xmin_;
78  variables_min_[Variable::EtaPlus] = variable_EtaPlus_xmin_;
79  variables_min_[Variable::PhiCS] = variable_PhiCS_xmin_;
80  variables_min_[Variable::PhiMinus] = variable_PhiMinus_xmin_;
81  variables_min_[Variable::PhiPlus] = variable_PhiPlus_xmin_;
82  variables_min_[Variable::Pt] = variable_PairPt_xmin_;
83 
84  variables_max_[Variable::CosThetaCS] = variable_CosThetaCS_xmax_;
86  variables_max_[Variable::EtaMinus] = variable_EtaMinus_xmax_;
87  variables_max_[Variable::EtaPlus] = variable_EtaPlus_xmax_;
88  variables_max_[Variable::PhiCS] = variable_PhiCS_xmax_;
89  variables_max_[Variable::PhiMinus] = variable_PhiMinus_xmax_;
90  variables_max_[Variable::PhiPlus] = variable_PhiPlus_xmax_;
91  variables_max_[Variable::Pt] = variable_PairPt_xmax_;
92 
93  variables_bins_number_[Variable::CosThetaCS] = variable_CosThetaCS_nbins_;
101  }
static const std::string kSharedResource
Definition: TFileService.h:76
double variable_CosThetaCS_xmax_
double variable_CosThetaCS_xmin_
double variables_min_[Variable::VarNumber]
double variables_max_[Variable::VarNumber]
int variables_bins_number_[Variable::VarNumber]
edm::EDGetTokenT< reco::TrackCollection > theTrackCollectionToken_

◆ ~DiMuonValidation()

DiMuonValidation::~DiMuonValidation ( )
overridedefault

Member Function Documentation

◆ analyze()

void DiMuonValidation::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 194 of file DiMuonValidation.cc.

References HLT_2024v12_cff::delta_eta, HLT_2024v12_cff::DeltaEta, eBeam_, DiLeptonHelp::PlotsVsDiLeptonRegion::fillTH1Plots(), DiLeptonHelp::PlotsVsDiLeptonRegion::fillTH2Plots(), iEvent, InvMassInEtaBins, InvMassVsCosThetaCSInEtaBins, InvMassVsPhiMinusInEtaBins, InvMassVsPhiPlusInEtaBins, mu_mass2_, BPhysicsValidation_cfi::muminus, BPhysicsValidation_cfi::muplus, pair_etamaxneg_, pair_etamaxpos_, pair_etaminneg_, pair_mass_max_, pair_mass_min_, funct::pow(), dttmaxenums::R, mathSSE::sqrt(), edm::swap(), th1f_mass, th2d_mass_variables_, and theTrackCollectionToken_.

194  {
195  using namespace edm;
196 
198 
199  DiMuonValid::LV LV_mother(0., 0., 0., 0.);
200  for (reco::TrackCollection::const_iterator track1 = tC.begin(); track1 != tC.end(); track1++) {
201  DiMuonValid::LV LV_track1(track1->px(),
202  track1->py(),
203  track1->pz(),
204  sqrt((track1->p() * track1->p()) + mu_mass2_)); //old 106
205 
206  for (reco::TrackCollection::const_iterator track2 = track1 + 1; track2 != tC.end(); track2++) {
207  if (track1->charge() == track2->charge()) {
208  continue;
209  } // only reconstruct opposite charge pair
210 
211  DiMuonValid::LV LV_track2(
212  track2->px(), track2->py(), track2->pz(), sqrt((track2->p() * track2->p()) + mu_mass2_));
213 
214  LV_mother = LV_track1 + LV_track2;
215  double mother_mass = LV_mother.M();
216  th1f_mass->Fill(mother_mass);
217  double mother_pt = LV_mother.Pt();
218 
219  int charge1 = track1->charge();
220  double etaMu1 = track1->eta();
221  double phiMu1 = track1->phi();
222  double ptMu1 = track1->pt();
223 
224  int charge2 = track2->charge();
225  double etaMu2 = track2->eta();
226  double phiMu2 = track2->phi();
227  double ptMu2 = track2->pt();
228 
229  if (charge1 < 0) { // use Mu+ for charge1, Mu- for charge2
230  std::swap(charge1, charge2);
231  std::swap(etaMu1, etaMu2);
232  std::swap(phiMu1, phiMu2);
233  std::swap(ptMu1, ptMu2);
234  }
235 
236  const auto& tplus = track1->charge() > 0 ? track1 : track2;
237  const auto& tminus = track1->charge() < 0 ? track1 : track2;
238  TLorentzVector p4_tplus(tplus->px(), tplus->py(), tplus->pz(), sqrt((tplus->p() * tplus->p()) + mu_mass2_));
239  TLorentzVector p4_tminus(tminus->px(), tminus->py(), tminus->pz(), sqrt((tminus->p() * tminus->p()) + mu_mass2_));
240  std::pair<TLorentzVector, TLorentzVector> tktk_p4 = std::make_pair(p4_tplus, p4_tminus);
241  InvMassInEtaBins.fillTH1Plots(mother_mass, tktk_p4);
242  InvMassVsPhiPlusInEtaBins.fillTH2Plots(mother_mass, phiMu1, tktk_p4);
243  InvMassVsPhiMinusInEtaBins.fillTH2Plots(mother_mass, phiMu2, tktk_p4);
244 
245  //eta cut
246  if (etaMu1 < pair_etaminpos_ || etaMu1 > pair_etamaxpos_ || etaMu2 < pair_etaminneg_ ||
247  etaMu2 > pair_etamaxneg_) {
248  continue;
249  }
250 
251  double delta_eta = etaMu1 - etaMu2;
252 
253  double muplus = 1.0 / sqrt(2.0) * (LV_track1.E() + LV_track1.Z());
254  double muminus = 1.0 / sqrt(2.0) * (LV_track1.E() - LV_track1.Z());
255  double mubarplus = 1.0 / sqrt(2.0) * (LV_track2.E() + LV_track2.Z());
256  double mubarminus = 1.0 / sqrt(2.0) * (LV_track2.E() - LV_track2.Z());
257  //double costheta = 2.0 / Q.mag() / sqrt(pow(Q.mag(), 2) + pow(Q.Pt(), 2)) * (muplus * mubarminus - muminus * mubarplus);
258  double costhetaCS = 2.0 / LV_mother.mag() / sqrt(pow(LV_mother.mag(), 2) + pow(LV_mother.Pt(), 2)) *
259  (muplus * mubarminus - muminus * mubarplus);
260 
261  InvMassVsCosThetaCSInEtaBins.fillTH2Plots(mother_mass, costhetaCS, tktk_p4);
262 
263  DiMuonValid::LV Pbeam(0., 0., eBeam_, eBeam_);
264  auto R = Pbeam.Vect().Cross(LV_mother.Vect());
265  auto Runit = R.Unit();
266  auto Qt = LV_mother.Vect();
267  Qt.SetZ(0);
268  auto Qtunit = Qt.Unit();
269  DiMuonValid::LV D(LV_track1 - LV_track2);
270  auto Dt = D.Vect();
271  Dt.SetZ(0);
272  double tanphi =
273  sqrt(pow(LV_mother.mag(), 2) + pow(LV_mother.Pt(), 2)) / LV_mother.mag() * Dt.Dot(Runit) / Dt.Dot(Qtunit);
274  double phiCS = atan(tanphi);
275 
276  if (mother_mass > pair_mass_min_ && mother_mass < pair_mass_max_) {
277  th2d_mass_variables_[Variable::CosThetaCS]->Fill(mother_mass, costhetaCS, 1);
278  th2d_mass_variables_[Variable::DeltaEta]->Fill(mother_mass, delta_eta, 1);
279  th2d_mass_variables_[Variable::EtaMinus]->Fill(mother_mass, etaMu2, 1);
280  th2d_mass_variables_[Variable::EtaPlus]->Fill(mother_mass, etaMu1, 1);
281  th2d_mass_variables_[Variable::PhiCS]->Fill(mother_mass, phiCS, 1);
282  th2d_mass_variables_[Variable::PhiMinus]->Fill(mother_mass, phiMu2, 1);
283  th2d_mass_variables_[Variable::PhiPlus]->Fill(mother_mass, phiMu1, 1);
284  th2d_mass_variables_[Variable::Pt]->Fill(mother_mass, mother_pt, 1);
285  }
286  }
287  }
288 }
DiLeptonHelp::PlotsVsDiLeptonRegion InvMassVsPhiMinusInEtaBins
static constexpr double mu_mass2_
void fillTH1Plots(const float val, const std::pair< TLorentzVector, TLorentzVector > &momenta)
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
DiLeptonHelp::PlotsVsDiLeptonRegion InvMassVsCosThetaCSInEtaBins
void swap(Association< C > &lhs, Association< C > &rhs)
Definition: Association.h:112
DiLeptonHelp::PlotsVsDiLeptonRegion InvMassInEtaBins
int iEvent
Definition: GenABIO.cc:224
TH2D * th2d_mass_variables_[Variable::VarNumber]
T sqrt(T t)
Definition: SSEVec.h:19
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:141
DiLeptonHelp::PlotsVsDiLeptonRegion InvMassVsPhiPlusInEtaBins
HLT enums.
reco::Particle::LorentzVector LV
edm::EDGetTokenT< reco::TrackCollection > theTrackCollectionToken_
void fillTH2Plots(const float valX, const float valY, const std::pair< TLorentzVector, TLorentzVector > &momenta)
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29

◆ beginJob()

void DiMuonValidation::beginJob ( )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 291 of file DiMuonValidation.cc.

References DiLeptonHelp::PlotsVsDiLeptonRegion::bookSet(), compressionSettings_, compareTotals::fs, mps_fire::i, InvMassInEtaBins, InvMassVsCosThetaCSInEtaBins, InvMassVsPhiMinusInEtaBins, InvMassVsPhiPlusInEtaBins, pair_mass_max_, pair_mass_min_, pair_mass_nbins_, AlCaHLTBitMon_QueryRunRegistry::string, th1f_mass, th2d_mass_variables_, variables_bins_number_, variables_max_, variables_min_, and variables_name_.

291  {
293  if (compressionSettings_ > 0) {
294  fs->file().SetCompressionSettings(compressionSettings_);
295  }
296 
297  th1f_mass = fs->make<TH1F>("hMass", "mass;m_{#mu#mu} [GeV];events", 200, 0., 200.);
298 
299  for (int i = 0; i < Variable::VarNumber; i++) {
300  std::string th2d_name = fmt::sprintf("th2d_mass_%s", variables_name_[i].c_str());
301  th2d_mass_variables_[i] = fs->make<TH2D>(th2d_name.c_str(),
302  th2d_name.c_str(),
307  variables_min_[i],
308  variables_max_[i]);
309  }
310 
311  // Z-> mm mass in eta bins
312  TFileDirectory dirResMassEta = fs->mkdir("TkTkMassInEtaBins");
313  InvMassInEtaBins.bookSet(dirResMassEta, th1f_mass);
314 
315  // Z->mm mass vs cos phi Collins-Soper in eta bins
316  TFileDirectory dirResMassVsCosThetaCSInEta = fs->mkdir("TkTkMassVsCosThetaCSInEtaBins");
317  InvMassVsCosThetaCSInEtaBins.bookSet(dirResMassVsCosThetaCSInEta, th2d_mass_variables_[Variable::CosThetaCS]);
318 
319  // Z->mm mass vs phi minus in eta bins
320  TFileDirectory dirResMassVsPhiMinusInEta = fs->mkdir("TkTkMassVsPhiMinusInEtaBins");
321  InvMassVsPhiMinusInEtaBins.bookSet(dirResMassVsPhiMinusInEta, th2d_mass_variables_[Variable::PhiMinus]);
322 
323  // Z->mm mass vs phi plus in eta bins
324  TFileDirectory dirResMassVsPhiPlusInEta = fs->mkdir("TkTkMassVsPhiPlusInEtaBins");
325  InvMassVsPhiPlusInEtaBins.bookSet(dirResMassVsPhiPlusInEta, th2d_mass_variables_[Variable::PhiPlus]);
326 }
DiLeptonHelp::PlotsVsDiLeptonRegion InvMassVsPhiMinusInEtaBins
DiLeptonHelp::PlotsVsDiLeptonRegion InvMassVsCosThetaCSInEtaBins
DiLeptonHelp::PlotsVsDiLeptonRegion InvMassInEtaBins
TH2D * th2d_mass_variables_[Variable::VarNumber]
void bookSet(const TFileDirectory &fs, const TH1 *histo)
std::string variables_name_[Variable::VarNumber]
double variables_min_[Variable::VarNumber]
DiLeptonHelp::PlotsVsDiLeptonRegion InvMassVsPhiPlusInEtaBins
double variables_max_[Variable::VarNumber]
int variables_bins_number_[Variable::VarNumber]

◆ fillDescriptions()

void DiMuonValidation::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 329 of file DiMuonValidation.cc.

References edm::ConfigurationDescriptions::addWithDefaultLabel(), submitPVResolutionJobs::desc, M_PI, and AlCaHLTBitMon_QueryRunRegistry::string.

329  {
331  desc.setComment("Validates alignment payloads by evaluating bias in Z->mm mass distributions");
332  desc.addUntracked<int>("compressionSettings", -1);
333 
334  desc.add<double>("eBeam", 3500.)->setComment("beam energy in GeV");
335  desc.add<std::string>("TkTag", "ALCARECOTkAlZMuMu");
336 
337  desc.add<double>("Pair_mass_min", 60);
338  desc.add<double>("Pair_mass_max", 120);
339  desc.add<int>("Pair_mass_nbins", 120);
340  desc.add<double>("Pair_etaminpos", -2.4);
341  desc.add<double>("Pair_etamaxpos", 2.4);
342  desc.add<double>("Pair_etaminneg", -2.4);
343  desc.add<double>("Pair_etamaxneg", 2.4);
344 
345  desc.add<double>("Variable_CosThetaCS_xmin", -1.);
346  desc.add<double>("Variable_CosThetaCS_xmax", 1.);
347  desc.add<int>("Variable_CosThetaCS_nbins", 20);
348 
349  desc.add<double>("Variable_DeltaEta_xmin", -4.8);
350  desc.add<double>("Variable_DeltaEta_xmax", 4.8);
351  desc.add<int>("Variable_DeltaEta_nbins", 20);
352 
353  desc.add<double>("Variable_EtaMinus_xmin", -2.4);
354  desc.add<double>("Variable_EtaMinus_xmax", 2.4);
355  desc.add<int>("Variable_EtaMinus_nbins", 12);
356 
357  desc.add<double>("Variable_EtaPlus_xmin", -2.4);
358  desc.add<double>("Variable_EtaPlus_xmax", 2.4);
359  desc.add<int>("Variable_EtaPlus_nbins", 12);
360 
361  desc.add<double>("Variable_PhiCS_xmin", -M_PI / 2);
362  desc.add<double>("Variable_PhiCS_xmax", M_PI / 2);
363  desc.add<int>("Variable_PhiCS_nbins", 20);
364 
365  desc.add<double>("Variable_PhiMinus_xmin", -M_PI);
366  desc.add<double>("Variable_PhiMinus_xmax", M_PI);
367  desc.add<int>("Variable_PhiMinus_nbins", 16);
368 
369  desc.add<double>("Variable_PhiPlus_xmin", -M_PI);
370  desc.add<double>("Variable_PhiPlus_xmax", M_PI);
371  desc.add<int>("Variable_PhiPlus_nbins", 16);
372 
373  desc.add<double>("Variable_PairPt_xmin", 0.);
374  desc.add<double>("Variable_PairPt_xmax", 100.);
375  desc.add<int>("Variable_PairPt_nbins", 100);
376 
377  descriptions.addWithDefaultLabel(desc);
378 }
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
#define M_PI

Member Data Documentation

◆ compressionSettings_

int DiMuonValidation::compressionSettings_
private

Definition at line 128 of file DiMuonValidation.cc.

Referenced by beginJob().

◆ eBeam_

float DiMuonValidation::eBeam_
private

Definition at line 127 of file DiMuonValidation.cc.

Referenced by analyze().

◆ InvMassInEtaBins

DiLeptonHelp::PlotsVsDiLeptonRegion DiMuonValidation::InvMassInEtaBins = DiLeptonHelp::PlotsVsDiLeptonRegion(1.5)
private

Definition at line 183 of file DiMuonValidation.cc.

Referenced by analyze(), and beginJob().

◆ InvMassVsCosThetaCSInEtaBins

DiLeptonHelp::PlotsVsDiLeptonRegion DiMuonValidation::InvMassVsCosThetaCSInEtaBins = DiLeptonHelp::PlotsVsDiLeptonRegion(1.5)
private

Definition at line 186 of file DiMuonValidation.cc.

Referenced by analyze(), and beginJob().

◆ InvMassVsPhiMinusInEtaBins

DiLeptonHelp::PlotsVsDiLeptonRegion DiMuonValidation::InvMassVsPhiMinusInEtaBins = DiLeptonHelp::PlotsVsDiLeptonRegion(1.5)
private

Definition at line 185 of file DiMuonValidation.cc.

Referenced by analyze(), and beginJob().

◆ InvMassVsPhiPlusInEtaBins

DiLeptonHelp::PlotsVsDiLeptonRegion DiMuonValidation::InvMassVsPhiPlusInEtaBins = DiLeptonHelp::PlotsVsDiLeptonRegion(1.5)
private

Definition at line 184 of file DiMuonValidation.cc.

Referenced by analyze(), and beginJob().

◆ mu_mass2_

constexpr double DiMuonValidation::mu_mass2_ = 0.105658 * 0.105658
static

Definition at line 120 of file DiMuonValidation.cc.

Referenced by analyze().

◆ pair_etamaxneg_

double DiMuonValidation::pair_etamaxneg_
private

Definition at line 137 of file DiMuonValidation.cc.

Referenced by analyze().

◆ pair_etamaxpos_

double DiMuonValidation::pair_etamaxpos_
private

Definition at line 135 of file DiMuonValidation.cc.

Referenced by analyze().

◆ pair_etaminneg_

double DiMuonValidation::pair_etaminneg_
private

Definition at line 136 of file DiMuonValidation.cc.

Referenced by analyze().

◆ pair_etaminpos_

double DiMuonValidation::pair_etaminpos_
private

Definition at line 134 of file DiMuonValidation.cc.

◆ pair_mass_max_

double DiMuonValidation::pair_mass_max_
private

Definition at line 132 of file DiMuonValidation.cc.

Referenced by analyze(), and beginJob().

◆ pair_mass_min_

double DiMuonValidation::pair_mass_min_
private

Definition at line 131 of file DiMuonValidation.cc.

Referenced by analyze(), and beginJob().

◆ pair_mass_nbins_

int DiMuonValidation::pair_mass_nbins_
private

Definition at line 133 of file DiMuonValidation.cc.

Referenced by beginJob().

◆ th1f_mass

TH1F* DiMuonValidation::th1f_mass
private

Definition at line 173 of file DiMuonValidation.cc.

Referenced by analyze(), and beginJob().

◆ th2d_mass_variables_

TH2D* DiMuonValidation::th2d_mass_variables_[Variable::VarNumber]
private

Definition at line 174 of file DiMuonValidation.cc.

Referenced by analyze(), and beginJob().

◆ theTrackCollectionToken_

edm::EDGetTokenT<reco::TrackCollection> DiMuonValidation::theTrackCollectionToken_
private

Definition at line 171 of file DiMuonValidation.cc.

Referenced by analyze(), and DiMuonValidation().

◆ TkTag_

std::string DiMuonValidation::TkTag_
private

Definition at line 129 of file DiMuonValidation.cc.

Referenced by DiMuonValidation().

◆ variable_CosThetaCS_nbins_

int DiMuonValidation::variable_CosThetaCS_nbins_
private

Definition at line 141 of file DiMuonValidation.cc.

Referenced by DiMuonValidation().

◆ variable_CosThetaCS_xmax_

double DiMuonValidation::variable_CosThetaCS_xmax_
private

Definition at line 140 of file DiMuonValidation.cc.

Referenced by DiMuonValidation().

◆ variable_CosThetaCS_xmin_

double DiMuonValidation::variable_CosThetaCS_xmin_
private

Definition at line 139 of file DiMuonValidation.cc.

Referenced by DiMuonValidation().

◆ variable_DeltaEta_nbins_

int DiMuonValidation::variable_DeltaEta_nbins_
private

Definition at line 145 of file DiMuonValidation.cc.

Referenced by DiMuonValidation().

◆ variable_DeltaEta_xmax_

double DiMuonValidation::variable_DeltaEta_xmax_
private

Definition at line 144 of file DiMuonValidation.cc.

Referenced by DiMuonValidation().

◆ variable_DeltaEta_xmin_

double DiMuonValidation::variable_DeltaEta_xmin_
private

Definition at line 143 of file DiMuonValidation.cc.

Referenced by DiMuonValidation().

◆ variable_EtaMinus_nbins_

int DiMuonValidation::variable_EtaMinus_nbins_
private

Definition at line 149 of file DiMuonValidation.cc.

Referenced by DiMuonValidation().

◆ variable_EtaMinus_xmax_

double DiMuonValidation::variable_EtaMinus_xmax_
private

Definition at line 148 of file DiMuonValidation.cc.

Referenced by DiMuonValidation().

◆ variable_EtaMinus_xmin_

double DiMuonValidation::variable_EtaMinus_xmin_
private

Definition at line 147 of file DiMuonValidation.cc.

Referenced by DiMuonValidation().

◆ variable_EtaPlus_nbins_

int DiMuonValidation::variable_EtaPlus_nbins_
private

Definition at line 153 of file DiMuonValidation.cc.

Referenced by DiMuonValidation().

◆ variable_EtaPlus_xmax_

double DiMuonValidation::variable_EtaPlus_xmax_
private

Definition at line 152 of file DiMuonValidation.cc.

Referenced by DiMuonValidation().

◆ variable_EtaPlus_xmin_

double DiMuonValidation::variable_EtaPlus_xmin_
private

Definition at line 151 of file DiMuonValidation.cc.

Referenced by DiMuonValidation().

◆ variable_PairPt_nbins_

int DiMuonValidation::variable_PairPt_nbins_
private

Definition at line 169 of file DiMuonValidation.cc.

Referenced by DiMuonValidation().

◆ variable_PairPt_xmax_

double DiMuonValidation::variable_PairPt_xmax_
private

Definition at line 168 of file DiMuonValidation.cc.

Referenced by DiMuonValidation().

◆ variable_PairPt_xmin_

double DiMuonValidation::variable_PairPt_xmin_
private

Definition at line 167 of file DiMuonValidation.cc.

Referenced by DiMuonValidation().

◆ variable_PhiCS_nbins_

int DiMuonValidation::variable_PhiCS_nbins_
private

Definition at line 157 of file DiMuonValidation.cc.

Referenced by DiMuonValidation().

◆ variable_PhiCS_xmax_

double DiMuonValidation::variable_PhiCS_xmax_
private

Definition at line 156 of file DiMuonValidation.cc.

Referenced by DiMuonValidation().

◆ variable_PhiCS_xmin_

double DiMuonValidation::variable_PhiCS_xmin_
private

Definition at line 155 of file DiMuonValidation.cc.

Referenced by DiMuonValidation().

◆ variable_PhiMinus_nbins_

int DiMuonValidation::variable_PhiMinus_nbins_
private

Definition at line 161 of file DiMuonValidation.cc.

Referenced by DiMuonValidation().

◆ variable_PhiMinus_xmax_

double DiMuonValidation::variable_PhiMinus_xmax_
private

Definition at line 160 of file DiMuonValidation.cc.

Referenced by DiMuonValidation().

◆ variable_PhiMinus_xmin_

double DiMuonValidation::variable_PhiMinus_xmin_
private

Definition at line 159 of file DiMuonValidation.cc.

Referenced by DiMuonValidation().

◆ variable_PhiPlus_nbins_

int DiMuonValidation::variable_PhiPlus_nbins_
private

Definition at line 165 of file DiMuonValidation.cc.

Referenced by DiMuonValidation().

◆ variable_PhiPlus_xmax_

double DiMuonValidation::variable_PhiPlus_xmax_
private

Definition at line 164 of file DiMuonValidation.cc.

Referenced by DiMuonValidation().

◆ variable_PhiPlus_xmin_

double DiMuonValidation::variable_PhiPlus_xmin_
private

Definition at line 163 of file DiMuonValidation.cc.

Referenced by DiMuonValidation().

◆ variables_bins_number_

int DiMuonValidation::variables_bins_number_[Variable::VarNumber]
private

Definition at line 179 of file DiMuonValidation.cc.

Referenced by beginJob(), and DiMuonValidation().

◆ variables_max_

double DiMuonValidation::variables_max_[Variable::VarNumber]
private

Definition at line 181 of file DiMuonValidation.cc.

Referenced by beginJob(), and DiMuonValidation().

◆ variables_min_

double DiMuonValidation::variables_min_[Variable::VarNumber]
private

Definition at line 180 of file DiMuonValidation.cc.

Referenced by beginJob(), and DiMuonValidation().

◆ variables_name_

std::string DiMuonValidation::variables_name_[Variable::VarNumber]
private
Initial value:
= {
"CosThetaCS", "DeltaEta", "EtaMinus", "EtaPlus", "PhiCS", "PhiMinus", "PhiPlus", "Pt"}

Definition at line 176 of file DiMuonValidation.cc.

Referenced by beginJob().