57 if (iConfig.
exists(
"HcalRecHitFlagsToBeExcluded"))
60 edm::LogWarning(
"MisConfiguration")<<
"the module is missing the parameter HcalAcceptSeverityLevel. created empty.";
88 std::vector<double> TS4TS5UpperThresholdTemp = iConfig.
getParameter<std::vector<double> >(
"TS4TS5UpperThreshold");
89 std::vector<double> TS4TS5UpperCutTemp = iConfig.
getParameter<std::vector<double> >(
"TS4TS5UpperCut");
90 std::vector<double> TS4TS5LowerThresholdTemp = iConfig.
getParameter<std::vector<double> >(
"TS4TS5LowerThreshold");
91 std::vector<double> TS4TS5LowerCutTemp = iConfig.
getParameter<std::vector<double> >(
"TS4TS5LowerCut");
93 for(
int i = 0;
i < (int)TS4TS5UpperThresholdTemp.size() &&
i < (int)TS4TS5UpperCutTemp.size();
i++)
94 TS4TS5UpperCut_.push_back(std::pair<double, double>(TS4TS5UpperThresholdTemp[
i], TS4TS5UpperCutTemp[i]));
97 for(
int i = 0; i < (int)TS4TS5LowerThresholdTemp.size() && i < (int)TS4TS5LowerCutTemp.size(); i++)
98 TS4TS5LowerCut_.push_back(std::pair<double, double>(TS4TS5LowerThresholdTemp[i], TS4TS5LowerCutTemp[i]));
104 edm::LogWarning(
"HCalNoiseInfoProducer") <<
" forcing fillRecHits to be true if fillDigis is true.\n";
107 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,
108 13.5,15.,17.,19.,21.,23.,25.,27.,29.5,32.5,35.5,38.5,42.,46.,50.,54.5,59.5,
109 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,
110 124.5,129.5,137.,147.,157.,167.,177.,187.,197.,209.5,224.5,239.5,254.5,272.,
111 292.,312.,334.5,359.5,384.5,359.5,384.5,409.5,434.5,459.5,484.5,509.5,534.5,
112 559.5,584.5,609.5,634.5,659.5,684.5,709.5,747.,797.,847.,897.,947.,997.,
113 1047.,1109.5,1184.5,1259.5,1334.5,1422.,1522.,1622.,1734.5,1859.5,1984.5,
114 1859.5,1984.5,2109.5,2234.5,2359.5,2484.5,2609.5,2734.5,2859.5,2984.5,
115 3109.5,3234.5,3359.5,3484.5,3609.5,3797.,4047.,4297.,4547.,4797.,5047.,
116 5297.,5609.5,5984.5,6359.5,6734.5,7172.,7672.,8172.,8734.5,9359.5,9984.5};
117 for(
int i = 0; i < 128; i++)
118 adc2fC[i] = adc2fCTemp[i];
121 produces<HcalNoiseRBXCollection>();
123 produces<HcalNoiseSummary>();
160 HcalNoiseRBXArray::iterator maxit=rbxarray.begin();
161 double maxenergy=-999;
162 bool maxwritten=
false;
163 for(HcalNoiseRBXArray::iterator rit = rbxarray.begin(); rit!=rbxarray.end(); ++rit) {
169 if(data.
energy()>maxenergy) {
185 result1->push_back(rbx);
186 if(maxit==rit) maxwritten=
true;
196 result1->push_back(rbx);
307 int NcalibTS45gt15=0;
310 double chargecalibTS45=0;
311 double chargecalibgt15TS45=0;
346 const HcalQIECoder* channelCoder = conditions->getHcalCoder (cell);
347 const HcalQIEShape* shape = conditions->getHcalShape(channelCoder);
356 bool isBig=
false, isBig5=
false, isRBX=
false;
360 rit!=rechits.
end(); ++rit, ++counter) {
361 if((*rit)->id() == digi.
id()) {
362 if(counter==0) isBig=isBig5=
true;
363 if(counter<5) isBig5=
true;
372 for(
int ts=0; ts<tool.
size(); ++ts) {
375 if(digi[ts].
adc()==0) {
381 double corrfc = tool[ts]-calibrations.
pedestal(digi[ts].capid());
403 if(digi->id().hcalSubdet() == 0)
432 for(
int i = 0;
i < (int)digi->size();
i++)
439 if(digi->zsMarkAndPass())
continue;
444 double sumChargeHF=0;
456 double sumChargeHBHE=0;
465 chargecalibTS45+=sumChargeHBHE;
469 chargecalibgt15TS45+=sumChargeHBHE;
509 <<
" could not find HBHERecHitCollection named " <<
recHitCollName_ <<
"\n.";
531 uint32_t recHitFlag = rechit.
flags();
539 recHitFlag = (recHitFlag & bitset) ? recHitFlag-bitset : recHitFlag;
546 int severityLevel = hcalSevLvlComputer->
getSeverityLevel(
id, recHitFlag, dbStatusFlag);
547 bool isRecovered = hcalSevLvlComputer->
recoveredRecHit(
id, recHitFlag);
571 if(rechit.
flags() & isolbitset) {
575 double et = rechit.
energy()*gp.perp()/gp.mag();
579 if(rechit.
flags() & flatbitset) {
583 double et = rechit.
energy()*gp.perp()/gp.mag();
587 if(rechit.
flags() & spikebitset) {
591 double et = rechit.
energy()*gp.perp()/gp.mag();
595 if(rechit.
flags() & trianglebitset) {
599 double et = rechit.
energy()*gp.perp()/gp.mag();
603 if(rechit.
flags() & ts4ts5bitset) {
609 double et = rechit.
energy()*gp.perp()/gp.mag();
626 for(HcalNoiseRBXArray::iterator rbxit=array.begin(); rbxit!=array.end(); ++rbxit) {
627 for(std::vector<HcalNoiseHPD>::iterator hpdit=rbxit->hpds_.begin(); hpdit!=rbxit->hpds_.end(); ++hpdit) {
631 it=hpdit->refrechitset_.begin(); it!=hpdit->refrechitset_.end(); ++it) {
632 hpdit->rechits_.push_back(*it);
664 std::vector<std::vector<HcalNoiseHPD>::iterator> hpditervec;
665 array.
findHPD(twr, hpditervec);
668 for(std::vector<std::vector<HcalNoiseHPD>::iterator>::iterator it=hpditervec.begin();
669 it!=hpditervec.end(); ++it)
670 (*it)->calotowers_.push_back(myRef);
697 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
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 passTightTiming(const CommonHcalNoiseRBXData &) const
double maxLowEHitTime(void) const
int numLowEHits(void) const
double energyInLaserRegion_
virtual void produce(edm::Event &, const edm::EventSetup &) override
std::vector< std::pair< double, double > > TS4TS5LowerCut_
std::set< edm::Ref< HBHERecHitCollection >, RefHBHERecHitEnergyComparison > refrechitset_
std::vector< T >::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
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
double calibdigiHFthreshold_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
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_
DEFINE_FWK_MODULE(CosmicTrackingParticleSelector)
bool passLooseHits(const CommonHcalNoiseRBXData &) const
static std::string join(char **cmd)
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
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