-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 74718 b: "refs/heads/CMSSW_7_1_X" c: d4aa8ae h: "refs/heads/CMSSW_7_1_X" v: v3
- Loading branch information
Marco Zanetti
committed
Oct 5, 2009
1 parent
9b6c880
commit 18cb608
Showing
3 changed files
with
34 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
--- | ||
refs/heads/gh-pages: 09c786f70121f131b3715aaf3464996502bbeb7e | ||
"refs/heads/CMSSW_7_1_X": ca7391601f7acd5815191f0047cf9e620cde2746 | ||
"refs/heads/CMSSW_7_1_X": d4aa8aecaf0b3374aa37a33991d54d223e9df430 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,8 @@ | |
* HLTFilter to select muons that points to a cylinder of configurable radius | ||
* and lenght. | ||
* | ||
* $Date: 2007/11/12 16:21:13 $ | ||
* $Revision: 1.1 $ | ||
* $Date: 2008/06/04 14:17:37 $ | ||
* $Revision: 1.2 $ | ||
* \author Stefano Lacaprara - INFN Legnaro <[email protected]> | ||
* | ||
*/ | ||
|
@@ -29,28 +29,29 @@ class Propagator; | |
|
||
class HLTMuonPointingFilter : public HLTFilter { | ||
|
||
public: | ||
|
||
/// Constructor | ||
HLTMuonPointingFilter(const edm::ParameterSet&) ; | ||
|
||
/// Destructor | ||
~HLTMuonPointingFilter() ; | ||
|
||
/* Operations */ | ||
virtual bool filter(edm::Event&, const edm::EventSetup&); | ||
|
||
private: | ||
std::string theSTAMuonLabel; // label of muons | ||
std::string thePropagatorName; // name of propagator to be used | ||
public: | ||
/// Constructor | ||
HLTMuonPointingFilter(const edm::ParameterSet&) ; | ||
/// Destructor | ||
~HLTMuonPointingFilter() ; | ||
/* Operations */ | ||
virtual bool filter(edm::Event&, const edm::EventSetup&); | ||
private: | ||
std::string theSTAMuonLabel; // label of muons | ||
std::string thePropagatorName; // name of propagator to be used | ||
double theRadius; // radius of cylinder | ||
double theMaxZ; // half lenght of cylinder | ||
|
||
Cylinder::CylinderPointer theCyl; | ||
Plane::PlanePointer thePosPlane,theNegPlane; | ||
|
||
mutable Propagator* thePropagator; | ||
|
||
double theMaxZ; // half lenght of cylinder | ||
|
||
Cylinder::CylinderPointer theCyl; | ||
Plane::PlanePointer thePosPlane,theNegPlane; | ||
|
||
mutable Propagator* thePropagator; | ||
unsigned long long m_cacheRecordId; | ||
|
||
}; | ||
#endif // Muon_HLTMuonPointingFilter_h | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/** \file | ||
* | ||
* $Date: 2008/06/04 14:17:38 $ | ||
* $Revision: 1.2 $ | ||
* $Date: 2008/06/11 08:19:14 $ | ||
* $Revision: 1.3 $ | ||
* \author Stefano Lacaprara - INFN Legnaro <[email protected]> | ||
*/ | ||
|
||
|
@@ -12,6 +12,7 @@ | |
#include "FWCore/Framework/interface/MakerMacros.h" | ||
#include "FWCore/Framework/interface/Frameworkfwd.h" | ||
#include "FWCore/Framework/interface/ESHandle.h" | ||
#include "FWCore/Framework/interface/EventSetupRecord.h" | ||
#include "FWCore/MessageLogger/interface/MessageLogger.h" | ||
|
||
#include "DataFormats/TrackReco/interface/Track.h" | ||
|
@@ -33,7 +34,7 @@ using namespace edm; | |
/* ====================================================================== */ | ||
|
||
/// Constructor | ||
HLTMuonPointingFilter::HLTMuonPointingFilter(const edm::ParameterSet& pset) { | ||
HLTMuonPointingFilter::HLTMuonPointingFilter(const edm::ParameterSet& pset): m_cacheRecordId(0) { | ||
|
||
// the name of the STA rec hits collection | ||
theSTAMuonLabel = pset.getParameter<string>("SALabel"); | ||
|
@@ -68,11 +69,14 @@ HLTMuonPointingFilter::~HLTMuonPointingFilter() { | |
/* Operations */ | ||
bool HLTMuonPointingFilter::filter(edm::Event& event, const edm::EventSetup& eventSetup) { | ||
bool accept = false; | ||
if (!thePropagator){ | ||
|
||
const TrackingComponentsRecord & tkRec = eventSetup.get<TrackingComponentsRecord>(); | ||
if (not thePropagator or tkRec.cacheIdentifier() != m_cacheRecordId) { | ||
ESHandle<Propagator> prop; | ||
eventSetup.get<TrackingComponentsRecord>().get(thePropagatorName, prop); | ||
tkRec.get(thePropagatorName, prop); | ||
thePropagator = prop->clone(); | ||
thePropagator->setPropagationDirection(anyDirection); | ||
m_cacheRecordId = tkRec.cacheIdentifier(); | ||
} | ||
|
||
ESHandle<MagneticField> theMGField; | ||
|