121 else if (maxDepth_ < 1) maxDepth_ = 4;
124 <<
":" << hcLabel_ <<
"\nVerbosity " << verbosity_ <<
" MaxDepth " 125 << maxDepth_ <<
" Maximum Eta " << etaMax_ <<
" tMin|tMax " 156 edm::SimTrackContainer::const_iterator simTrkItr;
167 std::vector<PCaloHit> calohh;
169 for (
unsigned int k=1;
k<pcalohh->size(); ++
k) {
173 int det = ((((*pcalohh)[
k].id())>>28)&0xF);
174 if (det != 4) {testN =
true;
break;}
177 for (edm::PCaloHitContainer::const_iterator itr=pcalohh->begin(); itr != pcalohh->end(); ++itr) {
182 calohh.push_back(hit);
185 calohh.insert(calohh.end(),pcalohh->begin(),pcalohh->end());
206 for (edm::SimTrackContainer::const_iterator simTrkItr=SimTk->begin();
207 simTrkItr!= SimTk->end(); simTrkItr++) {
208 if ((
std::abs(simTrkItr->type()) ==
idMuon_) && (simTrkItr->vertIndex() == 0) &&
210 unsigned int thisTrk = simTrkItr->trackId();
213 double eEcal(0), eHcal(0), activeLengthTot(0), activeLengthHotTot(0);
216 unsigned int isHot(0);
218 eHcalDepth[
i] = eHcalDepthHot[
i] = activeL[
i] = activeHotL[
i] = -10000;
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 243 std::cout <<
"Track at vertex " << tkvx.
ok <<
" position " 254 eEcal =
spr::eECALmatrix(isoCell, pcaloeb, pcaloee, geo, caloTopology, 1, 1, -100.0, -100.0,
tMinE_,
tMaxE_, debug);
259 eHcal =
spr::eHCALmatrix(theHBHETopology, closestCell, calohh,0,0,
false, -100.0, -100.0, -100.0, -100.0,
tMinH_,
tMaxH_, debug);
263 << eHcal << std::endl;
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;
277 activeL[ehdepth[
i].second-1] = actL;
278 activeLengthTot += actL;
281 std::cout << hcid0 <<
" E " << ehdepth[
i].first <<
" L " << actL
290 spr::eHCALmatrix(geo,theHBHETopology, closestCell, calohh, 1,1, hotCell, debug);
291 isHot =
matchId(closestCell,hotCell);
294 std::cout <<
"hcal 3X3 < " << h3x3 <<
">" <<
" ClosestCell <" 295 << (
HcalDetId)(closestCell) <<
"> hotCell id < " << hotCell
296 <<
"> isHot" << isHot << std::endl;
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;
311 activeHotL[ehdepth[
i].second-1] = actL;
312 activeLengthHotTot += actL;
315 std::cout << hcid0 <<
" E " << ehdepth[
i].first <<
" L " 316 << actL << std::endl;
323 std::cout <<
"Depth " <<
k <<
" E " << eHcalDepth[
k] <<
":" 324 << eHcalDepthHot[
k] << std::endl;
452 descriptions.
add(
"hcalHBHEMuonSim",desc);
510 unsigned int match = ((kd1 == kd2) ? 1 : 0);
516 int ieta =
id.ietaAbs();
517 int depth=
id.depth();
520 for (
unsigned int i=0;
i<
actHB_.size(); ++
i) {
527 for (
unsigned int i=0;
i<
actHE_.size(); ++
i) {
static const std::string kSharedResource
std::vector< double > hcalDepth2ActiveLengthHot_
T getParameter(std::string const &) const
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
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)
HcalSubdetector subdet() const
get the subdetector
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
std::vector< double > hcalDepth2EnergyHot_
std::vector< unsigned int > hcalDetId_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
std::vector< double > hcal1x1Energy_
Geom::Phi< T > phi() const
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)
int bunchCrossing() const
std::vector< double > hcalDepth5Energy_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< edm::SimVertexContainer > tok_SimVtx_
std::vector< double > hcalDepth4Energy_
T * make(const Args &...args) const
make new ROOT object
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_
LuminosityBlockNumber_t luminosityBlock() const
edm::Service< TFileService > fs_
virtual void endRun(edm::Run const &, edm::EventSetup const &) override
virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
std::vector< double > hcalDepth2ActiveLength_
std::vector< double > hcalActiveLengthHot_
double activeLength(const DetId &)
std::vector< double > hcalDepth2Energy_
uint32_t rawId() const
get the raw id
U second(std::pair< T, U > const &p)
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
Abs< T >::type abs(const T &t)
std::vector< double > hcalDepth1ActiveLengthHot_
~HcalHBHEMuonSimAnalyzer()
ParameterDescriptionBase * add(U const &iLabel, T const &value)
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< HcalActiveLength > getThickActive(const int type) const
std::vector< double > phiGlob_
std::vector< HcalDDDRecConstants::HcalActiveLength > actHE_
virtual void beginRun(edm::Run const &, edm::EventSetup const &) override
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloHH_
int iphi() const
get the cell iphi
std::vector< double > hcalDepth3ActiveLength_
GlobalVector directionHCAL
std::vector< double > hcalDepth5ActiveLength_
std::vector< double > hcalDepth4EnergyHot_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloEB_
unsigned int eventNumber_
std::vector< double > etaGlob_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
virtual void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
std::vector< double > hcalDepth7ActiveLengthHot_
std::vector< HcalDDDRecConstants::HcalActiveLength > actHB_
std::vector< double > pMuon_
std::vector< double > hcalDepth7EnergyHot_
std::vector< double > hcalDepth4ActiveLengthHot_
std::vector< double > hcalDepth6ActiveLength_
GlobalVector directionECAL
void setID(unsigned int id)
unsigned int matchId(const HcalDetId &, const HcalDetId &)
HcalHBHEMuonSimAnalyzer(const edm::ParameterSet &)
std::vector< double > hcalDepth1EnergyHot_
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
DetId relabel(const uint32_t testId) const
std::vector< double > hcalDepth7ActiveLength_
std::vector< double > hcalDepth3EnergyHot_
virtual void beginJob() override
T const * product() const
virtual void analyze(edm::Event const &, edm::EventSetup const &) override
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)