Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46391
b: "refs/heads/CMSSW_7_1_X"
c: 47960c7
h: "refs/heads/CMSSW_7_1_X"
i:
  46389: fb12f6c
  46387: 6c9f0b1
  46383: f3898c0
v: v3
  • Loading branch information
Michail Bachtis committed Jun 23, 2008
1 parent 27e2f93 commit 7983f8e
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 23 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: ac155dadd83efa75cad55c0508a57a2b9dd3d66c
"refs/heads/CMSSW_7_1_X": e11e5a068c3b41239ba2a594193edf9f7478407a
"refs/heads/CMSSW_7_1_X": 47960c7b2a2714b726c89a8eb8a2a0444e2569c2
6 changes: 4 additions & 2 deletions trunk/HLTriggerOffline/Tau/interface/L2TauValidation.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ class L2TauValidation : public edm::EDAnalyzer {

//Parameters to read
edm::InputTag l2TauInfoAssoc_; //Path to analyze
edm::InputTag l2Isolated_; //Path to analyze

edm::InputTag mcColl_; // input products from HLTMcInfo
edm::InputTag l1taus_; //Handle to L1 Seed
edm::InputTag met_; //Handle to missing Et
Expand All @@ -68,7 +70,7 @@ class L2TauValidation : public edm::EDAnalyzer {
//Output file
std::string outFile_;

std::vector<double> cuts_;
// std::vector<double> cuts_;

//Monitor elements main
MonitorElement* jetEt;
Expand All @@ -86,7 +88,7 @@ class L2TauValidation : public edm::EDAnalyzer {
MonitorElement* EtEff;
MonitorElement* MET;


bool matchJet(const reco::Jet&,const reco::CaloJetCollection&);//See if this Jet Is Matched
bool match(const reco::Jet&,const LVColl&);//See if this Jet Is Matched
bool matchL1(const reco::Jet&,std::vector<l1extra::L1JetParticleRef>&);//See if this Jet Is Matched to L1
};
Expand Down
17 changes: 8 additions & 9 deletions trunk/HLTriggerOffline/Tau/src/L25TauValidation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ L25TauValidation::L25TauValidation(const edm::ParameterSet& iConfig){
jetTagSrc_ = iConfig.getParameter<edm::InputTag>("JetTagProd");
jetMCTagSrc_ = iConfig.getParameter<edm::InputTag>("JetMCTagProd");
caloJets_ = iConfig.getParameter<edm::InputTag>("l2CaloJets");
rSig_ = iConfig.getParameter<double>("SignalCone");
rMatch_ = iConfig.getParameter<double>("MatchingCone");
rIso_ = iConfig.getParameter<double>("IsolationCone");
ptLeadTk_ = iConfig.getParameter<double>("MinimumTransverseMomentumLeadingTrack");
minPtIsoRing_ = iConfig.getParameter<double>("MinimumTransverseMomentumInIsolationRing");
nTracksInIsolationRing_ = iConfig.getParameter<int>("MaximumNumberOfTracksIsolationRing");
//rSig_ = iConfig.getParameter<double>("SignalCone");
//rMatch_ = iConfig.getParameter<double>("MatchingCone");
//rIso_ = iConfig.getParameter<double>("IsolationCone");
// ptLeadTk_ = iConfig.getParameter<double>("MinimumTransverseMomentumLeadingTrack");
//minPtIsoRing_ = iConfig.getParameter<double>("MinimumTransverseMomentumInIsolationRing");
//nTracksInIsolationRing_ = iConfig.getParameter<int>("MaximumNumberOfTracksIsolationRing");
mcMatch_ = iConfig.getParameter<double>("MCMatching");
signal_ = iConfig.getParameter<bool>("Signal");
triggerTag_ = iConfig.getParameter<std::string>("TriggerTag");
Expand Down Expand Up @@ -96,14 +96,13 @@ L25TauValidation::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetu
nPxlTrksInL25Jet->Fill(tauTagInfo.allTracks().size());
nQPxlTrksInL25Jet->Fill(tauTagInfo.selectedTracks().size());

const TrackRef leadTrk = tauTagInfo.leadingSignalTrack(rMatch_, ptLeadTk_);
const TrackRef leadTrk = tauTagInfo.leadingSignalTrack();
if(!leadTrk) std::cout << "No leading track found " << std::endl;
else{

signalLeadTrkPt->Fill(leadTrk->pt());

if(tauTagInfo.discriminator(rMatch_, rSig_, rIso_, ptLeadTk_, minPtIsoRing_,
nTracksInIsolationRing_)==1){
if(tauTagInfo.discriminator()==1){
l25IsoJetEta->Fill(theJet.Eta());
l25IsoJetPt->Fill(theJet.Pt());
l25IsoJetPhi->Fill(theJet.Phi());
Expand Down
45 changes: 34 additions & 11 deletions trunk/HLTriggerOffline/Tau/src/L2TauValidation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ L2TauValidation::L2TauValidation(const edm::ParameterSet& iConfig):
matchDeltaRMC_(iConfig.getParameter<double>("MatchDeltaRMC")),
matchDeltaRL1_(iConfig.getParameter<double>("MatchDeltaRL1")),
triggerTag_((iConfig.getParameter<std::string>("TriggerTag"))),
outFile_(iConfig.getParameter<std::string>("OutputFileName")),
cuts_(iConfig.getParameter<std::vector <double> >("Cuts"))
outFile_(iConfig.getParameter<std::string>("OutputFileName"))
// cuts_(iConfig.getParameter<std::vector <double> >("Cuts"))

{

DQMStore* store = &*edm::Service<DQMStore>();
Expand Down Expand Up @@ -61,6 +61,7 @@ L2TauValidation::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup
Handle<L2TauInfoAssociation> l2TauInfoAssoc; //Handle to the input (L2 Tau Info Association)
Handle<LVColl> McInfo; //Handle To The Truth!!!!
Handle<trigger::TriggerFilterObjectWithRefs> l1TriggeredTaus; //Handle to the L1
Handle<reco::CaloJetCollection> l2Isolated;


std::vector<l1extra::L1JetParticleRef> tauCandRefVec;
Expand Down Expand Up @@ -106,15 +107,13 @@ L2TauValidation::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup
jetPhi->Fill(jet.phi());

EtEffDenom->Fill(jet.et());
if(cuts_[0] >= l2info.ECALIsolConeCut)
if(cuts_[1] >= l2info.TowerIsolConeCut)
if(cuts_[2] <= l2info.SeedTowerEt)
if(cuts_[3] >= l2info.ECALClusterNClusters)
if(cuts_[4] >= l2info.ECALClusterEtaRMS)
if(cuts_[5] >= l2info.ECALClusterPhiRMS)
if(cuts_[6] >= l2info.ECALClusterDRRMS)
EtEffNum->Fill(jet.et());

if(iEvent.getByLabel(l2Isolated_,l2Isolated))
{
if(matchJet(jet,*l2Isolated))
EtEffNum->Fill(jet.et());

}



Expand Down Expand Up @@ -210,5 +209,29 @@ L2TauValidation::matchL1(const reco::Jet& jet,std::vector<l1extra::L1JetParticle
return match;
}

bool
L2TauValidation::matchJet(const reco::Jet& jet,const reco::CaloJetCollection& McInfo)
{

//Loop On the Collection and see if your tau jet is matched to one there
//Also find the nearest Matched MC Particle to your Jet (to be complete)

bool matched=false;

if(McInfo.size()>0)
for(reco::CaloJetCollection::const_iterator it = McInfo.begin();it!=McInfo.end();++it)
{
double delta = ROOT::Math::VectorUtil::DeltaR(jet.p4().Vect(),it->p4().Vect());
if(delta<matchDeltaRMC_)
{
matched=true;

}
}



return matched;
}


0 comments on commit 7983f8e

Please sign in to comment.