|
|
Go to the documentation of this file.
152 std::vector<PCaloHit> calohh;
154 for (
unsigned int k = 1;
k < pcalohh->size(); ++
k) {
158 int det = ((((*pcalohh)[
k].id()) >> 28) & 0xF);
165 for (edm::PCaloHitContainer::const_iterator
itr = pcalohh->begin();
itr != pcalohh->end(); ++
itr) {
172 calohh.push_back(
hit);
175 calohh.insert(calohh.end(), pcalohh->begin(), pcalohh->end());
196 for (edm::SimTrackContainer::const_iterator simTrkItr = SimTk->begin(); simTrkItr != SimTk->end(); simTrkItr++) {
197 if ((
std::abs(simTrkItr->type()) ==
idMuon_) && (simTrkItr->vertIndex() == 0) &&
199 unsigned int thisTrk = simTrkItr->trackId();
202 double eEcal(0), eHcal(0), activeLengthTot(0), activeLengthHotTot(0);
205 unsigned int isHot(0);
206 bool tmpmatch(
false);
208 eHcalDepth[
i] = eHcalDepthHot[
i] = activeL[
i] = activeHotL[
i] = -10000;
212 std::cout <<
"Track Type " << simTrkItr->type() <<
" Vertex " << simTrkItr->vertIndex() <<
" Charge "
213 << simTrkItr->charge() <<
" Momentum " << simTrkItr->momentum().P() <<
":"
214 << simTrkItr->momentum().eta() <<
":" << simTrkItr->momentum().phi() <<
" ECAL|HCAL " << trkD.
okECAL
219 bool propageback(
false);
235 std::cout <<
"Track at vertex " << tkvx.
ok <<
" position " << tkvx.
position <<
" Momentum "
237 << tkvx.
charge << std::endl;
245 isoCell, pcaloeb, pcaloee, geo, caloTopology, 1, 1, -100.0, -100.0,
tMinE_,
tMaxE_,
debug);
255 theHBHETopology, closestCell, calohh, 0, 0,
false, -100.0, -100.0, -100.0, -100.0,
tMinH_,
tMaxH_,
debug);
258 std::cout <<
"eEcal " << trkD.
okECAL <<
":" << eEcal <<
" eHcal " << eHcal << std::endl;
267 std::vector<std::pair<double, int> > ehdepth;
280 for (
unsigned int i = 0;
i < ehdepth.size(); ++
i) {
281 eHcalDepth[ehdepth[
i].second - 1] = ehdepth[
i].first;
285 activeL[ehdepth[
i].second - 1] = actL;
286 activeLengthTot += actL;
289 std::cout << hcid0 <<
" E " << ehdepth[
i].first <<
" L " << actL << std::endl;
298 isHot =
matchId(closestCell, hotCell);
301 std::cout <<
"hcal 3X3 < " << h3x3 <<
">"
302 <<
" ClosestCell <" << (
HcalDetId)(closestCell) <<
"> hotCell id < " << hotCell <<
"> isHot"
303 << isHot << std::endl;
313 std::vector<std::pair<double, int> > ehdepth;
315 hotCell, calohh, ehdepth,
maxDepth_, -100.0, -100.0, -100.0, -100.0,
tMinH_,
tMaxH_, depthHE,
debug);
316 for (
unsigned int i = 0;
i < ehdepth.size(); ++
i) {
317 eHcalDepthHot[ehdepth[
i].second - 1] = ehdepth[
i].first;
321 activeHotL[ehdepth[
i].second - 1] = actL;
322 activeLengthHotTot += actL;
325 std::cout << hcid0 <<
" E " << ehdepth[
i].first <<
" L " << actL << std::endl;
332 std::cout <<
"Depth " <<
k <<
" E " << eHcalDepth[
k] <<
":" << eHcalDepthHot[
k] << std::endl;
376 sprintf(
name,
"hcal_edepth%d", (
k + 1));
378 sprintf(
name,
"hcal_activeL%d", (
k + 1));
380 sprintf(
name,
"hcal_edepthHot%d", (
k + 1));
382 sprintf(
name,
"hcal_activeHotL%d", (
k + 1));
403 desc.addUntracked<
int>(
"Verbosity", 0);
404 desc.addUntracked<
int>(
"MaxDepth", 4);
405 desc.addUntracked<
double>(
"EtaMax", 3.0);
406 desc.addUntracked<
double>(
"TimeMinCutECAL", -500.);
407 desc.addUntracked<
double>(
"TimeMaxCutECAL", 500.);
408 desc.addUntracked<
double>(
"TimeMinCutHCAL", -500.);
409 desc.addUntracked<
double>(
"TimeMaxCutHCAL", 500.);
410 descriptions.
add(
"hcalHBHEMuonSim",
desc);
443 unsigned int match = ((kd1 == kd2) ? 1 : 0);
449 int ieta =
id.ietaAbs();
450 int depth =
id.depth();
453 for (
unsigned int i = 0;
i <
actHB_.size(); ++
i) {
460 for (
unsigned int i = 0;
i <
actHE_.size(); ++
i) {
std::vector< double > ecal3x3Energy_
T const * product() const
void analyze(edm::Event const &, edm::EventSetup const &) override
std::vector< double > hcalDepthActiveLength_[depthMax_]
std::vector< double > hcalDepthActiveLengthHot_[depthMax_]
std::vector< double > hcalDepthEnergyHot_[depthMax_]
static const int depthMax_
std::vector< double > hcal1x1Energy_
std::vector< unsigned int > hcalDetId_
constexpr int iphi() const
get the cell iphi
std::vector< HcalActiveLength > getThickActive(const int &type) const
U second(std::pair< T, U > const &p)
edm::Service< TFileService > fs_
std::vector< double > ptGlob_
T getUntrackedParameter(std::string const &, T const &) const
std::vector< double > matchedId_
std::vector< double > hcalActiveLengthHot_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
double activeLength(const DetId &)
edm::EDGetTokenT< edm::SimVertexContainer > tok_SimVtx_
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, int useRaw=0, int depthHE=3, bool debug=false)
#define DEFINE_FWK_MODULE(type)
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 add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< double > hcalActiveLength_
edm::EDGetTokenT< edm::SimTrackContainer > tok_SimTk_
int getMinDepth(const int &itype, const int &ieta, const int &iphi, const int &zside) const
constexpr int ieta() const
get the cell ieta
std::vector< double > hcalDepthEnergy_[depthMax_]
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
constexpr HcalSubdetector subdet() const
get the subdetector
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloHH_
unsigned int eventNumber_
~HcalHBHEMuonSimAnalyzer() override
void beginRun(edm::Run const &, edm::EventSetup const &) override
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloEB_
spr::trackAtOrigin simTrackAtOrigin(unsigned int thisTrk, edm::Handle< edm::SimTrackContainer > &SimTk, edm::Handle< edm::SimVertexContainer > &SimVtx, bool debug=false)
std::vector< std::pair< float, float > >::iterator itr
GlobalVector directionECAL
void endRun(edm::Run const &, edm::EventSetup const &) override
GlobalVector directionHCAL
std::vector< double > phiGlob_
std::vector< HcalDDDRecConstants::HcalActiveLength > actHB_
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, const std::string &theTrackQuality, bool debug=false)
std::vector< double > etaGlob_
std::vector< HcalDDDRecConstants::HcalActiveLength > actHE_
std::vector< double > pMuon_
DetId relabel(const uint32_t testId) const
constexpr uint32_t rawId() const
get the raw id
spr::propagatedTrackDirection propagateHCALBack(unsigned int thisTrk, edm::Handle< edm::SimTrackContainer > &SimTk, edm::Handle< edm::SimVertexContainer > &SimVtx, const CaloGeometry *geo, const MagneticField *bField, bool debug=false)
virtual void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
static const std::string kSharedResource
HcalHBHEMuonSimAnalyzer(const edm::ParameterSet &)
T getParameter(std::string const &) 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, int useRaw=0, bool debug=false)
unsigned int matchId(const HcalDetId &, const HcalDetId &)
Abs< T >::type abs(const T &t)
std::vector< unsigned int > hcalHot_
constexpr int zside() const
get the z-side of the cell (1/-1)
Geom::Phi< T > phi() const
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloEE_
T * make(const Args &... args) const
make new ROOT object
std::vector< unsigned int > ecalDetId_