52 if(iConfig.
existsAs<
double>(
"minR45HitE"))
56 if (iConfig.
exists(
"HcalRecHitFlagsToBeExcluded"))
59 edm::LogWarning(
"MisConfiguration")<<
"the module is missing the parameter HcalAcceptSeverityLevel. created empty.";
87 std::vector<double> TS4TS5UpperThresholdTemp = iConfig.
getParameter<std::vector<double> >(
"TS4TS5UpperThreshold");
88 std::vector<double> TS4TS5UpperCutTemp = iConfig.
getParameter<std::vector<double> >(
"TS4TS5UpperCut");
89 std::vector<double> TS4TS5LowerThresholdTemp = iConfig.
getParameter<std::vector<double> >(
"TS4TS5LowerThreshold");
90 std::vector<double> TS4TS5LowerCutTemp = iConfig.
getParameter<std::vector<double> >(
"TS4TS5LowerCut");
92 for(
int i = 0;
i < (int)TS4TS5UpperThresholdTemp.size() &&
i < (int)TS4TS5UpperCutTemp.size();
i++)
93 TS4TS5UpperCut_.push_back(std::pair<double, double>(TS4TS5UpperThresholdTemp[
i], TS4TS5UpperCutTemp[i]));
96 for(
int i = 0; i < (int)TS4TS5LowerThresholdTemp.size() && i < (int)TS4TS5LowerCutTemp.size(); i++)
97 TS4TS5LowerCut_.push_back(std::pair<double, double>(TS4TS5LowerThresholdTemp[i], TS4TS5LowerCutTemp[i]));
103 edm::LogWarning(
"HCalNoiseInfoProducer") <<
" forcing fillRecHits to be true if fillDigis is true.\n";
106 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,
107 13.5,15.,17.,19.,21.,23.,25.,27.,29.5,32.5,35.5,38.5,42.,46.,50.,54.5,59.5,
108 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,
109 124.5,129.5,137.,147.,157.,167.,177.,187.,197.,209.5,224.5,239.5,254.5,272.,
110 292.,312.,334.5,359.5,384.5,359.5,384.5,409.5,434.5,459.5,484.5,509.5,534.5,
111 559.5,584.5,609.5,634.5,659.5,684.5,709.5,747.,797.,847.,897.,947.,997.,
112 1047.,1109.5,1184.5,1259.5,1334.5,1422.,1522.,1622.,1734.5,1859.5,1984.5,
113 1859.5,1984.5,2109.5,2234.5,2359.5,2484.5,2609.5,2734.5,2859.5,2984.5,
114 3109.5,3234.5,3359.5,3484.5,3609.5,3797.,4047.,4297.,4547.,4797.,5047.,
115 5297.,5609.5,5984.5,6359.5,6734.5,7172.,7672.,8172.,8734.5,9359.5,9984.5};
116 for(
int i = 0; i < 128; i++)
117 adc2fC[i] = adc2fCTemp[i];
126 produces<HcalNoiseRBXCollection>();
128 produces<HcalNoiseSummary>();
165 HcalNoiseRBXArray::iterator maxit=rbxarray.begin();
166 double maxenergy=-999;
167 bool maxwritten=
false;
168 for(HcalNoiseRBXArray::iterator rit = rbxarray.begin(); rit!=rbxarray.end(); ++rit) {
174 if(data.
energy()>maxenergy) {
190 result1->push_back(rbx);
191 if(maxit==rit) maxwritten=
true;
201 result1->push_back(rbx);
317 int NcalibTS45gt15=0;
320 double chargecalibTS45=0;
321 double chargecalibgt15TS45=0;
358 const HcalQIECoder* channelCoder = conditions->getHcalCoder (cell);
359 const HcalQIEShape* shape = conditions->getHcalShape(channelCoder);
368 bool isBig=
false, isBig5=
false, isRBX=
false;
373 if((*rit)->id() == digi.
id()) {
374 if(counter==0) isBig=isBig5=
true;
375 if(counter<5) isBig5=
true;
384 for(
int ts=0; ts<tool.
size(); ++ts) {
387 if(digi[ts].
adc()==0) {
393 double corrfc = tool[ts]-calibrations.
pedestal(digi[ts].capid());
416 if(digi->id().hcalSubdet() == 0)
445 for(
int i = 0;
i < (int)digi->size();
i++)
452 if(digi->zsMarkAndPass())
continue;
457 double sumChargeHF=0;
469 double sumChargeHBHE=0;
478 chargecalibTS45+=sumChargeHBHE;
482 chargecalibgt15TS45+=sumChargeHBHE;
524 <<
" could not find HBHERecHitCollection named " <<
recHitCollName_ <<
"\n.";
546 uint32_t recHitFlag = rechit.
flags();
555 recHitFlag = (recHitFlag & bitset) ? recHitFlag-bitset : recHitFlag;
562 int severityLevel = hcalSevLvlComputer->
getSeverityLevel(
id, recHitFlag, dbStatusFlag);
563 bool isRecovered = hcalSevLvlComputer->
recoveredRecHit(
id, recHitFlag);
587 if(rechit.
flags() & isolbitset) {
591 double et = rechit.
energy()*gp.perp()/gp.mag();
595 if(rechit.
flags() & flatbitset) {
599 double et = rechit.
energy()*gp.perp()/gp.mag();
603 if(rechit.
flags() & spikebitset) {
607 double et = rechit.
energy()*gp.perp()/gp.mag();
611 if(rechit.
flags() & trianglebitset) {
615 double et = rechit.
energy()*gp.perp()/gp.mag();
619 if(rechit.
flags() & ts4ts5bitset) {
625 double et = rechit.
energy()*gp.perp()/gp.mag();
630 if(rechit.
flags() & negativebitset) {
634 double et = rechit.
energy()*gp.perp()/gp.mag();
650 for(HcalNoiseRBXArray::iterator rbxit=array.begin(); rbxit!=array.end(); ++rbxit) {
651 for(std::vector<HcalNoiseHPD>::iterator hpdit=rbxit->hpds_.begin(); hpdit!=rbxit->hpds_.end(); ++hpdit) {
655 it=hpdit->refrechitset_.begin(); it!=hpdit->refrechitset_.end(); ++it) {
656 hpdit->rechits_.push_back(*it);
690 std::vector<std::vector<HcalNoiseHPD>::iterator> hpditervec;
691 array.
findHPD(twr, hpditervec);
694 for(std::vector<std::vector<HcalNoiseHPD>::iterator>::iterator it=hpditervec.begin();
695 it!=hpditervec.end(); ++it)
696 (*it)->calotowers_.push_back(myRef);
724 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
bool passTightRBXRechitR45(const CommonHcalNoiseRBXData &) 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_
bool passLooseRBXRechitR45(const CommonHcalNoiseRBXData &) const
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
bool hasBadRBXRechitR45Loose_
edm::EDGetTokenT< HcalCalibDigiCollection > hcalcalibdigi_token_
bool passRatioThreshold(const CommonHcalNoiseRBXData &) const
std::vector< HcalNoiseHPD >::iterator findHPD(int hpdindex)
bool hasBadRBXRechitR45Tight_
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_