4 |
|
#include "TH1F.h" |
5 |
|
#include "TAxis.h" |
6 |
|
#include "TGraphErrors.h" |
7 |
+ |
#include "UserCode/L1RpcTriggerAnalysis/interface/EventObj.h" |
8 |
|
#include "UserCode/L1RpcTriggerAnalysis/interface/MuonObj.h" |
9 |
|
#include "UserCode/L1RpcTriggerAnalysis/interface/L1Obj.h" |
10 |
|
#include "UserCode/L1RpcTriggerAnalysis/interface/L1ObjColl.h" |
23 |
|
hEmu_L1Rpc= new TH1D( "hEmu_L1Rpc", "hEmu_L1Rpc", 64, -1.6, 1.6); histos.Add( hEmu_L1Rpc); |
24 |
|
} |
25 |
|
|
26 |
< |
void AnaEmu::run( const MuonObj* muon, |
26 |
> |
void AnaEmu::run( const EventObj* event, const MuonObj* muon, |
27 |
|
const L1ObjColl *l1RpcCollEmu, |
28 |
|
const L1ObjColl *l1RpcColl) |
29 |
|
{ |
30 |
|
if( muon->pt() < 10.) return; |
31 |
|
hEmu_Muon->Fill(muon->eta()); |
32 |
|
std::vector<L1Obj> l1Rpcs = l1RpcColl->getL1ObjsSelected(); |
33 |
+ |
//std::vector<L1Obj> l1RpcsEmu = l1RpcCollEmu->getL1ObjsMatched(); |
34 |
|
std::vector<L1Obj> l1RpcsEmu = l1RpcCollEmu->getL1ObjsMatched(); |
35 |
|
/* |
36 |
|
if (l1RpcsEmu.size()!=0 && l1Rpcs.size()==0 && muon->eta()>-0.25 && muon->eta() < -0.2) { |
37 |
|
std::cout<<"--------------"<<std::endl; |
38 |
|
debug = true; |
39 |
|
std::cout <<"MUON: pt="<<muon->pt()<<" eta="<<muon->eta()<<std::endl; |
40 |
< |
std::cout <<" NO EMU TRIGGER (matched)" << std::endl; |
40 |
> |
std::cout <<" HAS EMU, NO TRIGGER matched" << std::endl; |
41 |
|
} |
42 |
|
*/ |
43 |
|
if (l1Rpcs.size() > 0) hEmu_L1Rpc->Fill(muon->eta()); |
44 |
|
if (l1RpcsEmu.size() > 0) hEmu_Wide->Fill(muon->eta()); |
45 |
< |
if (l1Rpcs.size() > 0 && l1RpcsEmu.size()==0) std::cout <<"has no Emu but Rpc"<<std::endl; |
45 |
> |
if (l1Rpcs.size() > 0 && l1RpcsEmu.size()==0) { |
46 |
> |
std::cout <<"has no Emu but Rpc, run="<<event->run<<" lumi="<<event->lumi<<std::endl; |
47 |
> |
// debug = true; |
48 |
> |
} |
49 |
> |
if (debug) std::cout <<"MUON: pt="<<muon->pt()<<" eta="<<muon->eta()<<std::endl; |
50 |
|
if (debug) {std::cout <<" L1 EMU: "<<std::endl; l1RpcCollEmu->print();} |
51 |
|
if (debug) {std::cout <<" L1 RPC: "<<std::endl; l1RpcColl->print();} |
52 |
|
} |