80 minAmp1_( iConfig.getUntrackedParameter<double>(
"AmpMinSeed", 0.063) ),
81 minAmp2_( iConfig.getUntrackedParameter<double>(
"AmpMin2", 0.045) ),
82 minSingleAmp_( iConfig.getUntrackedParameter<double>(
"SingleAmpMin", 0.108) ),
84 side_( iConfig.getUntrackedParameter<
int>(
"side", 3) )
113 LogWarning(
"EcalMIPRecHitFilter") <<
"InputTag: label = \"" << labels.
module <<
"\", instance = \"" << labels.
productInstance <<
"\", process = \"" << labels.
process <<
"\" is not available";
135 bool thereIsSignal =
false;
137 for (
auto hitItr = recHits->
begin(); hitItr != recHits->
end(); ++hitItr ) {
147 float ampli_ = hit.
energy();
151 auto icalit=icalMap.
find(ebDet);
153 if( icalit!=icalMap.
end() ){
154 icalconst = (*icalit);
161 ampli_ /= (icalconst * lasercalib * adcconst);
166 thereIsSignal =
true;
179 float secondMin = 0.;
180 for(std::vector<DetId>::const_iterator detitr = neighbors.begin(); detitr != neighbors.end(); ++detitr)
182 auto thishit = recHits->
find((*detitr));
183 if (thishit == recHits->
end())
188 if ((*thishit).id() != ebDet)
190 float thisamp = (*thishit).energy();
192 auto icalit2=icalMap.
find((*thishit).id());
194 if( icalit2!=icalMap.
end() ){
195 icalconst2 = (*icalit2);
201 thisamp /= (icalconst2 * lasercalib2 * adcconst);
202 if (thisamp > secondMin) secondMin = thisamp;
208 thereIsSignal =
true;
214 return thereIsSignal;
224 desc.
addUntracked<std::vector<int>>(
"maskedChannels", std::vector<int>{});
227 descriptions.
add(
"ecalMIPRecHitFilter", desc);
bool filter(edm::Event &, edm::EventSetup const &) override
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
EcalMIPRecHitFilter(const edm::ParameterSet &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const self & getMap() const
float getLaserCorrection(DetId const &xid, edm::Timestamp const &iTime) const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
const edm::EDGetTokenT< EcalRecHitCollection > EcalRecHitToken_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
int hashedIndex(int ieta, int iphi)
#define DEFINE_FWK_MODULE(type)
std::vector< DetId > getWindow(const DetId &id, const int &northSouthSize, const int &eastWestSize) const
Get the neighbors of the given cell in a window of given size.
const std::vector< int > maskedList_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
const_iterator end() const
DetId id() const
get the id
const double minSingleAmp_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void labelsForToken(EDGetToken iToken, Labels &oLabels) const
char const * productInstance
iterator find(key_type k)
const_iterator find(uint32_t rawId) const
const_iterator end() const
~EcalMIPRecHitFilter() override
T const * product() const
edm::Timestamp time() const
const_iterator begin() const
float EcalIntercalibConstant