Skip to content

Commit

Permalink
Merge pull request cms-sw#1240 from fwyzard/make_HLTFilters_global_mo…
Browse files Browse the repository at this point in the history
…dules
  • Loading branch information
fwyzard committed Nov 3, 2013
2 parents 2b13d17 + 5ab8caf commit 728a18b
Show file tree
Hide file tree
Showing 196 changed files with 1,676 additions and 1,744 deletions.
16 changes: 8 additions & 8 deletions CaloOnlineTools/EcalTools/plugins/EcalFEDErrorFilter.cc
Expand Up @@ -2,7 +2,7 @@
//
// Package: EcalFEDErrorFilter
// Class: EcalFEDErrorFilter
//
//
/**\class EcalFEDErrorFilter EcalFEDErrorFilter.cc filter/EcalFEDErrorFilter/src/EcalFEDErrorFilter.cc
Description: <one line class summary>
Expand All @@ -29,15 +29,15 @@ EcalFEDErrorFilter::EcalFEDErrorFilter(const edm::ParameterSet& iConfig) :

DataLabel_ = iConfig.getParameter<edm::InputTag>("InputLabel");
fedUnpackList_ = iConfig.getUntrackedParameter< std::vector<int> >("FEDs", std::vector<int>());
if (fedUnpackList_.empty())
if (fedUnpackList_.empty())
for (int i=FEDNumbering::MINECALFEDID; i<=FEDNumbering::MAXECALFEDID; i++)
fedUnpackList_.push_back(i);
}


EcalFEDErrorFilter::~EcalFEDErrorFilter()
{

// do anything here that needs to be done at desctruction time
// (e.g. close files, deallocate resources etc.)

Expand All @@ -54,34 +54,34 @@ EcalFEDErrorFilter::hltFilter(edm::Event& iEvent, const edm::EventSetup& iSetup,
{
using namespace edm;

edm::Handle<FEDRawDataCollection> rawdata;
edm::Handle<FEDRawDataCollection> rawdata;
iEvent.getByLabel(DataLabel_,rawdata);

// get fed raw data and SM id

// loop over FEDS
for (std::vector<int>::const_iterator i=fedUnpackList_.begin(); i!=fedUnpackList_.end(); i++)
for (std::vector<int>::const_iterator i=fedUnpackList_.begin(); i!=fedUnpackList_.end(); i++)
{

// get fed raw data and SM id
const FEDRawData & fedData = rawdata->FEDData(*i);
int length = fedData.size()/sizeof(uint64_t);

// LogDebug("EcalRawToDigi") << "raw data length: " << length ;
//if data size is not null interpret data
if ( length >= 1 )
{
uint64_t * pData = (uint64_t *)(fedData.data());
//When crc error is found return true
uint64_t * fedTrailer = pData + (length - 1);
bool crcError = (*fedTrailer >> 2 ) & 0x1;
bool crcError = (*fedTrailer >> 2 ) & 0x1;
if (crcError)
{
std::cout << "CRCERROR in FED " << *i << " trailer is " << std::setw(8) << std::hex << (*fedTrailer) << std::endl;
return true;
}
}
}

return false;
}
12 changes: 6 additions & 6 deletions CaloOnlineTools/EcalTools/plugins/EcalFEDErrorFilter.h
Expand Up @@ -2,7 +2,7 @@
//
// Package: EcalFEDErrorFilter
// Class: EcalFEDErrorFilter
//
//
/**\class EcalFEDErrorFilter EcalFEDErrorFilter.cc filter/EcalFEDErrorFilter/src/EcalFEDErrorFilter.cc
Description: <one line class summary>
Expand Down Expand Up @@ -46,13 +46,13 @@ class EcalFEDErrorFilter : public HLTFilter {
public:
explicit EcalFEDErrorFilter(const edm::ParameterSet&);
~EcalFEDErrorFilter();

private:
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct);
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct) override;

// ----------member data ---------------------------

edm::InputTag DataLabel_;
std::vector<int> fedUnpackList_;

};
8 changes: 4 additions & 4 deletions DPGAnalysis/Skims/interface/HLTMuonPtFilter.h
Expand Up @@ -34,12 +34,12 @@ class HLTMuonPtFilter : public HLTFilter {
/// Destructorquer
~HLTMuonPtFilter() ;

/* Operations */
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct);
/* Operations */
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct) override;

private:
std::string theSTAMuonLabel; // label of muons
double theMinPt; // minimum pt required
std::string theSTAMuonLabel; // label of muons
double theMinPt; // minimum pt required


};
Expand Down
8 changes: 4 additions & 4 deletions DPGAnalysis/Skims/src/HLTMuonPtFilter.cc
Expand Up @@ -32,22 +32,22 @@ HLTMuonPtFilter::HLTMuonPtFilter(const edm::ParameterSet& pset) :

theMinPt = pset.getParameter<double>("minPt"); // pt min (GeV)

LogDebug("HLTMuonPt") << " SALabel : " << theSTAMuonLabel
LogDebug("HLTMuonPt") << " SALabel : " << theSTAMuonLabel
<< " Min Pt : " << theMinPt;
}

/// Destructor
HLTMuonPtFilter::~HLTMuonPtFilter() {
}

/* Operations */
/* Operations */
bool HLTMuonPtFilter::hltFilter(edm::Event& event, const edm::EventSetup& eventSetup, trigger::TriggerFilterObjectWithRefs & filterproduct) {
// Get the RecTrack collection from the event
Handle<reco::TrackCollection> staTracks;
event.getByLabel(theSTAMuonLabel, staTracks);

reco::TrackCollection::const_iterator staTrack;

for (staTrack = staTracks->begin(); staTrack != staTracks->end(); ++staTrack) {
if (staTrack->pt()>theMinPt)
return true;
Expand Down
2 changes: 1 addition & 1 deletion DQM/DTMonitorModule/src/DTDataErrorFilter.cc
Expand Up @@ -20,7 +20,7 @@ DTDataErrorFilter::~DTDataErrorFilter(){}


bool DTDataErrorFilter::hltFilter(edm::Event& event, const edm::EventSetup& setup, trigger::TriggerFilterObjectWithRefs & filterproduct) {
// check the event error flag
// check the event error flag
if (dataMonitor->eventHasErrors()) return true;
return false;
}
6 changes: 3 additions & 3 deletions DQM/DTMonitorModule/src/DTDataErrorFilter.h
Expand Up @@ -21,14 +21,14 @@ class DTDataErrorFilter : public HLTFilter {
virtual ~DTDataErrorFilter();

// Operations
virtual bool hltFilter(edm::Event& event, const edm::EventSetup& setup, trigger::TriggerFilterObjectWithRefs & filterproduct);
virtual bool hltFilter(edm::Event& event, const edm::EventSetup& setup, trigger::TriggerFilterObjectWithRefs & filterproduct) override;

protected:

private:
DTDataIntegrityTask * dataMonitor;


};
#endif

11 changes: 6 additions & 5 deletions DQM/DTMonitorModule/src/DTROMonitorFilter.cc
Expand Up @@ -29,9 +29,10 @@ DTROMonitorFilter::~DTROMonitorFilter(){}


bool DTROMonitorFilter::hltFilter(edm::Event& event, const edm::EventSetup& setup, trigger::TriggerFilterObjectWithRefs & filterproduct) {

// get the raw data
edm::Handle<FEDRawDataCollection> rawdata;
event.getByLabel(inputLabel, rawdata);


// Loop over the DT FEDs
int FEDIDmin = FEDNumbering::MINDTFEDID;
Expand All @@ -43,23 +44,23 @@ bool DTROMonitorFilter::hltFilter(edm::Event& event, const edm::EventSetup& setu

for (int dduID=FEDIDmin; dduID<=FEDIDMax; ++dduID) { // loop over all feds
const FEDRawData& feddata = rawdata->FEDData(dduID);
const int datasize = feddata.size();
const int datasize = feddata.size();
if (datasize){ // check the FED payload
const unsigned int* index32 = reinterpret_cast<const unsigned int*>(feddata.data());
const int numberOf32Words = datasize/wordSize_32;

const unsigned char* index8 = reinterpret_cast<const unsigned char*>(index32);

// Check Status Words (1 x ROS)
for (int rosId = 0; rosId < 12; rosId++ ) {
int wordIndex8 = numberOf32Words*wordSize_32 - 3*wordSize_64 + rosId;
int wordIndex8 = numberOf32Words*wordSize_32 - 3*wordSize_64 + rosId;
DTDDUFirstStatusWord statusWord(index8[wordIndex8]);
// check the error bit
if(statusWord.errorFromROS() != 0) return true;
}
}
}

// check the event error flag
// check the event error flag
return false;
}
7 changes: 2 additions & 5 deletions DQM/DTMonitorModule/src/DTROMonitorFilter.h
Expand Up @@ -21,14 +21,11 @@ class DTROMonitorFilter : public HLTFilter {
virtual ~DTROMonitorFilter();

// Operations
virtual bool hltFilter(edm::Event& event, const edm::EventSetup& setup, trigger::TriggerFilterObjectWithRefs & filterproduct);
virtual bool hltFilter(edm::Event& event, const edm::EventSetup& setup, trigger::TriggerFilterObjectWithRefs & filterproduct) override;

protected:

private:
// Get the data integrity service
edm::Handle<FEDRawDataCollection> rawdata;

/// if not you need the label
edm::InputTag inputLabel;

Expand Down
8 changes: 4 additions & 4 deletions HLTrigger/Egamma/interface/HLTDisplacedEgammaFilter.h
Expand Up @@ -26,21 +26,21 @@ class HLTDisplacedEgammaFilter : public HLTFilter {
explicit HLTDisplacedEgammaFilter(const edm::ParameterSet&);
~HLTDisplacedEgammaFilter();
static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct);
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct) override;

private:
edm::InputTag inputTag_; // input tag identifying product contains egammas
edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> inputToken_;
int ncandcut_; // number of egammas required
bool relaxed_;
edm::InputTag L1IsoCollTag_;
edm::InputTag L1NonIsoCollTag_;
edm::InputTag L1IsoCollTag_;
edm::InputTag L1NonIsoCollTag_;
edm::InputTag rechitsEB ;
edm::InputTag rechitsEE ;
edm::EDGetTokenT<EcalRecHitCollection> rechitsEBToken_;
edm::EDGetTokenT<EcalRecHitCollection> rechitsEEToken_;

bool EBOnly ;
bool EBOnly ;
double sMin_min ;
double sMin_max ;
double sMaj_min ;
Expand Down
6 changes: 3 additions & 3 deletions HLTrigger/Egamma/interface/HLTEgammaAllCombMassFilter.h
Expand Up @@ -20,10 +20,10 @@ class HLTEgammaAllCombMassFilter : public HLTFilter {
public:
explicit HLTEgammaAllCombMassFilter(const edm::ParameterSet&);
~HLTEgammaAllCombMassFilter();
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct);
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct) override;
static void getP4OfLegCands(const edm::Event& iEvent, const edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs>& filterToken, std::vector<math::XYZTLorentzVector>& p4s);
static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);

private:
edm::InputTag firstLegLastFilterTag_;
edm::InputTag secondLegLastFilterTag_;
Expand All @@ -32,6 +32,6 @@ class HLTEgammaAllCombMassFilter : public HLTFilter {
double minMass_;
};

#endif
#endif


62 changes: 31 additions & 31 deletions HLTrigger/Egamma/interface/HLTEgammaCaloIsolFilterPairs.h
Expand Up @@ -27,37 +27,37 @@ namespace edm {

class HLTEgammaCaloIsolFilterPairs : public HLTFilter {

public:
explicit HLTEgammaCaloIsolFilterPairs(const edm::ParameterSet&);
~HLTEgammaCaloIsolFilterPairs();
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct);
static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);

private:
edm::InputTag candTag_; // input tag identifying product contains filtered egammas
edm::InputTag isoTag_; // input tag identifying product contains ecal isolation map
edm::InputTag nonIsoTag_; // input tag identifying product contains ecal isolation map
edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> candToken_;
edm::EDGetTokenT<reco::RecoEcalCandidateIsolationMap> isoToken_;
edm::EDGetTokenT<reco::RecoEcalCandidateIsolationMap> nonIsoToken_;

double isolcut_EB1;
double FracCut_EB1;
double IsoloEt2_EB1;
double isolcut_EE1;
double FracCut_EE1;
double IsoloEt2_EE1;

double isolcut_EB2;
double FracCut_EB2;
double IsoloEt2_EB2;
double isolcut_EE2;
double FracCut_EE2;
double IsoloEt2_EE2;


bool AlsoNonIso_1,AlsoNonIso_2;
bool PassCaloIsolation(edm::Ref<reco::RecoEcalCandidateCollection> ref,const reco::RecoEcalCandidateIsolationMap& IsoMap,const reco::RecoEcalCandidateIsolationMap& NonIsoMap, int which, bool ChekAlsoNonIso);
public:
explicit HLTEgammaCaloIsolFilterPairs(const edm::ParameterSet&);
~HLTEgammaCaloIsolFilterPairs();
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct) override;
static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);

private:
edm::InputTag candTag_; // input tag identifying product contains filtered egammas
edm::InputTag isoTag_; // input tag identifying product contains ecal isolation map
edm::InputTag nonIsoTag_; // input tag identifying product contains ecal isolation map
edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> candToken_;
edm::EDGetTokenT<reco::RecoEcalCandidateIsolationMap> isoToken_;
edm::EDGetTokenT<reco::RecoEcalCandidateIsolationMap> nonIsoToken_;

double isolcut_EB1;
double FracCut_EB1;
double IsoloEt2_EB1;
double isolcut_EE1;
double FracCut_EE1;
double IsoloEt2_EE1;

double isolcut_EB2;
double FracCut_EB2;
double IsoloEt2_EB2;
double isolcut_EE2;
double FracCut_EE2;
double IsoloEt2_EE2;

bool AlsoNonIso_1, AlsoNonIso_2;

bool PassCaloIsolation(edm::Ref<reco::RecoEcalCandidateCollection> ref,const reco::RecoEcalCandidateIsolationMap& IsoMap,const reco::RecoEcalCandidateIsolationMap& NonIsoMap, int which, bool ChekAlsoNonIso) const;
};

#endif //HLTEgammaCaloIsolFilterPairs_h
Expand Down
6 changes: 3 additions & 3 deletions HLTrigger/Egamma/interface/HLTEgammaCombMassFilter.h
Expand Up @@ -21,10 +21,10 @@ class HLTEgammaCombMassFilter : public HLTFilter {
public:
explicit HLTEgammaCombMassFilter(const edm::ParameterSet&);
~HLTEgammaCombMassFilter();
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct);
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct) override;
static void getP4OfLegCands(const edm::Event& iEvent, const edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs>& filterToken, std::vector<math::XYZTLorentzVector>& p4s);
static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);

private:
edm::InputTag firstLegLastFilterTag_;
edm::InputTag secondLegLastFilterTag_;
Expand All @@ -33,6 +33,6 @@ class HLTEgammaCombMassFilter : public HLTFilter {
double minMass_;
};

#endif
#endif


8 changes: 4 additions & 4 deletions HLTrigger/Egamma/interface/HLTEgammaDoubleEtDeltaPhiFilter.h
Expand Up @@ -24,17 +24,17 @@ class HLTEgammaDoubleEtDeltaPhiFilter : public HLTFilter {
public:
explicit HLTEgammaDoubleEtDeltaPhiFilter(const edm::ParameterSet&);
~HLTEgammaDoubleEtDeltaPhiFilter();
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct);
virtual bool hltFilter(edm::Event&, const edm::EventSetup&, trigger::TriggerFilterObjectWithRefs & filterproduct) override;
static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);

private:
edm::InputTag inputTag_; // input tag identifying product contains filtered candidates
edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> inputToken_;
double etcut_; // Et threshold in GeV
double etcut_; // Et threshold in GeV
double minDeltaPhi_; // minimum deltaPhi
// int ncandcut_; // number of egammas required
// int ncandcut_; // number of egammas required
bool relaxed_;
edm::InputTag L1IsoCollTag_;
edm::InputTag L1IsoCollTag_;
edm::InputTag L1NonIsoCollTag_;
};

Expand Down

0 comments on commit 728a18b

Please sign in to comment.