CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends
PPSAssociationCuts Class Reference

#include <PPSAssociationCuts.h>

Classes

class  CutsPerArm
 

Public Member Functions

const CutsPerArmgetAssociationCuts (const int sector) const
 
void initialize ()
 
bool isValid () const
 
 PPSAssociationCuts ()
 
 PPSAssociationCuts (const edm::ParameterSet &iConfig)
 
 ~PPSAssociationCuts ()
 

Static Public Member Functions

static edm::ParameterSetDescription getDefaultParameters ()
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

std::map< unsigned int, CutsPerArmassociation_cuts_
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Definition at line 22 of file PPSAssociationCuts.h.

Constructor & Destructor Documentation

◆ PPSAssociationCuts() [1/2]

PPSAssociationCuts::PPSAssociationCuts ( )
inline

Definition at line 67 of file PPSAssociationCuts.h.

67 {}

◆ PPSAssociationCuts() [2/2]

PPSAssociationCuts::PPSAssociationCuts ( const edm::ParameterSet iConfig)

Definition at line 80 of file PPSAssociationCuts.cc.

References association_cuts_, mps_fire::i, and initialize().

80  {
81  unsigned int i = 0;
82  for (const int &sector : {45, 56})
83  association_cuts_[i++] = CutsPerArm(iConfig, sector);
84 
85  initialize();
86 }
std::map< unsigned int, CutsPerArm > association_cuts_

◆ ~PPSAssociationCuts()

PPSAssociationCuts::~PPSAssociationCuts ( )
inline

Definition at line 71 of file PPSAssociationCuts.h.

71 {}

Member Function Documentation

◆ getAssociationCuts()

const CutsPerArm& PPSAssociationCuts::getAssociationCuts ( const int  sector) const
inline

Definition at line 79 of file PPSAssociationCuts.h.

References association_cuts_.

Referenced by CTPPSProtonReconstructionPlotter::analyze(), operator<<(), and CTPPSProtonProducer::produce().

79 { return association_cuts_.find(sector)->second; }
std::map< unsigned int, CutsPerArm > association_cuts_

◆ getDefaultParameters()

edm::ParameterSetDescription PPSAssociationCuts::getDefaultParameters ( )
static

Definition at line 90 of file PPSAssociationCuts.cc.

References submitPVResolutionJobs::desc, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by cmsswVersionTools.PickRelValInputFiles::__call__(), cmsswVersionTools.PickRelValInputFiles::__init__(), cmsswVersionTools.PickRelValInputFiles::apply(), and PPSAssociationCutsESSource::getIOVDefaultParameters().

90  {
92 
93  desc.add<std::string>("x_cut_mean", "")->setComment("mean of track-association cut in x, mm");
94  desc.add<std::string>("x_cut_threshold", "")->setComment("threshold of track-association cut in x, mm");
95 
96  desc.add<std::string>("y_cut_mean", "")->setComment("mean of track-association cut in y, mm");
97  desc.add<std::string>("y_cut_threshold", "")->setComment("threshold of track-association cut in y, mm");
98 
99  desc.add<std::string>("xi_cut_mean", "")->setComment("mean of track-association cut in xi");
100  desc.add<std::string>("xi_cut_threshold", "")->setComment("threshold of track-association cut in xi");
101 
102  desc.add<std::string>("th_y_cut_mean", "")->setComment("mean of track-association cut in th_y, rad");
103  desc.add<std::string>("th_y_cut_threshold", "")->setComment("threshold of track-association cut in th_y, rad");
104 
105  desc.add<double>("ti_tr_min", -1.)->setComment("minimum value for timing-tracking association cut");
106  desc.add<double>("ti_tr_max", +1.)->setComment("maximum value for timing-tracking association cut");
107 
108  return desc;
109 }

◆ initialize()

void PPSAssociationCuts::initialize ( )

Definition at line 128 of file PPSAssociationCuts.cc.

References association_cuts_, Exception, isValid(), and AlCaHLTBitMon_ParallelJobs::p.

Referenced by PPSAssociationCuts().

128  {
129  if (!isValid())
130  throw cms::Exception("PPS") << "Invalid structure of PPSAssociationCuts.";
131 
132  for (auto &p : association_cuts_)
133  p.second.buildFunctions();
134 }
std::map< unsigned int, CutsPerArm > association_cuts_

◆ isValid()

bool PPSAssociationCuts::isValid ( void  ) const

Definition at line 113 of file PPSAssociationCuts.cc.

References association_cuts_.

Referenced by ntupleDataFormat._Object::_checkIsValid(), initialize(), and core.AutoHandle.AutoHandle::ReallyLoad().

113  {
114  // valid if association_cuts_ have two entries, with keys 0 and 1
115  if (association_cuts_.size() != 2)
116  return false;
117 
118  if (association_cuts_.find(0) == association_cuts_.end())
119  return false;
120  if (association_cuts_.find(1) == association_cuts_.end())
121  return false;
122 
123  return true;
124 }
std::map< unsigned int, CutsPerArm > association_cuts_

◆ serialize()

template<class Archive >
void PPSAssociationCuts::serialize ( Archive &  ar,
const unsigned int  version 
)
private

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 86 of file PPSAssociationCuts.h.

◆ cond::serialization::access

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 86 of file PPSAssociationCuts.h.

Member Data Documentation

◆ association_cuts_

std::map<unsigned int, CutsPerArm> PPSAssociationCuts::association_cuts_
private

Definition at line 84 of file PPSAssociationCuts.h.

Referenced by getAssociationCuts(), initialize(), isValid(), and PPSAssociationCuts().