32 using namespace muonisolation;
38 theDepositNames(std::vector<std::
string>(1,std::
string())),
41 LogDebug(
"RecoMuon|MuonIsolation")<<
" MuIsoDepositProducer CTOR";
53 if (theMultipleDepositsFlag){
55 .getParameter<std::vector<std::string> >(
"DepositInstanceLabels");
76 LogDebug(
"RecoMuon/MuIsoDepositProducer")<<
" MuIsoDepositProducer DTOR";
84 LogDebug(metname)<<
" Muon Deposit producing..."
85 <<
" BEGINING OF EVENT " <<
"================================";
98 unsigned int nMuons = 0;
100 bool readFromRecoTrack =
theInputType ==
"TrackCollection";
101 bool readFromRecoMuon =
theInputType ==
"MuonCollection";
102 bool readFromCandidateView =
theInputType ==
"CandidateView";
104 if (readFromRecoMuon){
106 nMuons = muons->size();
107 LogDebug(metname) <<
"Got Muons of size "<<nMuons;
110 if (readFromRecoTrack){
112 nMuons = tracks->size();
113 LogDebug(metname) <<
"Got MuonTracks of size "<<nMuons;
117 unsigned int nCands = cands->size();
120 if (nMuons != nCands)
edm::LogError(metname)<<
"Inconsistent configuration or failure to read Candidate-muon view";
123 LogDebug(metname)<<
"Got candidate view with size "<<nMuons;
126 static const unsigned int MAX_DEPS=10;
127 std::auto_ptr<reco::IsoDepositMap> depMaps[MAX_DEPS];
129 if (nDeps >10 )
LogError(metname)<<
"Unable to handle more than 10 input deposits";
130 for (
unsigned int i =0;
i<nDeps; ++
i){
139 std::vector<std::vector<IsoDeposit> > deps2D(nDeps, std::vector<IsoDeposit>(nMuons));
141 for (
unsigned int i=0;
i< nMuons; ++
i) {
143 if (readFromRecoMuon){
151 if (!(*muons)[
i].combinedMuon().isNull()){
153 }
else if (!(*muons)[
i].track().isNull()){
159 if (!(*muons)[
i].track().isNull()){
168 }
else if (readFromRecoTrack){
177 std::vector<IsoDeposit> deps(nDeps);
180 for (
unsigned int iDep =0; iDep<nDeps; ++iDep) {
181 deps2D[iDep][
i] = deps[iDep];
187 for (
unsigned int iDep=0; iDep < nDeps; ++iDep){
189 for (
unsigned int iMu = 0; iMu< nMuons; ++iMu){
191 <<
" for a muon at index "<<iMu;
192 LogTrace(metname)<<deps2D[iDep][iMu].print();
199 if (readFromRecoMuon){
201 }
else if (readFromRecoTrack){
203 }
else if (readFromCandidateView){
206 edm::LogError(metname)<<
"Inconsistent configuration: unknown type requested";
215 for (
unsigned int iMap = 0; iMap < nDeps; ++iMap){
217 <<
" of size "<<depMaps[iMap]->size()
218 <<
" into edm::Event";
222 LogTrace(metname) <<
" END OF EVENT " <<
"================================";
T getParameter(std::string const &) const
bool theExtractForCandidate
std::vector< std::string > theDepositNames
MuIsoDepositProducer(const edm::ParameterSet &)
constructor
const std::string metname
#define DEFINE_FWK_MODULE(type)
bool theMultipleDepositsFlag
void insert(const H &h, I begin, I end)
virtual ~MuIsoDepositProducer()
destructor
edm::InputTag theMuonCollectionTag
edm::RefToBase< reco::Track > TrackBaseRef
persistent reference to a Track, using views
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
std::string theMuonTrackRefType
edm::ValueMap< reco::IsoDeposit > IsoDepositMap
keep it only as a part of ValueMap
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
virtual void produce(edm::Event &, const edm::EventSetup &)
data making method
reco::isodeposit::IsoDepositExtractor * theExtractor
edm::ParameterSet theConfig
module configuration
T get(const Candidate &c)