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");
67 LogDebug(
"RecoMuon/MuIsoDepositProducer")<<
" MuIsoDepositProducer DTOR";
75 LogDebug(metname)<<
" Muon Deposit producing..."
76 <<
" BEGINING OF EVENT " <<
"================================";
82 LogDebug(metname)<<
" Load extractor..."<<extractorName;
97 unsigned int nMuons = 0;
99 bool readFromRecoTrack =
theInputType ==
"TrackCollection";
100 bool readFromRecoMuon =
theInputType ==
"MuonCollection";
101 bool readFromCandidateView =
theInputType ==
"CandidateView";
103 if (readFromRecoMuon){
105 nMuons = muons->size();
106 LogDebug(metname) <<
"Got Muons of size "<<nMuons;
109 if (readFromRecoTrack){
111 nMuons = tracks->size();
112 LogDebug(metname) <<
"Got MuonTracks of size "<<nMuons;
116 unsigned int nCands = cands->size();
119 if (nMuons != nCands)
edm::LogError(metname)<<
"Inconsistent configuration or failure to read Candidate-muon view";
122 LogDebug(metname)<<
"Got candidate view with size "<<nMuons;
125 static const unsigned int MAX_DEPS=10;
126 std::auto_ptr<reco::IsoDepositMap> depMaps[MAX_DEPS];
128 if (nDeps >10 )
LogError(metname)<<
"Unable to handle more than 10 input deposits";
129 for (
unsigned int i =0;
i<nDeps; ++
i){
138 std::vector<std::vector<IsoDeposit> > deps2D(nDeps, std::vector<IsoDeposit>(nMuons));
140 for (
unsigned int i=0;
i< nMuons; ++
i) {
142 if (readFromRecoMuon){
150 if (!(*muons)[
i].combinedMuon().isNull()){
152 }
else if (!(*muons)[
i].track().isNull()){
158 if (!(*muons)[
i].track().isNull()){
167 }
else if (readFromRecoTrack){
176 std::vector<IsoDeposit> deps(nDeps);
179 for (
unsigned int iDep =0; iDep<nDeps; ++iDep) {
180 deps2D[iDep][
i] = deps[iDep];
186 for (
unsigned int iDep=0; iDep < nDeps; ++iDep){
188 for (
unsigned int iMu = 0; iMu< nMuons; ++iMu){
190 <<
" for a muon at index "<<iMu;
191 LogTrace(metname)<<deps2D[iDep][iMu].print();
198 if (readFromRecoMuon){
200 }
else if (readFromRecoTrack){
202 }
else if (readFromCandidateView){
205 edm::LogError(metname)<<
"Inconsistent configuration: unknown type requested";
214 for (
unsigned int iMap = 0; iMap < nDeps; ++iMap){
216 <<
" of size "<<depMaps[iMap]->size()
217 <<
" into edm::Event";
221 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)