57 virtual void endJob()
override ;
89 trackAssociatorPS_ (iConfig.getParameter<edm::
ParameterSet>(
"TrackAssociatorParameters")),
90 minTrackPt_ (iConfig.getParameter<double>(
"MinTrackPt"))
98 produces<DetIdCollection>();
121 std::auto_ptr< DetIdCollection > interestingDetIdCollection(
new DetIdCollection() ) ;
128 for(reco::TrackCollection::const_iterator tkItr =
tracks->begin(); tkItr !=
tracks->end(); ++tkItr)
139 if(centerId.
rawId()==0)
144 const std::vector<DetId>& ids = topology->
getWindow(centerId, 5, 5);
145 for(std::vector<DetId>::const_iterator idItr = ids.begin(); idItr != ids.end(); ++idItr)
147 if(
std::find(interestingDetIdCollection->begin(), interestingDetIdCollection->end(), *idItr)
148 == interestingDetIdCollection->end())
149 interestingDetIdCollection->push_back(*idItr);
154 iEvent.
put(interestingDetIdCollection);
T getParameter(std::string const &) const
virtual void endJob() override
~InterestingTrackEcalDetIdProducer()
edm::ParameterSet trackAssociatorPS_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
InterestingTrackEcalDetIdProducer(const edm::ParameterSet &)
#define DEFINE_FWK_MODULE(type)
static FreeTrajectoryState getFreeTrajectoryState(const edm::EventSetup &, const reco::Track &)
get FreeTrajectoryState from different track representations
TrackDetectorAssociator trackAssociator_
void useDefaultPropagator()
use the default propagator
DetId findMaxDeposition(EnergyType)
Find detector elements with highest energy deposition.
edm::EDGetTokenT< reco::TrackCollection > trackCollectionToken_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
uint32_t rawId() const
get the raw id
TrackAssociatorParameters trackAssociatorParameters_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
void beginRun(edm::Run const &, const edm::EventSetup &) override
virtual void produce(edm::Event &, const edm::EventSetup &) override
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
const CaloTopology * caloTopology_
virtual std::vector< DetId > getWindow(const DetId &id, const int &northSouthSize, const int &eastWestSize) const
const CaloSubdetectorTopology * getSubdetectorTopology(const DetId &id) const
access the subdetector Topology for the given subdetector directly
TrackDetMatchInfo associate(const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const AssociatorParameters &)
virtual void beginJob() override
edm::EDCollection< DetId > DetIdCollection
edm::InputTag trackCollection_
void loadParameters(const edm::ParameterSet &)