CMS 3D CMS Logo

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

#include <CaloTowersCreationAlgo.h>

Classes

struct  MetaTower
 

Public Member Functions

void begin ()
 
 CaloTowersCreationAlgo ()
 
 CaloTowersCreationAlgo (double EBthreshold, double EEthreshold, bool useEtEBTreshold, bool useEtEETreshold, bool useSymEBTreshold, bool useSymEETreshold, double HcalThreshold, double HBthreshold, double HBthreshold1, double HBthreshold2, double HESthreshold, double HESthreshold1, double HEDthreshold, double HEDthreshold1, double HOthreshold0, double HOthresholdPlus1, double HOthresholdMinus1, double HOthresholdPlus2, double HOthresholdMinus2, double HF1threshold, double HF2threshold, const std::vector< double > &EBGrid, const std::vector< double > &EBWeights, const std::vector< double > &EEGrid, const std::vector< double > &EEWeights, const std::vector< double > &HBGrid, const std::vector< double > &HBWeights, const std::vector< double > &HESGrid, const std::vector< double > &HESWeights, const std::vector< double > &HEDGrid, const std::vector< double > &HEDWeights, const std::vector< double > &HOGrid, const std::vector< double > &HOWeights, const std::vector< double > &HF1Grid, const std::vector< double > &HF1Weights, const std::vector< double > &HF2Grid, const std::vector< double > &HF2Weights, double EBweight, double EEweight, double HBweight, double HESweight, double HEDweight, double HOweight, double HF1weight, double HF2weight, double EcutTower, double EBSumThreshold, double EESumThreshold, bool useHO, int momConstrMethod, double momHBDepth, double momHEDepth, double momEBDepth, double momEEDepth, int hcalPhase=0)
 
 CaloTowersCreationAlgo (double EBthreshold, double EEthreshold, bool useEtEBTreshold, bool useEtEETreshold, bool useSymEBTreshold, bool useSymEETreshold, double HcalThreshold, double HBthreshold, double HBthreshold1, double HBthreshold2, double HESthreshold, double HESthreshold1, double HEDthreshold, double HEDthreshold1, double HOthreshold0, double HOthresholdPlus1, double HOthresholdMinus1, double HOthresholdPlus2, double HOthresholdMinus2, double HF1threshold, double HF2threshold, double EBweight, double EEweight, double HBweight, double HESweight, double HEDweight, double HOweight, double HF1weight, double HF2weight, double EcutTower, double EBSumThreshold, double EESumThreshold, bool useHO, int momConstrMethod, double momHBDepth, double momHEDepth, double momEBDepth, double momEEDepth, int hcalPhase=0)
 
std::tuple< unsigned int, bool > ecalChanStatusForCaloTower (const EcalRecHit *hit)
 
GlobalPoint emCrystalShwrPos (DetId detId, float fracDepth)
 
GlobalPoint emShwrLogWeightPos (const std::vector< std::pair< DetId, float >> &metaContains, float fracDepth, double totEmE)
 
GlobalPoint emShwrPos (const std::vector< std::pair< DetId, float >> &metaContains, float fracDepth, double totEmE)
 
void finish (CaloTowerCollection &destCollection)
 
GlobalPoint hadSegmentShwrPos (DetId detId, float fracDepth)
 
GlobalPoint hadShwPosFromCells (DetId frontCell, DetId backCell, float fracDepth)
 
GlobalPoint hadShwrPos (CaloTowerDetId id, float fracDepth)
 
GlobalPoint hadShwrPos (const std::vector< std::pair< DetId, float >> &metaContains, float fracDepth, double hadE)
 
unsigned int hcalChanStatusForCaloTower (const CaloRecHit *hit)
 
void makeEcalBadChs ()
 
void makeHcalDropChMap ()
 
void process (const CaloTowerCollection &ctc)
 
void process (const EcalRecHitCollection &ecal)
 
void process (const HBHERecHitCollection &hbhe)
 
void process (const HFRecHitCollection &hf)
 
void process (const HORecHitCollection &ho)
 
void rescaleTowers (const CaloTowerCollection &ctInput, CaloTowerCollection &ctResult)
 
void setEBEScale (double scale)
 
void setEbHandle (const edm::Handle< EcalRecHitCollection > eb)
 
void setEcalChStatusFromDB (const EcalChannelStatus *s)
 
void setEcalSeveritiesToBeExcluded (const std::vector< int > &ecalSev)
 
void SetEcalSeveritiesToBeUsedInBadTowers (const std::vector< int > &ecalSev)
 
void setEcalSevLvlAlgo (const EcalSeverityLevelAlgo *a)
 
void setEEEScale (double scale)
 
void setEeHandle (const edm::Handle< EcalRecHitCollection > ee)
 
void setGeometry (const CaloTowerTopology *cttopo, const CaloTowerConstituentsMap *ctmap, const HcalTopology *htopo, const CaloGeometry *geo)
 
void setHBEScale (double scale)
 
void setHcalAcceptSeverityLevel (unsigned int level)
 
void setHcalAcceptSeverityLevelForRejectedHit (unsigned int level)
 
void setHcalChStatusFromDB (const HcalChannelQuality *s)
 
void setHcalSevLvlComputer (const HcalSeverityLevelComputer *c)
 
void setHEDEScale (double scale)
 
void setHESEScale (double scale)
 
void setHF1EScale (double scale)
 
void setHF2EScale (double scale)
 
void setHOEScale (double scale)
 
void setMissingHcalRescaleFactorForEcal (float factor)
 
void setRecoveredEcalHitsAreUsed (bool flag)
 
void setRecoveredHcalHitsAreUsed (bool flag)
 
void setUseRejectedHitsOnly (bool flag)
 
void setUseRejectedRecoveredEcalHits (bool flag)
 
void setUseRejectedRecoveredHcalHits (bool flag)
 

Public Attributes

int nalgo = -1
 

Private Types

enum  ctHitCategory {
  GoodChan = 0, BadChan = 1, RecoveredChan = 2, ProblematicChan = 3,
  IgnoredChan = 99
}
 
typedef std::map< CaloTowerDetId, std::pair< short int, bool > > HcalDropChMap
 
typedef std::vector< MetaTowerMetaTowerMap
 

Private Member Functions

void assignHitEcal (const EcalRecHit *recHit)
 adds a single hit to the tower More...
 
void assignHitHcal (const CaloRecHit *recHit)
 
int compactTime (float time)
 
void convert (const CaloTowerDetId &id, const MetaTower &mt, CaloTowerCollection &collection)
 
MetaTowerfind (const CaloTowerDetId &id)
 looks for a given tower in the internal cache. If it can't find it, it makes it. More...
 
void getThresholdAndWeight (const DetId &detId, double &threshold, double &weight) const
 helper method to look up the appropriate threshold & weight More...
 
void rescale (const CaloTower *ct)
 

Private Attributes

std::vector< unsigned short > ecalBadChs
 
HcalDropChMap hcalDropChMap
 
std::vector< HcalDetIdids_
 
float missingHcalRescaleFactorForEcal
 
double theEBEScale
 
std::vector< double > theEBGrid
 
edm::Handle< EcalRecHitCollectiontheEbHandle
 
double theEBSumThreshold
 
double theEBthreshold
 
double theEBweight
 
std::vector< double > theEBWeights
 
const EcalChannelStatustheEcalChStatus
 
std::vector< int > theEcalSeveritiesToBeExcluded
 
std::vector< int > theEcalSeveritiesToBeUsedInBadTowers
 
const EcalSeverityLevelAlgotheEcalSevLvlAlgo
 
double theEcutTower
 
double theEEEScale
 
std::vector< double > theEEGrid
 
edm::Handle< EcalRecHitCollectiontheEeHandle
 
double theEESumThreshold
 
double theEEthreshold
 
double theEEweight
 
std::vector< double > theEEWeights
 
const CaloGeometrytheGeometry
 
double theHBEScale
 
std::vector< double > theHBGrid
 
double theHBthreshold
 
double theHBthreshold1
 
double theHBthreshold2
 
double theHBweight
 
std::vector< double > theHBWeights
 
unsigned int theHcalAcceptSeverityLevel
 
unsigned int theHcalAcceptSeverityLevelForRejectedHit
 
const HcalChannelQualitytheHcalChStatus
 
int theHcalPhase
 
const HcalSeverityLevelComputertheHcalSevLvlComputer
 
double theHcalThreshold
 
const HcalTopologytheHcalTopology
 
double theHEDEScale
 
std::vector< double > theHEDGrid
 
double theHEDthreshold
 
double theHEDthreshold1
 
double theHEDweight
 
std::vector< double > theHEDWeights
 
double theHESEScale
 
std::vector< double > theHESGrid
 
double theHESthreshold
 
double theHESthreshold1
 
double theHESweight
 
std::vector< double > theHESWeights
 
double theHF1EScale
 
std::vector< double > theHF1Grid
 
double theHF1threshold
 
double theHF1weight
 
std::vector< double > theHF1Weights
 
double theHF2EScale
 
std::vector< double > theHF2Grid
 
double theHF2threshold
 
double theHF2weight
 
std::vector< double > theHF2Weights
 
double theHOEScale
 
std::vector< double > theHOGrid
 
bool theHOIsUsed
 only affects energy and ET calculation. HO is still recorded in the tower More...
 
double theHOthreshold0
 
double theHOthresholdMinus1
 
double theHOthresholdMinus2
 
double theHOthresholdPlus1
 
double theHOthresholdPlus2
 
double theHOweight
 
std::vector< double > theHOWeights
 
int theMomConstrMethod
 
double theMomEBDepth
 
double theMomEEDepth
 
double theMomHBDepth
 
double theMomHEDepth
 
bool theRecoveredEcalHitsAreUsed
 
bool theRecoveredHcalHitsAreUsed
 
const CaloTowerConstituentsMaptheTowerConstituentsMap
 
const CaloSubdetectorGeometrytheTowerGeometry
 
MetaTowerMap theTowerMap
 
unsigned int theTowerMapSize = 0
 
const CaloTowerTopologytheTowerTopology
 
bool theUseEtEBTresholdFlag
 
bool theUseEtEETresholdFlag
 
bool theUseSymEBTresholdFlag
 
bool theUseSymEETresholdFlag
 
bool useRejectedHitsOnly
 
unsigned int useRejectedRecoveredEcalHits
 
unsigned int useRejectedRecoveredHcalHits
 

Detailed Description

Author
R. Wilkinson - Caltech

Definition at line 48 of file CaloTowersCreationAlgo.h.

Member Typedef Documentation

◆ HcalDropChMap

typedef std::map<CaloTowerDetId, std::pair<short int, bool> > CaloTowersCreationAlgo::HcalDropChMap
private

Definition at line 380 of file CaloTowersCreationAlgo.h.

◆ MetaTowerMap

typedef std::vector<MetaTower> CaloTowersCreationAlgo::MetaTowerMap
private

Definition at line 374 of file CaloTowersCreationAlgo.h.

Member Enumeration Documentation

◆ ctHitCategory

Enumerator
GoodChan 
BadChan 
RecoveredChan 
ProblematicChan 
IgnoredChan 

Definition at line 390 of file CaloTowersCreationAlgo.h.

390 { GoodChan = 0, BadChan = 1, RecoveredChan = 2, ProblematicChan = 3, IgnoredChan = 99 };

Constructor & Destructor Documentation

◆ CaloTowersCreationAlgo() [1/3]

CaloTowersCreationAlgo::CaloTowersCreationAlgo ( )

Definition at line 14 of file CaloTowersCreationAlgo.cc.

15  : theEBthreshold(-1000.),
16  theEEthreshold(-1000.),
17 
22 
23  theHcalThreshold(-1000.),
24  theHBthreshold(-1000.),
25  theHBthreshold1(-1000.),
26  theHBthreshold2(-1000.),
27  theHESthreshold(-1000.),
28  theHESthreshold1(-1000.),
29  theHEDthreshold(-1000.),
30  theHEDthreshold1(-1000.),
31  theHOthreshold0(-1000.),
32  theHOthresholdPlus1(-1000.),
33  theHOthresholdMinus1(-1000.),
34  theHOthresholdPlus2(-1000.),
35  theHOthresholdMinus2(-1000.),
36  theHF1threshold(-1000.),
37  theHF2threshold(-1000.),
38  theEBGrid(std::vector<double>(5, 10.)),
39  theEBWeights(std::vector<double>(5, 1.)),
40  theEEGrid(std::vector<double>(5, 10.)),
41  theEEWeights(std::vector<double>(5, 1.)),
42  theHBGrid(std::vector<double>(5, 10.)),
43  theHBWeights(std::vector<double>(5, 1.)),
44  theHESGrid(std::vector<double>(5, 10.)),
45  theHESWeights(std::vector<double>(5, 1.)),
46  theHEDGrid(std::vector<double>(5, 10.)),
47  theHEDWeights(std::vector<double>(5, 1.)),
48  theHOGrid(std::vector<double>(5, 10.)),
49  theHOWeights(std::vector<double>(5, 1.)),
50  theHF1Grid(std::vector<double>(5, 10.)),
51  theHF1Weights(std::vector<double>(5, 1.)),
52  theHF2Grid(std::vector<double>(5, 10.)),
53  theHF2Weights(std::vector<double>(5, 1.)),
54  theEBweight(1.),
55  theEEweight(1.),
56  theHBweight(1.),
57  theHESweight(1.),
58  theHEDweight(1.),
59  theHOweight(1.),
60  theHF1weight(1.),
61  theHF2weight(1.),
62  theEcutTower(-1000.),
63  theEBSumThreshold(-1000.),
64  theEESumThreshold(-1000.),
65  theEBEScale(50.),
66  theEEEScale(50.),
67  theHBEScale(50.),
68  theHESEScale(50.),
69  theHEDEScale(50.),
70  theHOEScale(50.),
71  theHF1EScale(50.),
72  theHF2EScale(50.),
73  theHcalTopology(nullptr),
74  theGeometry(nullptr),
75  theTowerConstituentsMap(nullptr),
79  useRejectedHitsOnly(false),
84  theHOIsUsed(true),
85  // (for momentum reconstruction algorithm)
87  theMomHBDepth(0.),
88  theMomHEDepth(0.),
89  theMomEBDepth(0.),
90  theMomEEDepth(0.),
91  theHcalPhase(0) {}

◆ CaloTowersCreationAlgo() [2/3]

CaloTowersCreationAlgo::CaloTowersCreationAlgo ( double  EBthreshold,
double  EEthreshold,
bool  useEtEBTreshold,
bool  useEtEETreshold,
bool  useSymEBTreshold,
bool  useSymEETreshold,
double  HcalThreshold,
double  HBthreshold,
double  HBthreshold1,
double  HBthreshold2,
double  HESthreshold,
double  HESthreshold1,
double  HEDthreshold,
double  HEDthreshold1,
double  HOthreshold0,
double  HOthresholdPlus1,
double  HOthresholdMinus1,
double  HOthresholdPlus2,
double  HOthresholdMinus2,
double  HF1threshold,
double  HF2threshold,
double  EBweight,
double  EEweight,
double  HBweight,
double  HESweight,
double  HEDweight,
double  HOweight,
double  HF1weight,
double  HF2weight,
double  EcutTower,
double  EBSumThreshold,
double  EESumThreshold,
bool  useHO,
int  momConstrMethod,
double  momHBDepth,
double  momHEDepth,
double  momEBDepth,
double  momEEDepth,
int  hcalPhase = 0 
)

Definition at line 93 of file CaloTowersCreationAlgo.cc.

136  : theEBthreshold(EBthreshold),
137  theEEthreshold(EEthreshold),
138 
139  theUseEtEBTresholdFlag(useEtEBTreshold),
140  theUseEtEETresholdFlag(useEtEETreshold),
141  theUseSymEBTresholdFlag(useSymEBTreshold),
142  theUseSymEETresholdFlag(useSymEETreshold),
143 
145  theHBthreshold(HBthreshold),
146  theHBthreshold1(HBthreshold1),
147  theHBthreshold2(HBthreshold2),
148  theHESthreshold(HESthreshold),
149  theHESthreshold1(HESthreshold1),
150  theHEDthreshold(HEDthreshold),
151  theHEDthreshold1(HEDthreshold1),
152  theHOthreshold0(HOthreshold0),
153  theHOthresholdPlus1(HOthresholdPlus1),
154  theHOthresholdMinus1(HOthresholdMinus1),
155  theHOthresholdPlus2(HOthresholdPlus2),
156  theHOthresholdMinus2(HOthresholdMinus2),
157  theHF1threshold(HF1threshold),
158  theHF2threshold(HF2threshold),
159  theEBGrid(std::vector<double>(5, 10.)),
160  theEBWeights(std::vector<double>(5, 1.)),
161  theEEGrid(std::vector<double>(5, 10.)),
162  theEEWeights(std::vector<double>(5, 1.)),
163  theHBGrid(std::vector<double>(5, 10.)),
164  theHBWeights(std::vector<double>(5, 1.)),
165  theHESGrid(std::vector<double>(5, 10.)),
166  theHESWeights(std::vector<double>(5, 1.)),
167  theHEDGrid(std::vector<double>(5, 10.)),
168  theHEDWeights(std::vector<double>(5, 1.)),
169  theHOGrid(std::vector<double>(5, 10.)),
170  theHOWeights(std::vector<double>(5, 1.)),
171  theHF1Grid(std::vector<double>(5, 10.)),
172  theHF1Weights(std::vector<double>(5, 1.)),
173  theHF2Grid(std::vector<double>(5, 10.)),
174  theHF2Weights(std::vector<double>(5, 1.)),
175  theEBweight(EBweight),
176  theEEweight(EEweight),
177  theHBweight(HBweight),
178  theHESweight(HESweight),
179  theHEDweight(HEDweight),
180  theHOweight(HOweight),
181  theHF1weight(HF1weight),
182  theHF2weight(HF2weight),
186  theEBEScale(50.),
187  theEEEScale(50.),
188  theHBEScale(50.),
189  theHESEScale(50.),
190  theHEDEScale(50.),
191  theHOEScale(50.),
192  theHF1EScale(50.),
193  theHF2EScale(50.),
194  theHcalTopology(nullptr),
195  theGeometry(nullptr),
196  theTowerConstituentsMap(nullptr),
200  useRejectedHitsOnly(false),
206  // (momentum reconstruction algorithm)
207  theMomConstrMethod(momConstrMethod),
208  theMomHBDepth(momHBDepth),
209  theMomHEDepth(momHEDepth),
210  theMomEBDepth(momEBDepth),
211  theMomEEDepth(momEEDepth),
212  theHcalPhase(hcalPhase) {}

◆ CaloTowersCreationAlgo() [3/3]

CaloTowersCreationAlgo::CaloTowersCreationAlgo ( double  EBthreshold,
double  EEthreshold,
bool  useEtEBTreshold,
bool  useEtEETreshold,
bool  useSymEBTreshold,
bool  useSymEETreshold,
double  HcalThreshold,
double  HBthreshold,
double  HBthreshold1,
double  HBthreshold2,
double  HESthreshold,
double  HESthreshold1,
double  HEDthreshold,
double  HEDthreshold1,
double  HOthreshold0,
double  HOthresholdPlus1,
double  HOthresholdMinus1,
double  HOthresholdPlus2,
double  HOthresholdMinus2,
double  HF1threshold,
double  HF2threshold,
const std::vector< double > &  EBGrid,
const std::vector< double > &  EBWeights,
const std::vector< double > &  EEGrid,
const std::vector< double > &  EEWeights,
const std::vector< double > &  HBGrid,
const std::vector< double > &  HBWeights,
const std::vector< double > &  HESGrid,
const std::vector< double > &  HESWeights,
const std::vector< double > &  HEDGrid,
const std::vector< double > &  HEDWeights,
const std::vector< double > &  HOGrid,
const std::vector< double > &  HOWeights,
const std::vector< double > &  HF1Grid,
const std::vector< double > &  HF1Weights,
const std::vector< double > &  HF2Grid,
const std::vector< double > &  HF2Weights,
double  EBweight,
double  EEweight,
double  HBweight,
double  HESweight,
double  HEDweight,
double  HOweight,
double  HF1weight,
double  HF2weight,
double  EcutTower,
double  EBSumThreshold,
double  EESumThreshold,
bool  useHO,
int  momConstrMethod,
double  momHBDepth,
double  momHEDepth,
double  momEBDepth,
double  momEEDepth,
int  hcalPhase = 0 
)

Definition at line 214 of file CaloTowersCreationAlgo.cc.

272  : theEBthreshold(EBthreshold),
273  theEEthreshold(EEthreshold),
274 
275  theUseEtEBTresholdFlag(useEtEBTreshold),
276  theUseEtEETresholdFlag(useEtEETreshold),
277  theUseSymEBTresholdFlag(useSymEBTreshold),
278  theUseSymEETresholdFlag(useSymEETreshold),
279 
281  theHBthreshold(HBthreshold),
282  theHBthreshold1(HBthreshold1),
283  theHBthreshold2(HBthreshold2),
284  theHESthreshold(HESthreshold),
285  theHESthreshold1(HESthreshold1),
286  theHEDthreshold(HEDthreshold),
287  theHEDthreshold1(HEDthreshold1),
288  theHOthreshold0(HOthreshold0),
289  theHOthresholdPlus1(HOthresholdPlus1),
290  theHOthresholdMinus1(HOthresholdMinus1),
291  theHOthresholdPlus2(HOthresholdPlus2),
292  theHOthresholdMinus2(HOthresholdMinus2),
293  theHF1threshold(HF1threshold),
294  theHF2threshold(HF2threshold),
295  theEBGrid(EBGrid),
297  theEEGrid(EEGrid),
299  theHBGrid(HBGrid),
305  theHOGrid(HOGrid),
311  theEBweight(EBweight),
312  theEEweight(EEweight),
313  theHBweight(HBweight),
314  theHESweight(HESweight),
315  theHEDweight(HEDweight),
316  theHOweight(HOweight),
317  theHF1weight(HF1weight),
318  theHF2weight(HF2weight),
322  theEBEScale(50.),
323  theEEEScale(50.),
324  theHBEScale(50.),
325  theHESEScale(50.),
326  theHEDEScale(50.),
327  theHOEScale(50.),
328  theHF1EScale(50.),
329  theHF2EScale(50.),
330  theHcalTopology(nullptr),
331  theGeometry(nullptr),
332  theTowerConstituentsMap(nullptr),
336  useRejectedHitsOnly(false),
342  // (momentum reconstruction algorithm)
343  theMomConstrMethod(momConstrMethod),
344  theMomHBDepth(momHBDepth),
345  theMomHEDepth(momHEDepth),
346  theMomEBDepth(momEBDepth),
347  theMomEEDepth(momEEDepth),
348  theHcalPhase(hcalPhase) {
349  // static int N = 0;
350  // std::cout << "VI Algo " << ++N << std::endl;
351  // nalgo=N;
352 }

Member Function Documentation

◆ assignHitEcal()

void CaloTowersCreationAlgo::assignHitEcal ( const EcalRecHit recHit)
private

adds a single hit to the tower

Definition at line 772 of file CaloTowersCreationAlgo.cc.

772  {
773  DetId detId = recHit->detid();
774 
775  unsigned int chStatusForCT;
776  bool ecalIsBad = false;
777  std::tie(chStatusForCT, ecalIsBad) = ecalChanStatusForCaloTower(recHit);
778 
779  // this is for skipping channls: mostly needed for the creation of
780  // bad towers from hits i the bad channel collections.
781  if (chStatusForCT == CaloTowersCreationAlgo::IgnoredChan)
782  return;
783 
784  double threshold, weight;
786 
787  double energy = recHit->energy(); // original RecHit energy is used to apply thresholds
788  double e = energy * weight; // energies scaled by user weight: used in energy assignments
789 
791 
792  // For ECAL we count all bad channels after the metatower is complete
793 
794  // Include options for symmetric thresholds and cut on Et
795  // for ECAL RecHits
796 
797  bool passEmThreshold = false;
798 
799  if (detId.subdetId() == EcalBarrel) {
801  energy /= cosh((theGeometry->getGeometry(detId)->getPosition()).eta());
803  passEmThreshold = (fabs(energy) >= threshold);
804  else
805  passEmThreshold = (energy >= threshold);
806 
807  } else if (detId.subdetId() == EcalEndcap) {
809  energy /= cosh((theGeometry->getGeometry(detId)->getPosition()).eta());
811  passEmThreshold = (fabs(energy) >= threshold);
812  else
813  passEmThreshold = (energy >= threshold);
814  }
815 
816  CaloTowerDetId towerDetId = theTowerConstituentsMap->towerOf(detId);
817  if (towerDetId.null())
818  return;
819  MetaTower& tower = find(towerDetId);
820 
821  // count bad cells and avoid double counting with those from DB (Recovered are counted bad)
822 
823  // somehow misses some
824  // if ( (chStatusForCT == CaloTowersCreationAlgo::BadChan) & (!ecalIsBad) ) ++tower.numBadEcalCells;
825 
826  // a bit slower...
827  if (chStatusForCT == CaloTowersCreationAlgo::BadChan) {
828  auto thisEcalSevLvl = theEcalSevLvlAlgo->severityLevel(detId);
829  // check if the Ecal severity is ok to keep
830  auto sevit = std::find(theEcalSeveritiesToBeExcluded.begin(), theEcalSeveritiesToBeExcluded.end(), thisEcalSevLvl);
831  if (sevit == theEcalSeveritiesToBeExcluded.end())
832  ++tower.numBadEcalCells; // notinDB
833  }
834 
835  // if (chStatusForCT != CaloTowersCreationAlgo::BadChan && energy >= threshold) {
836  if (chStatusForCT != CaloTowersCreationAlgo::BadChan && passEmThreshold) {
837  tower.E_em += e;
838  tower.E += e;
839 
840  if (chStatusForCT == CaloTowersCreationAlgo::RecoveredChan) {
841  tower.numRecEcalCells += 1;
842  } else if (chStatusForCT == CaloTowersCreationAlgo::ProblematicChan) {
843  tower.numProbEcalCells += 1;
844  }
845 
846  // change when full status info is available
847  // for now use only good channels
848 
849  // add e>0 check (new options allow e<0)
850  if (chStatusForCT == CaloTowersCreationAlgo::GoodChan && e > 0) {
851  tower.emSumTimeTimesE += (e * recHit->time());
852  tower.emSumEForTime += e; // see above
853  }
854 
855  std::pair<DetId, float> mc(detId, e);
856  tower.metaConstituents.push_back(mc);
857  }
858 } // end of assignHitEcal method

References BadChan, MillePedeFileConverter_cfg::e, EcalBarrel, ecalChanStatusForCaloTower(), EcalEndcap, HCALHighEnergyHPDFilter_cfi::energy, PVValHelper::eta, spr::find(), find(), CaloGeometry::getGeometry(), getThresholdAndWeight(), GoodChan, IgnoredChan, CaloTowersParam_cfi::mc, DetId::null(), ProblematicChan, rpcPointValidation_cfi::recHit, RecoveredChan, EcalSeverityLevelAlgo::severityLevel(), DetId::subdetId(), theEcalSeveritiesToBeExcluded, theEcalSevLvlAlgo, theGeometry, theTowerConstituentsMap, theUseEtEBTresholdFlag, theUseEtEETresholdFlag, theUseSymEBTresholdFlag, theUseSymEETresholdFlag, remoteMonitoring_LED_IterMethod_cfg::threshold, hgcalTowerProducer_cfi::tower, CaloTowerConstituentsMap::towerOf(), and mps_merge::weight.

Referenced by process().

◆ assignHitHcal()

void CaloTowersCreationAlgo::assignHitHcal ( const CaloRecHit recHit)
private

Definition at line 534 of file CaloTowersCreationAlgo.cc.

534  {
535  DetId detId = recHit->detid();
536  DetId detIdF(detId);
537  if (detId.det() == DetId::Hcal && theHcalTopology->getMergePositionFlag()) {
538  detIdF = theHcalTopology->idFront(HcalDetId(detId));
539 #ifdef EDM_ML_DEBUG
540  std::cout << "AssignHitHcal DetId " << HcalDetId(detId) << " Front " << HcalDetId(detIdF) << std::endl;
541 #endif
542  }
543 
544  unsigned int chStatusForCT = hcalChanStatusForCaloTower(recHit);
545 
546  // this is for skipping channls: mostly needed for the creation of
547  // bad towers from hits i the bad channel collections.
548  if (chStatusForCT == CaloTowersCreationAlgo::IgnoredChan)
549  return;
550 
551  double threshold, weight;
553 
554  double energy = recHit->energy(); // original RecHit energy is used to apply thresholds
555  double e = energy * weight; // energies scaled by user weight: used in energy assignments
556 
557  // SPECIAL handling of tower 28 merged depths --> half into tower 28 and half into tower 29
558  bool merge(false);
559  if (detIdF.det() == DetId::Hcal && HcalDetId(detIdF).subdet() == HcalEndcap &&
560  (theHcalPhase == 0 || theHcalPhase == 1) &&
561  //HcalDetId(detId).depth()==3 &&
562  HcalDetId(detIdF).ietaAbs() == theHcalTopology->lastHERing() - 1) {
564 #ifdef EDM_ML_DEBUG
565  std::cout << "Merge " << HcalDetId(detIdF) << ":" << merge << std::endl;
566 #endif
567  }
568  if (merge) {
570 
571  // bad channels are counted regardless of energy threshold
572 
573  if (chStatusForCT == CaloTowersCreationAlgo::BadChan) {
574  CaloTowerDetId towerDetId = theTowerConstituentsMap->towerOf(detId);
575  if (towerDetId.null())
576  return;
577  MetaTower& tower28 = find(towerDetId);
578  CaloTowerDetId towerDetId29(towerDetId.ieta() + towerDetId.zside(), towerDetId.iphi());
579  MetaTower& tower29 = find(towerDetId29);
580  tower28.numBadHcalCells += 1;
581  tower29.numBadHcalCells += 1;
582  }
583 
584  else if (0.5 * energy >= threshold) { // not bad channel: use energy if above threshold
585 
586  CaloTowerDetId towerDetId = theTowerConstituentsMap->towerOf(detId);
587  if (towerDetId.null())
588  return;
589  MetaTower& tower28 = find(towerDetId);
590  CaloTowerDetId towerDetId29(towerDetId.ieta() + towerDetId.zside(), towerDetId.iphi());
591  MetaTower& tower29 = find(towerDetId29);
592 
593  if (chStatusForCT == CaloTowersCreationAlgo::RecoveredChan) {
594  tower28.numRecHcalCells += 1;
595  tower29.numRecHcalCells += 1;
596  } else if (chStatusForCT == CaloTowersCreationAlgo::ProblematicChan) {
597  tower28.numProbHcalCells += 1;
598  tower29.numProbHcalCells += 1;
599  }
600 
601  // NOTE DIVIDE BY 2!!!
602  double e28 = 0.5 * e;
603  double e29 = 0.5 * e;
604 
605  tower28.E_had += e28;
606  tower28.E += e28;
607  std::pair<DetId, float> mc(detId, e28);
608  tower28.metaConstituents.push_back(mc);
609 
610  tower29.E_had += e29;
611  tower29.E += e29;
612  tower29.metaConstituents.push_back(mc);
613 
614  // time info: do not use in averaging if timing error is found: need
615  // full set of status info to implement: use only "good" channels for now
616 
617  if (chStatusForCT == CaloTowersCreationAlgo::GoodChan) {
618  tower28.hadSumTimeTimesE += (e28 * recHit->time());
619  tower28.hadSumEForTime += e28;
620  tower29.hadSumTimeTimesE += (e29 * recHit->time());
621  tower29.hadSumEForTime += e29;
622  }
623 
624  // store the energy in layer 3 also in E_outer
625  tower28.E_outer += e28;
626  tower29.E_outer += e29;
627  } // not a "bad" hit
628  } // end of special case
629 
630  else {
631  HcalDetId hcalDetId(detId);
632 
634 
635  if (hcalDetId.subdet() == HcalOuter) {
636  CaloTowerDetId towerDetId = theTowerConstituentsMap->towerOf(detId);
637  if (towerDetId.null())
638  return;
639  MetaTower& tower = find(towerDetId);
640 
641  if (chStatusForCT == CaloTowersCreationAlgo::BadChan) {
642  if (theHOIsUsed)
643  tower.numBadHcalCells += 1;
644  }
645 
646  else if (energy >= threshold) {
647  tower.E_outer += e; // store HO energy even if HO is not used
648  // add energy of the tower and/or flag if theHOIsUsed
649  if (theHOIsUsed) {
650  tower.E += e;
651 
652  if (chStatusForCT == CaloTowersCreationAlgo::RecoveredChan) {
653  tower.numRecHcalCells += 1;
654  } else if (chStatusForCT == CaloTowersCreationAlgo::ProblematicChan) {
655  tower.numProbHcalCells += 1;
656  }
657  } // HO is used
658 
659  // add HO to constituents even if it is not used: JetMET wants to keep these towers
660  std::pair<DetId, float> mc(detId, e);
661  tower.metaConstituents.push_back(mc);
662 
663  } // not a bad channel, energy above threshold
664 
665  } // HO hit
666 
667  // HF calculates EM fraction differently
668  else if (hcalDetId.subdet() == HcalForward) {
669  if (chStatusForCT == CaloTowersCreationAlgo::BadChan) {
670  CaloTowerDetId towerDetId = theTowerConstituentsMap->towerOf(detId);
671  if (towerDetId.null())
672  return;
673  MetaTower& tower = find(towerDetId);
674  tower.numBadHcalCells += 1;
675  }
676 
677  else if (energy >= threshold) {
678  CaloTowerDetId towerDetId = theTowerConstituentsMap->towerOf(detId);
679  if (towerDetId.null())
680  return;
681  MetaTower& tower = find(towerDetId);
682 
683  if (hcalDetId.depth() == 1) {
684  // long fiber, so E_EM = E(Long) - E(Short)
685  tower.E_em += e;
686  } else {
687  // short fiber, EHAD = 2 * E(Short)
688  tower.E_em -= e;
689  tower.E_had += 2. * e;
690  }
691  tower.E += e;
692  if (chStatusForCT == CaloTowersCreationAlgo::RecoveredChan) {
693  tower.numRecHcalCells += 1;
694  } else if (chStatusForCT == CaloTowersCreationAlgo::ProblematicChan) {
695  tower.numProbHcalCells += 1;
696  }
697 
698  // put the timing in HCAL -> have to check timing errors when available
699  // for now use only good channels
700  if (chStatusForCT == CaloTowersCreationAlgo::GoodChan) {
701  tower.hadSumTimeTimesE += (e * recHit->time());
702  tower.hadSumEForTime += e;
703  }
704 
705  std::pair<DetId, float> mc(detId, e);
706  tower.metaConstituents.push_back(mc);
707 
708  } // not a bad HF channel, energy above threshold
709 
710  } // HF hit
711 
712  else {
713  // HCAL situation normal in HB/HE
714  if (chStatusForCT == CaloTowersCreationAlgo::BadChan) {
715  CaloTowerDetId towerDetId = theTowerConstituentsMap->towerOf(detId);
716  if (towerDetId.null())
717  return;
718  MetaTower& tower = find(towerDetId);
719  tower.numBadHcalCells += 1;
720  } else if (energy >= threshold) {
721  CaloTowerDetId towerDetId = theTowerConstituentsMap->towerOf(detId);
722  if (towerDetId.null())
723  return;
724  MetaTower& tower = find(towerDetId);
725  tower.E_had += e;
726  tower.E += e;
727  if (chStatusForCT == CaloTowersCreationAlgo::RecoveredChan) {
728  tower.numRecHcalCells += 1;
729  } else if (chStatusForCT == CaloTowersCreationAlgo::ProblematicChan) {
730  tower.numProbHcalCells += 1;
731  }
732 
733  // Timing information: need specific accessors
734  // for now use only good channels
735  if (chStatusForCT == CaloTowersCreationAlgo::GoodChan) {
736  tower.hadSumTimeTimesE += (e * recHit->time());
737  tower.hadSumEForTime += e;
738  }
739  // store energy in highest depth for towers 18-27 (for electron,photon ID in endcap)
740  // also, store energy in HE part of tower 16 (for JetMET cleanup)
741  HcalDetId hcalDetId(detId);
742  if (hcalDetId.subdet() == HcalEndcap) {
743  if (theHcalPhase == 0) {
744  if ((hcalDetId.depth() == 2 && hcalDetId.ietaAbs() >= 18 && hcalDetId.ietaAbs() < 27) ||
745  (hcalDetId.depth() == 3 && hcalDetId.ietaAbs() == 27) ||
746  (hcalDetId.depth() == 3 && hcalDetId.ietaAbs() == 16)) {
747  tower.E_outer += e;
748  }
749  }
750  //combine depths in phase0-like way
751  else if (theHcalPhase == 1) {
752  if ((hcalDetId.depth() >= 3 && hcalDetId.ietaAbs() >= 18 && hcalDetId.ietaAbs() < 26) ||
753  (hcalDetId.depth() >= 4 && (hcalDetId.ietaAbs() == 26 || hcalDetId.ietaAbs() == 27)) ||
754  (hcalDetId.depth() == 3 && hcalDetId.ietaAbs() == 17) ||
755  (hcalDetId.depth() == 4 && hcalDetId.ietaAbs() == 16)) {
756  tower.E_outer += e;
757  }
758  }
759  }
760 
761  std::pair<DetId, float> mc(detId, e);
762  tower.metaConstituents.push_back(mc);
763 
764  } // not a "bad" channel, energy above threshold
765 
766  } // channel in HBHE (excluding twrs 28,29)
767 
768  } // recHit normal case (not in HE towers 28,29)
769 
770 } // end of assignHitHcal method

References BadChan, gather_cfg::cout, HcalDetId::depth(), DetId::det(), MillePedeFileConverter_cfg::e, CaloTowersCreationAlgo::MetaTower::E, CaloTowersCreationAlgo::MetaTower::E_had, CaloTowersCreationAlgo::MetaTower::E_outer, HCALHighEnergyHPDFilter_cfi::energy, find(), HcalTopology::getMergePositionFlag(), getThresholdAndWeight(), GoodChan, CaloTowersCreationAlgo::MetaTower::hadSumEForTime, CaloTowersCreationAlgo::MetaTower::hadSumTimeTimesE, DetId::Hcal, hcalChanStatusForCaloTower(), HcalEndcap, HcalForward, HcalOuter, HcalTopology::idFront(), CaloTowerDetId::ieta(), HcalDetId::ietaAbs(), IgnoredChan, CaloTowerDetId::iphi(), HcalTopology::lastHERing(), CaloTowersParam_cfi::mc, MatrixUtil::merge(), HcalTopology::mergedDepth29(), CaloTowersCreationAlgo::MetaTower::metaConstituents, DetId::null(), CaloTowersCreationAlgo::MetaTower::numBadHcalCells, CaloTowersCreationAlgo::MetaTower::numProbHcalCells, CaloTowersCreationAlgo::MetaTower::numRecHcalCells, ProblematicChan, rpcPointValidation_cfi::recHit, RecoveredChan, HcalDetId::subdet(), theHcalPhase, theHcalTopology, theHOIsUsed, theTowerConstituentsMap, remoteMonitoring_LED_IterMethod_cfg::threshold, hgcalTowerProducer_cfi::tower, CaloTowerConstituentsMap::towerOf(), mps_merge::weight, and CaloTowerDetId::zside().

Referenced by process().

◆ begin()

void CaloTowersCreationAlgo::begin ( void  )

Definition at line 368 of file CaloTowersCreationAlgo.cc.

368  {
369  theTowerMap.clear();
370  theTowerMapSize = 0;
371  //hcalDropChMap.clear();
372 }

References theTowerMap, and theTowerMapSize.

Referenced by CaloTowersReCreator::produce(), and CaloTowersCreator::produce().

◆ compactTime()

int CaloTowersCreationAlgo::compactTime ( float  time)
private

Definition at line 1632 of file CaloTowersCreationAlgo.cc.

1632  {
1633  const float timeUnit = 0.01; // discretization (ns)
1634 
1635  if (time > 300.0)
1636  return 30000;
1637  if (time < -300.0)
1638  return -30000;
1639 
1640  return int(time / timeUnit + 0.5);
1641 }

References createfilelist::int, and protons_cff::time.

Referenced by convert().

◆ convert()

void CaloTowersCreationAlgo::convert ( const CaloTowerDetId id,
const MetaTower mt,
CaloTowerCollection collection 
)
private

if (E>0) towerP4 = CaloTower::PolarLorentzVector(E*sumPf, emPoint.eta(), emPoint.phi(), 0);

Definition at line 924 of file CaloTowersCreationAlgo.cc.

924  {
925  assert(id.rawId() != 0);
926 
927  double ecalThres = (id.ietaAbs() <= 17) ? (theEBSumThreshold) : (theEESumThreshold);
928  double E = mt.E;
929  double E_em = mt.E_em;
930  double E_had = mt.E_had;
931  double E_outer = mt.E_outer;
932 
933  // Note: E_outer is used to save HO energy OR energy in the outermost depths in endcap region
934  // In the methods with separate treatment of EM and HAD components:
935  // - HO is not used to determine direction, however HO energy is added to get "total had energy"
936  // => Check if the tower is within HO coverage before adding E_outer to the "total had" energy
937  // else the energy will be double counted
938  // When summing up the energy of the tower these checks are performed in the loops over RecHits
939 
940  std::vector<std::pair<DetId, float> > metaContains = mt.metaConstituents;
941  if (id.ietaAbs() < theTowerTopology->firstHFRing() && E_em < ecalThres) { // ignore EM threshold in HF
942  E -= E_em;
943  E_em = 0;
944  std::vector<std::pair<DetId, float> > metaContains_noecal;
945 
946  for (std::vector<std::pair<DetId, float> >::iterator i = metaContains.begin(); i != metaContains.end(); ++i)
947  if (i->first.det() != DetId::Ecal)
948  metaContains_noecal.push_back(*i);
949  metaContains.swap(metaContains_noecal);
950  }
951  if (id.ietaAbs() < theTowerTopology->firstHFRing() && E_had < theHcalThreshold) {
952  E -= E_had;
953 
954  if (theHOIsUsed && id.ietaAbs() <= theTowerTopology->lastHORing())
955  E -= E_outer; // not subtracted before, think it should be done
956 
957  E_had = 0;
958  E_outer = 0;
959  std::vector<std::pair<DetId, float> > metaContains_nohcal;
960 
961  for (std::vector<std::pair<DetId, float> >::iterator i = metaContains.begin(); i != metaContains.end(); ++i)
962  if (i->first.det() != DetId::Hcal)
963  metaContains_nohcal.push_back(*i);
964  metaContains.swap(metaContains_nohcal);
965  }
966 
967  if (metaContains.empty())
968  return;
969 
970  if (missingHcalRescaleFactorForEcal > 0 && E_had == 0 && E_em > 0) {
971  auto match = hcalDropChMap.find(id);
972  if (match != hcalDropChMap.end() && match->second.second) {
973  E_had = missingHcalRescaleFactorForEcal * E_em;
974  E += E_had;
975  }
976  }
977 
978  double E_had_tot = (theHOIsUsed && id.ietaAbs() <= theTowerTopology->lastHORing()) ? E_had + E_outer : E_had;
979 
980  // create CaloTower using the selected algorithm
981 
982  GlobalPoint emPoint, hadPoint;
983 
984  // this is actually a 4D vector
985  Basic3DVectorF towerP4;
986  bool massless = true;
987  // float mass1=0;
988  float mass2 = 0;
989 
990  // conditional assignment of depths for barrel/endcap
991  // Some additional tuning may be required in the transitional region
992  // 14<|iEta|<19
993  double momEmDepth = 0.;
994  double momHadDepth = 0.;
995  if (id.ietaAbs() <= 17) {
996  momHadDepth = theMomHBDepth;
997  momEmDepth = theMomEBDepth;
998  } else {
999  momHadDepth = theMomHEDepth;
1000  momEmDepth = theMomEEDepth;
1001  }
1002 
1003  switch (theMomConstrMethod) {
1004  // FIXME : move to simple cartesian algebra
1005  case 0: { // Simple 4-momentum assignment
1006  GlobalPoint p = theTowerGeometry->getGeometry(id)->getPosition();
1007  towerP4 = p.basicVector().unit();
1008  towerP4[3] = 1.f; // energy
1009  towerP4 *= E;
1010 
1011  // double pf=1.0/cosh(p.eta());
1012  // if (E>0) towerP4 = CaloTower::PolarLorentzVector(E*pf, p.eta(), p.phi(), 0);
1013 
1014  emPoint = p;
1015  hadPoint = p;
1016  } // end case 0
1017  break;
1018 
1019  case 1: { // separate 4-vectors for ECAL, HCAL, add to get the 4-vector of the tower (=>tower has mass!)
1020  if (id.ietaAbs() < theTowerTopology->firstHFRing()) {
1021  Basic3DVectorF emP4;
1022  if (E_em > 0) {
1023  emPoint = emShwrPos(metaContains, momEmDepth, E_em);
1024  emP4 = emPoint.basicVector().unit();
1025  emP4[3] = 1.f; // energy
1026  towerP4 = emP4 * E_em;
1027 
1028  // double emPf = 1.0/cosh(emPoint.eta());
1029  // towerP4 += CaloTower::PolarLorentzVector(E_em*emPf, emPoint.eta(), emPoint.phi(), 0);
1030  }
1031  if ((E_had + E_outer) > 0) {
1032  massless = (E_em <= 0);
1033  hadPoint = hadShwrPos(id, momHadDepth);
1034  auto lP4 = hadPoint.basicVector().unit();
1035  lP4[3] = 1.f; // energy
1036  if (!massless) {
1037  auto diff = lP4 - emP4;
1038  mass2 = std::sqrt(E_em * E_had_tot * diff.mag2());
1039  }
1040  lP4 *= E_had_tot;
1041  towerP4 += lP4;
1042  /*
1043  if (!massless) {
1044  auto p = towerP4;
1045  double m2 = double(p[3]*p[3]) - double(p[0]*p[0])+double(p[1]*p[1])+double(p[2]*p[2]); mass1 = m2>0 ? std::sqrt(m2) : 0;
1046  }
1047  */
1048  // double hadPf = 1.0/cosh(hadPoint.eta());
1049  // if (E_had_tot>0) {
1050  // towerP4 += CaloTower::PolarLorentzVector(E_had_tot*hadPf, hadPoint.eta(), hadPoint.phi(), 0);
1051  // }
1052  }
1053  } else { // forward detector: use the CaloTower position
1054  GlobalPoint p = theTowerGeometry->getGeometry(id)->getPosition();
1055  towerP4 = p.basicVector().unit();
1056  towerP4[3] = 1.f; // energy
1057  towerP4 *= E;
1058  // double pf=1.0/cosh(p.eta());
1059  // if (E>0) towerP4 = CaloTower::PolarLorentzVector(E*pf, p.eta(), p.phi(), 0); // simple momentum assignment, same position
1060  emPoint = p;
1061  hadPoint = p;
1062  }
1063  } // end case 1
1064  break;
1065 
1066  case 2: { // use ECAL position for the tower (when E_cal>0), else default CaloTower position (massless tower)
1067  if (id.ietaAbs() < theTowerTopology->firstHFRing()) {
1068  if (E_em > 0)
1069  emPoint = emShwrLogWeightPos(metaContains, momEmDepth, E_em);
1070  else
1071  emPoint = theTowerGeometry->getGeometry(id)->getPosition();
1072  towerP4 = emPoint.basicVector().unit();
1073  towerP4[3] = 1.f; // energy
1074  towerP4 *= E;
1075 
1076  // double sumPf = 1.0/cosh(emPoint.eta());
1078 
1079  hadPoint = emPoint;
1080  } else { // forward detector: use the CaloTower position
1081  GlobalPoint p = theTowerGeometry->getGeometry(id)->getPosition();
1082  towerP4 = p.basicVector().unit();
1083  towerP4[3] = 1.f; // energy
1084  towerP4 *= E;
1085 
1086  // double pf=1.0/cosh(p.eta());
1087  // if (E>0) towerP4 = CaloTower::PolarLorentzVector(E*pf, p.eta(), p.phi(), 0); // simple momentum assignment, same position
1088  emPoint = p;
1089  hadPoint = p;
1090  }
1091  } // end case 2
1092  break;
1093 
1094  } // end of decision on p4 reconstruction method
1095 
1096  // insert in collection (remove and return if below threshold)
1097  if UNLIKELY ((towerP4[3] == 0) & (E_outer > 0)) {
1098  float val = theHOIsUsed ? 0 : 1E-9; // to keep backwards compatibility for theHOIsUsed == true
1099  collection.emplace_back(id,
1100  E_em,
1101  E_had,
1102  E_outer,
1103  -1,
1104  -1,
1105  CaloTower::PolarLorentzVector(val, hadPoint.eta(), hadPoint.phi(), 0),
1106  emPoint,
1107  hadPoint);
1108  } else {
1109  collection.emplace_back(
1110  id, E_em, E_had, E_outer, -1, -1, GlobalVector(towerP4), towerP4[3], mass2, emPoint, hadPoint);
1111  }
1112  auto& caloTower = collection.back();
1113 
1114  // if (!massless) std::cout << "massive " << id <<' ' << mass1 <<' ' << mass2 <<' ' << caloTower.mass() << std::endl;
1115  // std::cout << "CaloTowerVI " <<theMomConstrMethod <<' ' << id <<' '<< E_em <<' '<< E_had <<' '<< E_outer <<' '<< GlobalVector(towerP4) <<' '<< towerP4[3] <<' '<< emPoint <<' '<< hadPoint << std::endl;
1116  //if (towerP4[3]==0) std::cout << "CaloTowerVIzero " << theEcutTower << ' ' << collection.back().eta() <<' '<< collection.back().phi() << std::endl;
1117 
1118  if (caloTower.energy() < theEcutTower) {
1119  collection.pop_back();
1120  return;
1121  }
1122 
1123  // set the timings
1124  float ecalTime = (mt.emSumEForTime > 0) ? mt.emSumTimeTimesE / mt.emSumEForTime : -9999;
1125  float hcalTime = (mt.hadSumEForTime > 0) ? mt.hadSumTimeTimesE / mt.hadSumEForTime : -9999;
1126  caloTower.setEcalTime(compactTime(ecalTime));
1127  caloTower.setHcalTime(compactTime(hcalTime));
1128  //add topology info
1129  caloTower.setHcalSubdet(theTowerTopology->lastHBRing(),
1133 
1134  // set the CaloTower status word =====================================
1135  // Channels must be counter exclusively in the defined cathegories
1136  // "Bad" channels (not used in energy assignment) can be flagged during
1137  // CaloTower creation only if specified in the configuration file
1138 
1139  unsigned int numBadHcalChan = mt.numBadHcalCells;
1140  // unsigned int numBadEcalChan = mt.numBadEcalCells;
1141  unsigned int numBadEcalChan = 0; //
1142 
1143  unsigned int numRecHcalChan = mt.numRecHcalCells;
1144  unsigned int numRecEcalChan = mt.numRecEcalCells;
1145  unsigned int numProbHcalChan = mt.numProbHcalCells;
1146  unsigned int numProbEcalChan = mt.numProbEcalCells;
1147 
1148  // now add dead/off/... channels not used in RecHit reconstruction for HCAL
1149  HcalDropChMap::iterator dropChItr = hcalDropChMap.find(id);
1150  if (dropChItr != hcalDropChMap.end())
1151  numBadHcalChan += dropChItr->second.first;
1152 
1153  // for ECAL the number of all bad channels is obtained here -----------------------
1154 
1155  /*
1156  // old hyper slow algorithm
1157  // get all possible constituents of the tower
1158  std::vector<DetId> allConstituents = theTowerConstituentsMap->constituentsOf(id);
1159 
1160  for (std::vector<DetId>::iterator ac_it=allConstituents.begin();
1161  ac_it!=allConstituents.end(); ++ac_it) {
1162 
1163  if (ac_it->det()!=DetId::Ecal) continue;
1164 
1165  int thisEcalSevLvl = -999;
1166 
1167  if (ac_it->subdetId() == EcalBarrel && theEbHandle.isValid()) {
1168  thisEcalSevLvl = theEcalSevLvlAlgo->severityLevel( *ac_it, *theEbHandle);//, *theEcalChStatus);
1169  }
1170  else if (ac_it->subdetId() == EcalEndcap && theEeHandle.isValid()) {
1171  thisEcalSevLvl = theEcalSevLvlAlgo->severityLevel( *ac_it, *theEeHandle);//, *theEcalChStatus);
1172  }
1173 
1174  // check if the Ecal severity is ok to keep
1175  std::vector<int>::const_iterator sevit = std::find(theEcalSeveritiesToBeExcluded.begin(),
1176  theEcalSeveritiesToBeExcluded.end(),
1177  thisEcalSevLvl);
1178  if (sevit!=theEcalSeveritiesToBeExcluded.end()) {
1179  ++numBadEcalChan;
1180  }
1181 
1182  }
1183 
1184  // compare with fast version
1185 
1186  // hcal:
1187  int inEcals[2] = {0,0};
1188  for (std::vector<std::pair<DetId,float> >::iterator i=metaContains.begin(); i!=metaContains.end(); ++i) {
1189  DetId detId = i->first;
1190  if(detId.det() == DetId::Ecal){
1191  if( detId.subdetId()==EcalBarrel ) inEcals[0] =1;
1192  else if( detId.subdetId()==EcalEndcap ) inEcals[1] =1;
1193  }
1194  }
1195 
1196  auto numBadEcalChanNew = ecalBadChs[theTowerTopology->denseIndex(id)]+mt.numBadEcalCells; // - mt.numRecEcalCells
1197  if (int(numBadEcalChanNew)!=int(numBadEcalChan)) {
1198  std::cout << "VI wrong " << ((inEcals[1]==1) ? "EE" : "" ) << id << " " << numBadEcalChanNew << " " << numBadEcalChan
1199  << " " << mt.numBadEcalCells << " " << mt.numRecEcalCells << std::endl;
1200  }
1201  */
1202 
1203  numBadEcalChan = ecalBadChs[theTowerTopology->denseIndex(id)] + mt.numBadEcalCells; // - mt.numRecEcalCells
1204 
1205  //--------------------------------------------------------------------------------------
1206 
1207  caloTower.setCaloTowerStatus(
1208  numBadHcalChan, numBadEcalChan, numRecHcalChan, numRecEcalChan, numProbHcalChan, numProbEcalChan);
1209 
1210  double maxCellE = -999.0; // for storing the hottest cell E in the calotower
1211 
1212  std::vector<DetId> contains;
1213  contains.reserve(metaContains.size());
1214  for (std::vector<std::pair<DetId, float> >::iterator i = metaContains.begin(); i != metaContains.end(); ++i) {
1215  contains.push_back(i->first);
1216 
1217  if (maxCellE < i->second) {
1218  // need an extra check because of the funny towers that are empty except for the presence of an HO
1219  // hit in the constituents (JetMET wanted them saved)
1220  // This constituent is only used for storing the tower, but should not be concidered as a hot cell canditate for
1221  // configurations with useHO = false
1222 
1223  if (i->first.det() == DetId::Ecal) { // ECAL
1224  maxCellE = i->second;
1225  } else { // HCAL
1226  if (HcalDetId(i->first).subdet() != HcalOuter)
1227  maxCellE = i->second;
1228  else if (theHOIsUsed)
1229  maxCellE = i->second;
1230  }
1231 
1232  } // found higher E cell
1233 
1234  } // loop over matacontains
1235 
1236  caloTower.setConstituents(std::move(contains));
1237  caloTower.setHottestCellE(maxCellE);
1238 
1239  // std::cout << "CaloTowerVI " << nalgo << ' ' << caloTower.id() << ((inEcals[1]==1) ? "EE " : " " ) << caloTower.pt() << ' ' << caloTower.et() << ' ' << caloTower.mass() << ' '
1240  // << caloTower.constituentsSize() <<' '<< caloTower.towerStatusWord() << std::endl;
1241 }

References cms::cuda::assert(), PV3DBase< T, PVType, FrameType >::basicVector(), universalConfigTemplate::collection, compactTime(), edm::contains(), CaloTowerTopology::denseIndex(), change_name::diff, DetId::Ecal, ecalBadChs, digitizers_cfi::ecalTime, emShwrLogWeightPos(), emShwrPos(), PV3DBase< T, PVType, FrameType >::eta(), CaloTowerTopology::firstHFRing(), CaloSubdetectorGeometry::getGeometry(), hadShwrPos(), DetId::Hcal, hcalDropChMap, HcalOuter, mps_fire::i, if(), CaloTowerTopology::lastHBRing(), CaloTowerTopology::lastHERing(), CaloTowerTopology::lastHFRing(), CaloTowerTopology::lastHORing(), match(), missingHcalRescaleFactorForEcal, eostools::move(), TtSemiLepEvtBuilder_cfi::mt, AlCaHLTBitMon_ParallelJobs::p, PV3DBase< T, PVType, FrameType >::phi(), edm::second(), mathSSE::sqrt(), HcalDetId::subdet(), theEBSumThreshold, theEcutTower, theEESumThreshold, theHcalThreshold, theHOIsUsed, theMomConstrMethod, theMomEBDepth, theMomEEDepth, theMomHBDepth, theMomHEDepth, theTowerGeometry, theTowerTopology, Basic3DVector< T >::unit(), UNLIKELY, heppy_batch::val, and trackerHitRTTI::vector.

Referenced by finish().

◆ ecalChanStatusForCaloTower()

std::tuple< unsigned int, bool > CaloTowersCreationAlgo::ecalChanStatusForCaloTower ( const EcalRecHit hit)

Definition at line 1802 of file CaloTowersCreationAlgo.cc.

1802  {
1803  // const DetId id = hit->detid();
1804 
1805  // uint16_t dbStatus = theEcalChStatus->find(id)->getStatusCode();
1806  // uint32_t rhFlags = hit->flags();
1807  // int severityLevel = theEcalSevLvlAlgo->severityLevel(rhFlags, dbStatus);
1808  // The methods above will become private and cannot be usef for flagging ecal spikes.
1809  // Use the recommended interface - we leave the parameters for spilke removal to be specified by ECAL.
1810 
1811  // int severityLevel = 999;
1812 
1813  EcalRecHit const& rh = *reinterpret_cast<EcalRecHit const*>(hit);
1815 
1816  // if (id.subdetId() == EcalBarrel) severityLevel = theEcalSevLvlAlgo->severityLevel( id, *theEbHandle);//, *theEcalChStatus);
1817  // else if (id.subdetId() == EcalEndcap) severityLevel = theEcalSevLvlAlgo->severityLevel( id, *theEeHandle);//, *theEcalChStatus);
1818 
1819  // there should be no other ECAL types used in this reconstruction
1820 
1821  // The definition of ECAL severity levels uses categories that
1822  // are similar to the defined for CaloTower. (However, the categorization
1823  // for CaloTowers depends on the specified maximum acceptabel severity and therefore cannnot
1824  // be exact correspondence between the two. ECAL has additional categories describing modes of failure.)
1825  // This approach is different from the initial idea and from
1826  // the implementation for HCAL. Still make the logic similar to HCAL so that one has the ability to
1827  // exclude problematic channels as defined by ECAL.
1828  // For definitions of ECAL severity levels see RecoLocalCalo/EcalRecAlgos/interface/EcalSeverityLevelAlgo.h
1829 
1830  bool isBad = (severityLevel == EcalSeverityLevel::kBad);
1831 
1832  bool isRecovered = (severityLevel == EcalSeverityLevel::kRecovered);
1833 
1834  // check if the severity is compatible with our configuration
1835  // This applies to the "default" tower cleaning
1836  std::vector<int>::const_iterator sevit =
1838  bool accepted = (sevit == theEcalSeveritiesToBeExcluded.end());
1839 
1840  // For use with hits that were rejected in the regular reconstruction:
1841  // This is for creating calotowers with lower level of cleaning by merging
1842  // the information from the default towers and a collection of towers created from
1843  // bad rechits
1844 
1845  if (useRejectedHitsOnly) {
1846  if (!isRecovered) {
1847  if (accepted || std::find(theEcalSeveritiesToBeUsedInBadTowers.begin(),
1850  return std::make_tuple(CaloTowersCreationAlgo::IgnoredChan, isBad);
1851  // this hit was either already accepted, or is not eligible for inclusion
1852  } else {
1854  // skip recovered hits either because they were already used or because there was an explicit instruction
1855  return std::make_tuple(CaloTowersCreationAlgo::IgnoredChan, isBad);
1856  ;
1857  } else if (useRejectedRecoveredEcalHits) {
1858  return std::make_tuple(CaloTowersCreationAlgo::RecoveredChan, isBad);
1859  }
1860 
1861  } // recovered channels
1862 
1863  // clasify channels as problematic
1864  return std::make_tuple(CaloTowersCreationAlgo::ProblematicChan, isBad);
1865 
1866  } // treatment of rejected hits
1867 
1868  // for normal reconstruction
1870  return std::make_tuple(CaloTowersCreationAlgo::GoodChan, false);
1871 
1872  if (isRecovered) {
1873  return std::make_tuple(
1875  } else {
1876  return std::make_tuple(accepted ? CaloTowersCreationAlgo::ProblematicChan : CaloTowersCreationAlgo::BadChan, isBad);
1877  }
1878 }

References BadChan, spr::find(), GoodChan, IgnoredChan, EcalSeverityLevel::kBad, EcalSeverityLevel::kGood, EcalSeverityLevel::kRecovered, ProblematicChan, RecoveredChan, interestingDetIdCollectionProducer_cfi::severityLevel, EcalSeverityLevelAlgo::severityLevel(), theEcalSeveritiesToBeExcluded, theEcalSeveritiesToBeUsedInBadTowers, theEcalSevLvlAlgo, theRecoveredEcalHitsAreUsed, useRejectedHitsOnly, and useRejectedRecoveredEcalHits.

Referenced by assignHitEcal().

◆ emCrystalShwrPos()

GlobalPoint CaloTowersCreationAlgo::emCrystalShwrPos ( DetId  detId,
float  fracDepth 
)

Definition at line 1395 of file CaloTowersCreationAlgo.cc.

1395  {
1396  auto cellGeometry = theGeometry->getGeometry(detId);
1397  GlobalPoint point = cellGeometry->getPosition(); // face of the cell
1398 
1399  if (fracDepth <= 0)
1400  return point;
1401  if (fracDepth > 1)
1402  fracDepth = 1;
1403 
1404  const GlobalPoint& backPoint = cellGeometry->getBackPoint();
1405  point += fracDepth * (backPoint - point);
1406 
1407  return point;
1408 }

References CaloGeometry::getGeometry(), point, and theGeometry.

Referenced by emShwrLogWeightPos(), emShwrPos(), and hadSegmentShwrPos().

◆ emShwrLogWeightPos()

GlobalPoint CaloTowersCreationAlgo::emShwrLogWeightPos ( const std::vector< std::pair< DetId, float >> &  metaContains,
float  fracDepth,
double  totEmE 
)

Definition at line 1595 of file CaloTowersCreationAlgo.cc.

1597  {
1598  double emX = 0.0;
1599  double emY = 0.0;
1600  double emZ = 0.0;
1601 
1602  double weight = 0;
1603  double sumWeights = 0;
1604  double sumEmE = 0; // add crystals with E/E_EM > 1.5%
1605  double crystalThresh = 0.015 * emE;
1606 
1607  std::vector<std::pair<DetId, float> >::const_iterator mc_it = metaContains.begin();
1608  for (; mc_it != metaContains.end(); ++mc_it) {
1609  if (mc_it->second < 0)
1610  continue;
1611  if (mc_it->first.det() == DetId::Ecal && mc_it->second > crystalThresh)
1612  sumEmE += mc_it->second;
1613  }
1614 
1615  for (mc_it = metaContains.begin(); mc_it != metaContains.end(); ++mc_it) {
1616  if (mc_it->first.det() != DetId::Ecal || mc_it->second < crystalThresh)
1617  continue;
1618 
1619  GlobalPoint p = emCrystalShwrPos(mc_it->first, fracDepth);
1620 
1621  weight = 4.2 + log(mc_it->second / sumEmE);
1622  sumWeights += weight;
1623 
1624  emX += p.x() * weight;
1625  emY += p.y() * weight;
1626  emZ += p.z() * weight;
1627  }
1628 
1629  return GlobalPoint(emX / sumWeights, emY / sumWeights, emZ / sumWeights);
1630 }

References DetId::Ecal, emCrystalShwrPos(), dqm-mbProfile::log, AlCaHLTBitMon_ParallelJobs::p, and mps_merge::weight.

Referenced by convert().

◆ emShwrPos()

GlobalPoint CaloTowersCreationAlgo::emShwrPos ( const std::vector< std::pair< DetId, float >> &  metaContains,
float  fracDepth,
double  totEmE 
)

Definition at line 1565 of file CaloTowersCreationAlgo.cc.

1567  {
1568  if (emE <= 0)
1569  return GlobalPoint(0, 0, 0);
1570 
1571  double emX = 0.0;
1572  double emY = 0.0;
1573  double emZ = 0.0;
1574 
1575  double eSum = 0;
1576 
1577  std::vector<std::pair<DetId, float> >::const_iterator mc_it = metaContains.begin();
1578  for (; mc_it != metaContains.end(); ++mc_it) {
1579  if (mc_it->first.det() != DetId::Ecal)
1580  continue;
1581  GlobalPoint p = emCrystalShwrPos(mc_it->first, fracDepth);
1582  double e = mc_it->second;
1583 
1584  if (e > 0) {
1585  emX += p.x() * e;
1586  emY += p.y() * e;
1587  emZ += p.z() * e;
1588  eSum += e;
1589  }
1590  }
1591 
1592  return GlobalPoint(emX / eSum, emY / eSum, emZ / eSum);
1593 }

References MillePedeFileConverter_cfg::e, DetId::Ecal, emCrystalShwrPos(), and AlCaHLTBitMon_ParallelJobs::p.

Referenced by convert().

◆ find()

CaloTowersCreationAlgo::MetaTower & CaloTowersCreationAlgo::find ( const CaloTowerDetId id)
private

looks for a given tower in the internal cache. If it can't find it, it makes it.

Definition at line 908 of file CaloTowersCreationAlgo.cc.

908  {
909  if (theTowerMap.empty()) {
911  }
912 
913  auto& mt = theTowerMap[theTowerTopology->denseIndex(detId)];
914 
915  if (mt.empty()) {
916  mt.id = detId;
917  mt.metaConstituents.reserve(detId.ietaAbs() < theTowerTopology->firstHFRing() ? 12 : 2);
918  ++theTowerMapSize;
919  }
920 
921  return mt;
922 }

References CaloTowerTopology::denseIndex(), CaloTowerTopology::firstHFRing(), CaloTowerDetId::ietaAbs(), TtSemiLepEvtBuilder_cfi::mt, CaloTowerTopology::sizeForDenseIndexing(), theTowerMap, theTowerMapSize, and theTowerTopology.

Referenced by assignHitEcal(), assignHitHcal(), and rescale().

◆ finish()

void CaloTowersCreationAlgo::finish ( CaloTowerCollection destCollection)

Definition at line 404 of file CaloTowersCreationAlgo.cc.

404  {
405  // now copy this map into the final collection
406  result.reserve(theTowerMapSize);
407  // auto k=0U;
408  // if (!theEbHandle.isValid()) std::cout << "VI ebHandle not valid" << std::endl;
409  // if (!theEeHandle.isValid()) std::cout << "VI eeHandle not valid" << std::endl;
410 
411  for (auto const& mt : theTowerMap) {
412  // Convert only if there is at least one constituent in the metatower.
413  // The check of constituents size in the coverted tower is still needed!
414  if (!mt.empty()) {
415  convert(mt.id, mt, result);
416  } // ++k;}
417  }
418 
419  // assert(k==theTowerMapSize);
420  // std::cout << "VI TowerMap " << theTowerMapSize << " " << k << std::endl;
421 
422  theTowerMap.clear(); // save the memory
423  theTowerMapSize = 0;
424 }

References convert(), TtSemiLepEvtBuilder_cfi::mt, mps_fire::result, theTowerMap, and theTowerMapSize.

Referenced by progressbar.ProgressBar::__next__(), and CaloTowersCreator::produce().

◆ getThresholdAndWeight()

void CaloTowersCreationAlgo::getThresholdAndWeight ( const DetId detId,
double &  threshold,
double &  weight 
) const
private

helper method to look up the appropriate threshold & weight

Definition at line 1243 of file CaloTowersCreationAlgo.cc.

1243  {
1244  DetId::Detector det = detId.det();
1245  weight = 0; // in case the hit is not identified
1246 
1247  if (det == DetId::Ecal) {
1248  // may or may not be EB. We'll find out.
1249 
1250  EcalSubdetector subdet = (EcalSubdetector)(detId.subdetId());
1251  if (subdet == EcalBarrel) {
1253  weight = theEBweight;
1254  if (weight <= 0.) {
1255  ROOT::Math::Interpolator my(theEBGrid, theEBWeights, ROOT::Math::Interpolation::kAKIMA);
1256  weight = my.Eval(theEBEScale);
1257  }
1258  } else if (subdet == EcalEndcap) {
1260  weight = theEEweight;
1261  if (weight <= 0.) {
1262  ROOT::Math::Interpolator my(theEEGrid, theEEWeights, ROOT::Math::Interpolation::kAKIMA);
1263  weight = my.Eval(theEEEScale);
1264  }
1265  }
1266  } else if (det == DetId::Hcal) {
1267  HcalDetId hcalDetId(detId);
1268  HcalSubdetector subdet = hcalDetId.subdet();
1269  int depth = hcalDetId.depth();
1270 
1271  if (subdet == HcalBarrel) {
1273  weight = theHBweight;
1274  if (weight <= 0.) {
1275  ROOT::Math::Interpolator my(theHBGrid, theHBWeights, ROOT::Math::Interpolation::kAKIMA);
1276  weight = my.Eval(theHBEScale);
1277  }
1278  }
1279 
1280  else if (subdet == HcalEndcap) {
1281  // check if it's single or double tower
1282  if (hcalDetId.ietaAbs() < theHcalTopology->firstHEDoublePhiRing()) {
1284  weight = theHESweight;
1285  if (weight <= 0.) {
1286  ROOT::Math::Interpolator my(theHESGrid, theHESWeights, ROOT::Math::Interpolation::kAKIMA);
1287  weight = my.Eval(theHESEScale);
1288  }
1289  } else {
1291  weight = theHEDweight;
1292  if (weight <= 0.) {
1293  ROOT::Math::Interpolator my(theHEDGrid, theHEDWeights, ROOT::Math::Interpolation::kAKIMA);
1294  weight = my.Eval(theHEDEScale);
1295  }
1296  }
1297  }
1298 
1299  else if (subdet == HcalOuter) {
1300  //check if it's ring 0 or +1 or +2 or -1 or -2
1301  if (hcalDetId.ietaAbs() <= 4)
1303  else if (hcalDetId.ieta() < 0) {
1304  // set threshold for ring -1 or -2
1305  threshold = (hcalDetId.ietaAbs() <= 10) ? theHOthresholdMinus1 : theHOthresholdMinus2;
1306  } else {
1307  // set threshold for ring +1 or +2
1308  threshold = (hcalDetId.ietaAbs() <= 10) ? theHOthresholdPlus1 : theHOthresholdPlus2;
1309  }
1310  weight = theHOweight;
1311  if (weight <= 0.) {
1312  ROOT::Math::Interpolator my(theHOGrid, theHOWeights, ROOT::Math::Interpolation::kAKIMA);
1313  weight = my.Eval(theHOEScale);
1314  }
1315  }
1316 
1317  else if (subdet == HcalForward) {
1318  if (hcalDetId.depth() == 1) {
1320  weight = theHF1weight;
1321  if (weight <= 0.) {
1322  ROOT::Math::Interpolator my(theHF1Grid, theHF1Weights, ROOT::Math::Interpolation::kAKIMA);
1323  weight = my.Eval(theHF1EScale);
1324  }
1325  } else {
1327  weight = theHF2weight;
1328  if (weight <= 0.) {
1329  ROOT::Math::Interpolator my(theHF2Grid, theHF2Weights, ROOT::Math::Interpolation::kAKIMA);
1330  weight = my.Eval(theHF2EScale);
1331  }
1332  }
1333  }
1334  } else {
1335  edm::LogError("CaloTowersCreationAlgo") << "Bad cell: " << det << std::endl;
1336  }
1337 }

References LEDCalibrationChannels::depth, HcalDetId::depth(), DetId::det(), DetId::Ecal, EcalBarrel, EcalEndcap, HcalTopology::firstHEDoublePhiRing(), DetId::Hcal, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, HcalDetId::ieta(), HcalDetId::ietaAbs(), fftjetcommon_cfi::Interpolator, HcalDetId::subdet(), DetId::subdetId(), theEBEScale, theEBGrid, theEBthreshold, theEBweight, theEBWeights, theEEEScale, theEEGrid, theEEthreshold, theEEweight, theEEWeights, theHBEScale, theHBGrid, theHBthreshold, theHBthreshold1, theHBthreshold2, theHBweight, theHBWeights, theHcalTopology, theHEDEScale, theHEDGrid, theHEDthreshold, theHEDthreshold1, theHEDweight, theHEDWeights, theHESEScale, theHESGrid, theHESthreshold, theHESthreshold1, theHESweight, theHESWeights, theHF1EScale, theHF1Grid, theHF1threshold, theHF1weight, theHF1Weights, theHF2EScale, theHF2Grid, theHF2threshold, theHF2weight, theHF2Weights, theHOEScale, theHOGrid, theHOthreshold0, theHOthresholdMinus1, theHOthresholdMinus2, theHOthresholdPlus1, theHOthresholdPlus2, theHOweight, theHOWeights, and remoteMonitoring_LED_IterMethod_cfg::threshold.

Referenced by assignHitEcal(), assignHitHcal(), rescale(), and rescaleTowers().

◆ hadSegmentShwrPos()

GlobalPoint CaloTowersCreationAlgo::hadSegmentShwrPos ( DetId  detId,
float  fracDepth 
)

Definition at line 1410 of file CaloTowersCreationAlgo.cc.

1410  {
1411  // same code as above
1412  return emCrystalShwrPos(detId, fracDepth);
1413 }

References emCrystalShwrPos().

◆ hadShwPosFromCells()

GlobalPoint CaloTowersCreationAlgo::hadShwPosFromCells ( DetId  frontCell,
DetId  backCell,
float  fracDepth 
)

Definition at line 1538 of file CaloTowersCreationAlgo.cc.

1538  {
1539  // uses the "front" and "back" cells
1540  // to determine the axis. point set by the predefined depth.
1541 
1542  HcalDetId hid1(frontCellId), hid2(backCellId);
1544  hid1 = theHcalTopology->idFront(frontCellId);
1545 #ifdef EDM_ML_DEBUG
1546  std::cout << "Front " << HcalDetId(frontCellId) << " " << hid1 << "\n";
1547 #endif
1548  hid2 = theHcalTopology->idBack(backCellId);
1549 #ifdef EDM_ML_DEBUG
1550  std::cout << "Back " << HcalDetId(backCellId) << " " << hid2 << "\n";
1551 #endif
1552  }
1553 
1554  auto frontCellGeometry = theGeometry->getGeometry(DetId(hid1));
1555  auto backCellGeometry = theGeometry->getGeometry(DetId(hid2));
1556 
1557  GlobalPoint point = frontCellGeometry->getPosition();
1558  const GlobalPoint& backPoint = backCellGeometry->getBackPoint();
1559 
1560  point += fracDepth * (backPoint - point);
1561 
1562  return point;
1563 }

References gather_cfg::cout, CaloGeometry::getGeometry(), HcalTopology::getMergePositionFlag(), HcalTopology::idBack(), HcalTopology::idFront(), point, theGeometry, and theHcalTopology.

Referenced by hadShwrPos().

◆ hadShwrPos() [1/2]

GlobalPoint CaloTowersCreationAlgo::hadShwrPos ( CaloTowerDetId  id,
float  fracDepth 
)

Definition at line 1454 of file CaloTowersCreationAlgo.cc.

1454  {
1455  // set depth using geometry of cells that are associated with the
1456  // tower (regardless if they have non-zero energies)
1457 
1458  // if (hadE <= 0) return GlobalPoint(0, 0, 0);
1459 #ifdef EDM_ML_DEBUG
1460  std::cout << "hadShwrPos " << towerId << " frac " << fracDepth << std::endl;
1461 #endif
1462  if (fracDepth < 0)
1463  fracDepth = 0;
1464  else if (fracDepth > 1)
1465  fracDepth = 1;
1466 
1467  GlobalPoint point(0, 0, 0);
1468 
1469  int iEta = towerId.ieta();
1470  int iPhi = towerId.iphi();
1471 
1472  HcalDetId frontCellId, backCellId;
1473 
1474  if (towerId.ietaAbs() >= theTowerTopology->firstHFRing()) {
1475  // forward, take the geometry for long fibers
1476  frontCellId = HcalDetId(HcalForward, towerId.zside() * theTowerTopology->convertCTtoHcal(abs(iEta)), iPhi, 1);
1477  backCellId = HcalDetId(HcalForward, towerId.zside() * theTowerTopology->convertCTtoHcal(abs(iEta)), iPhi, 1);
1478  } else {
1479  //use constituents map
1480  std::vector<DetId> items = theTowerConstituentsMap->constituentsOf(towerId);
1481  int frontDepth = 1000;
1482  int backDepth = -1000;
1483  for (unsigned i = 0; i < items.size(); i++) {
1484  if (items[i].det() != DetId::Hcal)
1485  continue;
1486  HcalDetId hid(items[i]);
1487  if (hid.subdet() == HcalOuter)
1488  continue;
1489  if (!theHcalTopology->validHcal(hid, 2))
1490  continue;
1491 
1492  if (theHcalTopology->idFront(hid).depth() < frontDepth) {
1493  frontCellId = hid;
1494  frontDepth = theHcalTopology->idFront(hid).depth();
1495  }
1496  if (theHcalTopology->idBack(hid).depth() > backDepth) {
1497  backCellId = hid;
1498  backDepth = theHcalTopology->idBack(hid).depth();
1499  }
1500  }
1501 #ifdef EDM_ML_DEBUG
1502  std::cout << "Front " << frontCellId << " Back " << backCellId << " Depths " << frontDepth << ":" << backDepth
1503  << std::endl;
1504 #endif
1505  //fix for tower 28/29 - no tower 29 at highest depths
1506  if (towerId.ietaAbs() == theTowerTopology->lastHERing() && (theHcalPhase == 0 || theHcalPhase == 1)) {
1507  CaloTowerDetId towerId28(towerId.ieta() - towerId.zside(), towerId.iphi());
1508  std::vector<DetId> items28 = theTowerConstituentsMap->constituentsOf(towerId28);
1509 #ifdef EDM_ML_DEBUG
1510  std::cout << towerId28 << " with " << items28.size() << " constituents:";
1511  for (unsigned k = 0; k < items28.size(); ++k)
1512  if (items28[k].det() == DetId::Hcal)
1513  std::cout << " " << HcalDetId(items28[k]);
1514  std::cout << std::endl;
1515 #endif
1516  for (unsigned i = 0; i < items28.size(); i++) {
1517  if (items28[i].det() != DetId::Hcal)
1518  continue;
1519  HcalDetId hid(items28[i]);
1520  if (hid.subdet() == HcalOuter)
1521  continue;
1522 
1523  if (theHcalTopology->idBack(hid).depth() > backDepth) {
1524  backCellId = hid;
1525  backDepth = theHcalTopology->idBack(hid).depth();
1526  }
1527  }
1528  }
1529 #ifdef EDM_ML_DEBUG
1530  std::cout << "Back " << backDepth << " ID " << backCellId << std::endl;
1531 #endif
1532  }
1533  point = hadShwPosFromCells(DetId(frontCellId), DetId(backCellId), fracDepth);
1534 
1535  return point;
1536 }

References funct::abs(), CaloTowerConstituentsMap::constituentsOf(), CaloTowerTopology::convertCTtoHcal(), gather_cfg::cout, HcalDetId::depth(), CaloTowerTopology::firstHFRing(), hadShwPosFromCells(), DetId::Hcal, HcalForward, HcalOuter, mps_fire::i, HcalTopology::idBack(), HcalTopology::idFront(), L1TowerCalibrationProducer_cfi::iEta, mps_monitormerge::items, dqmdumpme::k, CaloTowerTopology::lastHERing(), point, HcalDetId::subdet(), theHcalPhase, theHcalTopology, theTowerConstituentsMap, theTowerTopology, ecaldqm::towerId(), and HcalTopology::validHcal().

◆ hadShwrPos() [2/2]

GlobalPoint CaloTowersCreationAlgo::hadShwrPos ( const std::vector< std::pair< DetId, float >> &  metaContains,
float  fracDepth,
double  hadE 
)

Referenced by convert().

◆ hcalChanStatusForCaloTower()

unsigned int CaloTowersCreationAlgo::hcalChanStatusForCaloTower ( const CaloRecHit hit)

Definition at line 1751 of file CaloTowersCreationAlgo.cc.

1751  {
1752  HcalDetId hid(hit->detid());
1753  DetId id = theHcalTopology->idFront(hid);
1754 #ifdef EDM_ML_DEBUG
1755  std::cout << "ChanStatusForCaloTower for " << hid << " to " << HcalDetId(id) << std::endl;
1756 #endif
1757  const uint32_t recHitFlag = hit->flags();
1758  const uint32_t dbStatusFlag = theHcalChStatus->getValues(id)->getValue();
1759 
1760  int severityLevel = theHcalSevLvlComputer->getSeverityLevel(id, recHitFlag, dbStatusFlag);
1761  bool isRecovered = theHcalSevLvlComputer->recoveredRecHit(id, recHitFlag);
1762 
1763  // For use with hits rejected in the default reconstruction
1764  if (useRejectedHitsOnly) {
1765  if (!isRecovered) {
1769  // this hit was either already accepted or is worse than
1770  } else {
1772  // skip recovered hits either because they were already used or because there was an explicit instruction
1774  } else if (useRejectedRecoveredHcalHits) {
1776  }
1777 
1778  } // recovered channels
1779 
1780  // clasify channels as problematic: no good hits are supposed to be present in the
1781  // extra rechit collections
1783 
1784  } // treatment of rejected hits
1785 
1786  // this is for the regular reconstruction sequence
1787 
1788  if (severityLevel == 0)
1790 
1791  if (isRecovered) {
1793  } else {
1796  } else {
1798  }
1799  }
1800 }

References BadChan, gather_cfg::cout, HcalSeverityLevelComputer::getSeverityLevel(), HcalChannelStatus::getValue(), HcalCondObjectContainer< Item >::getValues(), GoodChan, HcalTopology::idFront(), IgnoredChan, ProblematicChan, RecoveredChan, HcalSeverityLevelComputer::recoveredRecHit(), interestingDetIdCollectionProducer_cfi::severityLevel, theHcalAcceptSeverityLevel, theHcalAcceptSeverityLevelForRejectedHit, theHcalChStatus, theHcalSevLvlComputer, theHcalTopology, theRecoveredHcalHitsAreUsed, useRejectedHitsOnly, and useRejectedRecoveredHcalHits.

Referenced by assignHitHcal().

◆ makeEcalBadChs()

void CaloTowersCreationAlgo::makeEcalBadChs ( )

Definition at line 1708 of file CaloTowersCreationAlgo.cc.

1708  {
1709  // std::cout << "VI making EcalBadChs ";
1710 
1711  // for ECAL the number of all bad channels is obtained here -----------------------
1712 
1713  for (auto ind = 0U; ind < theTowerTopology->sizeForDenseIndexing(); ++ind) {
1714  auto& numBadEcalChan = ecalBadChs[ind];
1715  numBadEcalChan = 0;
1716  auto id = theTowerTopology->detIdFromDenseIndex(ind);
1717 
1718  // this is utterly slow... (can be optmized if really needed)
1719 
1720  // get all possible constituents of the tower
1721  std::vector<DetId> allConstituents = theTowerConstituentsMap->constituentsOf(id);
1722 
1723  for (std::vector<DetId>::iterator ac_it = allConstituents.begin(); ac_it != allConstituents.end(); ++ac_it) {
1724  if (ac_it->det() != DetId::Ecal)
1725  continue;
1726 
1727  auto thisEcalSevLvl = theEcalSevLvlAlgo->severityLevel(*ac_it);
1728 
1729  // check if the Ecal severity is ok to keep
1730  std::vector<int>::const_iterator sevit =
1732  if (sevit != theEcalSeveritiesToBeExcluded.end()) {
1733  ++numBadEcalChan;
1734  }
1735  }
1736 
1737  // if (0!=numBadEcalChan) std::cout << id << ":" << numBadEcalChan << ", ";
1738  }
1739 
1740  /*
1741  int tot=0;
1742  for (auto ind=0U; ind<theTowerTopology->sizeForDenseIndexing(); ++ind) {
1743  if (ecalBadChs[ind]!=0) ++tot;
1744  }
1745  std::cout << " | " << tot << std::endl;
1746  */
1747 }

References CaloTowerConstituentsMap::constituentsOf(), CaloTowerTopology::detIdFromDenseIndex(), DetId::Ecal, ecalBadChs, spr::find(), EcalSeverityLevelAlgo::severityLevel(), CaloTowerTopology::sizeForDenseIndexing(), theEcalSeveritiesToBeExcluded, theEcalSevLvlAlgo, theTowerConstituentsMap, theTowerTopology, and mitigatedMETSequence_cff::U.

Referenced by CaloTowersCreator::produce().

◆ makeHcalDropChMap()

void CaloTowersCreationAlgo::makeHcalDropChMap ( )

Definition at line 1647 of file CaloTowersCreationAlgo.cc.

1647  {
1648  // This method fills the map of number of dead channels for the calotower,
1649  // The key of the map is CaloTowerDetId.
1650  // By definition these channels are not going to be in the RecHit collections.
1651  hcalDropChMap.clear();
1652  std::vector<DetId> allChanInStatusCont = theHcalChStatus->getAllChannels();
1653 
1654 #ifdef EDM_ML_DEBUG
1655  std::cout << "DropChMap with " << allChanInStatusCont.size() << " channels" << std::endl;
1656 #endif
1657  for (std::vector<DetId>::iterator it = allChanInStatusCont.begin(); it != allChanInStatusCont.end(); ++it) {
1658  const uint32_t dbStatusFlag = theHcalChStatus->getValues(*it)->getValue();
1659  if (theHcalSevLvlComputer->dropChannel(dbStatusFlag)) {
1661 
1663 
1664  hcalDropChMap[twrId].first += 1;
1665 
1666  HcalDetId hid(*it);
1667 
1668  // special case for tower 29: if HCAL hit is in depth 3 add to twr 29 as well
1669  if (hid.subdet() == HcalEndcap && (theHcalPhase == 0 || theHcalPhase == 1) &&
1670  hid.ietaAbs() == theHcalTopology->lastHERing() - 1) {
1671  bool merge = theHcalTopology->mergedDepth29(hid);
1672  if (merge) {
1673  CaloTowerDetId twrId29(twrId.ieta() + twrId.zside(), twrId.iphi());
1674  hcalDropChMap[twrId29].first += 1;
1675  }
1676  }
1677  }
1678  }
1679  // now I know how many bad channels, but I also need to know if there's any good ones
1681  for (auto& pair : hcalDropChMap) {
1682  if (pair.second.first == 0)
1683  continue; // unexpected, but just in case
1684  int ngood = 0, nbad = 0;
1685  for (DetId id : theTowerConstituentsMap->constituentsOf(pair.first)) {
1686  if (id.det() != DetId::Hcal)
1687  continue;
1688  HcalDetId hid(id);
1689  if (hid.subdet() != HcalBarrel && hid.subdet() != HcalEndcap)
1690  continue;
1691  const uint32_t dbStatusFlag = theHcalChStatus->getValues(id)->getValue();
1692  if (dbStatusFlag == 0 || !theHcalSevLvlComputer->dropChannel(dbStatusFlag)) {
1693  ngood += 1;
1694  } else {
1695  nbad += 1; // recount, since pair.second.first may include HO
1696  }
1697  }
1698  if (nbad > 0 && nbad >= ngood) {
1699  //uncomment for debug (may be useful to tune the criteria above)
1700  //CaloTowerDetId id(pair.first);
1701  //std::cout << "CaloTower at ieta = " << id.ieta() << ", iphi " << id.iphi() << ": set Hcal as not efficient (ngood =" << ngood << ", nbad = " << nbad << ")" << std::endl;
1702  pair.second.second = true;
1703  }
1704  }
1705  }
1706 }

References CaloTowerConstituentsMap::constituentsOf(), gather_cfg::cout, HcalSeverityLevelComputer::dropChannel(), HcalCondObjectContainer< Item >::getAllChannels(), HcalChannelStatus::getValue(), HcalCondObjectContainer< Item >::getValues(), DetId::Hcal, HcalBarrel, hcalDropChMap, HcalEndcap, CaloTowerDetId::ieta(), HcalDetId::ietaAbs(), CaloTowerDetId::iphi(), HcalTopology::lastHERing(), HcalTopology::mergedDepth29(), HcalTopology::mergedDepthDetId(), missingHcalRescaleFactorForEcal, HcalDetId::subdet(), theHcalChStatus, theHcalPhase, theHcalSevLvlComputer, theHcalTopology, theTowerConstituentsMap, CaloTowerConstituentsMap::towerOf(), and CaloTowerDetId::zside().

Referenced by CaloTowersCreator::produce().

◆ process() [1/5]

void CaloTowersCreationAlgo::process ( const CaloTowerCollection ctc)

Definition at line 398 of file CaloTowersCreationAlgo.cc.

398  {
399  for (CaloTowerCollection::const_iterator ctcItr = ctc.begin(); ctcItr != ctc.end(); ++ctcItr) {
400  rescale(&(*ctcItr));
401  }
402 }

References edm::SortedCollection< T, SORT >::begin(), edm::SortedCollection< T, SORT >::end(), and rescale().

◆ process() [2/5]

void CaloTowersCreationAlgo::process ( const EcalRecHitCollection ecal)

Definition at line 389 of file CaloTowersCreationAlgo.cc.

389  {
390  for (EcalRecHitCollection::const_iterator ecItr = ec.begin(); ecItr != ec.end(); ++ecItr)
391  assignHitEcal(&(*ecItr));
392 }

References assignHitEcal(), edm::SortedCollection< T, SORT >::begin(), and edm::SortedCollection< T, SORT >::end().

◆ process() [3/5]

void CaloTowersCreationAlgo::process ( const HBHERecHitCollection hbhe)

Definition at line 374 of file CaloTowersCreationAlgo.cc.

374  {
375  for (HBHERecHitCollection::const_iterator hbheItr = hbhe.begin(); hbheItr != hbhe.end(); ++hbheItr)
376  assignHitHcal(&(*hbheItr));
377 }

References assignHitHcal(), and photonIsolationHIProducer_cfi::hbhe.

Referenced by CaloTowersCreator::produce().

◆ process() [4/5]

void CaloTowersCreationAlgo::process ( const HFRecHitCollection hf)

Definition at line 384 of file CaloTowersCreationAlgo.cc.

384  {
385  for (HFRecHitCollection::const_iterator hfItr = hf.begin(); hfItr != hf.end(); ++hfItr)
386  assignHitHcal(&(*hfItr));
387 }

References assignHitHcal(), and photonIsolationHIProducer_cfi::hf.

◆ process() [5/5]

void CaloTowersCreationAlgo::process ( const HORecHitCollection ho)

Definition at line 379 of file CaloTowersCreationAlgo.cc.

379  {
380  for (HORecHitCollection::const_iterator hoItr = ho.begin(); hoItr != ho.end(); ++hoItr)
381  assignHitHcal(&(*hoItr));
382 }

References assignHitHcal(), and photonIsolationHIProducer_cfi::ho.

◆ rescale()

void CaloTowersCreationAlgo::rescale ( const CaloTower ct)
private

Definition at line 864 of file CaloTowersCreationAlgo.cc.

864  {
865  double threshold, weight;
866  CaloTowerDetId towerDetId = theTowerConstituentsMap->towerOf(ct->id());
867  if (towerDetId.null())
868  return;
869  MetaTower& tower = find(towerDetId);
870 
871  tower.E_em = 0.;
872  tower.E_had = 0.;
873  tower.E_outer = 0.;
874  for (unsigned int i = 0; i < ct->constituentsSize(); i++) {
875  DetId detId = ct->constituent(i);
877  DetId::Detector det = detId.det();
878  if (det == DetId::Ecal) {
879  tower.E_em = ct->emEnergy() * weight;
880  } else {
881  HcalDetId hcalDetId(detId);
882  if (hcalDetId.subdet() == HcalForward) {
883  if (hcalDetId.depth() == 1)
884  tower.E_em = ct->emEnergy() * weight;
885  if (hcalDetId.depth() == 2)
886  tower.E_had = ct->hadEnergy() * weight;
887  } else if (hcalDetId.subdet() == HcalOuter) {
888  tower.E_outer = ct->outerEnergy() * weight;
889  } else {
890  tower.E_had = ct->hadEnergy() * weight;
891  }
892  }
893  tower.E = tower.E_had + tower.E_em + tower.E_outer;
894 
895  // this is to be compliant with the new MetaTower setup
896  // used only for the default simple vector assignment
897  std::pair<DetId, float> mc(detId, 0);
898  tower.metaConstituents.push_back(mc);
899  }
900 
901  // preserve time inforamtion
902  tower.emSumTimeTimesE = ct->ecalTime();
903  tower.hadSumTimeTimesE = ct->hcalTime();
904  tower.emSumEForTime = 1.0;
905  tower.hadSumEForTime = 1.0;
906 }

References CaloTower::constituent(), CaloTower::constituentsSize(), HcalDetId::depth(), DetId::det(), DetId::Ecal, CaloTower::ecalTime(), CaloTower::emEnergy(), find(), getThresholdAndWeight(), CaloTower::hadEnergy(), HcalForward, HcalOuter, CaloTower::hcalTime(), mps_fire::i, CaloTower::id(), CaloTowersParam_cfi::mc, DetId::null(), CaloTower::outerEnergy(), HcalDetId::subdet(), theTowerConstituentsMap, remoteMonitoring_LED_IterMethod_cfg::threshold, hgcalTowerProducer_cfi::tower, CaloTowerConstituentsMap::towerOf(), and mps_merge::weight.

Referenced by process().

◆ rescaleTowers()

void CaloTowersCreationAlgo::rescaleTowers ( const CaloTowerCollection ctInput,
CaloTowerCollection ctResult 
)

Definition at line 426 of file CaloTowersCreationAlgo.cc.

426  {
427  for (CaloTowerCollection::const_iterator ctcItr = ctc.begin(); ctcItr != ctc.end(); ++ctcItr) {
428  CaloTowerDetId twrId = ctcItr->id();
429  double newE_em = ctcItr->emEnergy();
430  double newE_had = ctcItr->hadEnergy();
431  double newE_outer = ctcItr->outerEnergy();
432 
433  double threshold = 0.0; // not used: we do not change thresholds
434  double weight = 1.0;
435 
436  // HF
437  if (ctcItr->ietaAbs() >= theTowerTopology->firstHFRing()) {
438  double E_short = 0.5 * newE_had; // from the definitions for HF
439  double E_long = newE_em + 0.5 * newE_had; //
440  // scale
441  E_long *= theHF1weight;
442  E_short *= theHF2weight;
443  // convert
444  newE_em = E_long - E_short;
445  newE_had = 2.0 * E_short;
446  }
447 
448  else { // barrel/endcap
449 
450  // find if its in EB, or EE; determine from first ecal constituent found
451  for (unsigned int iConst = 0; iConst < ctcItr->constituentsSize(); ++iConst) {
452  DetId constId = ctcItr->constituent(iConst);
453  if (constId.det() != DetId::Ecal)
454  continue;
456  newE_em *= weight;
457  break;
458  }
459  // HO
460  for (unsigned int iConst = 0; iConst < ctcItr->constituentsSize(); ++iConst) {
461  DetId constId = ctcItr->constituent(iConst);
462  if (constId.det() != DetId::Hcal)
463  continue;
464  if (HcalDetId(constId).subdet() != HcalOuter)
465  continue;
467  newE_outer *= weight;
468  break;
469  }
470  // HB/HE
471  for (unsigned int iConst = 0; iConst < ctcItr->constituentsSize(); ++iConst) {
472  DetId constId = ctcItr->constituent(iConst);
473  if (constId.det() != DetId::Hcal)
474  continue;
475  if (HcalDetId(constId).subdet() == HcalOuter)
476  continue;
478  newE_had *= weight;
479  if (ctcItr->ietaAbs() > theTowerTopology->firstHERing())
480  newE_outer *= weight;
481  break;
482  }
483 
484  } // barrel/endcap region
485 
486  // now make the new tower
487 
488  double newE_hadTot =
489  (theHOIsUsed && twrId.ietaAbs() <= theTowerTopology->lastHORing()) ? newE_had + newE_outer : newE_had;
490 
491  GlobalPoint emPoint = ctcItr->emPosition();
492  GlobalPoint hadPoint = ctcItr->emPosition();
493 
494  double f_em = 1.0 / cosh(emPoint.eta());
495  double f_had = 1.0 / cosh(hadPoint.eta());
496 
498 
499  if (ctcItr->ietaAbs() < theTowerTopology->firstHFRing()) {
500  if (newE_em > 0)
501  towerP4 += CaloTower::PolarLorentzVector(newE_em * f_em, emPoint.eta(), emPoint.phi(), 0);
502  if (newE_hadTot > 0)
503  towerP4 += CaloTower::PolarLorentzVector(newE_hadTot * f_had, hadPoint.eta(), hadPoint.phi(), 0);
504  } else {
505  double newE_tot = newE_em + newE_had;
506  // for HF we use common point for ecal, hcal shower positions regardless of the method
507  if (newE_tot > 0)
508  towerP4 += CaloTower::PolarLorentzVector(newE_tot * f_had, hadPoint.eta(), hadPoint.phi(), 0);
509  }
510 
511  CaloTower rescaledTower(twrId, newE_em, newE_had, newE_outer, -1, -1, towerP4, emPoint, hadPoint);
512  // copy the timings, have to convert back to int, 1 unit = 0.01 ns
513  rescaledTower.setEcalTime(int(ctcItr->ecalTime() * 100.0 + 0.5));
514  rescaledTower.setHcalTime(int(ctcItr->hcalTime() * 100.0 + 0.5));
515  //add topology info
516  rescaledTower.setHcalSubdet(theTowerTopology->lastHBRing(),
520 
521  std::vector<DetId> contains;
522  for (unsigned int iConst = 0; iConst < ctcItr->constituentsSize(); ++iConst) {
523  contains.push_back(ctcItr->constituent(iConst));
524  }
525  rescaledTower.addConstituents(contains);
526 
527  rescaledTower.setCaloTowerStatus(ctcItr->towerStatusWord());
528 
529  ctcResult.push_back(rescaledTower);
530 
531  } // end of loop over towers
532 }

References CaloTower::addConstituents(), edm::SortedCollection< T, SORT >::begin(), edm::contains(), DetId::det(), DetId::Ecal, edm::SortedCollection< T, SORT >::end(), PV3DBase< T, PVType, FrameType >::eta(), CaloTowerTopology::firstHERing(), CaloTowerTopology::firstHFRing(), getThresholdAndWeight(), DetId::Hcal, HcalOuter, CaloTowerDetId::ietaAbs(), CaloTowerTopology::lastHBRing(), CaloTowerTopology::lastHERing(), CaloTowerTopology::lastHFRing(), CaloTowerTopology::lastHORing(), PV3DBase< T, PVType, FrameType >::phi(), edm::SortedCollection< T, SORT >::push_back(), CaloTower::setCaloTowerStatus(), CaloTower::setEcalTime(), CaloTower::setHcalSubdet(), CaloTower::setHcalTime(), HcalDetId::subdet(), theHF1weight, theHF2weight, theHOIsUsed, theTowerTopology, remoteMonitoring_LED_IterMethod_cfg::threshold, and mps_merge::weight.

Referenced by CaloTowersReCreator::produce().

◆ setEBEScale()

void CaloTowersCreationAlgo::setEBEScale ( double  scale)

Definition at line 1339 of file CaloTowersCreationAlgo.cc.

1339  {
1340  if (scale > 0.00001)
1341  *&theEBEScale = scale;
1342  else
1343  *&theEBEScale = 50.;
1344 }

References L1EGammaCrystalsEmulatorProducer_cfi::scale, and theEBEScale.

Referenced by CaloTowersReCreator::produce(), and CaloTowersCreator::produce().

◆ setEbHandle()

void CaloTowersCreationAlgo::setEbHandle ( const edm::Handle< EcalRecHitCollection eb)
inline

Definition at line 240 of file CaloTowersCreationAlgo.h.

240 { theEbHandle = eb; }

References theEbHandle.

Referenced by CaloTowersCreator::produce().

◆ setEcalChStatusFromDB()

void CaloTowersCreationAlgo::setEcalChStatusFromDB ( const EcalChannelStatus s)
inline

Definition at line 164 of file CaloTowersCreationAlgo.h.

164 { theEcalChStatus = s; }

References alignCSCRings::s, and theEcalChStatus.

Referenced by CaloTowersCreator::produce().

◆ setEcalSeveritiesToBeExcluded()

void CaloTowersCreationAlgo::setEcalSeveritiesToBeExcluded ( const std::vector< int > &  ecalSev)
inline

Definition at line 206 of file CaloTowersCreationAlgo.h.

206 { theEcalSeveritiesToBeExcluded = ecalSev; }

References theEcalSeveritiesToBeExcluded.

Referenced by CaloTowersCreator::produce().

◆ SetEcalSeveritiesToBeUsedInBadTowers()

void CaloTowersCreationAlgo::SetEcalSeveritiesToBeUsedInBadTowers ( const std::vector< int > &  ecalSev)
inline

Definition at line 228 of file CaloTowersCreationAlgo.h.

228  {
230  }

References theEcalSeveritiesToBeUsedInBadTowers.

Referenced by CaloTowersCreator::produce().

◆ setEcalSevLvlAlgo()

void CaloTowersCreationAlgo::setEcalSevLvlAlgo ( const EcalSeverityLevelAlgo a)
inline

Definition at line 216 of file CaloTowersCreationAlgo.h.

216 { theEcalSevLvlAlgo = a; }

References a, and theEcalSevLvlAlgo.

Referenced by CaloTowersCreator::produce().

◆ setEEEScale()

void CaloTowersCreationAlgo::setEEEScale ( double  scale)

Definition at line 1346 of file CaloTowersCreationAlgo.cc.

1346  {
1347  if (scale > 0.00001)
1348  *&theEEEScale = scale;
1349  else
1350  *&theEEEScale = 50.;
1351 }

References L1EGammaCrystalsEmulatorProducer_cfi::scale, and theEEEScale.

Referenced by CaloTowersReCreator::produce(), and CaloTowersCreator::produce().

◆ setEeHandle()

void CaloTowersCreationAlgo::setEeHandle ( const edm::Handle< EcalRecHitCollection ee)
inline

Definition at line 241 of file CaloTowersCreationAlgo.h.

241 { theEeHandle = ee; }

References theEeHandle.

Referenced by CaloTowersCreator::produce().

◆ setGeometry()

void CaloTowersCreationAlgo::setGeometry ( const CaloTowerTopology cttopo,
const CaloTowerConstituentsMap ctmap,
const HcalTopology htopo,
const CaloGeometry geo 
)

◆ setHBEScale()

void CaloTowersCreationAlgo::setHBEScale ( double  scale)

Definition at line 1353 of file CaloTowersCreationAlgo.cc.

1353  {
1354  if (scale > 0.00001)
1355  *&theHBEScale = scale;
1356  else
1357  *&theHBEScale = 50.;
1358 }

References L1EGammaCrystalsEmulatorProducer_cfi::scale, and theHBEScale.

Referenced by CaloTowersReCreator::produce(), and CaloTowersCreator::produce().

◆ setHcalAcceptSeverityLevel()

void CaloTowersCreationAlgo::setHcalAcceptSeverityLevel ( unsigned int  level)
inline

◆ setHcalAcceptSeverityLevelForRejectedHit()

void CaloTowersCreationAlgo::setHcalAcceptSeverityLevelForRejectedHit ( unsigned int  level)
inline

◆ setHcalChStatusFromDB()

void CaloTowersCreationAlgo::setHcalChStatusFromDB ( const HcalChannelQuality s)
inline

Definition at line 163 of file CaloTowersCreationAlgo.h.

163 { theHcalChStatus = s; }

References alignCSCRings::s, and theHcalChStatus.

Referenced by CaloTowersCreator::produce().

◆ setHcalSevLvlComputer()

void CaloTowersCreationAlgo::setHcalSevLvlComputer ( const HcalSeverityLevelComputer c)
inline

Definition at line 213 of file CaloTowersCreationAlgo.h.

213 { theHcalSevLvlComputer = c; };

References c, and theHcalSevLvlComputer.

Referenced by CaloTowersCreator::produce().

◆ setHEDEScale()

void CaloTowersCreationAlgo::setHEDEScale ( double  scale)

Definition at line 1367 of file CaloTowersCreationAlgo.cc.

1367  {
1368  if (scale > 0.00001)
1369  *&theHEDEScale = scale;
1370  else
1371  *&theHEDEScale = 50.;
1372 }

References L1EGammaCrystalsEmulatorProducer_cfi::scale, and theHEDEScale.

Referenced by CaloTowersReCreator::produce(), and CaloTowersCreator::produce().

◆ setHESEScale()

void CaloTowersCreationAlgo::setHESEScale ( double  scale)

Definition at line 1360 of file CaloTowersCreationAlgo.cc.

1360  {
1361  if (scale > 0.00001)
1362  *&theHESEScale = scale;
1363  else
1364  *&theHESEScale = 50.;
1365 }

References L1EGammaCrystalsEmulatorProducer_cfi::scale, and theHESEScale.

Referenced by CaloTowersReCreator::produce(), and CaloTowersCreator::produce().

◆ setHF1EScale()

void CaloTowersCreationAlgo::setHF1EScale ( double  scale)

Definition at line 1381 of file CaloTowersCreationAlgo.cc.

1381  {
1382  if (scale > 0.00001)
1383  *&theHF1EScale = scale;
1384  else
1385  *&theHF1EScale = 50.;
1386 }

References L1EGammaCrystalsEmulatorProducer_cfi::scale, and theHF1EScale.

Referenced by CaloTowersReCreator::produce(), and CaloTowersCreator::produce().

◆ setHF2EScale()

void CaloTowersCreationAlgo::setHF2EScale ( double  scale)

Definition at line 1388 of file CaloTowersCreationAlgo.cc.

1388  {
1389  if (scale > 0.00001)
1390  *&theHF2EScale = scale;
1391  else
1392  *&theHF2EScale = 50.;
1393 }

References L1EGammaCrystalsEmulatorProducer_cfi::scale, and theHF2EScale.

Referenced by CaloTowersReCreator::produce(), and CaloTowersCreator::produce().

◆ setHOEScale()

void CaloTowersCreationAlgo::setHOEScale ( double  scale)

Definition at line 1374 of file CaloTowersCreationAlgo.cc.

1374  {
1375  if (scale > 0.00001)
1376  *&theHOEScale = scale;
1377  else
1378  *&theHOEScale = 50.;
1379 }

References L1EGammaCrystalsEmulatorProducer_cfi::scale, and theHOEScale.

Referenced by CaloTowersReCreator::produce(), and CaloTowersCreator::produce().

◆ setMissingHcalRescaleFactorForEcal()

void CaloTowersCreationAlgo::setMissingHcalRescaleFactorForEcal ( float  factor)
inline

◆ setRecoveredEcalHitsAreUsed()

void CaloTowersCreationAlgo::setRecoveredEcalHitsAreUsed ( bool  flag)
inline

◆ setRecoveredHcalHitsAreUsed()

void CaloTowersCreationAlgo::setRecoveredHcalHitsAreUsed ( bool  flag)
inline

◆ setUseRejectedHitsOnly()

void CaloTowersCreationAlgo::setUseRejectedHitsOnly ( bool  flag)
inline

Definition at line 222 of file CaloTowersCreationAlgo.h.

References RemoveAddSevLevel::flag, and useRejectedHitsOnly.

Referenced by CaloTowersCreator::produce().

◆ setUseRejectedRecoveredEcalHits()

void CaloTowersCreationAlgo::setUseRejectedRecoveredEcalHits ( bool  flag)
inline

◆ setUseRejectedRecoveredHcalHits()

void CaloTowersCreationAlgo::setUseRejectedRecoveredHcalHits ( bool  flag)
inline

Member Data Documentation

◆ ecalBadChs

std::vector<unsigned short> CaloTowersCreationAlgo::ecalBadChs
private

Definition at line 385 of file CaloTowersCreationAlgo.h.

Referenced by convert(), makeEcalBadChs(), and setGeometry().

◆ hcalDropChMap

HcalDropChMap CaloTowersCreationAlgo::hcalDropChMap
private

Definition at line 381 of file CaloTowersCreationAlgo.h.

Referenced by convert(), and makeHcalDropChMap().

◆ ids_

std::vector<HcalDetId> CaloTowersCreationAlgo::ids_
private

Definition at line 399 of file CaloTowersCreationAlgo.h.

◆ missingHcalRescaleFactorForEcal

float CaloTowersCreationAlgo::missingHcalRescaleFactorForEcal
private

◆ nalgo

int CaloTowersCreationAlgo::nalgo = -1

Definition at line 50 of file CaloTowersCreationAlgo.h.

◆ theEBEScale

double CaloTowersCreationAlgo::theEBEScale
private

Definition at line 312 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight(), and setEBEScale().

◆ theEBGrid

std::vector<double> CaloTowersCreationAlgo::theEBGrid
private

Definition at line 300 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theEbHandle

edm::Handle<EcalRecHitCollection> CaloTowersCreationAlgo::theEbHandle
private

Definition at line 394 of file CaloTowersCreationAlgo.h.

Referenced by setEbHandle().

◆ theEBSumThreshold

double CaloTowersCreationAlgo::theEBSumThreshold
private

Definition at line 310 of file CaloTowersCreationAlgo.h.

Referenced by convert().

◆ theEBthreshold

double CaloTowersCreationAlgo::theEBthreshold
private

Definition at line 289 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theEBweight

double CaloTowersCreationAlgo::theEBweight
private

Definition at line 308 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theEBWeights

std::vector<double> CaloTowersCreationAlgo::theEBWeights
private

Definition at line 300 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theEcalChStatus

const EcalChannelStatus* CaloTowersCreationAlgo::theEcalChStatus
private

Definition at line 327 of file CaloTowersCreationAlgo.h.

Referenced by setEcalChStatusFromDB().

◆ theEcalSeveritiesToBeExcluded

std::vector<int> CaloTowersCreationAlgo::theEcalSeveritiesToBeExcluded
private

◆ theEcalSeveritiesToBeUsedInBadTowers

std::vector<int> CaloTowersCreationAlgo::theEcalSeveritiesToBeUsedInBadTowers
private

◆ theEcalSevLvlAlgo

const EcalSeverityLevelAlgo* CaloTowersCreationAlgo::theEcalSevLvlAlgo
private

◆ theEcutTower

double CaloTowersCreationAlgo::theEcutTower
private

Definition at line 310 of file CaloTowersCreationAlgo.h.

Referenced by convert().

◆ theEEEScale

double CaloTowersCreationAlgo::theEEEScale
private

Definition at line 313 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight(), and setEEEScale().

◆ theEEGrid

std::vector<double> CaloTowersCreationAlgo::theEEGrid
private

Definition at line 301 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theEeHandle

edm::Handle<EcalRecHitCollection> CaloTowersCreationAlgo::theEeHandle
private

Definition at line 395 of file CaloTowersCreationAlgo.h.

Referenced by setEeHandle().

◆ theEESumThreshold

double CaloTowersCreationAlgo::theEESumThreshold
private

Definition at line 310 of file CaloTowersCreationAlgo.h.

Referenced by convert().

◆ theEEthreshold

double CaloTowersCreationAlgo::theEEthreshold
private

Definition at line 289 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theEEweight

double CaloTowersCreationAlgo::theEEweight
private

Definition at line 308 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theEEWeights

std::vector<double> CaloTowersCreationAlgo::theEEWeights
private

Definition at line 301 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theGeometry

const CaloGeometry* CaloTowersCreationAlgo::theGeometry
private

◆ theHBEScale

double CaloTowersCreationAlgo::theHBEScale
private

Definition at line 314 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight(), and setHBEScale().

◆ theHBGrid

std::vector<double> CaloTowersCreationAlgo::theHBGrid
private

Definition at line 302 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theHBthreshold

double CaloTowersCreationAlgo::theHBthreshold
private

Definition at line 295 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theHBthreshold1

double CaloTowersCreationAlgo::theHBthreshold1
private

Definition at line 295 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theHBthreshold2

double CaloTowersCreationAlgo::theHBthreshold2
private

Definition at line 295 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theHBweight

double CaloTowersCreationAlgo::theHBweight
private

Definition at line 309 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theHBWeights

std::vector<double> CaloTowersCreationAlgo::theHBWeights
private

Definition at line 302 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theHcalAcceptSeverityLevel

unsigned int CaloTowersCreationAlgo::theHcalAcceptSeverityLevel
private

◆ theHcalAcceptSeverityLevelForRejectedHit

unsigned int CaloTowersCreationAlgo::theHcalAcceptSeverityLevelForRejectedHit
private

◆ theHcalChStatus

const HcalChannelQuality* CaloTowersCreationAlgo::theHcalChStatus
private

◆ theHcalPhase

int CaloTowersCreationAlgo::theHcalPhase
private

Definition at line 397 of file CaloTowersCreationAlgo.h.

Referenced by assignHitHcal(), hadShwrPos(), and makeHcalDropChMap().

◆ theHcalSevLvlComputer

const HcalSeverityLevelComputer* CaloTowersCreationAlgo::theHcalSevLvlComputer
private

◆ theHcalThreshold

double CaloTowersCreationAlgo::theHcalThreshold
private

Definition at line 293 of file CaloTowersCreationAlgo.h.

Referenced by convert().

◆ theHcalTopology

const HcalTopology* CaloTowersCreationAlgo::theHcalTopology
private

◆ theHEDEScale

double CaloTowersCreationAlgo::theHEDEScale
private

Definition at line 316 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight(), and setHEDEScale().

◆ theHEDGrid

std::vector<double> CaloTowersCreationAlgo::theHEDGrid
private

Definition at line 304 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theHEDthreshold

double CaloTowersCreationAlgo::theHEDthreshold
private

Definition at line 297 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theHEDthreshold1

double CaloTowersCreationAlgo::theHEDthreshold1
private

Definition at line 297 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theHEDweight

double CaloTowersCreationAlgo::theHEDweight
private

Definition at line 309 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theHEDWeights

std::vector<double> CaloTowersCreationAlgo::theHEDWeights
private

Definition at line 304 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theHESEScale

double CaloTowersCreationAlgo::theHESEScale
private

Definition at line 315 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight(), and setHESEScale().

◆ theHESGrid

std::vector<double> CaloTowersCreationAlgo::theHESGrid
private

Definition at line 303 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theHESthreshold

double CaloTowersCreationAlgo::theHESthreshold
private

Definition at line 296 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theHESthreshold1

double CaloTowersCreationAlgo::theHESthreshold1
private

Definition at line 296 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theHESweight

double CaloTowersCreationAlgo::theHESweight
private

Definition at line 309 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theHESWeights

std::vector<double> CaloTowersCreationAlgo::theHESWeights
private

Definition at line 303 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theHF1EScale

double CaloTowersCreationAlgo::theHF1EScale
private

Definition at line 318 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight(), and setHF1EScale().

◆ theHF1Grid

std::vector<double> CaloTowersCreationAlgo::theHF1Grid
private

Definition at line 306 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theHF1threshold

double CaloTowersCreationAlgo::theHF1threshold
private

Definition at line 299 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theHF1weight

double CaloTowersCreationAlgo::theHF1weight
private

Definition at line 309 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight(), and rescaleTowers().

◆ theHF1Weights

std::vector<double> CaloTowersCreationAlgo::theHF1Weights
private

Definition at line 306 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theHF2EScale

double CaloTowersCreationAlgo::theHF2EScale
private

Definition at line 319 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight(), and setHF2EScale().

◆ theHF2Grid

std::vector<double> CaloTowersCreationAlgo::theHF2Grid
private

Definition at line 307 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theHF2threshold

double CaloTowersCreationAlgo::theHF2threshold
private

Definition at line 299 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theHF2weight

double CaloTowersCreationAlgo::theHF2weight
private

Definition at line 309 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight(), and rescaleTowers().

◆ theHF2Weights

std::vector<double> CaloTowersCreationAlgo::theHF2Weights
private

Definition at line 307 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theHOEScale

double CaloTowersCreationAlgo::theHOEScale
private

Definition at line 317 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight(), and setHOEScale().

◆ theHOGrid

std::vector<double> CaloTowersCreationAlgo::theHOGrid
private

Definition at line 305 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theHOIsUsed

bool CaloTowersCreationAlgo::theHOIsUsed
private

only affects energy and ET calculation. HO is still recorded in the tower

Definition at line 358 of file CaloTowersCreationAlgo.h.

Referenced by assignHitHcal(), convert(), and rescaleTowers().

◆ theHOthreshold0

double CaloTowersCreationAlgo::theHOthreshold0
private

Definition at line 298 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theHOthresholdMinus1

double CaloTowersCreationAlgo::theHOthresholdMinus1
private

Definition at line 298 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theHOthresholdMinus2

double CaloTowersCreationAlgo::theHOthresholdMinus2
private

Definition at line 299 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theHOthresholdPlus1

double CaloTowersCreationAlgo::theHOthresholdPlus1
private

Definition at line 298 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theHOthresholdPlus2

double CaloTowersCreationAlgo::theHOthresholdPlus2
private

Definition at line 299 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theHOweight

double CaloTowersCreationAlgo::theHOweight
private

Definition at line 309 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theHOWeights

std::vector<double> CaloTowersCreationAlgo::theHOWeights
private

Definition at line 305 of file CaloTowersCreationAlgo.h.

Referenced by getThresholdAndWeight().

◆ theMomConstrMethod

int CaloTowersCreationAlgo::theMomConstrMethod
private

Definition at line 362 of file CaloTowersCreationAlgo.h.

Referenced by convert().

◆ theMomEBDepth

double CaloTowersCreationAlgo::theMomEBDepth
private

Definition at line 365 of file CaloTowersCreationAlgo.h.

Referenced by convert().

◆ theMomEEDepth

double CaloTowersCreationAlgo::theMomEEDepth
private

Definition at line 366 of file CaloTowersCreationAlgo.h.

Referenced by convert().

◆ theMomHBDepth

double CaloTowersCreationAlgo::theMomHBDepth
private

Definition at line 363 of file CaloTowersCreationAlgo.h.

Referenced by convert().

◆ theMomHEDepth

double CaloTowersCreationAlgo::theMomHEDepth
private

Definition at line 364 of file CaloTowersCreationAlgo.h.

Referenced by convert().

◆ theRecoveredEcalHitsAreUsed

bool CaloTowersCreationAlgo::theRecoveredEcalHitsAreUsed
private

◆ theRecoveredHcalHitsAreUsed

bool CaloTowersCreationAlgo::theRecoveredHcalHitsAreUsed
private

◆ theTowerConstituentsMap

const CaloTowerConstituentsMap* CaloTowersCreationAlgo::theTowerConstituentsMap
private

◆ theTowerGeometry

const CaloSubdetectorGeometry* CaloTowersCreationAlgo::theTowerGeometry
private

Definition at line 324 of file CaloTowersCreationAlgo.h.

Referenced by convert(), and setGeometry().

◆ theTowerMap

MetaTowerMap CaloTowersCreationAlgo::theTowerMap
private

Definition at line 375 of file CaloTowersCreationAlgo.h.

Referenced by begin(), find(), and finish().

◆ theTowerMapSize

unsigned int CaloTowersCreationAlgo::theTowerMapSize = 0
private

Definition at line 376 of file CaloTowersCreationAlgo.h.

Referenced by begin(), find(), and finish().

◆ theTowerTopology

const CaloTowerTopology* CaloTowersCreationAlgo::theTowerTopology
private

◆ theUseEtEBTresholdFlag

bool CaloTowersCreationAlgo::theUseEtEBTresholdFlag
private

Definition at line 290 of file CaloTowersCreationAlgo.h.

Referenced by assignHitEcal().

◆ theUseEtEETresholdFlag

bool CaloTowersCreationAlgo::theUseEtEETresholdFlag
private

Definition at line 290 of file CaloTowersCreationAlgo.h.

Referenced by assignHitEcal().

◆ theUseSymEBTresholdFlag

bool CaloTowersCreationAlgo::theUseSymEBTresholdFlag
private

Definition at line 291 of file CaloTowersCreationAlgo.h.

Referenced by assignHitEcal().

◆ theUseSymEETresholdFlag

bool CaloTowersCreationAlgo::theUseSymEETresholdFlag
private

Definition at line 291 of file CaloTowersCreationAlgo.h.

Referenced by assignHitEcal().

◆ useRejectedHitsOnly

bool CaloTowersCreationAlgo::useRejectedHitsOnly
private

◆ useRejectedRecoveredEcalHits

unsigned int CaloTowersCreationAlgo::useRejectedRecoveredEcalHits
private

◆ useRejectedRecoveredHcalHits

unsigned int CaloTowersCreationAlgo::useRejectedRecoveredHcalHits
private
personalPlayback.level
level
Definition: personalPlayback.py:22
CaloTower::emEnergy
double emEnergy() const
Definition: CaloTower.h:130
change_name.diff
diff
Definition: change_name.py:13
CaloTowersCreationAlgo::emShwrLogWeightPos
GlobalPoint emShwrLogWeightPos(const std::vector< std::pair< DetId, float >> &metaContains, float fracDepth, double totEmE)
Definition: CaloTowersCreationAlgo.cc:1595
CaloTowersCreationAlgo::IgnoredChan
Definition: CaloTowersCreationAlgo.h:390
CaloTowersCreationAlgo::theUseEtEBTresholdFlag
bool theUseEtEBTresholdFlag
Definition: CaloTowersCreationAlgo.h:290
CaloTowerDetId::ietaAbs
int ietaAbs() const
get the absolute value of the tower ieta
Definition: CaloTowerDetId.h:28
HLT_FULL_cff.HF2Weights
HF2Weights
Definition: HLT_FULL_cff.py:8572
CaloTower::ecalTime
float ecalTime() const
Definition: CaloTower.h:196
CaloTowersCreationAlgo::theMomConstrMethod
int theMomConstrMethod
Definition: CaloTowersCreationAlgo.h:362
EcalRecHit
Definition: EcalRecHit.h:15
mps_fire.i
i
Definition: mps_fire.py:428
EcalSeverityLevel::kGood
Definition: EcalSeverityLevel.h:19
CaloTowersCreationAlgo::emCrystalShwrPos
GlobalPoint emCrystalShwrPos(DetId detId, float fracDepth)
Definition: CaloTowersCreationAlgo.cc:1395
CaloTowersCreationAlgo::theEcalSeveritiesToBeUsedInBadTowers
std::vector< int > theEcalSeveritiesToBeUsedInBadTowers
Definition: CaloTowersCreationAlgo.h:349
edm::SortedCollection< CaloTower >::const_iterator
std::vector< CaloTower >::const_iterator const_iterator
Definition: SortedCollection.h:80
HcalSeverityLevelComputer::recoveredRecHit
bool recoveredRecHit(const DetId &myid, const uint32_t &myflag) const
Definition: HcalSeverityLevelComputer.cc:363
HcalTopology::idFront
HcalDetId idFront(const HcalDetId &id) const
Definition: HcalTopology.h:170
HcalTopology::validHcal
bool validHcal(const HcalDetId &id) const
Definition: HcalTopology.cc:230
CaloTowersCreationAlgo::assignHitHcal
void assignHitHcal(const CaloRecHit *recHit)
Definition: CaloTowersCreationAlgo.cc:534
CaloTowersCreationAlgo::theEBSumThreshold
double theEBSumThreshold
Definition: CaloTowersCreationAlgo.h:310
L1EGammaCrystalsEmulatorProducer_cfi.scale
scale
Definition: L1EGammaCrystalsEmulatorProducer_cfi.py:10
HLT_FULL_cff.EBWeights
EBWeights
Definition: HLT_FULL_cff.py:8584
CaloTowerTopology::firstHFRing
int firstHFRing() const
Definition: CaloTowerTopology.h:40
CaloTowersCreationAlgo::theMomEEDepth
double theMomEEDepth
Definition: CaloTowersCreationAlgo.h:366
CaloTowersCreationAlgo::theHcalTopology
const HcalTopology * theHcalTopology
Definition: CaloTowersCreationAlgo.h:321
EcalSeverityLevelAlgo::severityLevel
EcalSeverityLevel::SeverityLevel severityLevel(const DetId &id) const
Evaluate status from id use channelStatus from DB.
Definition: EcalSeverityLevelAlgo.cc:85
CaloTowersCreationAlgo::useRejectedRecoveredEcalHits
unsigned int useRejectedRecoveredEcalHits
Definition: CaloTowersCreationAlgo.h:352
CaloTowerConstituentsMap::constituentsOf
std::vector< DetId > constituentsOf(const CaloTowerDetId &id) const
Get the constituent detids for this tower id ( not yet implemented )
Definition: CaloTowerConstituentsMap.cc:69
CaloTowersCreationAlgo::theEBGrid
std::vector< double > theEBGrid
Definition: CaloTowersCreationAlgo.h:300
HcalTopology::mergedDepth29
bool mergedDepth29(HcalDetId id) const
Definition: HcalTopology.h:111
CaloTowersCreationAlgo::theHESweight
double theHESweight
Definition: CaloTowersCreationAlgo.h:309
CaloTowersParam_cfi.mc
mc
Definition: CaloTowersParam_cfi.py:8
HLT_FULL_cff.HF1Grid
HF1Grid
Definition: HLT_FULL_cff.py:8583
CaloTowersCreationAlgo::theGeometry
const CaloGeometry * theGeometry
Definition: CaloTowersCreationAlgo.h:322
CaloTowersCreationAlgo::theHEDweight
double theHEDweight
Definition: CaloTowersCreationAlgo.h:309
mps_merge.weight
weight
Definition: mps_merge.py:88
CaloTowersCreationAlgo::RecoveredChan
Definition: CaloTowersCreationAlgo.h:390
reco::Candidate::PolarLorentzVector
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:38
DetId::det
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
CaloTowersCreationAlgo::rescale
void rescale(const CaloTower *ct)
Definition: CaloTowersCreationAlgo.cc:864
CaloTowersCreationAlgo::hcalChanStatusForCaloTower
unsigned int hcalChanStatusForCaloTower(const CaloRecHit *hit)
Definition: CaloTowersCreationAlgo.cc:1751
gather_cfg.cout
cout
Definition: gather_cfg.py:144
HLT_FULL_cff.HESGrid
HESGrid
Definition: HLT_FULL_cff.py:8599
DetId::Hcal
Definition: DetId.h:28
HLT_FULL_cff.HF1Weights
HF1Weights
Definition: HLT_FULL_cff.py:8597
hgcalTowerProducer_cfi.tower
tower
Definition: hgcalTowerProducer_cfi.py:4
CaloTowersCreationAlgo::theHF2Grid
std::vector< double > theHF2Grid
Definition: CaloTowersCreationAlgo.h:307
CaloTowersCreationAlgo::convert
void convert(const CaloTowerDetId &id, const MetaTower &mt, CaloTowerCollection &collection)
Definition: CaloTowersCreationAlgo.cc:924
HLT_FULL_cff.EESumThreshold
EESumThreshold
Definition: HLT_FULL_cff.py:8560
CaloTower::id
CaloTowerDetId id() const
Definition: CaloTower.h:123
CaloGeometry::getSubdetectorGeometry
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:34
CaloTowersCreationAlgo::theHF1EScale
double theHF1EScale
Definition: CaloTowersCreationAlgo.h:318
CaloTowersCreationAlgo::theTowerMap
MetaTowerMap theTowerMap
Definition: CaloTowersCreationAlgo.h:375
if
if(0==first)
Definition: CAHitNtupletGeneratorKernelsImpl.h:58
CaloTowersCreationAlgo::theHESthreshold
double theHESthreshold
Definition: CaloTowersCreationAlgo.h:296
CaloTowersCreationAlgo::theEEthreshold
double theEEthreshold
Definition: CaloTowersCreationAlgo.h:289
cms::cuda::assert
assert(be >=bs)
protons_cff.time
time
Definition: protons_cff.py:35
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
digitizers_cfi.ecalTime
ecalTime
Definition: digitizers_cfi.py:77
CaloTower::outerEnergy
double outerEnergy() const
Definition: CaloTower.h:132
CaloTowersCreationAlgo::theHBEScale
double theHBEScale
Definition: CaloTowersCreationAlgo.h:314
CaloTowerTopology::lastHORing
int lastHORing() const
Definition: CaloTowerTopology.h:43
HLT_FULL_cff.EEGrid
EEGrid
Definition: HLT_FULL_cff.py:8574
HcalDetId::depth
constexpr int depth() const
get the tower depth
Definition: HcalDetId.h:164
CaloTowersCreationAlgo::missingHcalRescaleFactorForEcal
float missingHcalRescaleFactorForEcal
Definition: CaloTowersCreationAlgo.h:355
DetId::null
constexpr bool null() const
is this a null id ?
Definition: DetId.h:59
HLT_FULL_cff.HBGrid
HBGrid
Definition: HLT_FULL_cff.py:8566
CaloTowersCreationAlgo::theEEWeights
std::vector< double > theEEWeights
Definition: CaloTowersCreationAlgo.h:301
EcalSubdetector
EcalSubdetector
Definition: EcalSubdetector.h:10
CaloTowerDetId::SubdetId
static const int SubdetId
Definition: CaloTowerDetId.h:34
HcalTopology::mergedDepthDetId
HcalDetId mergedDepthDetId(const HcalDetId &id) const
Definition: HcalTopology.h:166
GlobalVector
Global3DVector GlobalVector
Definition: GlobalVector.h:10
CaloTowerTopology::firstHERing
int firstHERing() const
Definition: CaloTowerTopology.h:38
HcalBarrel
Definition: HcalAssistant.h:33
CaloTowersCreationAlgo::theHcalAcceptSeverityLevelForRejectedHit
unsigned int theHcalAcceptSeverityLevelForRejectedHit
Definition: CaloTowersCreationAlgo.h:348
CaloTowersCreationAlgo::useRejectedHitsOnly
bool useRejectedHitsOnly
Definition: CaloTowersCreationAlgo.h:347
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
HcalTopology::getMergePositionFlag
bool getMergePositionFlag() const
Definition: HcalTopology.h:167
CaloTowersCreationAlgo::theHOGrid
std::vector< double > theHOGrid
Definition: CaloTowersCreationAlgo.h:305
DetId::Calo
Definition: DetId.h:29
CaloTowersCreationAlgo::theEcalChStatus
const EcalChannelStatus * theEcalChStatus
Definition: CaloTowersCreationAlgo.h:327
CaloTowersCreationAlgo::theTowerConstituentsMap
const CaloTowerConstituentsMap * theTowerConstituentsMap
Definition: CaloTowersCreationAlgo.h:323
HcalCondObjectContainer::getValues
const Item * getValues(DetId fId, bool throwOnFail=true) const
Definition: HcalCondObjectContainer.h:159
EcalBarrel
Definition: EcalSubdetector.h:10
rpcPointValidation_cfi.recHit
recHit
Definition: rpcPointValidation_cfi.py:7
HLT_FULL_cff.HF2Grid
HF2Grid
Definition: HLT_FULL_cff.py:8581
CaloTowersCreationAlgo::theHOEScale
double theHOEScale
Definition: CaloTowersCreationAlgo.h:317
mps_monitormerge.items
list items
Definition: mps_monitormerge.py:29
CaloTowersCreationAlgo::theEeHandle
edm::Handle< EcalRecHitCollection > theEeHandle
Definition: CaloTowersCreationAlgo.h:395
ecaldqm::towerId
unsigned towerId(DetId const &, EcalElectronicsMapping const *)
Definition: EcalDQMCommonUtils.cc:77
HLT_FULL_cff.HBWeights
HBWeights
Definition: HLT_FULL_cff.py:8578
CaloTowersCreationAlgo::find
MetaTower & find(const CaloTowerDetId &id)
looks for a given tower in the internal cache. If it can't find it, it makes it.
Definition: CaloTowersCreationAlgo.cc:908
CaloTowersCreationAlgo::theHF2weight
double theHF2weight
Definition: CaloTowersCreationAlgo.h:309
CaloTowersCreationAlgo::theEcutTower
double theEcutTower
Definition: CaloTowersCreationAlgo.h:310
CaloTowersCreationAlgo::theHEDWeights
std::vector< double > theHEDWeights
Definition: CaloTowersCreationAlgo.h:304
CaloTowersCreationAlgo::theHF2threshold
double theHF2threshold
Definition: CaloTowersCreationAlgo.h:299
HcalTopology::firstHEDoublePhiRing
int firstHEDoublePhiRing() const
Definition: HcalTopology.h:101
CaloTowersCreationAlgo::theHOIsUsed
bool theHOIsUsed
only affects energy and ET calculation. HO is still recorded in the tower
Definition: CaloTowersCreationAlgo.h:358
DetId
Definition: DetId.h:17
CaloTowersCreationAlgo::compactTime
int compactTime(float time)
Definition: CaloTowersCreationAlgo.cc:1632
UNLIKELY
#define UNLIKELY(x)
Definition: Likely.h:21
CaloTowersCreationAlgo::theHF1weight
double theHF1weight
Definition: CaloTowersCreationAlgo.h:309
alignCSCRings.s
s
Definition: alignCSCRings.py:92
CaloTowersCreationAlgo::theHBGrid
std::vector< double > theHBGrid
Definition: CaloTowersCreationAlgo.h:302
photonIsolationHIProducer_cfi.hf
hf
Definition: photonIsolationHIProducer_cfi.py:9
CaloTowersCreationAlgo::theTowerMapSize
unsigned int theTowerMapSize
Definition: CaloTowersCreationAlgo.h:376
CaloTowersCreationAlgo::hadShwrPos
GlobalPoint hadShwrPos(const std::vector< std::pair< DetId, float >> &metaContains, float fracDepth, double hadE)
edm::SortedCollection::begin
const_iterator begin() const
Definition: SortedCollection.h:262
CaloTowersCreationAlgo::assignHitEcal
void assignHitEcal(const EcalRecHit *recHit)
adds a single hit to the tower
Definition: CaloTowersCreationAlgo.cc:772
PVValHelper::eta
Definition: PVValidationHelpers.h:70
CaloTower::constituentsSize
size_t constituentsSize() const
Definition: CaloTower.h:125
reco::LeafCandidate::PolarLorentzVector
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: LeafCandidate.h:25
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
CaloTowerTopology::lastHFRing
int lastHFRing() const
Definition: CaloTowerTopology.h:41
CaloTower::hadEnergy
double hadEnergy() const
Definition: CaloTower.h:131
CaloTowersCreationAlgo::theHOthresholdPlus1
double theHOthresholdPlus1
Definition: CaloTowersCreationAlgo.h:298
CaloTowersCreationAlgo::theHcalChStatus
const HcalChannelQuality * theHcalChStatus
Definition: CaloTowersCreationAlgo.h:328
CaloTowersCreationAlgo::theHEDthreshold
double theHEDthreshold
Definition: CaloTowersCreationAlgo.h:297
CaloTowersCreationAlgo::theHESthreshold1
double theHESthreshold1
Definition: CaloTowersCreationAlgo.h:296
HcalOuter
Definition: HcalAssistant.h:35
HLT_FULL_cff.HcalThreshold
HcalThreshold
Definition: HLT_FULL_cff.py:8593
DQMScaleToClient_cfi.factor
factor
Definition: DQMScaleToClient_cfi.py:8
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
CaloTowersCreationAlgo::theHcalThreshold
double theHcalThreshold
Definition: CaloTowersCreationAlgo.h:293
CaloTowersCreationAlgo::theEBthreshold
double theEBthreshold
Definition: CaloTowersCreationAlgo.h:289
CaloTowersCreationAlgo::emShwrPos
GlobalPoint emShwrPos(const std::vector< std::pair< DetId, float >> &metaContains, float fracDepth, double totEmE)
Definition: CaloTowersCreationAlgo.cc:1565
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
dqmdumpme.k
k
Definition: dqmdumpme.py:60
Point3DBase< float, GlobalTag >
HLT_FULL_cff.EcutTower
EcutTower
Definition: HLT_FULL_cff.py:8603
HLT_FULL_cff.HOWeights
HOWeights
Definition: HLT_FULL_cff.py:8573
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
CaloTowersCreationAlgo::theMomEBDepth
double theMomEBDepth
Definition: CaloTowersCreationAlgo.h:365
HcalSeverityLevelComputer::dropChannel
bool dropChannel(const uint32_t &mystatus) const
Definition: HcalSeverityLevelComputer.cc:395
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
mitigatedMETSequence_cff.U
U
Definition: mitigatedMETSequence_cff.py:36
CaloTowersCreationAlgo::GoodChan
Definition: CaloTowersCreationAlgo.h:390
CaloTowersCreationAlgo::theHESWeights
std::vector< double > theHESWeights
Definition: CaloTowersCreationAlgo.h:303
EcalEndcap
Definition: EcalSubdetector.h:10
HcalSeverityLevelComputer::getSeverityLevel
int getSeverityLevel(const DetId &myid, const uint32_t &myflag, const uint32_t &mystatus) const
Definition: HcalSeverityLevelComputer.cc:304
HcalChannelStatus::getValue
uint32_t getValue() const
Definition: HcalChannelStatus.h:60
CaloTowersCreationAlgo::theHOweight
double theHOweight
Definition: CaloTowersCreationAlgo.h:309
HLT_FULL_cff.HEDGrid
HEDGrid
Definition: HLT_FULL_cff.py:8604
CaloTowersCreationAlgo::theHEDGrid
std::vector< double > theHEDGrid
Definition: CaloTowersCreationAlgo.h:304
CaloTowersCreationAlgo::theMomHBDepth
double theMomHBDepth
Definition: CaloTowersCreationAlgo.h:363
CaloTowersCreationAlgo::theEEGrid
std::vector< double > theEEGrid
Definition: CaloTowersCreationAlgo.h:301
CaloTowersCreationAlgo::theHcalPhase
int theHcalPhase
Definition: CaloTowersCreationAlgo.h:397
a
double a
Definition: hdecay.h:119
CaloTowersCreationAlgo::theHOthreshold0
double theHOthreshold0
Definition: CaloTowersCreationAlgo.h:298
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
CaloTowerTopology::detIdFromDenseIndex
CaloTowerDetId detIdFromDenseIndex(uint32_t din) const
Definition: CaloTowerTopology.cc:247
HLT_FULL_cff.EBSumThreshold
EBSumThreshold
Definition: HLT_FULL_cff.py:8556
CaloGeometry::getGeometry
std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id.
Definition: CaloGeometry.cc:60
CaloTowersCreationAlgo::theEBWeights
std::vector< double > theEBWeights
Definition: CaloTowersCreationAlgo.h:300
edm::SortedCollection::end
const_iterator end() const
Definition: SortedCollection.h:267
HcalCondObjectContainer::getAllChannels
std::vector< DetId > getAllChannels() const
Definition: HcalCondObjectContainer.h:312
CaloTowersCreationAlgo::theHF1Weights
std::vector< double > theHF1Weights
Definition: CaloTowersCreationAlgo.h:306
CaloTowersCreationAlgo::theHcalAcceptSeverityLevel
unsigned int theHcalAcceptSeverityLevel
Definition: CaloTowersCreationAlgo.h:339
match
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
HcalTopology::idBack
HcalDetId idBack(const HcalDetId &id) const
Definition: HcalTopology.h:171
PV3DBase::eta
T eta() const
Definition: PV3DBase.h:73
HcalDetId::subdet
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
HcalDetId
Definition: HcalDetId.h:12
createfilelist.int
int
Definition: createfilelist.py:10
CaloTowerTopology::lastHERing
int lastHERing() const
Definition: CaloTowerTopology.h:39
CaloTower
Definition: CaloTower.h:26
universalConfigTemplate.collection
collection
Definition: universalConfigTemplate.py:81
CaloTowersCreationAlgo::theHEDEScale
double theHEDEScale
Definition: CaloTowersCreationAlgo.h:316
CaloTowersCreationAlgo::theHBthreshold
double theHBthreshold
Definition: CaloTowersCreationAlgo.h:295
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
HLT_FULL_cff.EBGrid
EBGrid
Definition: HLT_FULL_cff.py:8608
photonIsolationHIProducer_cfi.ho
ho
Definition: photonIsolationHIProducer_cfi.py:10
HLT_FULL_cff.HEDWeights
HEDWeights
Definition: HLT_FULL_cff.py:8582
CaloTowersCreationAlgo::useRejectedRecoveredHcalHits
unsigned int useRejectedRecoveredHcalHits
Definition: CaloTowersCreationAlgo.h:351
DetId::Detector
Detector
Definition: DetId.h:24
CaloSubdetectorGeometry::getGeometry
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
Definition: CaloSubdetectorGeometry.cc:36
HcalTopology::lastHERing
int lastHERing() const
Definition: HcalTopology.h:94
CaloTowerConstituentsMap::towerOf
CaloTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
Definition: CaloTowerConstituentsMap.cc:26
HLT_FULL_cff.EEWeights
EEWeights
Definition: HLT_FULL_cff.py:8570
edm::contains
bool contains(EventRange const &lh, EventID const &rh)
Definition: EventRange.cc:37
CaloTowersCreationAlgo::theMomHEDepth
double theMomHEDepth
Definition: CaloTowersCreationAlgo.h:364
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
DetId::Ecal
Definition: DetId.h:27
CaloTowersCreationAlgo::hadShwPosFromCells
GlobalPoint hadShwPosFromCells(DetId frontCell, DetId backCell, float fracDepth)
Definition: CaloTowersCreationAlgo.cc:1538
CaloTowersCreationAlgo::theEESumThreshold
double theEESumThreshold
Definition: CaloTowersCreationAlgo.h:310
PV3DBase::basicVector
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:53
photonIsolationHIProducer_cfi.hbhe
hbhe
Definition: photonIsolationHIProducer_cfi.py:8
HcalSubdetector
HcalSubdetector
Definition: HcalAssistant.h:31
CaloTowerDetId::iphi
int iphi() const
get the tower iphi
Definition: CaloTowerDetId.cc:30
HcalForward
Definition: HcalAssistant.h:36
CaloTowerTopology::lastHBRing
int lastHBRing() const
Definition: CaloTowerTopology.h:37
CaloTowersCreationAlgo::theHBthreshold2
double theHBthreshold2
Definition: CaloTowersCreationAlgo.h:295
CaloTowersCreationAlgo::theEbHandle
edm::Handle< EcalRecHitCollection > theEbHandle
Definition: CaloTowersCreationAlgo.h:394
CaloTowersCreationAlgo::theTowerGeometry
const CaloSubdetectorGeometry * theTowerGeometry
Definition: CaloTowersCreationAlgo.h:324
CaloTower::constituent
DetId constituent(size_t i) const
Definition: CaloTower.h:126
CaloTowerTopology::convertCTtoHcal
int convertCTtoHcal(int ct_ieta) const
Definition: CaloTowerTopology.cc:67
CaloTowersCreationAlgo::theHF2Weights
std::vector< double > theHF2Weights
Definition: CaloTowersCreationAlgo.h:307
heppy_batch.val
val
Definition: heppy_batch.py:351
CaloTowersCreationAlgo::theEEweight
double theEEweight
Definition: CaloTowersCreationAlgo.h:308
HLT_FULL_cff.HESWeights
HESWeights
Definition: HLT_FULL_cff.py:8600
eostools.move
def move(src, dest)
Definition: eostools.py:511
CaloTowersCreationAlgo::theHcalSevLvlComputer
const HcalSeverityLevelComputer * theHcalSevLvlComputer
Definition: CaloTowersCreationAlgo.h:331
interestingDetIdCollectionProducer_cfi.severityLevel
severityLevel
Definition: interestingDetIdCollectionProducer_cfi.py:10
CaloTowerDetId::ieta
int ieta() const
get the tower ieta
Definition: CaloTowerDetId.h:30
CaloTowersCreationAlgo::theHOthresholdMinus2
double theHOthresholdMinus2
Definition: CaloTowersCreationAlgo.h:299
HcalEndcap
Definition: HcalAssistant.h:34
CaloTowersCreationAlgo::theHOthresholdMinus1
double theHOthresholdMinus1
Definition: CaloTowersCreationAlgo.h:298
CaloTowersCreationAlgo::theHBweight
double theHBweight
Definition: CaloTowersCreationAlgo.h:309
CaloTowersCreationAlgo::theEBEScale
double theEBEScale
Definition: CaloTowersCreationAlgo.h:312
CaloTowersCreationAlgo::getThresholdAndWeight
void getThresholdAndWeight(const DetId &detId, double &threshold, double &weight) const
helper method to look up the appropriate threshold & weight
Definition: CaloTowersCreationAlgo.cc:1243
EcalSeverityLevel::kRecovered
Definition: EcalSeverityLevel.h:21
CaloTowersCreationAlgo::theEEEScale
double theEEEScale
Definition: CaloTowersCreationAlgo.h:313
CaloTowersCreationAlgo::theHOthresholdPlus2
double theHOthresholdPlus2
Definition: CaloTowersCreationAlgo.h:299
CaloTowersCreationAlgo::theEcalSeveritiesToBeExcluded
std::vector< int > theEcalSeveritiesToBeExcluded
Definition: CaloTowersCreationAlgo.h:340
CaloTowersCreationAlgo::hcalDropChMap
HcalDropChMap hcalDropChMap
Definition: CaloTowersCreationAlgo.h:381
CaloTowersCreationAlgo::ecalBadChs
std::vector< unsigned short > ecalBadChs
Definition: CaloTowersCreationAlgo.h:385
CaloTowersCreationAlgo::ProblematicChan
Definition: CaloTowersCreationAlgo.h:390
CaloTowerTopology::sizeForDenseIndexing
uint32_t sizeForDenseIndexing() const
Definition: CaloTowerTopology.h:56
TtSemiLepEvtBuilder_cfi.mt
mt
Definition: TtSemiLepEvtBuilder_cfi.py:47
CaloTowersCreationAlgo::theHESGrid
std::vector< double > theHESGrid
Definition: CaloTowersCreationAlgo.h:303
CaloTowersCreationAlgo::theHESEScale
double theHESEScale
Definition: CaloTowersCreationAlgo.h:315
CaloTowersCreationAlgo::theEcalSevLvlAlgo
const EcalSeverityLevelAlgo * theEcalSevLvlAlgo
Definition: CaloTowersCreationAlgo.h:334
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
CaloTowersCreationAlgo::theHF1Grid
std::vector< double > theHF1Grid
Definition: CaloTowersCreationAlgo.h:306
L1TowerCalibrationProducer_cfi.iEta
iEta
Definition: L1TowerCalibrationProducer_cfi.py:60
mps_fire.result
result
Definition: mps_fire.py:311
CaloTowersCreationAlgo::theHBWeights
std::vector< double > theHBWeights
Definition: CaloTowersCreationAlgo.h:302
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
EcalSeverityLevel::kBad
Definition: EcalSeverityLevel.h:24
CaloTowerDetId::zside
int zside() const
get the z-side of the tower (1/-1)
Definition: CaloTowerDetId.h:26
fftjetcommon_cfi.Interpolator
Interpolator
Definition: fftjetcommon_cfi.py:188
HcalDetId::ietaAbs
constexpr int ietaAbs() const
get the absolute value of the cell ieta
Definition: HcalDetId.h:148
CaloTower::hcalTime
float hcalTime() const
Definition: CaloTower.h:197
HLT_FULL_cff.useHO
useHO
Definition: HLT_FULL_cff.py:11461
CaloTowersCreationAlgo::theUseEtEETresholdFlag
bool theUseEtEETresholdFlag
Definition: CaloTowersCreationAlgo.h:290
CaloTowersCreationAlgo::theTowerTopology
const CaloTowerTopology * theTowerTopology
Definition: CaloTowersCreationAlgo.h:320
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
CaloTowersCreationAlgo::theUseSymEBTresholdFlag
bool theUseSymEBTresholdFlag
Definition: CaloTowersCreationAlgo.h:291
CaloTowersCreationAlgo::theHOWeights
std::vector< double > theHOWeights
Definition: CaloTowersCreationAlgo.h:305
CaloTowersCreationAlgo::theHF1threshold
double theHF1threshold
Definition: CaloTowersCreationAlgo.h:299
point
*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
remoteMonitoring_LED_IterMethod_cfg.threshold
threshold
Definition: remoteMonitoring_LED_IterMethod_cfg.py:430
MatrixUtil.merge
def merge(dictlist, TELL=False)
Definition: MatrixUtil.py:201
CaloTowersCreationAlgo::theUseSymEETresholdFlag
bool theUseSymEETresholdFlag
Definition: CaloTowersCreationAlgo.h:291
CaloTowersCreationAlgo::ecalChanStatusForCaloTower
std::tuple< unsigned int, bool > ecalChanStatusForCaloTower(const EcalRecHit *hit)
Definition: CaloTowersCreationAlgo.cc:1802
CaloTowersCreationAlgo::theHEDthreshold1
double theHEDthreshold1
Definition: CaloTowersCreationAlgo.h:297
CaloTowersCreationAlgo::theHBthreshold1
double theHBthreshold1
Definition: CaloTowersCreationAlgo.h:295
CaloTowersCreationAlgo::theRecoveredHcalHitsAreUsed
bool theRecoveredHcalHitsAreUsed
Definition: CaloTowersCreationAlgo.h:342
Basic3DVector::unit
Basic3DVector unit() const
Definition: extBasic3DVector.h:151
CaloTowersCreationAlgo::theHF2EScale
double theHF2EScale
Definition: CaloTowersCreationAlgo.h:319
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
Basic3DVector< float >
CaloTowersCreationAlgo::theRecoveredEcalHitsAreUsed
bool theRecoveredEcalHitsAreUsed
Definition: CaloTowersCreationAlgo.h:343
weight
Definition: weight.py:1
merge
Definition: merge.py:1
CaloTowersCreationAlgo::theEBweight
double theEBweight
Definition: CaloTowersCreationAlgo.h:308
hit
Definition: SiStripHitEffFromCalibTree.cc:88
HLT_FULL_cff.HOGrid
HOGrid
Definition: HLT_FULL_cff.py:8607
CaloTowerTopology::denseIndex
uint32_t denseIndex(const DetId &id) const
Definition: CaloTowerTopology.cc:235
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:117
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
CaloTowerDetId
Definition: CaloTowerDetId.h:12
CaloTowersCreationAlgo::BadChan
Definition: CaloTowersCreationAlgo.h:390