31 using namespace muonisolation;
37 theDepositNames(std::vector<std::
string>(1,std::
string())),
40 LogDebug(
"RecoMuon|MuonIsolation")<<
" MuIsoDepositProducer CTOR";
52 if (theMultipleDepositsFlag){
54 .getParameter<std::vector<std::string> >(
"DepositInstanceLabels");
66 LogDebug(
"RecoMuon/MuIsoDepositProducer")<<
" MuIsoDepositProducer DTOR";
74 LogDebug(metname)<<
" Muon Deposit producing..."
75 <<
" BEGINING OF EVENT " <<
"================================";
81 LogDebug(metname)<<
" Load extractor..."<<extractorName;
96 unsigned int nMuons = 0;
98 bool readFromRecoTrack =
theInputType ==
"TrackCollection";
99 bool readFromRecoMuon =
theInputType ==
"MuonCollection";
100 bool readFromCandidateView =
theInputType ==
"CandidateView";
102 if (readFromRecoMuon){
104 nMuons = muons->size();
105 LogDebug(metname) <<
"Got Muons of size "<<nMuons;
108 if (readFromRecoTrack){
110 nMuons = tracks->size();
111 LogDebug(metname) <<
"Got MuonTracks of size "<<nMuons;
115 unsigned int nCands = cands->size();
118 if (nMuons != nCands)
edm::LogError(metname)<<
"Inconsistent configuration or failure to read Candidate-muon view";
121 LogDebug(metname)<<
"Got candidate view with size "<<nMuons;
124 static const unsigned int MAX_DEPS=10;
125 std::auto_ptr<reco::IsoDepositMap> depMaps[MAX_DEPS];
127 if (nDeps >10 )
LogError(metname)<<
"Unable to handle more than 10 input deposits";
128 for (
unsigned int i =0;
i<nDeps; ++
i){
137 std::vector<std::vector<IsoDeposit> > deps2D(nDeps, std::vector<IsoDeposit>(nMuons));
139 for (
unsigned int i=0;
i< nMuons; ++
i) {
141 if (readFromRecoMuon){
149 if (!(*muons)[
i].combinedMuon().isNull()){
151 }
else if (!(*muons)[
i].track().isNull()){
157 if (!(*muons)[
i].track().isNull()){
166 }
else if (readFromRecoTrack){
175 std::vector<IsoDeposit> deps(nDeps);
178 for (
unsigned int iDep =0; iDep<nDeps; ++iDep) {
179 deps2D[iDep][
i] = deps[iDep];
185 for (
unsigned int iDep=0; iDep < nDeps; ++iDep){
187 for (
unsigned int iMu = 0; iMu< nMuons; ++iMu){
189 <<
" for a muon at index "<<iMu;
190 LogTrace(metname)<<deps2D[iDep][iMu].print();
197 if (readFromRecoMuon){
199 }
else if (readFromRecoTrack){
201 }
else if (readFromCandidateView){
204 edm::LogError(metname)<<
"Inconsistent configuration: unknown type requested";
213 for (
unsigned int iMap = 0; iMap < nDeps; ++iMap){
215 <<
" of size "<<depMaps[iMap]->size()
216 <<
" into edm::Event";
220 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
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)