Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
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
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 29 deletions.
2 changes: 1 addition & 1 deletion [refs]
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
47 changes: 24 additions & 23 deletions trunk/EventFilter/Cosmics/interface/HLTMuonPointingFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -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]>
*
*/
Expand All @@ -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

14 changes: 9 additions & 5 deletions trunk/EventFilter/Cosmics/src/HLTMuonPointingFilter.cc
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]>
*/

Expand All @@ -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"
Expand All @@ -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");
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 18cb608

Please sign in to comment.