54 if (iConfig.
exists(
"HcalRecHitFlagsToBeExcluded"))
57 edm::LogWarning(
"MisConfiguration")<<
"the module is missing the parameter HcalAcceptSeverityLevel. created empty.";
85 std::vector<double> TS4TS5UpperThresholdTemp = iConfig.
getParameter<std::vector<double> >(
"TS4TS5UpperThreshold");
86 std::vector<double> TS4TS5UpperCutTemp = iConfig.
getParameter<std::vector<double> >(
"TS4TS5UpperCut");
87 std::vector<double> TS4TS5LowerThresholdTemp = iConfig.
getParameter<std::vector<double> >(
"TS4TS5LowerThreshold");
88 std::vector<double> TS4TS5LowerCutTemp = iConfig.
getParameter<std::vector<double> >(
"TS4TS5LowerCut");
90 for(
int i = 0;
i < (int)TS4TS5UpperThresholdTemp.size() &&
i < (int)TS4TS5UpperCutTemp.size();
i++)
91 TS4TS5UpperCut_.push_back(std::pair<double, double>(TS4TS5UpperThresholdTemp[
i], TS4TS5UpperCutTemp[i]));
94 for(
int i = 0; i < (int)TS4TS5LowerThresholdTemp.size() && i < (int)TS4TS5LowerCutTemp.size(); i++)
95 TS4TS5LowerCut_.push_back(std::pair<double, double>(TS4TS5LowerThresholdTemp[i], TS4TS5LowerCutTemp[i]));
101 edm::LogWarning(
"HCalNoiseInfoProducer") <<
" forcing fillRecHits to be true if fillDigis is true.\n";
104 const float adc2fCTemp[128]={-0.5,0.5,1.5,2.5,3.5,4.5,5.5,6.5,7.5,8.5,9.5,10.5,11.5,12.5,
105 13.5,15.,17.,19.,21.,23.,25.,27.,29.5,32.5,35.5,38.5,42.,46.,50.,54.5,59.5,
106 64.5,59.5,64.5,69.5,74.5,79.5,84.5,89.5,94.5,99.5,104.5,109.5,114.5,119.5,
107 124.5,129.5,137.,147.,157.,167.,177.,187.,197.,209.5,224.5,239.5,254.5,272.,
108 292.,312.,334.5,359.5,384.5,359.5,384.5,409.5,434.5,459.5,484.5,509.5,534.5,
109 559.5,584.5,609.5,634.5,659.5,684.5,709.5,747.,797.,847.,897.,947.,997.,
110 1047.,1109.5,1184.5,1259.5,1334.5,1422.,1522.,1622.,1734.5,1859.5,1984.5,
111 1859.5,1984.5,2109.5,2234.5,2359.5,2484.5,2609.5,2734.5,2859.5,2984.5,
112 3109.5,3234.5,3359.5,3484.5,3609.5,3797.,4047.,4297.,4547.,4797.,5047.,
113 5297.,5609.5,5984.5,6359.5,6734.5,7172.,7672.,8172.,8734.5,9359.5,9984.5};
114 for(
int i = 0; i < 128; i++)
115 adc2fC[i] = adc2fCTemp[i];
124 produces<HcalNoiseRBXCollection>();
126 produces<HcalNoiseSummary>();
163 HcalNoiseRBXArray::iterator maxit=rbxarray.begin();
164 double maxenergy=-999;
165 bool maxwritten=
false;
166 for(HcalNoiseRBXArray::iterator rit = rbxarray.begin(); rit!=rbxarray.end(); ++rit) {
172 if(data.
energy()>maxenergy) {
188 result1->push_back(rbx);
189 if(maxit==rit) maxwritten=
true;
199 result1->push_back(rbx);
310 int NcalibTS45gt15=0;
313 double chargecalibTS45=0;
314 double chargecalibgt15TS45=0;
351 const HcalQIECoder* channelCoder = conditions->getHcalCoder (cell);
352 const HcalQIEShape* shape = conditions->getHcalShape(channelCoder);
361 bool isBig=
false, isBig5=
false, isRBX=
false;
366 if((*rit)->id() == digi.
id()) {
367 if(counter==0) isBig=isBig5=
true;
368 if(counter<5) isBig5=
true;
377 for(
int ts=0; ts<tool.
size(); ++ts) {
380 if(digi[ts].
adc()==0) {
386 double corrfc = tool[ts]-calibrations.
pedestal(digi[ts].capid());
409 if(digi->id().hcalSubdet() == 0)
438 for(
int i = 0;
i < (int)digi->size();
i++)
445 if(digi->zsMarkAndPass())
continue;
450 double sumChargeHF=0;
462 double sumChargeHBHE=0;
471 chargecalibTS45+=sumChargeHBHE;
475 chargecalibgt15TS45+=sumChargeHBHE;
517 <<
" could not find HBHERecHitCollection named " <<
recHitCollName_ <<
"\n.";
539 uint32_t recHitFlag = rechit.
flags();
547 recHitFlag = (recHitFlag & bitset) ? recHitFlag-bitset : recHitFlag;
554 int severityLevel = hcalSevLvlComputer->
getSeverityLevel(
id, recHitFlag, dbStatusFlag);
555 bool isRecovered = hcalSevLvlComputer->
recoveredRecHit(
id, recHitFlag);
579 if(rechit.
flags() & isolbitset) {
583 double et = rechit.
energy()*gp.perp()/gp.mag();
587 if(rechit.
flags() & flatbitset) {
591 double et = rechit.
energy()*gp.perp()/gp.mag();
595 if(rechit.
flags() & spikebitset) {
599 double et = rechit.
energy()*gp.perp()/gp.mag();
603 if(rechit.
flags() & trianglebitset) {
607 double et = rechit.
energy()*gp.perp()/gp.mag();
611 if(rechit.
flags() & ts4ts5bitset) {
617 double et = rechit.
energy()*gp.perp()/gp.mag();
634 for(HcalNoiseRBXArray::iterator rbxit=array.begin(); rbxit!=array.end(); ++rbxit) {
635 for(std::vector<HcalNoiseHPD>::iterator hpdit=rbxit->hpds_.begin(); hpdit!=rbxit->hpds_.end(); ++hpdit) {
639 it=hpdit->refrechitset_.begin(); it!=hpdit->refrechitset_.end(); ++it) {
640 hpdit->rechits_.push_back(*it);
674 std::vector<std::vector<HcalNoiseHPD>::iterator> hpditervec;
675 array.
findHPD(twr, hpditervec);
678 for(std::vector<std::vector<HcalNoiseHPD>::iterator>::iterator it=hpditervec.begin();
679 it!=hpditervec.end(); ++it)
680 (*it)->calotowers_.push_back(myRef);
708 for(reco::TrackCollection::const_iterator iTrack = handle->begin(); iTrack!=handle->end(); ++iTrack) {
int adc(sample_type sample)
get the ADC sample (12 bits)
double HPDEMF(void) const
double p() const
momentum vector magnitude
T getParameter(std::string const &) const
edm::RefVector< CaloTowerCollection > hlnoisetwrs_
double lowEHitTimeSqrd(void) const
std::vector< int > calibdigiHFtimeslices_
std::vector< HcalNoiseRBX > HcalNoiseRBXCollection
std::vector< int > HcalRecHitFlagsToBeExcluded_
bool isProblematic(const CommonHcalNoiseRBXData &) const
algo_(conf.existsAs< bool >("Correct")?conf.getParameter< bool >("Correct"):true, conf.getParameter< double >("e9e25Cut"), conf.getParameter< double >("intercept2DCut"), conf.existsAs< bool >("intercept2DSlope")?conf.getParameter< double >("intercept2DSlope"):defaultSlope2D_, conf.getParameter< std::vector< double > >("e1e9Cut"), conf.getParameter< std::vector< double > >("eCOREe9Cut"), conf.getParameter< std::vector< double > >("eSeLCut"), hfvars_)
bool passTightRatio(const CommonHcalNoiseRBXData &) const
bool zsMarkAndPass() const
was ZS MarkAndPass?
double minLowEHitTime(void) const
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
std::string caloTowerCollName_
bool passLooseRatio(const CommonHcalNoiseRBXData &) const
CalibDetType calibFlavor() const
get the flavor of this calibration detid
void fillrechits(edm::Event &, const edm::EventSetup &, HcalNoiseRBXArray &, HcalNoiseSummary &) const
const DetId & detid() const
double maxHighEHitTime(void) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
bool passTightTiming(const CommonHcalNoiseRBXData &) const
double maxLowEHitTime(void) const
#define DEFINE_FWK_MODULE(type)
int numLowEHits(void) const
double energyInLaserRegion_
virtual void produce(edm::Event &, const edm::EventSetup &) override
std::vector< std::pair< double, double > > TS4TS5LowerCut_
HcalDetId id() const
get the id
std::set< edm::Ref< HBHERecHitCollection >, RefHBHERecHitEnergyComparison > refrechitset_
std::vector< HBHEDataFrame >::const_iterator const_iterator
std::vector< float > bigCharge_
float maxE2Over10TS(void) const
edm::RefVector< CaloTowerCollection > loosenoisetwrs_
bool exists(std::string const ¶meterName) const
checks if a parameter exists
void fillcalotwrs(edm::Event &, const edm::EventSetup &, HcalNoiseRBXArray &, HcalNoiseSummary &) const
std::vector< float > big5Charge_
double pedestal(int fCapId) const
get pedestal for capid=0..3
const Item * getValues(DetId fId, bool throwOnFail=true) const
int hitsInNonLaserRegion_
const_iterator end() const
Termination of iteration.
float min25GeVHitTime(void) const
std::string digiCollName_
bool passHighLevelNoiseFilter(const CommonHcalNoiseRBXData &) const
std::string trackCollName_
const_iterator begin() const
Initialize an iterator over the RefVector.
double RBXEMF(void) const
edm::RefVector< HBHERecHitCollection > rechits_
int numRBXHits(void) const
uint32_t rawId() const
get the raw id
float min10GeVHitTime(void) const
HcalNoiseRBXArray::iterator findRBX(int rbxindex)
double highEHitTimeSqrd(void) const
float minE2Over10TS(void) const
double eta() const
pseudorapidity of momentum vector
bool passLooseZeros(const CommonHcalNoiseRBXData &) const
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
int maxRBXHits(void) const
virtual void adc2fC(const HBHEDataFrame &df, CaloSamples &lf) const
bool passTightZeros(const CommonHcalNoiseRBXData &) const
double TS4TS5EnergyThreshold_
double pt() const
track transverse momentum
bool recoveredRecHit(const DetId &myid, const uint32_t &myflag) const
int numHighEHits(void) const
edm::EDGetTokenT< HcalCalibDigiCollection > hcalcalibdigi_token_
bool passRatioThreshold(const CommonHcalNoiseRBXData &) const
std::vector< HcalNoiseHPD >::iterator findHPD(int hpdindex)
bool dropChannel(const uint32_t &mystatus) const
const GlobalPoint & getPosition(const DetId &id) const
Get the position of a given detector id.
int numHPDNoOtherHits(void) const
edm::EDGetTokenT< HBHEDigiCollection > hbhedigi_token_
double calibdigiHFthreshold_
bool passZerosThreshold(const CommonHcalNoiseRBXData &) const
std::vector< std::pair< double, double > > TS4TS5UpperCut_
float minHPDEMF(void) const
bool passLooseNoiseFilter(const CommonHcalNoiseRBXData &) const
edm::RefVector< CaloTowerCollection > rbxTowers(void) const
std::vector< float > allCharge_
double calibdigiHBHEthreshold_
edm::EDGetTokenT< reco::TrackCollection > track_token_
bool passLooseHits(const CommonHcalNoiseRBXData &) const
static std::string join(char **cmd)
edm::EDGetTokenT< HBHERecHitCollection > hbherechit_token_
int size() const
get the size
uint32_t HcalAcceptSeverityLevel_
void filldigis(edm::Event &, const edm::EventSetup &, HcalNoiseRBXArray &, HcalNoiseSummary &)
T const * product() const
edm::RefVector< CaloTowerCollection > tightnoisetwrs_
int getSeverityLevel(const DetId &myid, const uint32_t &myflag, const uint32_t &mystatus) const
double energy(void) const
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalPoint
point in global coordinate system
bool passLooseTiming(const CommonHcalNoiseRBXData &) const
bool passTightNoiseFilter(const CommonHcalNoiseRBXData &) const
int maxHPDNoOtherHits(void) const
char data[epos_bytes_allocation]
double minHighEHitTime(void) const
static std::atomic< unsigned int > counter
double energyInNonLaserRegion_
float minRBXEMF(void) const
std::vector< int > calibdigiHBHEtimeslices_
const HcalDetId & id() const
bool PassTS4TS5(void) const
uint32_t getValue() const
bool passEMFThreshold(const CommonHcalNoiseRBXData &) const
void filltracks(edm::Event &, const edm::EventSetup &, HcalNoiseSummary &) const
HcalNoiseInfoProducer(const edm::ParameterSet &)
void fillOtherSummaryVariables(HcalNoiseSummary &summary, const CommonHcalNoiseRBXData &data) const
int maxHPDHits(void) const
int numHPDHits(void) const
std::string recHitCollName_
float max25GeVHitTime(void) const
float max10GeVHitTime(void) const
double calibChargegt15TS45_
bool validRatio(void) const
bool passTightHits(const CommonHcalNoiseRBXData &) const
edm::EDGetTokenT< CaloTowerCollection > calotower_token_