CMS 3D CMS Logo

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

Public Member Functions

 CTPPSLHCInfoPlotter (const edm::ParameterSet &)
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > 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
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices 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)
 

Private Member Functions

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

Private Attributes

TH2D * h2_betaStar_vs_xangle_
 
TH1D * h_beamEnergy_
 
TH1D * h_betaStar_
 
TH1D * h_fill_
 
TH1D * h_run_
 
TH1D * h_xangle_
 
edm::ESGetToken< LHCInfo, LHCInfoRcdlhcInfoESToken_
 
std::string outputFile_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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 ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 22 of file CTPPSLHCInfoPlotter.cc.

Constructor & Destructor Documentation

◆ CTPPSLHCInfoPlotter()

CTPPSLHCInfoPlotter::CTPPSLHCInfoPlotter ( const edm::ParameterSet iConfig)
explicit

Definition at line 52 of file CTPPSLHCInfoPlotter.cc.

54  : lhcInfoESToken_(esConsumes(ESInputTag("", iConfig.getParameter<std::string>("lhcInfoLabel")))),
55  outputFile_(iConfig.getParameter<string>("outputFile")),
56 
57  h_beamEnergy_(new TH1D("h_beamEnergy", ";beam energy (GeV)", 81, -50., 8050.)),
58  h_xangle_(new TH1D("h_xangle", ";(half) crossing angle (#murad)", 201, -0.5, 200.5)),
59  h_betaStar_(new TH1D("h_betaStar", ";#beta^{*} (m)", 101, -0.005, 1.005)),
60  h2_betaStar_vs_xangle_(new TH2D("h2_betaStar_vs_xangle",
61  ";(half) crossing angle (#murad);#beta^{*} (m)",
62  201,
63  -0.5,
64  200.5,
65  101,
66  -0.005,
67  1.005)),
68 
69  h_fill_(new TH1D("h_fill", ";fill", 4001, 3999.5, 8000.5)),

Member Function Documentation

◆ analyze()

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

Implements edm::one::EDAnalyzerBase.

Definition at line 84 of file CTPPSLHCInfoPlotter.cc.

85  {
86  const auto &lhcInfo = iSetup.getData(lhcInfoESToken_);
87 
88  h_beamEnergy_->Fill(lhcInfo.energy());
89  h_xangle_->Fill(lhcInfo.crossingAngle());
90  h_betaStar_->Fill(lhcInfo.betaStar());
91  h2_betaStar_vs_xangle_->Fill(lhcInfo.crossingAngle(), lhcInfo.betaStar());
92 
93  h_fill_->Fill(lhcInfo.fillNumber());
94  h_run_->Fill(iEvent.id().run());

References edm::EventSetup::getData(), h2_betaStar_vs_xangle_, h_beamEnergy_, h_betaStar_, h_fill_, h_run_, h_xangle_, iEvent, and lhcInfoESToken_.

◆ endJob()

void CTPPSLHCInfoPlotter::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 98 of file CTPPSLHCInfoPlotter.cc.

99  {
100  auto f_out = std::make_unique<TFile>(outputFile_.c_str(), "recreate");
101 
102  h_beamEnergy_->Write();
103  h_xangle_->Write();
104  h_betaStar_->Write();
105  h2_betaStar_vs_xangle_->Write();
106 
107  h_fill_->Write();
108  h_run_->Write();

References h2_betaStar_vs_xangle_, h_beamEnergy_, h_betaStar_, h_fill_, h_run_, h_xangle_, and outputFile_.

◆ fillDescriptions()

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

Definition at line 73 of file CTPPSLHCInfoPlotter.cc.

74  {
76 
77  desc.add<std::string>("lhcInfoLabel", "")->setComment("label of the LHCInfo record");
78  desc.add<std::string>("outputFile", "")->setComment("output file");
79 
80  descriptions.add("ctppsLHCInfoPlotter", desc);

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

Member Data Documentation

◆ h2_betaStar_vs_xangle_

TH2D* CTPPSLHCInfoPlotter::h2_betaStar_vs_xangle_
private

Definition at line 41 of file CTPPSLHCInfoPlotter.cc.

Referenced by analyze(), and endJob().

◆ h_beamEnergy_

TH1D* CTPPSLHCInfoPlotter::h_beamEnergy_
private

Definition at line 38 of file CTPPSLHCInfoPlotter.cc.

Referenced by analyze(), and endJob().

◆ h_betaStar_

TH1D* CTPPSLHCInfoPlotter::h_betaStar_
private

Definition at line 40 of file CTPPSLHCInfoPlotter.cc.

Referenced by analyze(), and endJob().

◆ h_fill_

TH1D* CTPPSLHCInfoPlotter::h_fill_
private

Definition at line 43 of file CTPPSLHCInfoPlotter.cc.

Referenced by analyze(), and endJob().

◆ h_run_

TH1D* CTPPSLHCInfoPlotter::h_run_
private

Definition at line 44 of file CTPPSLHCInfoPlotter.cc.

Referenced by analyze(), and endJob().

◆ h_xangle_

TH1D* CTPPSLHCInfoPlotter::h_xangle_
private

Definition at line 39 of file CTPPSLHCInfoPlotter.cc.

Referenced by analyze(), and endJob().

◆ lhcInfoESToken_

edm::ESGetToken<LHCInfo, LHCInfoRcd> CTPPSLHCInfoPlotter::lhcInfoESToken_
private

Definition at line 34 of file CTPPSLHCInfoPlotter.cc.

Referenced by analyze().

◆ outputFile_

std::string CTPPSLHCInfoPlotter::outputFile_
private

Definition at line 36 of file CTPPSLHCInfoPlotter.cc.

Referenced by endJob().

edm::ESInputTag
Definition: ESInputTag.h:87
CTPPSLHCInfoPlotter::h_xangle_
TH1D * h_xangle_
Definition: CTPPSLHCInfoPlotter.cc:39
CTPPSLHCInfoPlotter::h2_betaStar_vs_xangle_
TH2D * h2_betaStar_vs_xangle_
Definition: CTPPSLHCInfoPlotter.cc:41
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
CTPPSLHCInfoPlotter::lhcInfoESToken_
edm::ESGetToken< LHCInfo, LHCInfoRcd > lhcInfoESToken_
Definition: CTPPSLHCInfoPlotter.cc:34
CTPPSLHCInfoPlotter::outputFile_
std::string outputFile_
Definition: CTPPSLHCInfoPlotter.cc:36
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CTPPSLHCInfoPlotter::h_betaStar_
TH1D * h_betaStar_
Definition: CTPPSLHCInfoPlotter.cc:40
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:127
CTPPSLHCInfoPlotter::h_fill_
TH1D * h_fill_
Definition: CTPPSLHCInfoPlotter.cc:43
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
CTPPSLHCInfoPlotter::h_run_
TH1D * h_run_
Definition: CTPPSLHCInfoPlotter.cc:44
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDConsumerBase::esConsumes
auto esConsumes()
Definition: EDConsumerBase.h:202
CTPPSLHCInfoPlotter::h_beamEnergy_
TH1D * h_beamEnergy_
Definition: CTPPSLHCInfoPlotter.cc:38