HLTConfigVersion
" in order to find the HLT key.import FWCore.ParameterSet.Config as cms process = cms.Process( "HLTPROV" ) # Conditions process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") from Configuration.PyReleaseValidation.autoCond import autoCond process.GlobalTag.globaltag = cms.string( autoCond[ 'startup' ] ) # Source from PhysicsTools.PatAlgos.tools.cmsswVersionTools import pickRelValInputFiles process.source = cms.Source("PoolSource", fileNames = cms.untracked.vstring( pickRelValInputFiles() # <-- picks automatically RelVal input files for the current release ) ) process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32( 1 ) ) # Trigger analyzers process.load( "HLTrigger.HLTcore.hltEventAnalyzerAOD_cfi" ) process.hltEventAnalyzerAOD.triggerName = cms.string( '@' ) # <-- wild-card for all HLT paths # Schedule process.p = cms.Path( process.hltEventAnalyzerAOD )
HLT
) as follows:
*_l1extraParticles_*_*
of varyious types: L1GtTriggerMenu
from CondDB: *_gtDigis_*_*
of type L1GlobalTriggerReadoutRecord
: *_l1L1GtObjectMap_*_*
of type L1GlobalTriggerObjectMaps
edmConditionsIn{Event,Lumi,Run}Block_conditionsInEdm_*_*
: *_TriggerResults_*_HLT
of type edm::TriggerResults
: ???
from CondDB: *_hltTriggerSummaryAOD_*_HLT
of type trigger::TriggerEvent
: TriggerEvent
provides this possibility by holding links to all other PAT trigger products and by making available not only direct access methods, but also methods to relate different informations to each other (x-links).
Due to this design, the other PAT trigger data formats do not need much more methods than the usual setters & getters to access their data members.
pat
namespace within CMSSW.
However, the namespace is omitted in the code snippets, just like a using namespace pat;
directive has been used.
TriggerObject
class inherits from reco::LeafCandidate
.
typedef std::vector< TriggerObject > TriggerObjectCollection
:TriggerObject
to be stored in the event;
typedef edm::Ref< TriggerObjectCollection > TriggerObjectRef
:TriggerObjectCollection
;
typedef edm::RefProd< TriggerObjectCollection > TriggerObjectRefProd
:TriggerObjectCollection
product,TriggerEvent
;
typedef edm::RefVector< TriggerObjectCollection > TriggerObjectRefVector
:TriggerObjectCollection
;
typedef std::map< std::string, TriggerObjectRef > TriggerObjectMatchMap
:TriggerObject
,typedef edm::Association< TriggerObjectCollection > TriggerObjectMatch
:reco::Candidate
(PAT objects) to items in a TriggerObjectCollection
,typedef edm::RefProd< TriggerObjectMatch > TriggerObjectMatchRefProd
:TriggerObjectMatch
product;
typedef std::map< std::string, TriggerObjectMatchRefProd > TriggerObjectMatchContainer
:TriggerObjectMatch
products,<TriggerEvent
.
std::string collection_
:std::vector< trigger::TriggerObjectType > triggerObjectTypes_
: DataFormats/HLTReco/interface/TriggerTypeDefs.h
.
reco::CandidateBaseRef refToOrig_
:reco::Candidate
, meant for l1extra
particles to access their additional functionalities.
pdgId_
is used correspondingly to the data member id_
of trigger::TriggerObject
("physics type").
TriggerObject()
:TriggerObject( const trigger::TriggerObject& aTrigObj )
:TriggerObject( const reco::LeafCandidate & leafCand )
:TriggerObject( const reco::CandidateBaseRef & candRef )
:reco::Candidate
, meant for l1extra
particles.
TriggerObject( const reco::Particle::LorentzVector& vec, int id = 0 )
andTriggerObject( const reco::Particle::PolarLorentzVector& vec, int id = 0 )
:bool hasCollection( const edm::InputTag & coll )
,bool hasCollection( const std::string & coll )
andbool coll( const std::string & coll )
( * ):bool hasTriggerObjectType( trigger::TriggerObjectType triggerObjectType )
,bool hasTriggerObjectType( int triggerObjectType )
,bool type( trigger::TriggerObjectType triggerObjectType )
( * ) andbool type( int triggerObjectType )
( * ):const reco::CandidateBaseRef & origObjRef()
:reco::Candidate
base reference to the original l1extra
particle.
const reco::Candidate * origObjCand()
:reco::Candidate
base of the original l1extra
particle.
const l1extra::L1EmParticleRef origL1EmRef()
:l1extra::L1EmParticle
;l1extra::L1EmParticle
.
const L1GctEmCand * origL1GctEmCand()
:l1extra::L1EmParticle
or the original L1 object cannot be found.
const l1extra::L1EtMissParticleRef origL1EtMissRef()
:l1extra::L1EtMissParticle
;l1extra::L1EtMissParticle
.
const L1GctEtMiss * origL1GctEtMiss()
:l1extra::L1EtMissParticle
or is not of ET type or the original L1 object cannot be found.
const L1GctEtTotal * origL1GctEtTotal()
:l1extra::L1EtMissParticle
or is not of ET type or the original L1 object cannot be found.
const L1GctHtMiss * origL1GctHtMiss()
:l1extra::L1EtMissParticle
or is not of HT type or the original L1 object cannot be found.
const L1GctEtHad * origL1GctEtHad()
:l1extra::L1EtMissParticle
or is not of HT type or the original L1 object cannot be found.
const l1extra::L1JetParticleRef origL1JetRef()
:l1extra::L1JetParticle
;l1extra::L1JetParticle
.
const L1GctJetCand * origL1GctJetCand()
:l1extra::L1JetParticle
or the original L1 object cannot be found.
const l1extra::L1MuonParticleRef origL1MuonRef()
:l1extra::L1MuonParticle
;l1extra::L1MuonParticle
.
const L1MuGMTExtendedCand * origL1GmtMuonCand()
:l1extra::L1MuonParticle
or the original L1 object cannot be found.
TriggerObjectStandAlone
inherits from TriggerObject
.
It is meant to provide some of the information, which normally is organized top-down (s. here).
So this stand-alone trigger object can be used in the absence of trigger event, paths and filters.
However, the available information is significantly reduced compared to the "full" mode.
typedef std::vector< TriggerObjectStandAlone > TriggerObjectStandAloneCollection
:TriggerObjectStandAlone
to be stored in the event;
typedef edm::Ref< TriggerObjectStandAloneCollection > TriggerObjectStandAloneRef
:TriggerObjectStandAloneCollection
;
typedef edm::RefProd< TriggerObjectStandAloneCollection > TriggerObjectStandAloneRefProd
:TriggerObjectStandAloneCollection
product;
typedef edm::RefVector< TriggerObjectStandAloneCollection > TriggerObjectStandAloneRefVector
:TriggerObjectStandAloneCollection
;
typedef edm::Association< TriggerObjectStandAloneCollection > TriggerObjectStandAloneMatch
:reco::Candidate
(PAT objects) to items in a TriggerObjectStandAloneCollection
,std::vector< std::string > filterLabels_
:std::vector< std::string > pathNames_
:std::vector< bool > pathLastFilterAccepted_
:std::vector< bool > pathL3FilterAccepted_
:false
for correspondence to L1 algorithms.
TriggerObject
also work for TriggerObjectStandAlone
(reco::CandidateBaseRef
not yet);
TriggerObjectStandAlone( const TriggerObject& trigObj )
:pat::TriggerObject
.
void addFilterLabel( const std::string & filterLabel )
:void addConditionName( const std::string & conditionName )
:void addPathName( const std::string & pathName, bool pathLastFilterAccepted = true, bool pathL3FilterAccepted = true )
:pathLastFilterAccepted
) resp. in an L3 filter ( pathL3FilterAccepted
) and the path was succeeding.
void addAlgorithmName( const std::string & algorithmName, bool algoCondAccepted = true )
:std::vector< std::string > filterLabels()
:std::vector< std::string > conditionNames()
:std::vector< std::string > pathNames( bool pathLastFilterAccepted = false, bool pathL3FilterAccepted = true )
:pathLastFilterAccepted
) resp. in an L3 filter ( pathL3FilterAccepted
) and the path was succeeding;pathL3FilterAccepted_
flag vector. To restore the old behaviour, this parameter has to be set to true
and pathL3FilterAccepted
has to be set to false
.
std::vector< std::string > algorithmNames( bool algoCondAccepted = true )
:bool hasPathLastFilterAccepted()
:pathLastFilterAccepted_
flag vector.
bool hasAlgoConfAccepted()
:hasPathLastFilterAccepted()
.
bool hasPathL3FilterAccepted()
:pathL3FilterAccepted_
flag vector.
'*'
: bool hasFilterLabel( const std::string& filterLabel )
andbool filter( const std::string& filterLabel )
( ** ):bool hasConditionName( const std::string& conditionName )
andbool cond( const std::string& conditionName )
( ** ):bool hasPathName( const std::string& pathName, bool pathLastFilterAccepted = false, bool pathL3FilterAccepted = true )
andbool path( const std::string& pathName, unsigned pathLastFilterAccepted = 0, unsigned pathL3FilterAccepted = 1 )
( ** ):pathLastFilterAccepted
) resp. in an L3 filter ( pathL3FilterAccepted
) and the path was succeeding;pathL3FilterAccepted_
flag vector. To restore the old behaviour, this parameter has to be set to true
/ 1
and pathL3FilterAccepted
has to be set to false
/ 0
.
bool hasAlgorithmName( const std::string & algorithmName, bool algoCondAccepted = true )
andbool algo( const std::string & algorithmName, unsigned algoCondAccepted = 1 )
( ** ):bool hasCollection( const edm::InputTag & coll )
,bool hasCollection( const std::string & coll )
andbool coll( const std::string & coll )
( ** ):bool
).typedef std::vector< TriggerFilter > TriggerFilterCollection
:TriggerFilter
to be stored in the event;
typedef edm::Ref< TriggerFilterCollection > TriggerFilterRef
:TriggerFilterCollection
;
typedef edm::RefProd< TriggerFilterCollection > TriggerFilterRefProd
:TriggerFilterCollection
product,<TriggerEvent
;
typedef edm::RefVector< TriggerFilterCollection > TriggerFilterRefVector
:TriggerFilterCollection
.
std::string label_
:std::string type_
:std::vector< unsigned > objectKeys_
:std::vector< trigger::TriggerObjectType > triggeObjectTypes_
:int status_
:code | -1 | 0 | 1 |
---|---|---|---|
status | not run | failed | succeeded |
bool saveTags_
:TriggerFilter( const std::string& label, int status = -1, bool saveTags = false )
andTriggerFilter( const edm::InputTag& tag, int status = -1, bool saveTags = false )
:bool isL3()
:bool isFiring()
:bool hasTriggerObjectType( trigger::TriggerObjectType triggerObjectType )
andbool hasTriggerObjectType( int triggerObjectType )
:bool hasObjectKey( unsigned objectKey )
:typedef std::vector< TriggerCondition > TriggerConditionCollection
:TriggerCondition
to be stored in the event;
typedef edm::Ref< TriggerConditionCollection > TriggerConditionRef
:TriggerConditionCollection
;
typedef edm::RefProd< TriggerConditionCollection > TriggerConditionRefProd
:TriggerConditionCollection
product,<TriggerEvent
;
typedef edm::RefVector< TriggerConditionCollection > TriggerConditionRefVector
:TriggerConditionCollection
.
std::string name_
:bool accept_
:L1GtConditionCategory category_
:L1GtConditionType type_
:std::vector< trigger::TriggerObjectType > triggerObjectTypes_
:std::vector< unsigned > objectKeys_
:TriggerCondition( const std::string & name )
:TriggerCondition( const std::string & name, bool accept )
:bool hasTriggerObjectType( trigger::TriggerObjectType triggerObjectType )
andbool hasTriggerObjectType( int triggerObjectType )
:bool hasObjectKey( unsigned objectKey )
:typedef std::pair< bool, std::string > L1Seed;
:typedef std::vector< L1Seed > L1SeedCollection;
:TriggerPath
to store the L1 seeds;
typedef std::vector< TriggerPath > TriggerPathCollection
:TriggerPath
to be stored in the event;
typedef edm::Ref< TriggerPathCollection > TriggerPathRef
:TriggerPathCollection
;
typedef edm::RefProd< TriggerPathCollection > TriggerPathRefProd
:TriggerPathCollection
product,TriggerEvent
;
typedef edm::RefVector< TriggerPathCollection > TriggerPathRefVector
:TriggerPathCollection
.
std::string name_
:unsigned index_
:unsigned prescale_
:bool run_
:bool accept_
:bool error_
:std::vector< std::string > modules_
:std::vector< unsigned > filterIndices_
:unsigned lastActiveFilterSlot_
:modules_
,modules_ was filled
.
L1SeedCollection l1Seeds_
:unsigned l3Filters_
:TriggerPath( const std::string& name)
:TriggerPath( const std::string& name, unsigned index, unsigned prescale, bool run, bool accept, bool error, unsigned lastActiveFilterSlot )
:bool xTrigger()
:l3Filters_ > 2
.
int indexModule( const std::string& name )
:modules_
,modules_
is empty.
std::vector< std::string > l1Seeds( const bool decision )
:std::vector< std::string > acceptedL1Seeds()
:l1Seeds( true )
.
std::vector< std::string > failedL1Seeds()
:l1Seeds( false )
.
typedef std::vector< TriggerAlgorithm > TriggerAlgorithmCollection
:TriggerAlgorithm
to be stored in the event;
typedef edm::Ref< TriggerAlgorithmCollection > TriggerAlgorithmRef
:TriggerAlgorithmCollection
;
typedef edm::RefProd< TriggerAlgorithmCollection > TriggerAlgorithmRefProd
:TriggerAlgorithmCollection
product,TriggerEvent
;
typedef edm::RefVector< TriggerAlgorithmCollection > TriggerAlgorithmRefVector
:TriggerAlgorithmCollection
.
std::string name_
:std::string alias_
:std::string logic_
:bool tech_
:unsigned bit_
:bool gtlResult_
:unsigned prescale_
:bool mask_
:bool decisionBeforeMask_
:bool decisionAfterMask_
:std::vector< unsigned > conditionKeys_;
:TriggerAlgorithm( const std::string& name)
:TriggerAlgorithm( const std::string& name, const std::string & alias, bool tech, unsigned bit, unsigned prescale, bool mask, bool decisionBeforeMask, bool decisionAfterMask )
:TriggerAlgorithm( const std::string& name, const std::string & alias, bool tech, unsigned bit, bool gtlResult, unsigned prescale, bool mask, bool decisionBeforeMask, bool decisionAfterMask )
:bool hasConditionKey( unsigned conditionKey )
:std::string nameL1Menu_
:std::string nameHltTable_
:bool run_
:bool accept_
:bool error_
:bool physDecl_
:boost::uint32_t lhcFill_
:boost::uint16_t beamMode_
:boost::uint16_t beamMomentum_
:boost::uint32_t intensityBeam1_
:boost::uint32_t intensityBeam2_
:boost::uint16_t bstMasterStatus_
:boost::uint32_t turnCount_
:float bCurrentStart_
:=float bCurrentStop_
:=float bCurrentAvg_
:TriggerAlgorithmRefProd algorithms_
:TriggerAlgorithmCollection
product in the event;
TriggerConditionRefProd conditions_
:TriggerConditionCollection
product in the event;
TriggerPathRefProd paths_
:TriggerPathCollection
product in the event;
TriggerFilterRefProd filters_
:TriggerFilterCollection
product in the event;
TriggerObjectRefProd objects_
:TriggerObjectCollection
product in the event;
TriggerObjectMatchContainer objectMatchResults_
:TriggerObjectMatch
products in the event, mapped by their producer labels.
TriggerEvent( const std::string& nameHltTable, bool run, bool accept, bool error, bool physDecl = true )
:TriggerEvent( const std::string& nameL1Menu, const std::string& nameHltTable, bool run, bool accept, bool error, bool physDecl = true )
:void setAlgorithms( const edm::Handle< TriggerAlgorithmCollection > & handleTriggerAlgorithms )
:TriggerAlgorithmCollection
in event from edm::Handle
;
const TriggerAlgorithmCollection * algorithms()
:TriggerAlgorithmCollection
in event;
const TriggerAlgorithmRefVector algorithmRefs()
:const TriggerAlgorithm * algorithm( const std::string& nameAlgorithm )
:const TriggerAlgorithmRef algorithmRef( const std::string& nameAlgorithm )
:std::string nameAlgorithm( const unsigned bitAlgorithm, const bool techAlgorithm = true )
:unsigned indexAlgorithm( const std::string& nameAlgorithm )
:TriggerAlgorithmCollection
in event;
TriggerAlgorithmRefVector acceptedAlgorithms()
:TriggerAlgorithmRefVector acceptedAlgorithmsGtl()
:TriggerAlgorithmRefVector techAlgorithms()
:TriggerAlgorithmRefVector acceptedTechAlgorithms()
:TriggerAlgorithmRefVector acceptedTechAlgorithmsGtl()
:TriggerAlgorithmRefVector physAlgorithms()
:TriggerAlgorithmRefVector acceptedPhysAlgorithms()
:TriggerAlgorithmRefVector acceptedPhysAlgorithmsGtl()
:void setConditions( const edm::Handle< TriggerConditionCollection > & handleTriggerConditions )
:TriggerConditionCollection
in event from edm::Handle
;
const TriggerConditionCollection * conditions()
:TriggerConditionCollection
in event;
const TriggerConditionRefVector conditionRefs()
:const TriggerCondition * condition( const std::string & nameCondition )
:const TriggerConditionRef conditionRef( const std::string& nameCondition )
:unsigned indexCondition( const std::string& nameCondition )
:TriggerConditionCollection
in event;
TriggerConditionRefVector acceptedConditions()
:void setPaths( const edm::Handle< TriggerPathCollection >& handleTriggerPaths )
:TriggerPathCollection
in event from edm::Handle
;
const TriggerPathCollection* paths()
:TriggerPathCollection
in event;
const TriggerPathRefVector pathRefs()
:const TriggerPath* path( const std::string& namePath )
:const TriggerPathRef pathRef( const std::string& namePath )
:unsigned indexPath( const std::string& namePath )
:TriggerPathCollection
in event;
TriggerPathRefVector acceptedPaths()
:void setFilters( const edm::Handle< TriggerFilterCollection >& handleTriggerFilters )
:TriggerFilterCollection
in event from edm::Handle
;
const TriggerFilterCollection* filters()
:TriggerFilterCollection
in event;
const TriggerFilterRefVector filterRefs()
:const TriggerFilter* filter( const std::string& labelFilter )
:const TriggerFilterRef filterRef( const std::string& labelFilter )
:unsigned indexFilter( const std::string& labelFilter )
:TriggerFilterCollection
in event;
TriggerFilterRefVector acceptedFilters()
:void setObjects( const edm::Handle< TriggerObjectCollection >& handleTriggerObjects )
:TriggerObjectCollection
in event from edm::Handle
;
bool addObjectMatchResult( const TriggerObjectMatchRefProd& trigMatches, const std::string & labelMatcher )
,bool addObjectMatchResult( const edm::Handle< TriggerObjectMatch >& trigMatches, const std::string & labelMatcher )
andbool addObjectMatchResult( const edm::OrphanHandle< TriggerObjectMatch >& trigMatches, const std::string & labelMatcher )
:TriggerObjectMatch
in event from product reference, edm::Handle
or edm::OrpanHandle
under the label of the producer module,false
, if the label exists already in objectMatchResults_
;
const TriggerObjectCollection* objects()
:TriggerObjectCollection
in event;
TriggerObjectRefVector objects( unsigned filterId )
:std::vector< std::string > triggerMatchers()
:const TriggerObjectMatchContainer* triggerObjectMatchResults()
:const TriggerObjectMatch* triggerObjectMatchResult( const std::string& labelMatcher )
:TriggerObjectMatch
in event given the matcher module label;
pat::TriggerEvent
.
TriggerConditionRefVector algorithmConditions( const std::string & nameAlgorithm )
:TriggerConditionCollection
in the event, which were used in an algorithm given by its name;
bool conditionInAlgorithm( const TriggerConditionRef & conditionRef, const std::string & nameAlgorithm )
:TriggerAlgorithmRefVector conditionAlgorithms( const TriggerConditionRef & conditionRef )
:TriggerAlgorithmCollection
in the event, which used a condition given by a reference to it;
std::vector< std::string > conditionCollections( const std::string & nameAlgorithm )
:TriggerObjectRefVector conditionObjects( const std::string & nameCondition )
:bool objectInCondition( const TriggerObjectRef & usedobjectRef, const std::string & nameCondition )
:TriggerConditionRefVector objectConditions( const TriggerObjectRef & objectRef )
:TriggerConditionCollection
in the event, which had an object in a succeeding combination given by a reference to it;
TriggerObjectRefVector algorithmObjects( const std::string & nameAlgorithm )
:bool objectInAlgorithm( const TriggerObjectRef & objectRef, const std::string & nameAlgorithm )
:TriggerAlgorithmRefVector objectAlgorithms( const TriggerObjectRef & objectRef )
:TriggerAlgorithmCollection
in the event, which had an object given by a reference to it in any combination succeeding any of the algorithm's conditions;
TriggerFilterRefVector pathModules( const std::string& namePath, bool all = true )
:TriggerFilterCollection
in the event, which have an entry in the modules_
vector of the path given by its trigger name,all
is set to true () default, and truncated after the last active filter has been reached otzherwise,modules_
of the path, but not in the TriggerFilterCollection
in the event,modules_
is empty;
TriggerFilterRefVector pathFilters( const std::string& namePath, bool firing = true )
:TriggerFilterCollection
in the event, which were run in a path given by its trigger name;firing
restricts the result to succeeding L3 filters;pathL3FilterAccepted_
flag vector. To restore the old behaviour, this parameter has to be set to false
;
bool filterInPath( const TriggerFilterRef& filterRef, const std::string& namePath, bool firing = true )
:firing
restricts the result to succeeding L3 filters;pathL3FilterAccepted_
flag vector. To restore the old behaviour, this parameter has to be set to false
;
TriggerPathRefVector filterPaths( const TriggerFilterRef & filterRef, bool firing = true )
:TriggerPathCollection
in the event, which ran a filter given by a reference to it;firing
restricts the result to succeeding L3 filters;pathL3FilterAccepted_
flag vector. To restore the old behaviour, this parameter has to be set to false
;
std::vector< std::string > filterCollections( const std::string& labelFilter )
:TriggerObjectRefVector filterObjects( const std::string& labelFilter )
:bool objectInFilter( const TriggerObjectRef& objectRef, const std::string& labelFilter )
:TriggerFilterRefVector objectFilters( const TriggerObjectRef& objectRef, bool firing = true )
:TriggerFilterCollection
in the event, which used an object given by a reference to it;firing
restricts the result to objects from succeeding L3 filters;pathL3FilterAccepted_
flag vector. To restore the old behaviour, this parameter has to be set to false
;
TriggerObjectRefVector pathObjects( const std::string& namePath, bool firing = true )
:firing
restricts the result to objects from succeeding L3 filters;pathL3FilterAccepted_
flag vector. To restore the old behaviour, this parameter has to be set to false
;
bool objectInPath( const TriggerObjectRef& objectRef, const std::string& namePath, bool firing = true )
:firing
restricts the result to objects from succeeding L3 filters;pathL3FilterAccepted_
flag vector. To restore the old behaviour, this parameter has to be set to false
;
TriggerPathRefVector objectPaths( const TriggerObjectRef& objectRef, bool firing = true )
:TriggerPathCollection
in the event, which used anywhere an object given by a reference to it;firing
restricts the result to objects from succeeding L3 filters;pathL3FilterAccepted_
flag vector. To restore the old behaviour, this parameter has to be set to false
.
pat::TriggerEvent
and were reimplemented in the PhysicsTools/PatUtilspat::helper
namespace.
The names of the methods where preserved and the usage as much as possible.
The classes and their functions are defined in PhysicsTools/PatUtils/interface/TriggerHelper.h
using namespace pat::helper;
directive has been used.
TriggerMatchHelper
TriggerObjectRef triggerMatchObject( const reco::CandidateBaseRef& candRef, const std::string& labelMatcher, const edm::Event& event, const TriggerEvent& triggerEvent )
:TriggerObjectRef triggerMatchObject( const reco::CandidateBaseRef& candRef, const TriggerObjectMatch* matchResult, const edm::Event& event, const TriggerEvent& triggerEvent )
:pat::TriggerEvent::triggerObjectMatchResult
,template< class C > TriggerObjectRef triggerMatchObject( const edm::Handle< C > & candCollHandle, const size_t iCand, const std::string & labelMatcher, const edm::Event & event, const TriggerEvent & triggerEvent )
:template< class C > TriggerObjectRef triggerMatchObject( const edm::Handle< C > & candCollHandle, const size_t iCand, const TriggerObjectMatch * matchResult, const edm::Event & event, const TriggerEvent & triggerEvent )
:pat::TriggerEvent::triggerObjectMatchResult
,TriggerObjectMatchMap triggerMatchObjects( const reco::CandidateBaseRef& candRef, const edm::Event& event, const TriggerEvent& triggerEvent )
:TriggerObjectMatchMap triggerMatchObjects( const edm::Handle< C > & candCollHandle, const size_t iCand, const edm::Event& event, const TriggerEvent& triggerEvent )
:reco::CandidateBaseRefVector triggerMatchCandidates( const TriggerObjectRef& objectRef, const std::string& labelMatcher, const edm::Event& event, const TriggerEvent& triggerEvent )
:reco::CandidateBaseRefVector triggerMatchCandidates( const TriggerObjectRef& objectRef, const TriggerObjectMatch* matchResult, const edm::Event& event, const TriggerEvent& triggerEvent )
:pat::TriggerEvent::triggerObjectMatchResult
;
reco::CandidateBaseRefVector triggerMatchCandidates( const edm::Handle< TriggerObjectCollection > & trigCollHandle, const size_t iTrig, const std::string& labelMatcher, const edm::Event& event, const TriggerEvent& triggerEvent )
:reco::CandidateBaseRefVector triggerMatchCandidates( const edm::Handle< TriggerObjectCollection > & trigCollHandle, const size_t iTrig, const TriggerObjectMatch* matchResult, const edm::Event& event, const TriggerEvent& triggerEvent )
:pat::TriggerEvent::triggerObjectMatchResult
.
#include "CMS.PhysicsTools/PatUtils/interface/TriggerHelper.h" using namespace pat; using namespace pat::helper; [...] const TriggerMatchHelper matchHelper; const TriggerObjectRef matchObjRef( matchHelper.triggerMatchObject( candRef, labelMatcher, event, triggerEvent ) ); const TriggerObjectMatchMap matchMap( matchHelper.triggerMatchObjects( candRef, event, triggerEvent ) ); const reco::CandidateBaseRefVector matchCandRefs( matchHelper.triggerMatchCandidates( objRef, labelMatcher, event, triggerEvent ) );
typedef
on the basis of TriggerObject
resp. TriggerObjectStandAlone
.
S. here (TriggerObject
) and here (TriggerObjectStandAlone
) for available types.
PATObject
hosts embedded trigger matches as the TriggerObjectStandAloneCollection triggerObjectMatchesEmbedded
. It has the following corresponding methods:
const TriggerObjectStandAloneCollection & triggerObjectMatches()
:const TriggerObjectStandAlone * triggerObjectMatch( const size_t idx = 0 )
:const TriggerObjectStandAloneCollection triggerObjectMatchesByType( const trigger::TriggerObjectType triggerObjectType )
:const TriggerObjectStandAlone * triggerObjectMatchByType( const trigger::TriggerObjectType triggerObjectType, const size_t idx = 0 )
:const TriggerObjectStandAloneCollection triggerObjectMatchesByCollection( const std::string & coll )
andconst TriggerObjectStandAloneCollection triggerObjectMatchesByCollection( const char * coll )
const TriggerObjectStandAlone * triggerObjectMatchByCollection( const std::string & coll, const size_t idx = 0 )
andconst TriggerObjectStandAlone * triggerObjectMatchByCollection( const char * coll, const size_t idx = 0 )
:const TriggerObjectStandAloneCollection triggerObjectMatchesByCondition( const std::string & nameCondition )
andconst TriggerObjectStandAloneCollection triggerObjectMatchesByCondition( const char * nameCondition )
:const TriggerObjectStandAlone * triggerObjectMatchByCondition( const std::string & nameCondition, const size_t idx = 0 )
andconst TriggerObjectStandAlone * triggerObjectMatchByCondition( const char * nameCondition, const size_t idx = 0 )
:const TriggerObjectStandAloneCollection triggerObjectMatchesByAlgorithm( const std::string & nameAlgorithm, const bool algoCondAccepted = true )
,const TriggerObjectStandAloneCollection triggerObjectMatchesByAlgorithm( const char * nameAlgorithm, const bool algoCondAccepted = true )
,const TriggerObjectStandAloneCollection triggerObjectMatchesByAlgorithm( const std::string & nameAlgorithm, const unsigned algoCondAccepted )
andconst TriggerObjectStandAloneCollection triggerObjectMatchesByAlgorithm( const char * nameAlgorithm, const unsigned algoCondAccepted )
:unsigned
arguments instead of bool
do not have a default value for it.
const TriggerObjectStandAlone * triggerObjectMatchByAlgorithm( const std::string & nameAlgorithm, const size_t idx = 0, const bool algoCondAccepted = true )
,const TriggerObjectStandAlone * triggerObjectMatchByAlgorithm( const char * nameAlgorithm, const size_t idx = 0, const bool algoCondAccepted = true )
,const TriggerObjectStandAlone * triggerObjectMatchByAlgorithm( const std::string & nameAlgorithm, const size_t idx = 0, const bool algoCondAccepted )
andconst TriggerObjectStandAlone * triggerObjectMatchByAlgorithm( const char * nameAlgorithm, const size_t idx = 0, const bool algoCondAccepted )
:unsigned
arguments instead of bool
do not have a default value for it.
const TriggerObjectStandAloneCollection triggerObjectMatchesByFilter( const std::string & labelFilter )
andconst TriggerObjectStandAloneCollection triggerObjectMatchesByFilter( const char * labelFilter )
:const TriggerObjectStandAlone * triggerObjectMatchByFilter( const std::string & labelFilter, const size_t idx = 0 )
andconst TriggerObjectStandAlone * triggerObjectMatchByFilter( const char * labelFilter, const size_t idx = 0 )
:const TriggerObjectStandAloneCollection triggerObjectMatchesByPath( const std::string & namePath, const bool pathLastFilterAccepted = false, const bool pathL3FilterAccepted = true )
,const TriggerObjectStandAloneCollection triggerObjectMatchesByPath( const char * namePath, const bool pathLastFilterAccepted = false, const bool pathL3FilterAccepted = true )
,const TriggerObjectStandAloneCollection triggerObjectMatchesByPath( const std::string & namePath, const unsigned pathLastFilterAccepted, const unsigned pathL3FilterAccepted = 1 )
andconst TriggerObjectStandAloneCollection triggerObjectMatchesByPath( const char * namePath, const unsigned pathLastFilterAccepted, const unsigned pathL3FilterAccepted = 1 )
:unsigned
arguments instead of bool
do not have a default value for the first one;pathLastFilterAccepted
is mandatory now, the new optional parameter pathL3FilterAccepted
uses the new L3 filter identifiers; To restore the original behaviour, pass a true
/ 1
to pathLastFilterAccepted
, to use the new feature pass a false
/ 0
; if you passed a false
/ 0
to pathLastFilterAccepted
so far, pass it now to both arguments; pathLastFilterAccepted
and pathL3FilterAccepted
are combined with a logical AND. Since usually all last filters are also L3 filters, the combination true
/ 1
,==false== / 0
does not make sense and will return an empty collection.
const TriggerObjectStandAlone * triggerObjectMatchByPath( const std::string & namePath, const size_t idx = 0, const bool pathLastFilterAccepted = false, const bool pathL3FilterAccepted = true )
,const TriggerObjectStandAlone * triggerObjectMatchByPath( const char * namePath, const size_t idx = 0, const bool pathLastFilterAccepted = false, const bool pathL3FilterAccepted = true )
,const TriggerObjectStandAlone * triggerObjectMatchByPath( const std::string & namePath, const size_t idx = 0, const unsigned pathLastFilterAccepted, const unsigned pathL3FilterAccepted = 1 )
andconst TriggerObjectStandAlone * triggerObjectMatchByPath( const char * namePath, const size_t idx = 0, const unsigned pathLastFilterAccepted, const unsigned pathL3FilterAccepted = 1 )
:unsigned
arguments instead of bool
do not have a default value for the first one;pathLastFilterAccepted
is mandatory now, the new optional parameter pathL3FilterAccepted
uses the new L3 filter identifiers; To restore the original behaviour, pass a true
/ 1
to pathLastFilterAccepted
, to use the new feature pass a false
/ 0
; if you passed a false
/ 0
to pathLastFilterAccepted
so far, pass it now to both arguments. pathLastFilterAccepted
and pathL3FilterAccepted
are combined with a logical AND. Since usually all last filters are also L3 filters, the combination true
/ 1
,==false== / 0
does not make sense and will return a NULL pointer..
std::string
as parameter are also available for char*
in order to be used also in CINT command lines.std::string
or char *
as parameter allow for the usage of the wild-card character '*'
bool
as parameter are also available for unsigned
in order to be used also in the cut string parser.PATTriggerProducer
:
The PATTriggerProducer accesses the existing trigger information in AOD, produces a TriggerObjectCollection
, a TriggerObjectStandAloneCollection
, a TriggerFilterCollection
, a TriggerPathCollection
, a TriggerConditionCollection
and a TriggerAlgorithmCollection
from it and puts them to the event.
The TriggerFilterCollection
and the TriggerPathCollection
already contain the top-down x-links for HLT information as described here.
In case this is requested, the amount of produced collections is reduced to the TriggerObjectStandAloneCollection
only.
cms.bool onlyStandAlone
:False
) and stand-alone information with one collection (True
),False
;
cms.bool addL1Algos
(optional):False
;cms.bool mainBxOnly
(optional):True
.
cms.bool saveL1Refs
(optional):*_l1extraParticles_*_[processName]
and *_gctDigis_*_[processName]
in the event; default : False
.
cms.InputTag l1GlobalTriggerObjectMaps
(optional) L1GlobalTriggerObjectMaps
product,"l1L1GtObjectMap"
"l1L1GtObjectMap"
. However, it will not work at all for direct access to RAW files any more.
cms.string processName
:'*'
(wild-card) will pick up the process corresponding to the most recently run producer for a trigger::TriggerEvent (as configured with triggerEvent
, s. below), independently of its availability in the event. It is presumed that CMSSW prohibits the usage of input file with differing event content.'HLT'
;
cms.InputTag triggerResults
(optional):edm::TriggerResult
product,"TriggerResults"
;
cms.InputTag triggerEvent
(optional):trigger::TriggerEvent
product,"hltTriggerSummaryAOD"
;
cms.bool addPathModuleLabels
(optional):True
,False
.
cms.vstring exludeCollections
(optional):cms.InputTag
parameters in this section: '*'
(wild-card) as process name leads to the automatic usage of the process name as configured by processName
. cms.InputTag l1ExtraMu
: l1extraParticles
cms.InputTag l1ExtraNoIsoEG
: l1extraParticles:NonIsolated
cms.InputTag l1ExtraIsoEG
: l1extraParticles:Isolated
cms.InputTag l1ExtraCenJet
: l1extraParticles:Central
cms.InputTag l1ExtraForJet
: l1extraParticles:Forward
cms.InputTag l1ExtraTauJet
: l1extraParticles:Tau
cms.InputTag l1ExtraETM
: l1extraParticles:MET
cms.InputTag l1ExtraHTM
: l1extraParticles:MHT
cms.string hltPrescaleLabel
: cms.string hltPrescaleTable
: PATTriggerMatcherDRLessByR
:PATTriggerMatcherDRDPtLessByR
:PATTriggerMatcherDRLessByPt
:PATTriggerMatcherDRDPtLessByPt
:PATTriggerMatcherDEtaLessByDR
:PATTriggerMatcherDEtaLessByDEta
:PhysObjectMatcher
from the PhysicsTools/UtilAlgosTriggerObjectStandAloneMatch
to the event.
For the selection of the trigger objects considered for the match, the templated PATTriggerMatchSelector
is used, which again passes the selection criteria to the StringCutObjectSelector (cut string parser).
cms.InputTag src
:cms.InputTag matched
:TriggerObjectCollection
in the event,"patTrigger"
;
cms.string matchedCuts
: andOr
, filterIdsEnum
, filterIds
, filterLabels
, pathNames
and collectionTags
(cms.double maxDPtRel
:object type | electron | photon | muon | tau to jet | jet |
---|---|---|---|---|---|
value | 0.5 | 1.0 | 0.5 | 3.0 | 3.0 |
cms.double maxDeltaR
:object type | electron | photon | muon | tau to jet | jet |
---|---|---|---|---|---|
value | 0.5 | 0.2 | 0.5 | 0.1 | 0.4 |
cms.double maxDeltaEta
:cms.bool resolveAmbiguities
:True
,True
;
cms.bool resolveByMatchQuality
:resolveAmbiguities
set to True
,False
.
matchedCuts
to pass the selection, rather than the set of the obsolete configuration parameters andOr
, filterIdsEnum
, filterIds
, filterLabels
, pathNames
and collectionTags
.
matchedCuts
parameter will crash!Old configuration parameter | TriggerObjectStandAlone function to be used |
Remarks | |
---|---|---|---|
bool |
andOr |
logical junctors in the cut string expression as explained here | This is much more flexible than the static approach before. |
vstring |
filterIdsEnum |
type( trigger::TriggerObjectType triggerObjectType ) |
The trigger::TriggerObjectType is provided as string according to the enum definition in this file![]() trigger . S. example below.This is for one single trigger objects type. The former vector has to be built (using the logical OR) using logical junctors. |
vint32 |
filterIds |
type( int triggerObjectType ) |
This is for one single trigger objects type. The former vector has to be built (using the logical OR) using logical junctors. |
vstring |
filterLabels |
filter( std::string filterLabel ) |
This is for one single filter label. The former vector has to be built (using the logical OR) using logical junctors. ![]() '*' . |
vstring |
pathNames |
path( std::string pathName, unsigned pathLastFilterAccepted = 1 ) |
This is for one single path name. The former vector has to be built (using the logical OR) using logical junctors.![]() '*' .![]() |
bool |
pathLastFilterAcceptedOnly |
included in path(...) (s. above) |
This can be applied individually per path now. |
vstring |
collectionTags |
coll( std::string collName ) |
Accepts also an encoded edm::InputTag .This is for one single collection name/tag. The former vector has to be built (using the logical OR) using logical junctors. ![]() '*' . |
cleanMuonTriggerMatchHLTMu9
:andOr = cms.bool( False ), filterIdsEnum = cms.vstring( '*' ), filterIds = cms.vint32( 0 ), filterLabels = cms.vstring( '*' ), pathNames = cms.vstring( 'HLT_Mu9' ), pathLastFilterAcceptedOnly = cms.bool( True ), collectionTags = cms.vstring( '*' )new:
matchedCuts = cms.string( 'path( "HLT_Mu9" )' )
cleanMuonTriggerMatchHLTMu13
(incl. wild-card, not a default example):andOr = cms.bool( False ), filterIdsEnum = cms.vstring( '*' ), filterIds = cms.vint32( 0 ), filterLabels = cms.vstring( '*' ), pathNames = cms.vstring( 'HLT_Mu13' , 'HLT_Mu13_v1' , 'HLT_Mu13_v2' # , [...] # many, many more... ), pathLastFilterAcceptedOnly = cms.bool( True ), collectionTags = cms.vstring( '*' )new:
matchedCuts = cms.string( 'path( "HLT_Mu13" ) || path( "HLT_Mu13_v*" )' )
cleanMuonTriggerMatchHLTMu9All
(not a default example):andOr = cms.bool( False ), filterIdsEnum = cms.vstring( '*' ), filterIds = cms.vint32( 0 ), filterLabels = cms.vstring( '*' ), pathNames = cms.vstring( 'HLT_Mu9' ), pathLastFilterAcceptedOnly = cms.bool( False ), # <-- collectionTags = cms.vstring( '*' )new:
matchedCuts = cms.string( 'path( "HLT_Mu9", 0 )' )
cleanMuonTriggerMatchTriggerMuon
:andOr = cms.bool( False ), filterIdsEnum = cms.vstring( 'TriggerL1Mu' , 'TriggerMuon' ), filterIds = cms.vint32( 0 ), filterLabels = cms.vstring( '*' ), pathNames = cms.vstring( '*' ), pathLastFilterAcceptedOnly = cms.bool( True ), collectionTags = cms.vstring( '*' )new:
matchedCuts = cms.string( 'type( "TriggerL1Mu" ) || type( "TriggerMuon" )' )
cleanElectronTriggerMatchL1EGammaCollection
:andOr = cms.bool( False ), filterIdsEnum = cms.vstring( '*' ), filterIds = cms.vint32( 0 ), filterLabels = cms.vstring( '*' ), pathNames = cms.vstring( '*' ), pathLastFilterAcceptedOnly = cms.bool( True ), collectionTags = cms.vstring( 'l1extraParticles:NonIsolated' , 'l1extraParticles:Isolated' )new:
matchedCuts = cms.string( 'coll( "l1extraParticles:NonIsolated" ) || coll( "l1extraParticles:Isolated" )' )
TriggerObjectStandAloneMatch
products, it is not the label but the instance of the TriggerObjectMatch
products, e.g. the event contains then these products:
patTriggerObjectStandAloneedmAssociation_myTriggerMatch__PAT patTriggerObjectedmAssociation_triggerEvent_myTriggerMatch_PATwhere the label of the PATTriggerMatcher was
myTriggerMatch
amd the label of the PATTriggerEventProducer was triggerEvent
.
cms.string processName
:'*'
(wild-card) will pick up the process corresponding to the most recent trigger::TriggerEvent found in the input file'HLT'
;
cms.InputTag triggerResults
(optional):edm::TriggerResult
product,"TriggerResults"
;
cms.InputTag patTriggerProducer
(optional):TriggerObjectCollection
, TriggerFilterCollection
and TriggerPathCollection
products,"patTrigger"
;
cms.InputTag l1GtTag
(optional):L1CMS.GlobalTriggerReadoutRecord
product;"gtDigis"
is the default name of the collection to be added;
cms.InputTag condGtTag
(optional):edm::ConditionsIn{Event,Lumi,Run}Block
products;"conditionsInEdm"
is the default name of the collection to be added;
cms.VInputTag patTriggerMatches
(optional):TriggerObjectStandAloneMatch
products to be converted into TriggerObjectMatch
products,PATTriggerMatchElectronEmbedder
:std::vector
) of pat::Electron
;
PATTriggerMatchJetEmbedder
:std::vector
) of pat::Jet
;
PATTriggerMatchMETEmbedder
:std::vector
) of pat::MET
;
PATTriggerMatchMuonEmbedder
:std::vector
) of pat::Muon
;
PATTriggerMatchPhotonEmbedder
:std::vector
) of pat::Photon
;
PATTriggerMatchTauEmbedder
:std::vector
) of pat::Taus
.
PATTriggerMatchEmbedder
The PATTriggerMatchEmbedder simply copies a PAT object collection into a new collection and fills in addition its data member triggerObjectMatchesEmbedded_
(TriggerObjectStandAloneCollection
) from the stand-alone trigger objects and their matches.
cms.InputTag src
:cms.VInputTag matches
:src
) have to be the same as indicated by the src
parameter of this embedder module.
PATTriggerMatchEmbedder
module, not from the original (input) PAT object collection, since they are added after the original PAT object collection has been produced.
cleanPatMuonsTriggerMatch = cms.EDProducer( "PATTriggerMatchMuonEmbedder" , src = cms.InputTag( "cleanPatMuons" ) , matches = cms.VInputTag( 'myMuonTriggerMatch' ) )the embedded trigger matches are accessible from the
cleanPatMuonsTriggerMatch
collection and not from cleanPatMuons
.
process.load( "CMS.PhysicsTools.PatAlgos.patSequences_cff" ) from CMS.PhysicsTools.PatAlgos.patEventContent_cff import *
processName
:processName
in the PATTriggerEventProducer triggerResults
:triggerResults
in the PATTriggerEventProducer onlyStandAlone
:TriggerObjectCollection
, TriggerFilterCollection
and TriggerPathCollection
src
:matched
:processName
:processName
in the PATTriggerProducer triggerResults
:triggerResults
in the PATTriggerProducer patTriggerProducer
:patTriggerMatches
:patTriggerMatcher
, which is defined in PhysicsTools/PatAlgos/python/triggerLayer1/triggerMatcher_cfi.pysrc
:src
in all PatTriggerMatcher modules listed in parameter matches
;
matches
:src
.
patTriggerEventContent
:TriggerObjectCollection
, TriggerFilterCollection
, TriggerPathCollection
, TriggerConditionCollection
, TriggerAlgorithmCollection
and TriggerEvent
as produced in the default configurations,patTriggerStandAloneEventContent
:TriggerObjectStandAloneCollection
and the TriggerObjectStandAloneMatch
;
patTriggerL1RefsEventContent
:l1extraParticles
and gctDigis
collections with the original L1 trigger objects (needed, if L1 object references are stored; s. PATTriggerProducer).
onlyStandAlone
of the PATTriggerProducer, the according PAT trigger event content should be added.
It is easiest to use the according tools for this, since they take care.
from CMS.PhysicsTools.PatAlgos.tools.trigTools import *to the main configuration file.
from PhysicsTools.PatAlgos.tools.trigTools import * switchOnTrigger( process ) process.patTrigger.addL1Algos = cms.bool( True ) # This needs an updated event content! process.patTrigger.l1ExtraMu = cms.InputTag( 'l1extraParticles', '' ) process.patTrigger.saveL1Refs = cms.bool( True ) # This needs an updated event content! switchOnTrigger( process ) # This updates the event content as needed :-)
cms.Process
has to be given to all tools as the first parameter. In addition, there is a list of optional parameters for each tool to customize the resulting configuration accordingly to individual needs. The optional parameters have the same meaning for all tools and are explained here.
Find also additional explanations in the PAT Tools SWGuide - Trigger Tools
The available functions are:
switchOnTrigger( process, triggerProducer, triggerEventProducer, sequence, hltProcess, outputModule )
PATTriggerEvent
is also produced as single entry point and cross-links between the collection items are preserved.
switchOnTriggerStandAlone( process, triggerProducer, sequence, hltProcess, outputModule )
switchOnTriggerMatching( process, triggerMatchers, triggerProducer, triggerEventProducer, sequence, hltProcess, outputModule )
PATTriggerEvent
.
switchOnTriggerMatchingStandAlone( process, triggerMatchers, triggerProducer, sequence, hltProcess, outputModule )
switchOnTriggerMatchEmbedding( process, triggerMatchers, triggerProducer, sequence, hltProcess, outputModule )
patPhotons
selectedPatPhotons
cleanPatPhotons
patElectrons
selectedPatElectrons
cleanPatElectrons
patMuons
selectedPatMuons
cleanPatMuons
patTaus
selectedPatTaus
cleanPatTaus
patMETs
patJets
selectedPatJets
cleanPatJets
Calo | JPT | PF | |
---|---|---|---|
IC5 | patJetsIC5Calo selectedPatJetsIC5Calo cleanPatJetsIC5Calo | patJetsIC5JPT selectedPatJetsIC5JPT cleanPatJetsIC5JPT | patJetsIC5PF selectedPatJetsIC5PF cleanPatJetsIC5PF |
SC5 | patJetsSC5Calo selectedPatJetsSC5Calo cleanPatJetsSC5Calo | patJetsSC5JPT selectedPatJetsSC5JPT cleanPatJetsSC5JPT | patJetsSC5PF selectedPatJetsSC5PF cleanPatJetsSC5PF |
KT4 | patJetsKT4Calo selectedPatJetsKT4Calo cleanPatJetsKT4Calo | patJetsKT4JPT selectedPatJetsKT4JPT cleanPatJetsKT4JPT | patJetsKT4PF selectedPatJetsKT4PF cleanPatJetsKT4PF |
KT6 | patJetsKT6Calo selectedPatJetsKT6Calo cleanPatJetsKT6Calo | patJetsKT6JPT selectedPatJetsKT6JPT cleanPatJetsKT6JPT | patJetsKT6PF selectedPatJetsKT6PF cleanPatJetsKT6PF |
AK5 | patJetsAK5Calo selectedPatJetsAK5Calo cleanPatJetsAK5Calo | patJetsAK5JPT selectedPatJetsAK5JPT cleanPatJetsAK5JPT | patJetsAK5PF selectedPatJetsAK5PF cleanPatJetsAK5PF |
removeCleaningFromTriggerMatching( process, outputModule )
clean
indicates cleaned collections;
selected
indicates un-cleaned collections.
None
or by parameter name specification.
triggerMatchers
:triggerProducer
:PATTriggerProducer
to be used.'patTrigger'
triggerEventProducer
:PATTriggerEventProducer
to be used.'patTriggerEvent'
sequence
:cms.Sequence
to add the PAT trigger producer modules to. Also path names are allowed.sequence
is a cms.Sequence
, it has to be part of a path in the current process, otherwise PAT trigger production will not be run.'patDefaultSequence'
hltProcess
:'HLT'
'*'
(wild-card) will pick up the process corresponding to the most recent trigger::TriggerEvent found in the input fileoutputModule
:PoolOutputModule
used in the current process.''
) indicates that no output should be stored, e.g. when no PoolOutputModule
is defined in on-the-fly production of a histogram file via TFileService
.'out'
from CMS.PhysicsTools.PatAlgos.patTemplate_cfg import * process.p = cms.Path( process.patDefaultSequence ) from CMS.PhysicsTools.PatAlgos.tools.trigTools import * switchOnTrigger( process )
from CMS.PhysicsTools.PatAlgos.patTemplate_cfg import * process.p = cms.Path() from CMS.PhysicsTools.PatAlgos.tools.trigTools import * switchOnTrigger( process, sequence = 'p', hltProcess = '*' )
cms.Path
has to be defined, before switchOnTrigger
is called, because it is needed as parameter sequence
. (The default patDefaultSequence
is not part of a path here). from CMS.PhysicsTools.PatAlgos.patTemplate_cfg import * process.p = cms.Path( process.patDefaultSequence ) from CMS.PhysicsTools.PatAlgos.triggerLayer1.triggerMatcher_cfi import cleanMuonTriggerMatchPDMu process.patMuonMatch = cleanMuonTriggerMatchPDMu.clone() from CMS.PhysicsTools.PatAlgos.tools.trigTools import * switchOnTriggerMatchEmbedding( process, [ 'patMuonMatch' ] )
switchOnTriggerStrandAlone
and switchOnTriggerMatchingStrandAlone
are done automatically.
run52xOn51xTrigger( process, sequence )
import CondCore.DBCommon.CondDBCommon_cfi process.l1GtTriggerMenu = cms.ESSource( "PoolDBESSource" , CondCore.DBCommon.CondDBCommon_cfi.CondDBCommon , toGet = cms.VPSet( cms.PSet( connect = cms.untracked.string( 'frontier://FrontierProd/CMS_COND_31X_L1T' ) , record = cms.string( 'L1GtTriggerMenuRcd' ) , tag = cms.string( 'L1GtTriggerMenu_L1Menu_Commissioning2010_v4_mc' ) # L1 menu for Fall10 REDIGI (CMSSW_3_8_7) ) ) ) process.preferL1GtTriggerMenu = cms.ESPrefer( "PoolDBESSource", "l1GtTriggerMenu" )
#include "DataFormats/HLTReco/interface/TriggerTypeDefs.h" // gives access to the (release cycle dependent) trigger object codes [...] edm::Handle< TriggerEvent > handlePatTriggerEvent; iEvent.getByLabel( tagPatTriggerEvent_, handlePatTriggerEvent ); const TriggerObjectRefVector triggerElectrons( handlePatTriggerEvent->objects( trigger::TriggerElectron ) ); // uses trigger object code from the enum in DataFormats/HLTReco/interface/TriggerTypeDefs.h for ( TriggerObjectRefVector::const_iterator it = triggerElectrons.begin(); it != triggerElectrons.end(); ++it ) { const TriggerObjectRef objRef( *it ); const CandidateBaseRefVector candRefs( handlePatTriggerEvent->triggerMatchCandidates( objRef, labelMatcher, iEvent ) ); // 'const std::string labelMatcher' for ( CandidateBaseRefVector::const_iterator ic = candRefs.begin(); ic !=candRefs.end(); ++ic ) { const CandidateBaseRef candRef( *ic ); histos2D_[ "ptObjCand" ]->Fill( candRef->pt(), objRef->pt() ); // 'std::map< std::string, TH2D* > histos2D_' histos2D_[ "etaObjCand" ]->Fill( candRef->eta(), objRef->eta() ); histos2D_[ "phiObjCand" ]->Fill( candRef->phi(), objRef->phi() ); } } [...]
[...] #include "DataFormats/Common/interface/AssociativeIterator.h" [...] edm::Handle< TriggerObjectMatch > triggerMatch; iEvent.getByLabel( matchTag, triggerMatch ); // 'const edm::InputTag& matchTag' is the tag of the according PATTriggerMatcher // loop over matched candidates edm::AssociativeIterator< reco::CandidateBaseRef, TriggerObjectMatch > it( *triggerMatch, edm::EdmEventItemGetter< reco::CandidateBaseRef >( iEvent ) ), itEnd( it.end() ); while ( it != itEnd ) { const reco::CandidateBaseRef candRef( it->first ); const TriggerObjectRef objRef( it->second ); // escape for empty references if ( objRef.isNull() || ! objRef.isAvailable() ) { ++it; continue; } // fill histograms histos2D_[ "ptObjCand" ]->Fill( candRef->pt(), objRef->pt() ); // 'std::map< std::string, TH2D* > histos2D_' histos2D_[ "etaObjCand" ]->Fill( candRef->eta(), objRef->eta() ); histos2D_[ "phiObjCand" ]->Fill( candRef->phi(), objRef->phi() ); ++it; } [...]
TriggerObjectMatch
directly, a check for empty references is always needed due to properties the PhysObjectMatcher module.clone()
).
saveTags
configuration parameter in the HLT menu: pathLastFilterAccepted
flag have also an (optional) argument to use the new pathL3FilterAccepted
flag,Refs
in RefVector
initialisation in pat::TriggerEvent
pat::TriggerCondition
to hold L1 conditions as applied on trigger boards;
PATTriggerProducer
as InputTags;
pat::TriggerEvent
;
pat::TriggerObjectStandAlone
pat::PATObject'
;
pat::TriggerAlgorithm
;
"label[:instance[:process]]"
;
false
to true
;switchOnTriggerMatchEmbedding
Python tool, incl. all standard jet collections;
trigger::TriggerEvent
has been produced, than the latest trigger::TriggerEvent
present in the event; this is checked every run now, not every event anymore;
pat::TriggerPath
.
pat::TriggerEvent::techAlgorithms()
;
pat::helper::TriggerMatchHelper
;
Reviewer/Editor and Date | Comments |
---|---|
Volker Adler - 03-Apr-2009 | created page |
Volker Adler - 04-Jul-2010 | latest announced![]() |
Volker Adler - 19-Jul-2010 | additional Global Trigger status bits form conditionsInEdm |
Volker Adler - 27-Sep-2010 | added version control and updated to status of PAT trigger tutorial Sep. 2010 |
Volker Adler - 30-Sep-2010 | new PAT trigger Python tools (announced![]() |
Volker Adler - 01-Dec-2010 | wild-cards for HLT process name and other updates (announced![]() |
Volker Adler - 20-Dec-2010 | bachward incompatible cut string parser usage in trigger matching and wild-cards in pat::TriggerObjectStandAlone (announced![]() |
Volker Adler - 23-Feb-2011 | establish links between L1 (physics) algorithms and objects, incl. the new data format pat::TriggerCondition (announced![]() |
Volker Adler - 13-Apr-2011 | final (belated) version for the Apr. 2011 PAT tutorial![]() |
Volker Adler - 28-May-2011 | utilising new saveTags parameter of HLT modules to identify L3 filters,incl. some bachward incompatible changes of defaults in optional parameters of access functions (announced ![]() |
I | Attachment | History | Action | Size | Date | Who | Comment |
---|---|---|---|---|---|---|---|
![]() |
compareEta.png | r1 | manage | 11.8 K | 2009-04-07 - 14:23 | VolkerAdler | |
![]() |
comparePhi.png | r1 | manage | 10.3 K | 2009-04-07 - 14:23 | VolkerAdler | |
![]() |
comparePt.png | r1 | manage | 10.9 K | 2009-04-07 - 14:23 | VolkerAdler |