CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
HGCalShowerSeparation Class Reference
Inheritance diagram for HGCalShowerSeparation:
DQMEDAnalyzer edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 HGCalShowerSeparation (const edm::ParameterSet &)
 
 ~HGCalShowerSeparation () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual void dqmBeginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
virtual void dqmEndLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) 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
 
ESProxyIndex const * esGetTokenIndices (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::vector< ModuleDescription const * > &modules, 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
 
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::EDProducerBase
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 bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void fillWithRecHits (std::map< DetId, const HGCRecHit * > &, DetId, unsigned int, float, int &, float &)
 

Private Attributes

edm::EDGetTokenT< std::vector< CaloParticle > > caloParticles_
 
std::vector< MonitorElement * > centers_
 
int debug_
 
MonitorElementdeltaEtaPhi_
 
std::vector< MonitorElement * > distanceOnLayer_
 
MonitorElementenergy1_
 
MonitorElementenergy2_
 
MonitorElementenergytot_
 
MonitorElementeta1_
 
MonitorElementeta2_
 
MonitorElementetaPhi_
 
bool filterOnEnergyAndCaloP_
 
std::vector< MonitorElement * > globalProfileOnLayer_
 
std::vector< MonitorElement * > idealDeltaXY_
 
std::vector< MonitorElement * > idealDistanceOnLayer_
 
MonitorElementlayerDistance_
 
MonitorElementlayerEnergy_
 
std::vector< MonitorElement * > profileOnLayer_
 
edm::EDGetTokenT< HGCRecHitCollectionrecHitsBH_
 
edm::EDGetTokenT< HGCRecHitCollectionrecHitsEE_
 
edm::EDGetTokenT< HGCRecHitCollectionrecHitsFH_
 
hgcal::RecHitTools recHitTools_
 
MonitorElementscEnergy_
 
MonitorElementshowerProfile_
 

Static Private Attributes

static int layers_ = 52
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::ProducerBase
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
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 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<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 43 of file HGCalShowerSeparation.cc.

Constructor & Destructor Documentation

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

Definition at line 86 of file HGCalShowerSeparation.cc.

References caloTruthCellsProducer_cfi::caloParticles, caloParticles_, edm::ParameterSet::getParameter(), recHitsBH_, EcalDeadCellBoundaryEnergyFilter_cfi::recHitsEE, recHitsEE_, and recHitsFH_.

87  : debug_(iConfig.getParameter<int>("debug")),
88  filterOnEnergyAndCaloP_(iConfig.getParameter<bool>("filterOnEnergyAndCaloP")) {
89  auto recHitsEE = iConfig.getParameter<edm::InputTag>("recHitsEE");
90  auto recHitsFH = iConfig.getParameter<edm::InputTag>("recHitsFH");
91  auto recHitsBH = iConfig.getParameter<edm::InputTag>("recHitsBH");
92  auto caloParticles = iConfig.getParameter<edm::InputTag>("caloParticles");
93  recHitsEE_ = consumes<HGCRecHitCollection>(recHitsEE);
94  recHitsFH_ = consumes<HGCRecHitCollection>(recHitsFH);
95  recHitsBH_ = consumes<HGCRecHitCollection>(recHitsBH);
96  caloParticles_ = consumes<std::vector<CaloParticle> >(caloParticles);
97 }
edm::EDGetTokenT< HGCRecHitCollection > recHitsEE_
T getParameter(std::string const &) const
edm::EDGetTokenT< HGCRecHitCollection > recHitsFH_
edm::EDGetTokenT< HGCRecHitCollection > recHitsBH_
edm::EDGetTokenT< std::vector< CaloParticle > > caloParticles_
HGCalShowerSeparation::~HGCalShowerSeparation ( )
override

Definition at line 99 of file HGCalShowerSeparation.cc.

99  {
100  // do anything here that needs to be done at desctruction time
101  // (e.g. close files, deallocate resources etc.)
102 }

Member Function Documentation

void HGCalShowerSeparation::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 166 of file HGCalShowerSeparation.cc.

References funct::abs(), caloTruthCellsProducer_cfi::caloParticles, caloParticles_, centers_, funct::cos(), KineDebug3::count(), debug_, deltaEtaPhi_, HLT_2018_cff::distance, distanceOnLayer_, HCALHighEnergyHPDFilter_cfi::energy, SimCluster::energy(), energy1_, energy2_, energytot_, HLT_2018_cff::eta1, eta1_, HLT_2018_cff::eta2, eta2_, etaPhi_, JetChargeProducer_cfi::exp, dqm::impl::MonitorElement::Fill(), filterOnEnergyAndCaloP_, edm::Event::getByToken(), hgcal::RecHitTools::getEventSetup(), hgcal::RecHitTools::getLayerWithOffset(), hgcal::RecHitTools::getPosition(), globalProfileOnLayer_, SimCluster::hits_and_fractions(), mps_fire::i, idealDeltaXY_, idealDistanceOnLayer_, IfLogTrace, layerDistance_, layerEnergy_, or, profileOnLayer_, recHitsBH_, recHitsEE_, recHitsFH_, recHitTools_, scEnergy_, showerProfile_, SimCluster::simEnergy(), funct::sin(), edm::RefVector< C, T, F >::size(), findQualityFiles::size, mathSSE::sqrt(), funct::tan(), PV3DBase< T, PVType, FrameType >::x(), testProducerWithPsetDescEmpty_cfi::x1, testProducerWithPsetDescEmpty_cfi::x2, testProducerWithPsetDescEmpty_cfi::y1, and testProducerWithPsetDescEmpty_cfi::y2.

166  {
167  using namespace edm;
168 
169  recHitTools_.getEventSetup(iSetup);
170 
171  Handle<HGCRecHitCollection> recHitHandleEE;
172  Handle<HGCRecHitCollection> recHitHandleFH;
173  Handle<HGCRecHitCollection> recHitHandleBH;
174 
175  Handle<std::vector<CaloParticle> > caloParticleHandle;
176  iEvent.getByToken(caloParticles_, caloParticleHandle);
177  const std::vector<CaloParticle>& caloParticles = *caloParticleHandle;
178 
179  iEvent.getByToken(recHitsEE_, recHitHandleEE);
180  iEvent.getByToken(recHitsFH_, recHitHandleFH);
181  iEvent.getByToken(recHitsBH_, recHitHandleBH);
182  const auto& rechitsEE = *recHitHandleEE;
183  const auto& rechitsFH = *recHitHandleFH;
184  const auto& rechitsBH = *recHitHandleBH;
185 
186  std::map<DetId, const HGCRecHit*> hitmap;
187  for (unsigned int i = 0; i < rechitsEE.size(); ++i) {
188  hitmap[rechitsEE[i].detid()] = &rechitsEE[i];
189  }
190  for (unsigned int i = 0; i < rechitsFH.size(); ++i) {
191  hitmap[rechitsFH[i].detid()] = &rechitsFH[i];
192  }
193  for (unsigned int i = 0; i < rechitsBH.size(); ++i) {
194  hitmap[rechitsBH[i].detid()] = &rechitsBH[i];
195  }
196 
197  // loop over caloParticles
198  IfLogTrace(debug_ > 0, "HGCalShowerSeparation") << "Number of caloParticles: " << caloParticles.size() << std::endl;
199  if (caloParticles.size() == 2) {
200  auto eta1 = caloParticles[0].eta();
201  auto phi1 = caloParticles[0].phi();
202  auto theta1 = 2. * atan(exp(-eta1));
203  auto eta2 = caloParticles[1].eta();
204  auto phi2 = caloParticles[1].phi();
205  auto theta2 = 2. * atan(exp(-eta2));
206  eta1_->Fill(eta1);
207  eta2_->Fill(eta2);
208 
209  // Select event only if the sum of the energy of its recHits
210  // is close enough to the gen energy
211  int count = 0;
212  int size = 0;
213  float energy = 0.;
214  float energy_tmp = 0.;
215  for (const auto& it_caloPart : caloParticles) {
216  count++;
217  const SimClusterRefVector& simClusterRefVector = it_caloPart.simClusters();
218  size += simClusterRefVector.size();
219  for (const auto& it_sc : simClusterRefVector) {
220  const SimCluster& simCluster = (*(it_sc));
221  const std::vector<std::pair<uint32_t, float> >& hits_and_fractions = simCluster.hits_and_fractions();
222  for (const auto& it_haf : hits_and_fractions) {
223  if (hitmap.count(it_haf.first))
224  energy += hitmap[it_haf.first]->energy() * it_haf.second;
225  } //hits and fractions
226  } // simcluster
227  if (count == 1) {
228  energy1_->Fill(energy);
229  energy_tmp = energy;
230  } else {
231  energy2_->Fill(energy - energy_tmp);
232  }
233  } // caloParticle
234  energytot_->Fill(energy);
235  if (filterOnEnergyAndCaloP_ && (energy < 2. * 0.8 * 80 or size != 2))
236  return;
237 
238  deltaEtaPhi_->Fill(eta1 - eta2, phi1 - phi2);
239 
240  for (const auto& it_caloPart : caloParticles) {
241  const SimClusterRefVector& simClusterRefVector = it_caloPart.simClusters();
242  IfLogTrace(debug_ > 0, "HGCalShowerSeparation") << ">>> " << simClusterRefVector.size() << std::endl;
243  for (const auto& it_sc : simClusterRefVector) {
244  const SimCluster& simCluster = (*(it_sc));
245  if (simCluster.energy() < 80 * 0.8)
246  continue;
247  scEnergy_->Fill(simCluster.energy());
248  IfLogTrace(debug_ > 1, "HGCalShowerSeparation")
249  << ">>> SC.energy(): " << simCluster.energy() << " SC.simEnergy(): " << simCluster.simEnergy() << std::endl;
250  const std::vector<std::pair<uint32_t, float> >& hits_and_fractions = simCluster.hits_and_fractions();
251 
252  for (const auto& it_haf : hits_and_fractions) {
253  if (!hitmap.count(it_haf.first))
254  continue;
255  unsigned int hitlayer = recHitTools_.getLayerWithOffset(it_haf.first);
256  auto global = recHitTools_.getPosition(it_haf.first);
257  float globalx = global.x();
258  float globaly = global.y();
259  float globalz = global.z();
260  if (globalz == 0)
261  continue;
262  auto rho1 = globalz * tan(theta1);
263  auto rho2 = globalz * tan(theta2);
264  auto x1 = rho1 * cos(phi1);
265  auto y1 = rho1 * sin(phi1);
266  auto x2 = rho2 * cos(phi2);
267  auto y2 = rho2 * sin(phi2);
268  auto half_point_x = (x1 + x2) / 2.;
269  auto half_point_y = (y1 + y2) / 2.;
270  auto half_point = sqrt((x1 - half_point_x) * (x1 - half_point_x) + (y1 - half_point_y) * (y1 - half_point_y));
271  auto d_len = sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
272  auto dn_x = (x2 - x1) / d_len;
273  auto dn_y = (y2 - y1) / d_len;
274  auto distance = (globalx - x1) * dn_x + (globaly - y1) * dn_y;
275  distance -= half_point;
276  auto idealDistance = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
277  if (hitmap.count(it_haf.first)) {
278  profileOnLayer_[hitlayer]->Fill(10. * (globalx - half_point_x),
279  10. * (globaly - half_point_y),
280  hitmap[it_haf.first]->energy() * it_haf.second);
281  profileOnLayer_[55]->Fill(10. * (globalx - half_point_x),
282  10. * (globaly - half_point_y),
283  hitmap[it_haf.first]->energy() * it_haf.second);
284  globalProfileOnLayer_[hitlayer]->Fill(globalx, globaly, hitmap[it_haf.first]->energy() * it_haf.second);
285  globalProfileOnLayer_[55]->Fill(globalx, globaly, hitmap[it_haf.first]->energy() * it_haf.second);
286  layerEnergy_->Fill(hitlayer, hitmap[it_haf.first]->energy());
287  layerDistance_->Fill(hitlayer, std::abs(10. * distance), hitmap[it_haf.first]->energy() * it_haf.second);
288  etaPhi_->Fill(global.eta(), global.phi());
289  distanceOnLayer_[hitlayer]->Fill(10. * distance); //,
290  idealDistanceOnLayer_[hitlayer]->Fill(10. * idealDistance); //,
291  idealDeltaXY_[hitlayer]->Fill(10. * (x1 - x2), 10. * (y1 - y2)); //,
292  centers_[hitlayer]->Fill(10. * half_point_x, 10. * half_point_y); //,
293  IfLogTrace(debug_ > 0, "HGCalShowerSeparation")
294  << ">>> " << distance << " " << hitlayer << " " << hitmap[it_haf.first]->energy() * it_haf.second
295  << std::endl;
296  showerProfile_->Fill(10. * distance, hitlayer, hitmap[it_haf.first]->energy() * it_haf.second);
297  }
298  } // end simHit
299  } // end simCluster
300  } // end caloparticle
301  }
302 }
size
Write out results.
edm::EDGetTokenT< HGCRecHitCollection > recHitsEE_
edm::EDGetTokenT< HGCRecHitCollection > recHitsFH_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
std::vector< MonitorElement * > globalProfileOnLayer_
#define IfLogTrace(cond, cat)
std::vector< MonitorElement * > idealDeltaXY_
std::vector< MonitorElement * > profileOnLayer_
void getEventSetup(const edm::EventSetup &)
Definition: RecHitTools.cc:70
void Fill(long long x)
edm::EDGetTokenT< HGCRecHitCollection > recHitsBH_
Monte Carlo truth information used for tracking validation.
Definition: SimCluster.h:29
T sqrt(T t)
Definition: SSEVec.h:19
edm::EDGetTokenT< std::vector< CaloParticle > > caloParticles_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
std::vector< MonitorElement * > distanceOnLayer_
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
float energy() const
Energy. Note this is taken from the first SimTrack only.
Definition: SimCluster.h:104
float simEnergy() const
returns the accumulated sim energy in the cluster
Definition: SimCluster.h:196
hgcal::RecHitTools recHitTools_
unsigned int getLayerWithOffset(const DetId &) const
Definition: RecHitTools.cc:355
MonitorElement * layerDistance_
GlobalPoint getPosition(const DetId &id) const
Definition: RecHitTools.cc:129
HLT enums.
std::vector< MonitorElement * > centers_
size_type size() const
Size of the RefVector.
Definition: RefVector.h:102
std::vector< MonitorElement * > idealDistanceOnLayer_
T x() const
Definition: PV3DBase.h:59
MonitorElement * showerProfile_
std::vector< std::pair< uint32_t, float > > hits_and_fractions() const
Returns list of rechit IDs and fractions for this SimCluster.
Definition: SimCluster.h:181
void HGCalShowerSeparation::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &   
)
overrideprivatevirtual

Implements DQMEDAnalyzer.

Definition at line 104 of file HGCalShowerSeparation.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book1D(), dqm::dqmstoreimpl::DQMStore::IBooker::book2D(), dqm::dqmstoreimpl::DQMStore::IBooker::cd(), centers_, deltaEtaPhi_, distanceOnLayer_, energy1_, energy2_, energytot_, eta1_, eta2_, etaPhi_, globalProfileOnLayer_, mps_fire::i, idealDeltaXY_, idealDistanceOnLayer_, layerDistance_, layerEnergy_, layers_, profileOnLayer_, scEnergy_, dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder(), showerProfile_, and AlCaHLTBitMon_QueryRunRegistry::string.

106  {
107  ibooker.cd();
108  ibooker.setCurrentFolder("HGCalShowerSeparation");
109  scEnergy_ = ibooker.book1D("SCEnergy", "SCEnergy", 240, 0., 120.);
110  eta1_ = ibooker.book1D("eta1", "eta1", 80, 0., 4.);
111  eta2_ = ibooker.book1D("eta2", "eta2", 80, 0., 4.);
112  energy1_ = ibooker.book1D("energy1", "energy1", 240, 0., 120.);
113  energy2_ = ibooker.book1D("energy2", "energy2", 240, 0., 120.);
114  energytot_ = ibooker.book1D("energytot", "energytot", 200, 100., 200.);
115  showerProfile_ = ibooker.book2D("ShowerProfile", "ShowerProfile", 800, -400., 400., layers_, 0., (float)layers_);
116  layerEnergy_ = ibooker.book2D("LayerEnergy", "LayerEnergy", 60, 0., 60., 50, 0., 0.1);
117  layerDistance_ = ibooker.book2D("LayerDistance", "LayerDistance", 60, 0., 60., 400, -400., 400.);
118  etaPhi_ = ibooker.book2D("EtaPhi", "EtaPhi", 800, -4., 4., 800, -4., 4.);
119  deltaEtaPhi_ = ibooker.book2D("DeltaEtaPhi", "DeltaEtaPhi", 100, -0.5, 0.5, 100, -0.5, 0.5);
120  for (int i = 0; i < layers_; ++i) {
121  profileOnLayer_.push_back(ibooker.book2D(std::string("ProfileOnLayer_") + std::to_string(i),
122  std::string("ProfileOnLayer_") + std::to_string(i),
123  120,
124  -600.,
125  600.,
126  120,
127  -600.,
128  600.));
129  globalProfileOnLayer_.push_back(ibooker.book2D(std::string("GlobalProfileOnLayer_") + std::to_string(i),
130  std::string("GlobalProfileOnLayer_") + std::to_string(i),
131  320,
132  -160.,
133  160.,
134  320,
135  -160.,
136  160.));
137  distanceOnLayer_.push_back(ibooker.book1D(std::string("DistanceOnLayer_") + std::to_string(i),
138  std::string("DistanceOnLayer_") + std::to_string(i),
139  120,
140  -600.,
141  600.));
142  idealDistanceOnLayer_.push_back(ibooker.book1D(std::string("IdealDistanceOnLayer_") + std::to_string(i),
143  std::string("IdealDistanceOnLayer_") + std::to_string(i),
144  120,
145  -600.,
146  600.));
147  idealDeltaXY_.push_back(ibooker.book2D(std::string("IdealDeltaXY_") + std::to_string(i),
148  std::string("IdealDeltaXY_") + std::to_string(i),
149  800,
150  -400.,
151  400.,
152  800,
153  -400.,
154  400.));
155  centers_.push_back(ibooker.book2D(std::string("Centers_") + std::to_string(i),
156  std::string("Centers_") + std::to_string(i),
157  320,
158  -1600.,
159  1600.,
160  320,
161  -1600.,
162  1600.));
163  }
164 }
std::vector< MonitorElement * > globalProfileOnLayer_
std::vector< MonitorElement * > idealDeltaXY_
std::vector< MonitorElement * > profileOnLayer_
std::vector< MonitorElement * > distanceOnLayer_
MonitorElement * layerDistance_
std::vector< MonitorElement * > centers_
std::vector< MonitorElement * > idealDistanceOnLayer_
MonitorElement * showerProfile_
void HGCalShowerSeparation::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 306 of file HGCalShowerSeparation.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), DEFINE_FWK_MODULE, and HLT_2018_cff::InputTag.

306  {
308  desc.add<int>("debug", 1);
309  desc.add<bool>("filterOnEnergyAndCaloP", false);
310  desc.add<edm::InputTag>("caloParticles", edm::InputTag("mix", "MergedCaloTruth"));
311  desc.add<edm::InputTag>("recHitsEE", edm::InputTag("HGCalRecHit", "HGCEERecHits"));
312  desc.add<edm::InputTag>("recHitsFH", edm::InputTag("HGCalRecHit", "HGCHEFRecHits"));
313  desc.add<edm::InputTag>("recHitsBH", edm::InputTag("HGCalRecHit", "HGCHEBRecHits"));
314  descriptions.add("hgcalShowerSeparationDefault", desc);
315 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void HGCalShowerSeparation::fillWithRecHits ( std::map< DetId, const HGCRecHit * > &  ,
DetId  ,
unsigned  int,
float  ,
int &  ,
float &   
)
private

Member Data Documentation

edm::EDGetTokenT<std::vector<CaloParticle> > HGCalShowerSeparation::caloParticles_
private

Definition at line 59 of file HGCalShowerSeparation.cc.

Referenced by analyze(), and HGCalShowerSeparation().

std::vector<MonitorElement*> HGCalShowerSeparation::centers_
private

Definition at line 81 of file HGCalShowerSeparation.cc.

Referenced by analyze(), and bookHistograms().

int HGCalShowerSeparation::debug_
private

Definition at line 61 of file HGCalShowerSeparation.cc.

Referenced by analyze().

MonitorElement* HGCalShowerSeparation::deltaEtaPhi_
private

Definition at line 75 of file HGCalShowerSeparation.cc.

Referenced by analyze(), and bookHistograms().

std::vector<MonitorElement*> HGCalShowerSeparation::distanceOnLayer_
private

Definition at line 78 of file HGCalShowerSeparation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HGCalShowerSeparation::energy1_
private

Definition at line 67 of file HGCalShowerSeparation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HGCalShowerSeparation::energy2_
private

Definition at line 68 of file HGCalShowerSeparation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HGCalShowerSeparation::energytot_
private

Definition at line 69 of file HGCalShowerSeparation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HGCalShowerSeparation::eta1_
private

Definition at line 65 of file HGCalShowerSeparation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HGCalShowerSeparation::eta2_
private

Definition at line 66 of file HGCalShowerSeparation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HGCalShowerSeparation::etaPhi_
private

Definition at line 74 of file HGCalShowerSeparation.cc.

Referenced by analyze(), and bookHistograms().

bool HGCalShowerSeparation::filterOnEnergyAndCaloP_
private

Definition at line 62 of file HGCalShowerSeparation.cc.

Referenced by analyze().

std::vector<MonitorElement*> HGCalShowerSeparation::globalProfileOnLayer_
private

Definition at line 77 of file HGCalShowerSeparation.cc.

Referenced by analyze(), and bookHistograms().

std::vector<MonitorElement*> HGCalShowerSeparation::idealDeltaXY_
private

Definition at line 80 of file HGCalShowerSeparation.cc.

Referenced by analyze(), and bookHistograms().

std::vector<MonitorElement*> HGCalShowerSeparation::idealDistanceOnLayer_
private

Definition at line 79 of file HGCalShowerSeparation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HGCalShowerSeparation::layerDistance_
private

Definition at line 73 of file HGCalShowerSeparation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HGCalShowerSeparation::layerEnergy_
private

Definition at line 72 of file HGCalShowerSeparation.cc.

Referenced by analyze(), and bookHistograms().

int HGCalShowerSeparation::layers_ = 52
staticprivate

Definition at line 83 of file HGCalShowerSeparation.cc.

Referenced by bookHistograms().

std::vector<MonitorElement*> HGCalShowerSeparation::profileOnLayer_
private

Definition at line 76 of file HGCalShowerSeparation.cc.

Referenced by analyze(), and bookHistograms().

edm::EDGetTokenT<HGCRecHitCollection> HGCalShowerSeparation::recHitsBH_
private

Definition at line 58 of file HGCalShowerSeparation.cc.

Referenced by analyze(), and HGCalShowerSeparation().

edm::EDGetTokenT<HGCRecHitCollection> HGCalShowerSeparation::recHitsEE_
private

Definition at line 56 of file HGCalShowerSeparation.cc.

Referenced by analyze(), and HGCalShowerSeparation().

edm::EDGetTokenT<HGCRecHitCollection> HGCalShowerSeparation::recHitsFH_
private

Definition at line 57 of file HGCalShowerSeparation.cc.

Referenced by analyze(), and HGCalShowerSeparation().

hgcal::RecHitTools HGCalShowerSeparation::recHitTools_
private

Definition at line 63 of file HGCalShowerSeparation.cc.

Referenced by analyze().

MonitorElement* HGCalShowerSeparation::scEnergy_
private

Definition at line 70 of file HGCalShowerSeparation.cc.

Referenced by analyze(), and bookHistograms().

MonitorElement* HGCalShowerSeparation::showerProfile_
private

Definition at line 71 of file HGCalShowerSeparation.cc.

Referenced by analyze(), and bookHistograms().