CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
PreshowerPhiClusterProducer Class Reference

#include <PreshowerPhiClusterProducer.h>

Inheritance diagram for PreshowerPhiClusterProducer:
edm::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Types

typedef math::XYZPoint Point
 
- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

 PreshowerPhiClusterProducer (const edm::ParameterSet &ps)
 
virtual void produce (edm::Event &evt, const edm::EventSetup &es)
 
void set (const edm::EventSetup &es)
 
 ~PreshowerPhiClusterProducer ()
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- 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 ()
 
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, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

double aEta_ [4]
 
double alpha0_
 
double alpha1_
 
double alpha2_
 
double alpha3_
 
std::string assocSClusterCollection_
 
double bEta_ [4]
 
edm::EDGetTokenT< reco::SuperClusterCollectionendcapSClusterToken_
 
edm::ESHandle< ESChannelStatusesChannelStatus_
 
edm::ESHandle< ESEEIntercalibConstantsesEEInterCalib_
 
edm::ESHandle< ESGainesgain_
 
edm::ESHandle< ESMIPToGeVConstantesMIPToGeV_
 
edm::ESHandle< ESMissingEnergyCalibrationesMissingECalib_
 
float esPhiClusterDeltaEta_
 
float esPhiClusterDeltaPhi_
 
double etThresh_
 
double gamma0_
 
double gamma1_
 
double gamma2_
 
double gamma3_
 
double mip_
 
int nEvt_
 
PreshowerPhiClusterAlgopresh_algo
 
std::string preshClusterCollectionX_
 
std::string preshClusterCollectionY_
 
edm::EDGetTokenT< EcalRecHitCollectionpreshHitToken_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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 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)
 

Detailed Description

Definition at line 21 of file PreshowerPhiClusterProducer.h.

Member Typedef Documentation

Definition at line 25 of file PreshowerPhiClusterProducer.h.

Constructor & Destructor Documentation

PreshowerPhiClusterProducer::PreshowerPhiClusterProducer ( const edm::ParameterSet ps)
explicit

Definition at line 44 of file PreshowerPhiClusterProducer.cc.

References edm::ParameterSet::getParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

44  {
45 
46  // use configuration file to setup input/output collection names
48  consumes<EcalRecHitCollection>(ps.getParameter<edm::InputTag>("preshRecHitProducer"));
49 
50  // Name of a SuperClusterCollection to make associations:
52  consumes<reco::SuperClusterCollection>(ps.getParameter<edm::InputTag>("endcapSClusterProducer"));
53 
54  // Output collections:
55  preshClusterCollectionX_ = ps.getParameter<std::string>("preshClusterCollectionX");
56  preshClusterCollectionY_ = ps.getParameter<std::string>("preshClusterCollectionY");
57 
58  assocSClusterCollection_ = ps.getParameter<std::string>("assocSClusterCollection");
59 
60  produces< reco::PreshowerClusterCollection >(preshClusterCollectionX_);
61  produces< reco::PreshowerClusterCollection >(preshClusterCollectionY_);
62  produces< reco::SuperClusterCollection >(assocSClusterCollection_);
63 
64  float esStripECut = ps.getParameter<double>("esStripEnergyCut");
65  esPhiClusterDeltaEta_ = ps.getParameter<double>("esPhiClusterDeltaEta");
66  esPhiClusterDeltaPhi_ = ps.getParameter<double>("esPhiClusterDeltaPhi");
67 
68  etThresh_ = ps.getParameter<double>("etThresh");
69 
70  presh_algo = new PreshowerPhiClusterAlgo(esStripECut);
71 }
T getParameter(std::string const &) const
PreshowerPhiClusterAlgo * presh_algo
edm::EDGetTokenT< reco::SuperClusterCollection > endcapSClusterToken_
edm::EDGetTokenT< EcalRecHitCollection > preshHitToken_
PreshowerPhiClusterProducer::~PreshowerPhiClusterProducer ( )

Definition at line 73 of file PreshowerPhiClusterProducer.cc.

73  {
74  delete presh_algo;
75 }
PreshowerPhiClusterAlgo * presh_algo

Member Function Documentation

void PreshowerPhiClusterProducer::produce ( edm::Event evt,
const edm::EventSetup es 
)
virtual

Definition at line 77 of file PreshowerPhiClusterProducer.cc.

References edm::SortedCollection< T, SORT >::begin(), GetRecoTauVFromDQM_MC_cff::cl2, reco::deltaPhi(), MillePedeFileConverter_cfg::e, reco::e1, reco::e2, DetId::Ecal, EcalPreshower, edm::SortedCollection< T, SORT >::end(), SimCluster::energy(), reco::CaloCluster::energy(), ESCondObjectContainer< T >::find(), geometry, edm::EventSetup::get(), edm::Event::getByToken(), ESCondObjectContainer< T >::getMap(), CaloGeometry::getSubdetectorGeometry(), LogTrace, fastPrimaryVertexProducer_cfi::maxDeltaPhi, fftjetdijetfilter_cfi::minDeltaPhi, eostools::move(), point, edm::Handle< T >::product(), edm::PtrVector< T >::push_back(), edm::Event::put(), TrackInfoProducer_cfi::rechits, SimDataFormats::CaloAnalysis::sc, reco::PreshowerCluster::setBCRef(), funct::sin(), edm::SortedCollection< T, SORT >::size(), SimCluster::theta(), X, DOFs::Y, and DOFs::Z.

77  {
78 
81 
82  // get the ECAL geometry:
84  es.get<CaloGeometryRecord>().get(geoHandle);
85 
86  // retrieve ES-EE intercalibration constants and channel status
87  set(es);
88  const ESChannelStatus *channelStatus = esChannelStatus_.product();
89 
91  const CaloSubdetectorGeometry *& geometry_p = geometry;
92 
93  // create unique_ptr to a PreshowerClusterCollection
94  auto clusters_p1 = std::make_unique<reco::PreshowerClusterCollection>();
95  auto clusters_p2 = std::make_unique<reco::PreshowerClusterCollection>();
96  // create new collection of corrected super clusters
97  auto superclusters_p = std::make_unique<reco::SuperClusterCollection>();
98 
99  CaloSubdetectorTopology * topology_p=0;
100  if (geometry)
101  topology_p = new EcalPreshowerTopology(geoHandle);
102 
103  // fetch the product (pSuperClusters)
104  evt.getByToken(endcapSClusterToken_, pSuperClusters);
105  const reco::SuperClusterCollection* SClusts = pSuperClusters.product();
106 
107  // fetch the product (RecHits)
108  evt.getByToken( preshHitToken_, pRecHits);
109  // pointer to the object in the product
110  const EcalRecHitCollection* rechits = pRecHits.product(); // EcalRecHitCollection hit_collection = *rhcHandle;
111 
112  LogTrace("EcalClusters") << "PreshowerPhiClusterProducerInfo: ### Total # of preshower RecHits: "<< rechits->size();
113 
114  // make the map of rechits:
115  std::map<DetId, EcalRecHit> rechits_map;
117  for (it = rechits->begin(); it != rechits->end(); it++) {
118  // remove bad ES rechits
119  if (it->recoFlag()==1 || it->recoFlag()==14 || (it->recoFlag()<=10 && it->recoFlag()>=5)) continue;
120  //Make the map of DetID, EcalRecHit pairs
121  rechits_map.insert(std::make_pair(it->id(), *it));
122  }
123  // The set of used DetID's for a given event:
124  std::set<DetId> used_strips;
125  used_strips.clear();
126  LogTrace("EcalClusters") << "PreshowerPhiClusterProducerInfo: ### rechits_map of size " << rechits_map.size() <<" was created!";
127 
128  reco::PreshowerClusterCollection clusters1, clusters2; // output collection of corrected PCs
129  reco::SuperClusterCollection new_SC; // output collection of corrected SCs
130 
131  //make cycle over super clusters
132  reco::SuperClusterCollection::const_iterator it_super;
133  int isc = 0;
134  for (it_super=SClusts->begin(); it_super!=SClusts->end(); ++it_super) {
135 
136  float e1 = 0;
137  float e2 = 0;
138  float deltaE = 0;
139 
141  ++isc;
142  LogTrace("EcalClusters")<< " superE = " << it_super->energy() << " superETA = " << it_super->eta() << " superPHI = " << it_super->phi() ;
143 
144  //cout<<"=== new SC ==="<<endl;
145  //cout<<"superE = "<<it_super->energy()<<" superETA = "<<it_super->eta()<<" superPHI = "<<it_super->phi()<<endl;
146 
147  int nBC = 0;
148  int condP1 = 1; // 0: dead channel; 1: active channel
149  int condP2 = 1;
150  float maxDeltaPhi = 0;
151  float minDeltaPhi = 0;
152  float refPhi = 0;
153 
154  reco::CaloCluster_iterator bc_iter = it_super->clustersBegin();
155  for ( ; bc_iter !=it_super->clustersEnd(); ++bc_iter) {
156  if (nBC == 0) {
157  refPhi = (*bc_iter)->phi();
158  } else {
159  if (reco::deltaPhi((*bc_iter)->phi(), refPhi) > 0 && reco::deltaPhi((*bc_iter)->phi(), refPhi) > maxDeltaPhi)
160  maxDeltaPhi = reco::deltaPhi((*bc_iter)->phi(), refPhi);
161  if (reco::deltaPhi((*bc_iter)->phi(), refPhi) < 0 && reco::deltaPhi((*bc_iter)->phi(), refPhi) < minDeltaPhi)
162  minDeltaPhi = reco::deltaPhi((*bc_iter)->phi(), refPhi);
163  //cout<<"delta phi : "<<reco::deltaPhi((*bc_iter)->phi(), refPhi)<<endl;
164  }
165  //cout<<"BC : "<<nBC<<" "<<(*bc_iter)->energy()<<" "<<(*bc_iter)->eta()<<" "<<(*bc_iter)->phi()<<endl;
166  nBC++;
167  }
168  maxDeltaPhi += esPhiClusterDeltaPhi_;
169  minDeltaPhi -= esPhiClusterDeltaPhi_;
170 
171  nBC = 0;
172  for (bc_iter = it_super->clustersBegin() ; bc_iter !=it_super->clustersEnd(); ++bc_iter) {
173  if (geometry) {
174 
175  // Get strip position at intersection point of the line EE - Vertex:
176  double X = (*bc_iter)->x();
177  double Y = (*bc_iter)->y();
178  double Z = (*bc_iter)->z();
179  const GlobalPoint point(X,Y,Z);
180 
181  DetId tmp1 = (dynamic_cast<const EcalPreshowerGeometry*>(geometry_p))->getClosestCellInPlane(point, 1);
182  DetId tmp2 = (dynamic_cast<const EcalPreshowerGeometry*>(geometry_p))->getClosestCellInPlane(point, 2);
183  ESDetId strip1 = (tmp1 == DetId(0)) ? ESDetId(0) : ESDetId(tmp1);
184  ESDetId strip2 = (tmp2 == DetId(0)) ? ESDetId(0) : ESDetId(tmp2);
185 
186  if (nBC == 0) {
187  if (strip1 != ESDetId(0) && strip2 != ESDetId(0)) {
188  ESChannelStatusMap::const_iterator status_p1 = channelStatus->getMap().find(strip1);
189  ESChannelStatusMap::const_iterator status_p2 = channelStatus->getMap().find(strip2);
190  if (status_p1->getStatusCode() == 1) condP1 = 0;
191  if (status_p2->getStatusCode() == 1) condP2 = 0;
192  } else if (strip1 == ESDetId(0)) {
193  condP1 = 0;
194  } else if (strip2 == ESDetId(0)) {
195  condP2 = 0;
196  }
197 
198  //cout<<"starting cluster : "<<maxDeltaPhi<<" "<<minDeltaPhi<<" "<<esPhiClusterDeltaEta_<<endl;
199  //cout<<"do plane 1 === "<<strip1.zside()<<" "<<strip1.plane()<<" "<<strip1.six()<<" "<<strip1.siy()<<" "<<strip1.strip()<<endl;
200  // Get a vector of ES clusters (found by the PreshSeeded algorithm) associated with a given EE basic cluster.
201  reco::PreshowerCluster cl1 = presh_algo->makeOneCluster(strip1,&used_strips,&rechits_map,geometry_p,topology_p,esPhiClusterDeltaEta_,minDeltaPhi,maxDeltaPhi);
202  cl1.setBCRef(*bc_iter);
203  clusters1.push_back(cl1);
204  e1 += cl1.energy();
205 
206  //cout<<"do plane 2 === "<<strip2.zside()<<" "<<strip2.plane()<<" "<<strip2.six()<<" "<<strip2.siy()<<" "<<strip2.strip()<<endl;
207  reco::PreshowerCluster cl2 = presh_algo->makeOneCluster(strip2,&used_strips,&rechits_map,geometry_p,topology_p,esPhiClusterDeltaEta_,minDeltaPhi,maxDeltaPhi);
208  cl2.setBCRef(*bc_iter);
209  clusters2.push_back(cl2);
210  e2 += cl2.energy();
211  }
212  }
213 
214  new_BC.push_back(*bc_iter);
215  nBC++;
216  } // end of cycle over BCs
217 
218  LogTrace("EcalClusters") << " For SC #" << isc-1 << ", containing "
219  << it_super->clustersSize()
220  << " basic clusters, PreshowerPhiClusterAlgo made "
221  << clusters1.size() << " in X plane and "
222  << clusters2.size()
223  << " in Y plane " << " preshower clusters " ;
224 
225  // update energy of the SuperCluster
226  if(e1+e2 > 1.0e-10) {
227 
228  e1 = e1 / mip_; // GeV to #MIPs
229  e2 = e2 / mip_;
230 
231  if (condP1 == 1 && condP2 == 1) {
232  deltaE = gamma0_*(e1 + alpha0_*e2);
233  } else if (condP1 == 1 && condP2 == 0) {
234  deltaE = gamma1_*(e1 + alpha1_*e2);
235  } else if (condP1 == 0 && condP2 == 1) {
236  deltaE = gamma2_*(e1 + alpha2_*e2);
237  } else if (condP1 == 0 && condP2 == 0) {
238  deltaE = gamma3_*(e1 + alpha3_*e2);
239  }
240  }
241 
242  //corrected Energy
243  float E = it_super->energy() + deltaE;
244 
245  LogTrace("EcalClusters") << " Creating corrected SC ";
246 
247  reco::SuperCluster sc(E, it_super->position(), it_super->seed(), new_BC, deltaE);
248  sc.setPreshowerEnergyPlane1(e1*mip_);
249  sc.setPreshowerEnergyPlane2(e2*mip_);
250  if (condP1 == 1 && condP2 == 1) sc.setPreshowerPlanesStatus(0);
251  else if (condP1 == 1 && condP2 == 0) sc.setPreshowerPlanesStatus(1);
252  else if (condP1 == 0 && condP2 == 1) sc.setPreshowerPlanesStatus(2);
253  else if (condP1 == 0 && condP2 == 0) sc.setPreshowerPlanesStatus(3);
254 
255  if (etThresh_>0){ // calling postion().theta can be expensive
256  if (sc.energy()*sin(sc.position().theta())>etThresh_ )
257  new_SC.push_back(sc);
258  } else {
259  new_SC.push_back(sc);
260  }
261 
262  } // end of cycle over SCs
263 
264  // copy the preshower clusters into collections and put in the Event:
265  clusters_p1->assign(clusters1.begin(), clusters1.end());
266  clusters_p2->assign(clusters2.begin(), clusters2.end());
267  // put collection of preshower clusters to the event
268  evt.put(std::move(clusters_p1), preshClusterCollectionX_ );
269  evt.put(std::move(clusters_p2), preshClusterCollectionY_ );
270  LogTrace("EcalClusters") << "Preshower clusters added to the event" ;
271 
272  // put collection of corrected super clusters to the event
273  superclusters_p->assign(new_SC.begin(), new_SC.end());
274  evt.put(std::move(superclusters_p), assocSClusterCollection_);
275  LogTrace("EcalClusters") << "Corrected SClusters added to the event" ;
276 
277  if (topology_p) delete topology_p;
278 }
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:45
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:122
PreshowerPhiClusterAlgo * presh_algo
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
void push_back(Ptr< T > const &iPtr)
Definition: PtrVector.h:141
const self & getMap() const
reco::PreshowerCluster makeOneCluster(ESDetId strip, HitsID *used_strips, RecHitsMap *rechits_map, const CaloSubdetectorGeometry *&geometry_p, CaloSubdetectorTopology *&topology_p, double deltaEta, double minDeltaPhi, double maxDeltaPhi)
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
std::vector< EcalRecHit >::const_iterator const_iterator
#define X(str)
Definition: MuonsGrabber.cc:48
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
void setBCRef(const CaloClusterPtr &r)
DetIds of component RecHits – now inherited from CaloCluster.
const_iterator find(uint32_t rawId) const
float energy() const
Energy. Note this is taken from the first SimTrack only.
Definition: SimCluster.h:111
std::vector< PreshowerCluster > PreshowerClusterCollection
collection of PreshowerCluster objects
double energy() const
cluster energy
Definition: CaloCluster.h:124
edm::ESHandle< ESChannelStatus > esChannelStatus_
#define LogTrace(id)
float theta() const
Momentum polar angle. Note this is taken from the first SimTrack only.
Definition: SimCluster.h:166
const_iterator end() const
double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:22
Float e1
Definition: deltaR.h:20
Definition: DetId.h:18
T const * product() const
Definition: Handle.h:81
const T & get() const
Definition: EventSetup.h:56
std::vector< Item >::const_iterator const_iterator
Float e2
Definition: deltaR.h:21
ESHandle< TrackerGeometry > geometry
edm::EDGetTokenT< reco::SuperClusterCollection > endcapSClusterToken_
size_type size() const
edm::EDGetTokenT< EcalRecHitCollection > preshHitToken_
def move(src, dest)
Definition: eostools.py:510
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
const_iterator begin() const
void PreshowerPhiClusterProducer::set ( const edm::EventSetup es)

Definition at line 280 of file PreshowerPhiClusterProducer.cc.

References muonCSCDigis_cfi::gain, edm::EventSetup::get(), ESEEIntercalibConstants::getAlphaHigh0(), ESEEIntercalibConstants::getAlphaHigh1(), ESEEIntercalibConstants::getAlphaHigh2(), ESEEIntercalibConstants::getAlphaHigh3(), ESEEIntercalibConstants::getAlphaLow0(), ESEEIntercalibConstants::getAlphaLow1(), ESEEIntercalibConstants::getAlphaLow2(), ESEEIntercalibConstants::getAlphaLow3(), ESMissingEnergyCalibration::getConstAEta0(), ESMissingEnergyCalibration::getConstAEta1(), ESMissingEnergyCalibration::getConstAEta2(), ESMissingEnergyCalibration::getConstAEta3(), ESMissingEnergyCalibration::getConstBEta0(), ESMissingEnergyCalibration::getConstBEta1(), ESMissingEnergyCalibration::getConstBEta2(), ESMissingEnergyCalibration::getConstBEta3(), ESGain::getESGain(), ESMIPToGeVConstant::getESValueHigh(), ESMIPToGeVConstant::getESValueLow(), ESEEIntercalibConstants::getGammaHigh0(), ESEEIntercalibConstants::getGammaHigh1(), ESEEIntercalibConstants::getGammaHigh2(), ESEEIntercalibConstants::getGammaHigh3(), ESEEIntercalibConstants::getGammaLow1(), and ESEEIntercalibConstants::getGammaLow2().

280  {
281 
282  es.get<ESGainRcd>().get(esgain_);
283  const ESGain *gain = esgain_.product();
284 
285  double ESGain = gain->getESGain();
286 
288  const ESMIPToGeVConstant *mipToGeV = esMIPToGeV_.product();
289 
290  mip_ = (ESGain == 1) ? mipToGeV->getESValueLow() : mipToGeV->getESValueHigh();
291 
293 
295  const ESEEIntercalibConstants *esEEInterCalib = esEEInterCalib_.product();
296 
297  // both planes work
298  gamma0_ = (ESGain == 1) ? 0.02 : esEEInterCalib->getGammaHigh0();
299  alpha0_ = (ESGain == 1) ? esEEInterCalib->getAlphaLow0() : esEEInterCalib->getAlphaHigh0();
300 
301  // only first plane works
302  gamma1_ = (ESGain == 1) ? (0.02 * esEEInterCalib->getGammaLow1()) : esEEInterCalib->getGammaHigh1();
303  alpha1_ = (ESGain == 1) ? esEEInterCalib->getAlphaLow1() : esEEInterCalib->getAlphaHigh1();
304 
305  // only second plane works
306  gamma2_ = (ESGain == 1) ? (0.02 * esEEInterCalib->getGammaLow2()) : esEEInterCalib->getGammaHigh2();
307  alpha2_ = (ESGain == 1) ? esEEInterCalib->getAlphaLow2() : esEEInterCalib->getAlphaHigh2();
308 
309  // both planes do not work
310  gamma3_ = (ESGain == 1) ? 0.02 : esEEInterCalib->getGammaHigh3();
311  alpha3_ = (ESGain == 1) ? esEEInterCalib->getAlphaLow3() : esEEInterCalib->getAlphaHigh3();
312 
314  const ESMissingEnergyCalibration * esMissingECalib = esMissingECalib_.product();
315 
316  // |eta| < 1.9
317  aEta_[0] = esMissingECalib->getConstAEta0();
318  bEta_[0] = esMissingECalib->getConstBEta0();
319 
320  // 1.9 < |eta| < 2.1
321  aEta_[1] = esMissingECalib->getConstAEta1();
322  bEta_[1] = esMissingECalib->getConstBEta1();
323 
324  // 2.1 < |eta| < 2.3
325  aEta_[2] = esMissingECalib->getConstAEta2();
326  bEta_[2] = esMissingECalib->getConstBEta2();
327 
328  // 2.3 < |eta| < 2.5
329  aEta_[3] = esMissingECalib->getConstAEta3();
330  bEta_[3] = esMissingECalib->getConstBEta3();
331 
332 }
Definition: ESGain.h:7
float getESValueLow() const
edm::ESHandle< ESMIPToGeVConstant > esMIPToGeV_
edm::ESHandle< ESMissingEnergyCalibration > esMissingECalib_
edm::ESHandle< ESEEIntercalibConstants > esEEInterCalib_
edm::ESHandle< ESChannelStatus > esChannelStatus_
float getESGain() const
Definition: ESGain.h:13
const T & get() const
Definition: EventSetup.h:56
float getESValueHigh() const
T const * product() const
Definition: ESHandle.h:86

Member Data Documentation

double PreshowerPhiClusterProducer::aEta_[4]
private

Definition at line 64 of file PreshowerPhiClusterProducer.h.

double PreshowerPhiClusterProducer::alpha0_
private

Definition at line 60 of file PreshowerPhiClusterProducer.h.

double PreshowerPhiClusterProducer::alpha1_
private

Definition at line 61 of file PreshowerPhiClusterProducer.h.

double PreshowerPhiClusterProducer::alpha2_
private

Definition at line 62 of file PreshowerPhiClusterProducer.h.

double PreshowerPhiClusterProducer::alpha3_
private

Definition at line 63 of file PreshowerPhiClusterProducer.h.

std::string PreshowerPhiClusterProducer::assocSClusterCollection_
private

Definition at line 48 of file PreshowerPhiClusterProducer.h.

double PreshowerPhiClusterProducer::bEta_[4]
private

Definition at line 65 of file PreshowerPhiClusterProducer.h.

edm::EDGetTokenT<reco::SuperClusterCollection> PreshowerPhiClusterProducer::endcapSClusterToken_
private

Definition at line 41 of file PreshowerPhiClusterProducer.h.

edm::ESHandle<ESChannelStatus> PreshowerPhiClusterProducer::esChannelStatus_
private

Definition at line 54 of file PreshowerPhiClusterProducer.h.

edm::ESHandle<ESEEIntercalibConstants> PreshowerPhiClusterProducer::esEEInterCalib_
private

Definition at line 52 of file PreshowerPhiClusterProducer.h.

edm::ESHandle<ESGain> PreshowerPhiClusterProducer::esgain_
private

Definition at line 50 of file PreshowerPhiClusterProducer.h.

edm::ESHandle<ESMIPToGeVConstant> PreshowerPhiClusterProducer::esMIPToGeV_
private

Definition at line 51 of file PreshowerPhiClusterProducer.h.

edm::ESHandle<ESMissingEnergyCalibration> PreshowerPhiClusterProducer::esMissingECalib_
private

Definition at line 53 of file PreshowerPhiClusterProducer.h.

float PreshowerPhiClusterProducer::esPhiClusterDeltaEta_
private

Definition at line 73 of file PreshowerPhiClusterProducer.h.

float PreshowerPhiClusterProducer::esPhiClusterDeltaPhi_
private

Definition at line 74 of file PreshowerPhiClusterProducer.h.

double PreshowerPhiClusterProducer::etThresh_
private

Definition at line 67 of file PreshowerPhiClusterProducer.h.

double PreshowerPhiClusterProducer::gamma0_
private

Definition at line 56 of file PreshowerPhiClusterProducer.h.

double PreshowerPhiClusterProducer::gamma1_
private

Definition at line 57 of file PreshowerPhiClusterProducer.h.

double PreshowerPhiClusterProducer::gamma2_
private

Definition at line 58 of file PreshowerPhiClusterProducer.h.

double PreshowerPhiClusterProducer::gamma3_
private

Definition at line 59 of file PreshowerPhiClusterProducer.h.

double PreshowerPhiClusterProducer::mip_
private

Definition at line 55 of file PreshowerPhiClusterProducer.h.

int PreshowerPhiClusterProducer::nEvt_
private

Definition at line 36 of file PreshowerPhiClusterProducer.h.

PreshowerPhiClusterAlgo* PreshowerPhiClusterProducer::presh_algo
private

Definition at line 69 of file PreshowerPhiClusterProducer.h.

std::string PreshowerPhiClusterProducer::preshClusterCollectionX_
private

Definition at line 44 of file PreshowerPhiClusterProducer.h.

std::string PreshowerPhiClusterProducer::preshClusterCollectionY_
private

Definition at line 45 of file PreshowerPhiClusterProducer.h.

edm::EDGetTokenT<EcalRecHitCollection> PreshowerPhiClusterProducer::preshHitToken_
private

Definition at line 39 of file PreshowerPhiClusterProducer.h.