CMS 3D CMS Logo

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

Public Member Functions

 HcalHBHEMuonSimAnalyzer (const edm::ParameterSet &)
 
 ~HcalHBHEMuonSimAnalyzer ()
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::SharedResources >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- 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)
 

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

double activeLength (const DetId &)
 
virtual void analyze (edm::Event const &, edm::EventSetup const &) override
 
virtual void beginJob () override
 
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &) override
 
void clearVectors ()
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void endRun (edm::Run const &, edm::EventSetup const &) override
 
unsigned int matchId (const HcalDetId &, const HcalDetId &)
 

Private Attributes

std::vector< HcalDDDRecConstants::HcalActiveLengthactHB_
 
std::vector< HcalDDDRecConstants::HcalActiveLengthactHE_
 
unsigned int bxNumber_
 
std::string ebLabel_
 
std::vector< double > ecal3x3Energy_
 
std::vector< unsigned int > ecalDetId_
 
std::string eeLabel_
 
std::vector< double > etaGlob_
 
double etaMax_
 
unsigned int eventNumber_
 
edm::Service< TFileServicefs_
 
std::string g4Label_
 
std::vector< double > hcal1x1Energy_
 
std::vector< double > hcalActiveLength_
 
std::vector< double > hcalActiveLengthHot_
 
std::vector< double > hcalDepth1ActiveLength_
 
std::vector< double > hcalDepth1ActiveLengthHot_
 
std::vector< double > hcalDepth1Energy_
 
std::vector< double > hcalDepth1EnergyHot_
 
std::vector< double > hcalDepth2ActiveLength_
 
std::vector< double > hcalDepth2ActiveLengthHot_
 
std::vector< double > hcalDepth2Energy_
 
std::vector< double > hcalDepth2EnergyHot_
 
std::vector< double > hcalDepth3ActiveLength_
 
std::vector< double > hcalDepth3ActiveLengthHot_
 
std::vector< double > hcalDepth3Energy_
 
std::vector< double > hcalDepth3EnergyHot_
 
std::vector< double > hcalDepth4ActiveLength_
 
std::vector< double > hcalDepth4ActiveLengthHot_
 
std::vector< double > hcalDepth4Energy_
 
std::vector< double > hcalDepth4EnergyHot_
 
std::vector< double > hcalDepth5ActiveLength_
 
std::vector< double > hcalDepth5ActiveLengthHot_
 
std::vector< double > hcalDepth5Energy_
 
std::vector< double > hcalDepth5EnergyHot_
 
std::vector< double > hcalDepth6ActiveLength_
 
std::vector< double > hcalDepth6ActiveLengthHot_
 
std::vector< double > hcalDepth6Energy_
 
std::vector< double > hcalDepth6EnergyHot_
 
std::vector< double > hcalDepth7ActiveLength_
 
std::vector< double > hcalDepth7ActiveLengthHot_
 
std::vector< double > hcalDepth7Energy_
 
std::vector< double > hcalDepth7EnergyHot_
 
std::vector< unsigned int > hcalDetId_
 
std::vector< unsigned int > hcalHot_
 
std::string hcLabel_
 
const int idMuon_ =13
 
unsigned int lumiNumber_
 
const int MaxDepth =7
 
int maxDepth_
 
std::vector< double > phiGlob_
 
std::vector< double > pMuon_
 
std::vector< double > ptGlob_
 
unsigned int runNumber_
 
double tMaxE_
 
double tMaxH_
 
double tMinE_
 
double tMinH_
 
edm::EDGetTokenT< edm::PCaloHitContainertok_caloEB_
 
edm::EDGetTokenT< edm::PCaloHitContainertok_caloEE_
 
edm::EDGetTokenT< edm::PCaloHitContainertok_caloHH_
 
edm::EDGetTokenT< edm::SimTrackContainertok_SimTk_
 
edm::EDGetTokenT< edm::SimVertexContainertok_SimVtx_
 
TTree * tree_
 
int verbosity_
 

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
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 43 of file HcalHBHEMuonSimAnalyzer.cc.

Constructor & Destructor Documentation

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

Definition at line 98 of file HcalHBHEMuonSimAnalyzer.cc.

References gather_cfg::cout, ebLabel_, eeLabel_, etaMax_, g4Label_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hcLabel_, TFileService::kSharedResource, MaxDepth, maxDepth_, AlCaHLTBitMon_QueryRunRegistry::string, tMaxE_, tMaxH_, tMinE_, tMinH_, tok_caloEB_, tok_caloEE_, tok_caloHH_, tok_SimTk_, tok_SimVtx_, and verbosity_.

98  {
99 
100  usesResource(TFileService::kSharedResource);
101 
102  //now do what ever initialization is needed
103  g4Label_ = iConfig.getParameter<std::string>("ModuleLabel");
104  ebLabel_ = iConfig.getParameter<std::string>("EBCollection");
105  eeLabel_ = iConfig.getParameter<std::string>("EECollection");
106  hcLabel_ = iConfig.getParameter<std::string>("HCCollection");
107  verbosity_ = iConfig.getUntrackedParameter<int>("Verbosity",0);
108  maxDepth_ = iConfig.getUntrackedParameter<int>("MaxDepth",4);
109  etaMax_ = iConfig.getUntrackedParameter<double>("EtaMax", 3.0);
110  tMinE_ = iConfig.getUntrackedParameter<double>("TimeMinCutECAL", -500.);
111  tMaxE_ = iConfig.getUntrackedParameter<double>("TimeMaxCutECAL", 500.);
112  tMinH_ = iConfig.getUntrackedParameter<double>("TimeMinCutHCAL", -500.);
113  tMaxH_ = iConfig.getUntrackedParameter<double>("TimeMaxCutHCAL", 500.);
114 
115  tok_SimTk_ = consumes<edm::SimTrackContainer>(edm::InputTag(g4Label_));
116  tok_SimVtx_ = consumes<edm::SimVertexContainer>(edm::InputTag(g4Label_));
117  tok_caloEB_ = consumes<edm::PCaloHitContainer>(edm::InputTag(g4Label_,ebLabel_));
118  tok_caloEE_ = consumes<edm::PCaloHitContainer>(edm::InputTag(g4Label_,eeLabel_));
119  tok_caloHH_ = consumes<edm::PCaloHitContainer>(edm::InputTag(g4Label_,hcLabel_));
121  else if (maxDepth_ < 1) maxDepth_ = 4;
122 
123  std::cout << "Labels: " << g4Label_ << ":" << ebLabel_ << ":" << eeLabel_
124  << ":" << hcLabel_ << "\nVerbosity " << verbosity_ << " MaxDepth "
125  << maxDepth_ << " Maximum Eta " << etaMax_ << " tMin|tMax "
126  << tMinE_ << ":" << tMaxE_ << ":" << tMinH_ << ":" << tMaxH_
127  << std::endl;
128 }
static const std::string kSharedResource
Definition: TFileService.h:76
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloEE_
edm::EDGetTokenT< edm::SimVertexContainer > tok_SimVtx_
edm::EDGetTokenT< edm::SimTrackContainer > tok_SimTk_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloHH_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloEB_
HcalHBHEMuonSimAnalyzer::~HcalHBHEMuonSimAnalyzer ( )

Definition at line 130 of file HcalHBHEMuonSimAnalyzer.cc.

130 { }

Member Function Documentation

double HcalHBHEMuonSimAnalyzer::activeLength ( const DetId id_)
private

Definition at line 514 of file HcalHBHEMuonSimAnalyzer.cc.

References actHB_, actHE_, DEFINE_FWK_MODULE, particleFlowClusterECALTimeSelected_cfi::depth, HcalBarrel, mps_fire::i, and hcalTTPDigis_cfi::id.

Referenced by analyze(), and endLuminosityBlock().

514  {
515  HcalDetId id(id_);
516  int ieta = id.ietaAbs();
517  int depth= id.depth();
518  double lx(0);
519  if (id.subdet() == HcalBarrel) {
520  for (unsigned int i=0; i<actHB_.size(); ++i) {
521  if (ieta == actHB_[i].ieta && depth == actHB_[i].depth) {
522  lx = actHB_[i].thick;
523  break;
524  }
525  }
526  } else {
527  for (unsigned int i=0; i<actHE_.size(); ++i) {
528  if (ieta == actHE_[i].ieta && depth == actHE_[i].depth) {
529  lx = actHE_[i].thick;
530  break;
531  }
532  }
533  }
534  return lx;
535 }
std::vector< HcalDDDRecConstants::HcalActiveLength > actHE_
std::vector< HcalDDDRecConstants::HcalActiveLength > actHB_
void HcalHBHEMuonSimAnalyzer::analyze ( edm::Event const &  ,
edm::EventSetup const &   
)
overrideprivatevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 132 of file HcalHBHEMuonSimAnalyzer.cc.

References funct::abs(), activeLength(), ecalTB2006H4_GenSimDigiReco_cfg::bField, edm::EventBase::bunchCrossing(), bxNumber_, spr::trackAtOrigin::charge, clearVectors(), gather_cfg::cout, debug, TauDecayModes::dec, spr::propagatedTrackDirection::detIdECAL, spr::propagatedTrackDirection::detIdHCAL, spr::propagatedTrackDirection::directionECAL, spr::propagatedTrackDirection::directionHCAL, ecal3x3Energy_, ecalDetId_, spr::eECALmatrix(), spr::eHCALmatrix(), spr::energyHCALCell(), PV3DBase< T, PVType, FrameType >::eta(), etaGlob_, etaMax_, edm::EventID::event(), eventNumber_, edm::EventSetup::get(), edm::Event::getByToken(), photonIsolationHIProducer_cfi::hbhe, hcal1x1Energy_, hcalActiveLength_, hcalActiveLengthHot_, HcalBarrel, hcalDepth1ActiveLength_, hcalDepth1ActiveLengthHot_, hcalDepth1Energy_, hcalDepth1EnergyHot_, hcalDepth2ActiveLength_, hcalDepth2ActiveLengthHot_, hcalDepth2Energy_, hcalDepth2EnergyHot_, hcalDepth3ActiveLength_, hcalDepth3ActiveLengthHot_, hcalDepth3Energy_, hcalDepth3EnergyHot_, hcalDepth4ActiveLength_, hcalDepth4ActiveLengthHot_, hcalDepth4Energy_, hcalDepth4EnergyHot_, hcalDepth5ActiveLength_, hcalDepth5ActiveLengthHot_, hcalDepth5Energy_, hcalDepth5EnergyHot_, hcalDepth6ActiveLength_, hcalDepth6ActiveLengthHot_, hcalDepth6Energy_, hcalDepth6EnergyHot_, hcalDepth7ActiveLength_, hcalDepth7ActiveLengthHot_, hcalDepth7Energy_, hcalDepth7EnergyHot_, hcalDetId_, HcalEndcap, hcalHot_, mps_fire::i, PCaloHit::id(), edm::EventBase::id(), idMuon_, HcalDetId::ieta(), HcalDetId::iphi(), gen::k, edm::EventID::luminosityBlock(), lumiNumber_, PV3DBase< T, PVType, FrameType >::mag(), matchId(), MaxDepth, maxDepth_, spr::trackAtOrigin::momentum, spr::trackAtOrigin::ok, spr::propagatedTrackDirection::okECAL, spr::propagatedTrackDirection::okHCAL, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), phiGlob_, pMuon_, spr::propagatedTrackDirection::pointECAL, spr::propagatedTrackDirection::pointHCAL, spr::trackAtOrigin::position, edm::ESHandle< T >::product(), spr::propagateCALO(), ptGlob_, DetId::rawId(), HcalHitRelabeller::relabel(), edm::EventID::run(), runNumber_, edm::second(), PCaloHit::setID(), spr::simTrackAtOrigin(), HcalDetId::subdet(), tMaxE_, tMaxH_, tMinE_, tMinH_, tok_caloEB_, tok_caloEE_, tok_caloHH_, tok_SimTk_, tok_SimVtx_, tree_, and verbosity_.

133  {
134 
135  clearVectors();
136  bool debug(false);
137 #ifdef EDM_ML_DEBUG
138  debug = ((verbosity_/10)>0);
139 #endif
140  // depthHE is the first depth index for HE for |ieta| = 16
141  // It used to be 3 for all runs preceding 2017 and 4 beyond that
142  int depthHE = (maxDepth_ <= 6) ? 3 : 4;
143 
145  iSetup.get<HcalRecNumberingRecord>().get(pHRNDC);
146  const HcalDDDRecConstants* hcons = &(*pHRNDC);
147 
148  runNumber_ = iEvent.id().run();
149  eventNumber_ = iEvent.id().event();
150  lumiNumber_ = iEvent.id().luminosityBlock();
151  bxNumber_ = iEvent.bunchCrossing();
152 
153  //get Handles to SimTracks and SimHits
155  iEvent.getByToken(tok_SimTk_,SimTk);
156  edm::SimTrackContainer::const_iterator simTrkItr;
158  iEvent.getByToken(tok_SimVtx_,SimVtx);
159 
160  //get Handles to PCaloHitContainers of eb/ee/hbhe
162  iEvent.getByToken(tok_caloEB_, pcaloeb);
164  iEvent.getByToken(tok_caloEE_, pcaloee);
166  iEvent.getByToken(tok_caloHH_, pcalohh);
167  std::vector<PCaloHit> calohh;
168  bool testN(false);
169  for (unsigned int k=1; k<pcalohh->size(); ++k) {
170  // if it is a standard DetId bits 28..31 will carry the det #
171  // for HCAL det # is 4 and if there is at least one hit in the collection
172  // have det # which is not 4 this collection is created using TestNumbering
173  int det = ((((*pcalohh)[k].id())>>28)&0xF);
174  if (det != 4) {testN = true; break;}
175  }
176  if (testN) {
177  for (edm::PCaloHitContainer::const_iterator itr=pcalohh->begin(); itr != pcalohh->end(); ++itr) {
178  PCaloHit hit(*itr);
179  DetId newid = HcalHitRelabeller::relabel(hit.id(),hcons);
180  std::cout << "Old ID " << std::hex << hit.id() << std::dec << " New " << HcalDetId(newid) << std::endl;
181  hit.setID(newid.rawId());
182  calohh.push_back(hit);
183  }
184  } else {
185  calohh.insert(calohh.end(),pcalohh->begin(),pcalohh->end());
186  }
187 
188  // get handles to calogeometry and calotopology
190  iSetup.get<CaloGeometryRecord>().get(pG);
191  const CaloGeometry* geo = pG.product();
192 
194  iSetup.get<IdealMagneticFieldRecord>().get(bFieldH);
195  const MagneticField* bField = bFieldH.product();
196 
197  edm::ESHandle<CaloTopology> theCaloTopology;
198  iSetup.get<CaloTopologyRecord>().get(theCaloTopology);
199  const CaloTopology *caloTopology = theCaloTopology.product();
200 
202  iSetup.get<HcalRecNumberingRecord>().get(htopo);
203  const HcalTopology* theHBHETopology = htopo.product();
204 
205  // Loop over all SimTracks
206  for (edm::SimTrackContainer::const_iterator simTrkItr=SimTk->begin();
207  simTrkItr!= SimTk->end(); simTrkItr++) {
208  if ((std::abs(simTrkItr->type()) == idMuon_) && (simTrkItr->vertIndex() == 0) &&
209  (std::abs(simTrkItr->momentum().eta()) < etaMax_)) {
210  unsigned int thisTrk = simTrkItr->trackId();
211  spr::propagatedTrackDirection trkD = spr::propagateCALO(thisTrk, SimTk, SimVtx, geo, bField, debug);
212 
213  double eEcal(0), eHcal(0), activeLengthTot(0), activeLengthHotTot(0);
214  double eHcalDepth[MaxDepth], eHcalDepthHot[MaxDepth];
215  double activeL[MaxDepth], activeHotL[MaxDepth];
216  unsigned int isHot(0);
217  for (int i=0; i<MaxDepth; ++i)
218  eHcalDepth[i] = eHcalDepthHot[i] = activeL[i] = activeHotL[i] = -10000;
219 
220 #ifdef EDM_ML_DEBUG
221  if ((verbosity_%10) > 0)
222  std::cout << "Track Type " << simTrkItr->type() << " Vertex "
223  << simTrkItr->vertIndex() << " Charge " << simTrkItr->charge()
224  << " Momentum " << simTrkItr->momentum().P() << ":"
225  << simTrkItr->momentum().eta() << ":"
226  << simTrkItr->momentum().phi() << " ECAL|HCAL " << trkD.okECAL
227  << ":" << trkD.okHCAL << " Point " << trkD.pointECAL << ":"
228  << trkD.pointHCAL << " Direction " << trkD.directionECAL.eta()
229  << ":" << trkD.directionECAL.phi() << " | "
230  << trkD.directionHCAL.eta() << ":" << trkD.directionHCAL.phi()
231  << std::endl;
232 #endif
233 
234  if (trkD.okHCAL) {
235  // Muon properties
236  spr::trackAtOrigin tkvx = spr::simTrackAtOrigin(thisTrk, SimTk, SimVtx, debug);
237  ptGlob_.push_back(tkvx.momentum.perp());
238  etaGlob_.push_back(tkvx.momentum.eta());
239  phiGlob_.push_back(tkvx.momentum.phi());
240  pMuon_.push_back(tkvx.momentum.mag());
241 #ifdef EDM_ML_DEBUG
242  if ((verbosity_%10) > 0)
243  std::cout << "Track at vertex " << tkvx.ok << " position "
244  << tkvx.position << " Momentum " << tkvx.momentum.mag()
245  << ":" << tkvx.momentum.eta() << ":"
246  << tkvx.momentum.phi() << " Charge " << tkvx.charge
247  << std::endl;
248 #endif
249 
250  // Energy in ECAL
251  DetId isoCell;
252  if (trkD.okECAL) {
253  isoCell = trkD.detIdECAL;
254  eEcal = spr::eECALmatrix(isoCell, pcaloeb, pcaloee, geo, caloTopology, 1, 1, -100.0, -100.0, tMinE_, tMaxE_, debug);
255  }
256 
257  // Energy in Hcal
258  const DetId closestCell(trkD.detIdHCAL);
259  eHcal = spr::eHCALmatrix(theHBHETopology, closestCell, calohh,0,0, false, -100.0, -100.0, -100.0, -100.0, tMinH_, tMaxH_, debug);
260 #ifdef EDM_ML_DEBUG
261  if ((verbosity_%10) > 0)
262  std::cout << "eEcal " << trkD.okECAL << ":" << eEcal << " eHcal "
263  << eHcal << std::endl;
264 #endif
265 
266  HcalSubdetector subdet = HcalDetId(closestCell).subdet();
267  int ieta = HcalDetId(closestCell).ieta();
268  int iphi = HcalDetId(closestCell).iphi();
269  bool hbhe = (std::abs(ieta) == 16);
270  std::vector<std::pair<double,int> > ehdepth;
271  spr::energyHCALCell((HcalDetId)closestCell, calohh, ehdepth, maxDepth_, -100.0, -100.0, -100.0, -100.0, -500.0, 500.0, debug);
272  for (unsigned int i=0; i<ehdepth.size(); ++i) {
273  eHcalDepth[ehdepth[i].second-1] = ehdepth[i].first;
274  HcalSubdetector subdet0 = (hbhe) ? ((ehdepth[i].second >= depthHE) ? HcalEndcap : HcalBarrel) : subdet;
275  HcalDetId hcid0(subdet0,ieta,iphi,ehdepth[i].second);
276  double actL = activeLength(DetId(hcid0));
277  activeL[ehdepth[i].second-1] = actL;
278  activeLengthTot += actL;
279 #ifdef EDM_ML_DEBUG
280  if ((verbosity_%10) > 0)
281  std::cout << hcid0 << " E " << ehdepth[i].first << " L " << actL
282  << std::endl;
283 #endif
284  }
285 
286  HcalDetId hotCell;
287 #ifdef EDM_ML_DEBUG
288  double h3x3 =
289 #endif
290  spr::eHCALmatrix(geo,theHBHETopology, closestCell, calohh, 1,1, hotCell, debug);
291  isHot = matchId(closestCell,hotCell);
292 #ifdef EDM_ML_DEBUG
293  if ((verbosity_%10) > 0)
294  std::cout << "hcal 3X3 < " << h3x3 << ">" << " ClosestCell <"
295  << (HcalDetId)(closestCell) << "> hotCell id < " << hotCell
296  << "> isHot" << isHot << std::endl;
297 #endif
298 
299  if (hotCell != HcalDetId()) {
300  subdet = HcalDetId(hotCell).subdet();
301  ieta = HcalDetId(hotCell).ieta();
302  iphi = HcalDetId(hotCell).iphi();
303  hbhe = (std::abs(ieta) == 16);
304  std::vector<std::pair<double,int> > ehdepth;
305  spr::energyHCALCell(hotCell, calohh, ehdepth, maxDepth_, -100.0, -100.0, -100.0, -100.0, tMinH_, tMaxH_, debug);
306  for (unsigned int i=0; i<ehdepth.size(); ++i) {
307  eHcalDepthHot[ehdepth[i].second-1] = ehdepth[i].first;
308  HcalSubdetector subdet0 = (hbhe) ? ((ehdepth[i].second >= depthHE) ? HcalEndcap : HcalBarrel) : subdet;
309  HcalDetId hcid0(subdet0,ieta,iphi,ehdepth[i].second);
310  double actL = activeLength(DetId(hcid0));
311  activeHotL[ehdepth[i].second-1] = actL;
312  activeLengthHotTot += actL;
313 #ifdef EDM_ML_DEBUG
314  if ((verbosity_%10) > 0)
315  std::cout << hcid0 << " E " << ehdepth[i].first << " L "
316  << actL << std::endl;
317 #endif
318  }
319  }
320 #ifdef EDM_ML_DEBUG
321  if ((verbosity_%10) > 0) {
322  for (int k=0; k<MaxDepth; ++k)
323  std::cout << "Depth " << k << " E " << eHcalDepth[k] << ":"
324  << eHcalDepthHot[k] << std::endl;
325  }
326 #endif
327  ecal3x3Energy_.push_back(eEcal);
328  ecalDetId_.push_back(isoCell.rawId());
329  hcal1x1Energy_.push_back(eHcal);
330  hcalDetId_.push_back(closestCell.rawId());
331  hcalDepth1Energy_.push_back(eHcalDepth[0]);
332  hcalDepth2Energy_.push_back(eHcalDepth[1]);
333  hcalDepth3Energy_.push_back(eHcalDepth[2]);
334  hcalDepth4Energy_.push_back(eHcalDepth[3]);
335  hcalDepth5Energy_.push_back(eHcalDepth[4]);
336  hcalDepth6Energy_.push_back(eHcalDepth[5]);
337  hcalDepth7Energy_.push_back(eHcalDepth[6]);
338  hcalDepth1ActiveLength_.push_back(activeL[0]);
339  hcalDepth2ActiveLength_.push_back(activeL[1]);
340  hcalDepth3ActiveLength_.push_back(activeL[2]);
341  hcalDepth4ActiveLength_.push_back(activeL[3]);
342  hcalDepth5ActiveLength_.push_back(activeL[4]);
343  hcalDepth6ActiveLength_.push_back(activeL[5]);
344  hcalDepth7ActiveLength_.push_back(activeL[6]);
345  hcalActiveLength_.push_back(activeLengthTot);
346  hcalHot_.push_back(isHot);
347  hcalDepth1EnergyHot_.push_back(eHcalDepthHot[0]);
348  hcalDepth2EnergyHot_.push_back(eHcalDepthHot[1]);
349  hcalDepth3EnergyHot_.push_back(eHcalDepthHot[2]);
350  hcalDepth4EnergyHot_.push_back(eHcalDepthHot[3]);
351  hcalDepth5EnergyHot_.push_back(eHcalDepthHot[4]);
352  hcalDepth6EnergyHot_.push_back(eHcalDepthHot[5]);
353  hcalDepth7EnergyHot_.push_back(eHcalDepthHot[6]);
354  hcalDepth1ActiveLengthHot_.push_back(activeHotL[0]);
355  hcalDepth2ActiveLengthHot_.push_back(activeHotL[1]);
356  hcalDepth3ActiveLengthHot_.push_back(activeHotL[2]);
357  hcalDepth4ActiveLengthHot_.push_back(activeHotL[3]);
358  hcalDepth5ActiveLengthHot_.push_back(activeHotL[4]);
359  hcalDepth6ActiveLengthHot_.push_back(activeHotL[5]);
360  hcalDepth7ActiveLengthHot_.push_back(activeHotL[6]);
361  hcalActiveLengthHot_.push_back(activeLengthHotTot);
362  }
363  }
364  }
365  if (hcalHot_.size() > 0) tree_->Fill();
366 }
std::vector< double > hcalDepth2ActiveLengthHot_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloEE_
std::vector< double > hcalDepth6EnergyHot_
std::vector< double > ecal3x3Energy_
std::vector< double > hcalDepth6ActiveLengthHot_
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, std::string &theTrackQuality, bool debug=false)
T perp() const
Definition: PV3DBase.h:72
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:49
std::vector< double > hcalDepth2EnergyHot_
std::vector< unsigned int > hcalDetId_
std::vector< double > hcal1x1Energy_
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
double eHCALmatrix(const HcalTopology *topology, const DetId &det, edm::Handle< T > &hits, int ieta, int iphi, bool includeHO=false, bool algoNew=true, double hbThr=-100, double heThr=-100, double hfThr=-100, double hoThr=-100, double tMin=-500, double tMax=500, bool useRaw=false, bool debug=false)
std::vector< double > hcalDepth5Energy_
edm::EDGetTokenT< edm::SimVertexContainer > tok_SimVtx_
std::vector< double > hcalDepth4Energy_
spr::trackAtOrigin simTrackAtOrigin(unsigned int thisTrk, edm::Handle< edm::SimTrackContainer > &SimTk, edm::Handle< edm::SimVertexContainer > &SimVtx, bool debug=false)
std::vector< double > ptGlob_
std::vector< double > hcalDepth5EnergyHot_
std::vector< double > hcalDepth5ActiveLengthHot_
std::vector< double > hcalDepth2ActiveLength_
std::vector< double > hcalActiveLengthHot_
double activeLength(const DetId &)
std::vector< double > hcalDepth2Energy_
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
U second(std::pair< T, U > const &p)
int iEvent
Definition: GenABIO.cc:230
T mag() const
Definition: PV3DBase.h:67
edm::EDGetTokenT< edm::SimTrackContainer > tok_SimTk_
std::vector< double > hcalDepth1Energy_
std::vector< double > hcalActiveLength_
std::vector< double > hcalDepth7Energy_
std::vector< double > hcalDepth3Energy_
int ieta() const
get the cell ieta
Definition: HcalDetId.h:56
HcalSubdetector
Definition: HcalAssistant.h:31
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< double > hcalDepth1ActiveLengthHot_
void energyHCALCell(HcalDetId detId, edm::Handle< T > &hits, std::vector< std::pair< double, int > > &energyCell, int maxDepth=1, double hbThr=-100, double heThr=-100, double hfThr=-100, double hoThr=-100, double tMin=-500, double tMax=500, bool useRaw=false, bool debug=false)
std::vector< double > hcalDepth3ActiveLengthHot_
std::vector< double > hcalDepth6Energy_
std::vector< double > phiGlob_
int k[5][pyjets_maxn]
unsigned int id
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloHH_
int iphi() const
get the cell iphi
Definition: HcalDetId.cc:103
Definition: DetId.h:18
std::vector< double > hcalDepth3ActiveLength_
#define debug
Definition: HDRShower.cc:19
std::vector< double > hcalDepth5ActiveLength_
std::vector< double > hcalDepth4EnergyHot_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloEB_
std::vector< double > etaGlob_
std::vector< double > hcalDepth7ActiveLengthHot_
std::vector< double > pMuon_
T eta() const
Definition: PV3DBase.h:76
std::vector< double > hcalDepth7EnergyHot_
std::vector< double > hcalDepth4ActiveLengthHot_
std::vector< double > hcalDepth6ActiveLength_
unsigned int matchId(const HcalDetId &, const HcalDetId &)
std::vector< double > hcalDepth1EnergyHot_
DetId relabel(const uint32_t testId) const
std::vector< double > hcalDepth7ActiveLength_
std::vector< double > hcalDepth3EnergyHot_
T const * product() const
Definition: ESHandle.h:86
std::vector< unsigned int > hcalHot_
std::vector< double > hcalDepth4ActiveLength_
std::vector< unsigned int > ecalDetId_
std::vector< double > hcalDepth1ActiveLength_
double eECALmatrix(const DetId &detId, edm::Handle< T > &hitsEB, edm::Handle< T > &hitsEE, const CaloGeometry *geo, const CaloTopology *caloTopology, int ieta, int iphi, double ebThr=-100, double eeThr=-100, double tMin=-500, double tMax=500, bool debug=false)
void HcalHBHEMuonSimAnalyzer::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 368 of file HcalHBHEMuonSimAnalyzer.cc.

References bxNumber_, ecal3x3Energy_, ecalDetId_, etaGlob_, eventNumber_, fs_, hcal1x1Energy_, hcalActiveLength_, hcalActiveLengthHot_, hcalDepth1ActiveLength_, hcalDepth1Energy_, hcalDepth1EnergyHot_, hcalDepth2ActiveLength_, hcalDepth2Energy_, hcalDepth2EnergyHot_, hcalDepth3ActiveLength_, hcalDepth3Energy_, hcalDepth3EnergyHot_, hcalDepth4ActiveLength_, hcalDepth4Energy_, hcalDepth4EnergyHot_, hcalDepth5ActiveLength_, hcalDepth5Energy_, hcalDepth5EnergyHot_, hcalDepth6ActiveLength_, hcalDepth6Energy_, hcalDepth6EnergyHot_, hcalDepth7ActiveLength_, hcalDepth7Energy_, hcalDepth7EnergyHot_, hcalDetId_, hcalHot_, lumiNumber_, TFileService::make(), maxDepth_, phiGlob_, pMuon_, ptGlob_, runNumber_, and tree_.

368  {
369 
370  tree_ = fs_->make<TTree>("TREE", "TREE");
371  tree_->Branch("Run_No", &runNumber_);
372  tree_->Branch("Event_No", &eventNumber_);
373  tree_->Branch("LumiNumber", &lumiNumber_);
374  tree_->Branch("BXNumber", &bxNumber_);
375  tree_->Branch("pt_of_muon", &ptGlob_);
376  tree_->Branch("eta_of_muon", &etaGlob_);
377  tree_->Branch("phi_of_muon", &phiGlob_);
378  tree_->Branch("p_of_muon", &pMuon_);
379 
380  tree_->Branch("ecal_3x3", &ecal3x3Energy_);
381  tree_->Branch("ecal_detID", &ecalDetId_);
382  tree_->Branch("hcal_1x1", &hcal1x1Energy_);
383  tree_->Branch("hcal_detID", &hcalDetId_);
384  tree_->Branch("hcal_cellHot", &hcalHot_);
385  tree_->Branch("activeLength", &hcalActiveLength_);
386  tree_->Branch("hcal_edepth1", &hcalDepth1Energy_);
387  tree_->Branch("hcal_edepth2", &hcalDepth2Energy_);
388  tree_->Branch("hcal_edepth3", &hcalDepth3Energy_);
389  tree_->Branch("hcal_edepth4", &hcalDepth4Energy_);
390  tree_->Branch("hcal_activeL1", &hcalDepth1ActiveLength_);
391  tree_->Branch("hcal_activeL2", &hcalDepth2ActiveLength_);
392  tree_->Branch("hcal_activeL3", &hcalDepth3ActiveLength_);
393  tree_->Branch("hcal_activeL4", &hcalDepth4ActiveLength_);
394  tree_->Branch("activeLengthHot", &hcalActiveLengthHot_);
395  tree_->Branch("hcal_edepthHot1", &hcalDepth1EnergyHot_);
396  tree_->Branch("hcal_edepthHot2", &hcalDepth2EnergyHot_);
397  tree_->Branch("hcal_edepthHot3", &hcalDepth3EnergyHot_);
398  tree_->Branch("hcal_edepthHot4", &hcalDepth4EnergyHot_);
399  tree_->Branch("hcal_activeHotL1", &hcalDepth1ActiveLength_);
400  tree_->Branch("hcal_activeHotL2", &hcalDepth2ActiveLength_);
401  tree_->Branch("hcal_activeHotL3", &hcalDepth3ActiveLength_);
402  tree_->Branch("hcal_activeHotL4", &hcalDepth4ActiveLength_);
403  if (maxDepth_ > 4) {
404  tree_->Branch("hcal_edepth5", &hcalDepth5Energy_);
405  tree_->Branch("hcal_activeL5", &hcalDepth5ActiveLength_);
406  tree_->Branch("hcal_edepthHot5", &hcalDepth5EnergyHot_);
407  tree_->Branch("hcal_activeHotL5", &hcalDepth5ActiveLength_);
408  if (maxDepth_ > 5) {
409  tree_->Branch("hcal_edepth6", &hcalDepth6Energy_);
410  tree_->Branch("hcal_activeL6", &hcalDepth6ActiveLength_);
411  tree_->Branch("hcal_edepthHot6", &hcalDepth6EnergyHot_);
412  tree_->Branch("hcal_activeHotL6", &hcalDepth6ActiveLength_);
413  if (maxDepth_ > 6) {
414  tree_->Branch("hcal_edepth7", &hcalDepth7Energy_);
415  tree_->Branch("hcal_activeL7", &hcalDepth7ActiveLength_);
416  tree_->Branch("hcal_edepthHot7", &hcalDepth7EnergyHot_);
417  tree_->Branch("hcal_activeHotL7", &hcalDepth7ActiveLength_);
418  }
419  }
420  }
421 
422 }
std::vector< double > hcalDepth6EnergyHot_
std::vector< double > ecal3x3Energy_
std::vector< double > hcalDepth2EnergyHot_
std::vector< unsigned int > hcalDetId_
std::vector< double > hcal1x1Energy_
std::vector< double > hcalDepth5Energy_
std::vector< double > hcalDepth4Energy_
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
std::vector< double > ptGlob_
std::vector< double > hcalDepth5EnergyHot_
edm::Service< TFileService > fs_
std::vector< double > hcalDepth2ActiveLength_
std::vector< double > hcalActiveLengthHot_
std::vector< double > hcalDepth2Energy_
std::vector< double > hcalDepth1Energy_
std::vector< double > hcalActiveLength_
std::vector< double > hcalDepth7Energy_
std::vector< double > hcalDepth3Energy_
std::vector< double > hcalDepth6Energy_
std::vector< double > phiGlob_
std::vector< double > hcalDepth3ActiveLength_
std::vector< double > hcalDepth5ActiveLength_
std::vector< double > hcalDepth4EnergyHot_
std::vector< double > etaGlob_
std::vector< double > pMuon_
std::vector< double > hcalDepth7EnergyHot_
std::vector< double > hcalDepth6ActiveLength_
std::vector< double > hcalDepth1EnergyHot_
std::vector< double > hcalDepth7ActiveLength_
std::vector< double > hcalDepth3EnergyHot_
std::vector< unsigned int > hcalHot_
std::vector< double > hcalDepth4ActiveLength_
std::vector< unsigned int > ecalDetId_
std::vector< double > hcalDepth1ActiveLength_
virtual void HcalHBHEMuonSimAnalyzer::beginLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
inlineprivatevirtual

Definition at line 56 of file HcalHBHEMuonSimAnalyzer.cc.

56 {}
void HcalHBHEMuonSimAnalyzer::beginRun ( edm::Run const &  iRun,
edm::EventSetup const &  iSetup 
)
overrideprivatevirtual

Definition at line 424 of file HcalHBHEMuonSimAnalyzer.cc.

References actHB_, actHE_, edm::EventSetup::get(), and HcalDDDRecConstants::getThickActive().

425  {
426 
428  iSetup.get<HcalRecNumberingRecord>().get(pHRNDC);
429  const HcalDDDRecConstants & hdc = (*pHRNDC);
430  actHB_.clear();
431  actHE_.clear();
432  actHB_ = hdc.getThickActive(0);
433  actHE_ = hdc.getThickActive(1);
434 }
std::vector< HcalActiveLength > getThickActive(const int type) const
std::vector< HcalDDDRecConstants::HcalActiveLength > actHE_
std::vector< HcalDDDRecConstants::HcalActiveLength > actHB_
void HcalHBHEMuonSimAnalyzer::clearVectors ( )
private

clearing vectots

Definition at line 455 of file HcalHBHEMuonSimAnalyzer.cc.

References bxNumber_, ecal3x3Energy_, ecalDetId_, etaGlob_, eventNumber_, hcal1x1Energy_, hcalActiveLength_, hcalActiveLengthHot_, hcalDepth1ActiveLength_, hcalDepth1ActiveLengthHot_, hcalDepth1Energy_, hcalDepth1EnergyHot_, hcalDepth2ActiveLength_, hcalDepth2ActiveLengthHot_, hcalDepth2Energy_, hcalDepth2EnergyHot_, hcalDepth3ActiveLength_, hcalDepth3ActiveLengthHot_, hcalDepth3Energy_, hcalDepth3EnergyHot_, hcalDepth4ActiveLength_, hcalDepth4ActiveLengthHot_, hcalDepth4Energy_, hcalDepth4EnergyHot_, hcalDepth5ActiveLength_, hcalDepth5ActiveLengthHot_, hcalDepth5Energy_, hcalDepth5EnergyHot_, hcalDepth6ActiveLength_, hcalDepth6ActiveLengthHot_, hcalDepth6Energy_, hcalDepth6EnergyHot_, hcalDepth7ActiveLength_, hcalDepth7ActiveLengthHot_, hcalDepth7Energy_, hcalDepth7EnergyHot_, hcalDetId_, hcalHot_, lumiNumber_, phiGlob_, pMuon_, ptGlob_, and runNumber_.

Referenced by analyze(), and endLuminosityBlock().

455  {
456 
458  runNumber_ = -99999;
459  eventNumber_ = -99999;
460  lumiNumber_ = -99999;
461  bxNumber_ = -99999;
462 
463  ptGlob_.clear();
464  etaGlob_.clear();
465  phiGlob_.clear();
466  pMuon_.clear();
467 
468  ecal3x3Energy_.clear();
469  ecalDetId_.clear();
470  hcal1x1Energy_.clear();
471  hcalDetId_.clear();
472  hcalHot_.clear();
473  hcalActiveLength_.clear();
474  hcalDepth1Energy_.clear();
475  hcalDepth2Energy_.clear();
476  hcalDepth3Energy_.clear();
477  hcalDepth4Energy_.clear();
478  hcalDepth5Energy_.clear();
479  hcalDepth6Energy_.clear();
480  hcalDepth7Energy_.clear();
481  hcalDepth1ActiveLength_.clear();
482  hcalDepth2ActiveLength_.clear();
483  hcalDepth3ActiveLength_.clear();
484  hcalDepth4ActiveLength_.clear();
485  hcalDepth5ActiveLength_.clear();
486  hcalDepth6ActiveLength_.clear();
487  hcalDepth7ActiveLength_.clear();
488  hcalActiveLengthHot_.clear();
489  hcalDepth1EnergyHot_.clear();
490  hcalDepth2EnergyHot_.clear();
491  hcalDepth3EnergyHot_.clear();
492  hcalDepth4EnergyHot_.clear();
493  hcalDepth5EnergyHot_.clear();
494  hcalDepth6EnergyHot_.clear();
495  hcalDepth7EnergyHot_.clear();
503 }
std::vector< double > hcalDepth2ActiveLengthHot_
std::vector< double > hcalDepth6EnergyHot_
std::vector< double > ecal3x3Energy_
std::vector< double > hcalDepth6ActiveLengthHot_
std::vector< double > hcalDepth2EnergyHot_
std::vector< unsigned int > hcalDetId_
std::vector< double > hcal1x1Energy_
std::vector< double > hcalDepth5Energy_
std::vector< double > hcalDepth4Energy_
std::vector< double > ptGlob_
std::vector< double > hcalDepth5EnergyHot_
std::vector< double > hcalDepth5ActiveLengthHot_
std::vector< double > hcalDepth2ActiveLength_
std::vector< double > hcalActiveLengthHot_
std::vector< double > hcalDepth2Energy_
std::vector< double > hcalDepth1Energy_
std::vector< double > hcalActiveLength_
std::vector< double > hcalDepth7Energy_
std::vector< double > hcalDepth3Energy_
std::vector< double > hcalDepth1ActiveLengthHot_
std::vector< double > hcalDepth3ActiveLengthHot_
std::vector< double > hcalDepth6Energy_
std::vector< double > phiGlob_
std::vector< double > hcalDepth3ActiveLength_
std::vector< double > hcalDepth5ActiveLength_
std::vector< double > hcalDepth4EnergyHot_
std::vector< double > etaGlob_
std::vector< double > hcalDepth7ActiveLengthHot_
std::vector< double > pMuon_
std::vector< double > hcalDepth7EnergyHot_
std::vector< double > hcalDepth4ActiveLengthHot_
std::vector< double > hcalDepth6ActiveLength_
std::vector< double > hcalDepth1EnergyHot_
std::vector< double > hcalDepth7ActiveLength_
std::vector< double > hcalDepth3EnergyHot_
std::vector< unsigned int > hcalHot_
std::vector< double > hcalDepth4ActiveLength_
std::vector< unsigned int > ecalDetId_
std::vector< double > hcalDepth1ActiveLength_
virtual void HcalHBHEMuonSimAnalyzer::endLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
inlineprivatevirtual

Definition at line 57 of file HcalHBHEMuonSimAnalyzer.cc.

References activeLength(), clearVectors(), and matchId().

57 {}
virtual void HcalHBHEMuonSimAnalyzer::endRun ( edm::Run const &  ,
edm::EventSetup const &   
)
inlineoverrideprivatevirtual

Definition at line 55 of file HcalHBHEMuonSimAnalyzer.cc.

55 {}
void HcalHBHEMuonSimAnalyzer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 437 of file HcalHBHEMuonSimAnalyzer.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), and AlCaHLTBitMon_QueryRunRegistry::string.

437  {
438  //The following says we do not know what parameters are allowed so do no validation
439  // Please change this to state exactly what you do use, even if it is no parameters
441  desc.add<std::string>("ModuleLabel","g4SimHits");
442  desc.add<std::string>("EBCollection","EcalHitsEB");
443  desc.add<std::string>("EECollection","EcalHitsEE");
444  desc.add<std::string>("HCCollection","HcalHits");
445  desc.addUntracked<int>("Verbosity",0);
446  desc.addUntracked<int>("MaxDepth",4);
447  desc.addUntracked<double>("EtaMax",3.0);
448  desc.addUntracked<double>("TimeMinCutECAL",-500.0);
449  desc.addUntracked<double>("TimeMaxCutECAL",500.0);
450  desc.addUntracked<double>("TimeMinCutHCAL",-500.0);
451  desc.addUntracked<double>("TimeMaxCutHCAL",500.0);
452  descriptions.add("hcalHBHEMuonSim",desc);
453 }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
unsigned int HcalHBHEMuonSimAnalyzer::matchId ( const HcalDetId id1,
const HcalDetId id2 
)
private

Definition at line 505 of file HcalHBHEMuonSimAnalyzer.cc.

References HcalDetId::ieta(), HcalDetId::iphi(), match(), and HcalDetId::subdet().

Referenced by analyze(), and endLuminosityBlock().

506  {
507 
508  HcalDetId kd1(id1.subdet(),id1.ieta(),id1.iphi(),1);
509  HcalDetId kd2(id2.subdet(),id2.ieta(),id2.iphi(),1);
510  unsigned int match = ((kd1 == kd2) ? 1 : 0);
511  return match;
512 }
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:49
int ieta() const
get the cell ieta
Definition: HcalDetId.h:56
int iphi() const
get the cell iphi
Definition: HcalDetId.cc:103
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10

Member Data Documentation

std::vector<HcalDDDRecConstants::HcalActiveLength> HcalHBHEMuonSimAnalyzer::actHB_
private

Definition at line 66 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by activeLength(), and beginRun().

std::vector<HcalDDDRecConstants::HcalActiveLength> HcalHBHEMuonSimAnalyzer::actHE_
private

Definition at line 66 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by activeLength(), and beginRun().

unsigned int HcalHBHEMuonSimAnalyzer::bxNumber_
private

Definition at line 77 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

std::string HcalHBHEMuonSimAnalyzer::ebLabel_
private

Definition at line 62 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by HcalHBHEMuonSimAnalyzer().

std::vector<double> HcalHBHEMuonSimAnalyzer::ecal3x3Energy_
private

Definition at line 79 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

std::vector<unsigned int> HcalHBHEMuonSimAnalyzer::ecalDetId_
private

Definition at line 80 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

std::string HcalHBHEMuonSimAnalyzer::eeLabel_
private

Definition at line 62 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by HcalHBHEMuonSimAnalyzer().

std::vector<double> HcalHBHEMuonSimAnalyzer::etaGlob_
private

Definition at line 78 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonSimAnalyzer::etaMax_
private

Definition at line 65 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), and HcalHBHEMuonSimAnalyzer().

unsigned int HcalHBHEMuonSimAnalyzer::eventNumber_
private

Definition at line 77 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

edm::Service<TFileService> HcalHBHEMuonSimAnalyzer::fs_
private

Definition at line 70 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by beginJob().

std::string HcalHBHEMuonSimAnalyzer::g4Label_
private

Definition at line 62 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by HcalHBHEMuonSimAnalyzer().

std::vector<double> HcalHBHEMuonSimAnalyzer::hcal1x1Energy_
private

Definition at line 79 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::hcalActiveLength_
private

Definition at line 95 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::hcalActiveLengthHot_
private

Definition at line 95 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::hcalDepth1ActiveLength_
private

Definition at line 81 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::hcalDepth1ActiveLengthHot_
private

Definition at line 88 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::hcalDepth1Energy_
private

Definition at line 81 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::hcalDepth1EnergyHot_
private

Definition at line 88 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::hcalDepth2ActiveLength_
private

Definition at line 82 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::hcalDepth2ActiveLengthHot_
private

Definition at line 89 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::hcalDepth2Energy_
private

Definition at line 82 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::hcalDepth2EnergyHot_
private

Definition at line 89 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::hcalDepth3ActiveLength_
private

Definition at line 83 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::hcalDepth3ActiveLengthHot_
private

Definition at line 90 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::hcalDepth3Energy_
private

Definition at line 83 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::hcalDepth3EnergyHot_
private

Definition at line 90 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::hcalDepth4ActiveLength_
private

Definition at line 84 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::hcalDepth4ActiveLengthHot_
private

Definition at line 91 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::hcalDepth4Energy_
private

Definition at line 84 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::hcalDepth4EnergyHot_
private

Definition at line 91 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::hcalDepth5ActiveLength_
private

Definition at line 85 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::hcalDepth5ActiveLengthHot_
private

Definition at line 92 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::hcalDepth5Energy_
private

Definition at line 85 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::hcalDepth5EnergyHot_
private

Definition at line 92 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::hcalDepth6ActiveLength_
private

Definition at line 86 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::hcalDepth6ActiveLengthHot_
private

Definition at line 93 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::hcalDepth6Energy_
private

Definition at line 86 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::hcalDepth6EnergyHot_
private

Definition at line 93 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::hcalDepth7ActiveLength_
private

Definition at line 87 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::hcalDepth7ActiveLengthHot_
private

Definition at line 94 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::hcalDepth7Energy_
private

Definition at line 87 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::hcalDepth7EnergyHot_
private

Definition at line 94 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

std::vector<unsigned int> HcalHBHEMuonSimAnalyzer::hcalDetId_
private

Definition at line 80 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

std::vector<unsigned int> HcalHBHEMuonSimAnalyzer::hcalHot_
private

Definition at line 80 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

std::string HcalHBHEMuonSimAnalyzer::hcLabel_
private

Definition at line 63 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by HcalHBHEMuonSimAnalyzer().

const int HcalHBHEMuonSimAnalyzer::idMuon_ =13
private

Definition at line 68 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze().

unsigned int HcalHBHEMuonSimAnalyzer::lumiNumber_
private

Definition at line 77 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

const int HcalHBHEMuonSimAnalyzer::MaxDepth =7
private

Definition at line 67 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), and HcalHBHEMuonSimAnalyzer().

int HcalHBHEMuonSimAnalyzer::maxDepth_
private

Definition at line 64 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and HcalHBHEMuonSimAnalyzer().

std::vector<double> HcalHBHEMuonSimAnalyzer::phiGlob_
private

Definition at line 78 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::pMuon_
private

Definition at line 78 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

std::vector<double> HcalHBHEMuonSimAnalyzer::ptGlob_
private

Definition at line 78 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

unsigned int HcalHBHEMuonSimAnalyzer::runNumber_
private

Definition at line 77 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), beginJob(), and clearVectors().

double HcalHBHEMuonSimAnalyzer::tMaxE_
private

Definition at line 69 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), and HcalHBHEMuonSimAnalyzer().

double HcalHBHEMuonSimAnalyzer::tMaxH_
private

Definition at line 69 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), and HcalHBHEMuonSimAnalyzer().

double HcalHBHEMuonSimAnalyzer::tMinE_
private

Definition at line 69 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), and HcalHBHEMuonSimAnalyzer().

double HcalHBHEMuonSimAnalyzer::tMinH_
private

Definition at line 69 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), and HcalHBHEMuonSimAnalyzer().

edm::EDGetTokenT<edm::PCaloHitContainer> HcalHBHEMuonSimAnalyzer::tok_caloEB_
private

Definition at line 73 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), and HcalHBHEMuonSimAnalyzer().

edm::EDGetTokenT<edm::PCaloHitContainer> HcalHBHEMuonSimAnalyzer::tok_caloEE_
private

Definition at line 73 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), and HcalHBHEMuonSimAnalyzer().

edm::EDGetTokenT<edm::PCaloHitContainer> HcalHBHEMuonSimAnalyzer::tok_caloHH_
private

Definition at line 74 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), and HcalHBHEMuonSimAnalyzer().

edm::EDGetTokenT<edm::SimTrackContainer> HcalHBHEMuonSimAnalyzer::tok_SimTk_
private

Definition at line 71 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), and HcalHBHEMuonSimAnalyzer().

edm::EDGetTokenT<edm::SimVertexContainer> HcalHBHEMuonSimAnalyzer::tok_SimVtx_
private

Definition at line 72 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), and HcalHBHEMuonSimAnalyzer().

TTree* HcalHBHEMuonSimAnalyzer::tree_
private

Definition at line 76 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), and beginJob().

int HcalHBHEMuonSimAnalyzer::verbosity_
private

Definition at line 64 of file HcalHBHEMuonSimAnalyzer.cc.

Referenced by analyze(), and HcalHBHEMuonSimAnalyzer().