1 #ifndef CaloAnalysis_CaloTruthAccumulator_h
2 #define CaloAnalysis_CaloTruthAccumulator_h
10 #include <unordered_map>
31 class ConsumesCollector;
58 template<
class T>
void fillSimHits( std::vector<std::pair<DetId,const PCaloHit*> > & returnValue,
const T& event,
const edm::EventSetup& setup );
61 std::unique_ptr<SimHitInfoPerSimTrack_t>
attachedSimHitInfo(
Barcode_t st,
const std::vector<std::pair<DetId,const PCaloHit*> > & hits,
62 bool includeOwn =
true,
bool includeOther =
false,
bool markUsed =
false);
63 std::unique_ptr<SimHitInfoPerSimTrack_t>
descendantOnlySimHitInfo(
Barcode_t st,
const std::vector<std::pair<DetId,const PCaloHit*> > & hits,
bool markUsed =
false);
64 std::unique_ptr<SimHitInfoPerSimTrack_t>
allAttachedSimHitInfo(
Barcode_t st,
const std::vector<std::pair<DetId,const PCaloHit*> > & hits,
bool markUsed =
false);
175 #endif // end of "#ifndef CaloAnalysis_CaloTruthAccumulator_h"
std::pair< Index_t, Index_t > IndexPair_t
void setConsideredBarcode(Barcode_t barcode)
std::pair< Barcode_t, Barcode_t > BarcodePair_t
calo_particles m_caloParticles
std::unordered_multimap< Index_t, Index_t > m_detIdToCluster
edm::Handle< std::vector< SimVertex > > hSimVertices
std::unordered_multimap< Barcode_t, Index_t > m_simTrackToSimVertex
virtual void initializeEvent(const edm::Event &event, const edm::EventSetup &setup) override
std::vector< Barcode_t > descendantTrackBarcodes(Barcode_t barcode)
std::unordered_multimap< Barcode_t, Index_t > m_simHitBarcodeToIndex
const unsigned int maximumSubsequentBunchCrossing_
void swap(calo_particles &oth)
virtual void beginLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) override
std::unordered_map< Barcode_t, Index_t > m_genParticleBarcodeToIndex
std::unordered_map< Barcode_t, Index_t > m_genBarcodeToSimTrackIndex
std::vector< edm::InputTag > collectionTags_
edm::InputTag genParticleLabel_
bool signalOnly_
Uses the same config as selector_, but can be used to drop out early since selector_ requires the Tra...
std::unique_ptr< SimHitInfoPerSimTrack_t > attachedSimHitInfo(Barcode_t st, const std::vector< std::pair< DetId, const PCaloHit * > > &hits, bool includeOwn=true, bool includeOther=false, bool markUsed=false)
OutputCollections output_
std::pair< Barcode_t, Index_t > BarcodeIndexPair_t
edm::InputTag hepMCproductLabel_
Needed to add HepMC::GenVertex to SimVertex.
const std::string messageCategory_
The message category used to send messages to MessageLogger.
virtual void accumulate(const edm::Event &event, const edm::EventSetup &setup) override
const double maxPseudoRapidity_
std::unique_ptr< SimHitInfoPerSimTrack_t > allAttachedSimHitInfo(Barcode_t st, const std::vector< std::pair< DetId, const PCaloHit * > > &hits, bool markUsed=false)
void fillSimHits(std::vector< std::pair< DetId, const PCaloHit * > > &returnValue, const T &event, const edm::EventSetup &setup)
Fills the supplied vector with pointers to the SimHits, checking for bad modules if required...
const edm::InputTag simVertexLabel_
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
bool consideredBarcode(Barcode_t barcode)
std::unordered_map< Barcode_t, Barcode_t > m_simTrackBarcodeToSimVertexParentBarcode
const HGCalDDDConstants * hgddd_[2]
std::vector< Barcode_t > m_simVertexBarcodes
const edm::InputTag simTrackLabel_
If bremsstrahlung merging, whether to also add the unmerged collection to the event or not...
CaloTruthAccumulator(const edm::ParameterSet &config, edm::stream::EDProducerBase &mixMod, edm::ConsumesCollector &iC)
std::unordered_map< Barcode_t, Index_t > m_simTrackBarcodeToIndex
edm::Handle< std::vector< SimTrack > > hSimTracks
std::unordered_map< Barcode_t, Index_t > m_simVertexBarcodeToIndex
void accumulateEvent(const T &event, const edm::EventSetup &setup, const edm::Handle< edm::HepMCProduct > &hepMCproduct)
Both forms of accumulate() delegate to this templated method.
std::unique_ptr< CaloParticleCollection > pCaloParticles
std::vector< uint32_t > sc_stop_
bool barcodeLogicWarningAlready_
std::unique_ptr< SimHitInfoPerSimTrack_t > descendantOnlySimHitInfo(Barcode_t st, const std::vector< std::pair< DetId, const PCaloHit * > > &hits, bool markUsed=false)
const HcalDDDRecConstants * hcddd_
virtual void finalizeEvent(edm::Event &event, const edm::EventSetup &setup) override
std::vector< SimHitInfoPerRecoDetId_t > SimHitInfoPerSimTrack_t
std::set< Barcode_t > m_simTracksConsideredForSimClusters
std::vector< uint32_t > sc_start_
std::pair< DetId, float > SimHitInfoPerRecoDetId_t
SimClusterCollection descendantSimClusters(Barcode_t barcode, const std::vector< std::pair< DetId, const PCaloHit * > > &hits)
std::unique_ptr< SimClusterCollection > pSimClusters
When counting hits, allows hits in different detectors to have a different process type...
const HGCalTopology * hgtopo_[2]
std::unordered_multimap< Barcode_t, Index_t > m_simVertexToSimTrackParent
std::vector< SimCluster > SimClusterCollection
std::unordered_map< Index_t, float > m_detIdToTotalSimEnergy
std::unordered_multimap< Barcode_t, Barcode_t > m_simVertexBarcodeToSimTrackBarcode
const unsigned int maximumPreviousBunchCrossing_
maximum distance for HepMC::GenVertex to be added to SimVertex
std::pair< IndexPair_t, float > SimHitInfo_t
bool chargedOnly_
Uses the same config as selector_, but can be used to drop out early since selector_ requires the Tra...