ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/L1RpcTriggerAnalysis/src/AnaEff.cc
(Generate patch)

Comparing UserCode/L1RpcTriggerAnalysis/src/AnaEff.cc (file contents):
Revision 1.1 by konec, Mon Nov 28 18:39:48 2011 UTC vs.
Revision 1.3 by konec, Mon Oct 1 19:20:38 2012 UTC

# Line 14 | Line 14
14   #include <sstream>
15  
16   const double AnaEff::ptCuts[ AnaEff::nPtCuts] = { 0., 5., 10., 16., 30., 100.};
17 + std::string reg[5]={"_Bar","_Int","_End","_Qeq0","_Qgt0"};
18  
19  
20 < AnaEff::AnaEff(TObjArray& histos)
20 <  : debug(false)
20 > void AnaEff::init(TObjArray& histos)
21   {
22    hEfficMuPt_D = new TH1D("hEfficMuPt_D","hEfficMuPt_D", L1PtScale::nPtBins, L1PtScale::ptBins); histos.Add(hEfficMuPt_D);
23    hEfficRpcNoCut_N = new TH1D("hEfficRpcNoCut_N","hEfficRpcNoCut_N", L1PtScale::nPtBins, L1PtScale::ptBins);  histos.Add(hEfficRpcNoCut_N);
24    hEfficRpcPtCut_N = new TH1D("hEfficRpcPtCut_N","hEfficRpcPtCut_N", L1PtScale::nPtBins, L1PtScale::ptBins);  histos.Add(hEfficRpcPtCut_N);
25  
26    std::string  base("hEff");
27  std::string reg[3]={"_Bar","_Int","_End"};
27    std::string opt[2]={"_RpcPtCut","_OthPtCut"};
28 <  for (unsigned int ir=0; ir<3; ++ir) {
28 >  for (unsigned int ir=0; ir<5; ++ir) {
29      std::string name=base+"_PtDenom"+reg[ir];
30      TH1D *h= new TH1D(name.c_str(),name.c_str(), L1PtScale::nPtBins, L1PtScale::ptBins);
31      histos.Add(h); hm[name]=h;
32      for (unsigned int iopt=0; iopt<2; ++iopt) {
33 +    if (iopt >0 && ir >2) continue;
34      for (unsigned int icut=0; icut<AnaEff::nPtCuts; ++icut) {
35        std::stringstream str;
36        str << base << opt[iopt] << ptCuts[icut]<<reg[ir];
# Line 81 | Line 81 | void AnaEff::run( const MuonObj *muon, c
81    if (etaMu < 0.83) iregion = 0;
82    else if (etaMu < 1.24) iregion = 1;
83    else iregion = 2;
84 <  std::string reg[3]={"_Bar","_Int","_End"};
84 > //  std::string reg[3]={"_Bar","_Int","_End"};
85  
86    hm["hEff_PtDenom"+reg[iregion]]->Fill(ptMu);
87    double epsilon=1.e-5;
# Line 102 | Line 102 | void AnaEff::run( const MuonObj *muon, c
102    }
103    
104  
105 + //
106 + // check performance for q=0 and q>0 in 0.7 < |eta| < 1.1
107 + //
108 +  if (etaMu > 0.7 && etaMu < 1.1) {
109 +    for (unsigned int ir=3; ir <=4; ++ir) {
110 +      hm["hEff_PtDenom"+reg[ir]]->Fill(ptMu);
111 +      std::vector<L1Obj> l1RpcsQ;
112 +      if (ir==3) l1RpcsQ = l1RpcColl->getL1ObjsSelected(true, false,0.,161., 0,0, -1.6,1.6, 0.,7., 0,0);
113 +      if (ir==4) l1RpcsQ = l1RpcColl->getL1ObjsSelected(true, false,0.,161., 0,0, -1.6,1.6, 0.,7., 1,7);
114 +      double epsilon=1.e-5;
115 +      for (unsigned int icut=0; icut < AnaEff::nPtCuts; icut++) {
116 +        double threshold = AnaEff::ptCuts[icut];
117 +        if (maxPt(l1RpcsQ)+epsilon > threshold) {
118 +          std::stringstream strPt;  strPt  << "hEff_RpcPtCut"<<  ptCuts[icut]<<reg[ir];
119 +          hm[strPt.str()]->Fill(ptMu);
120 +        }
121 +      }
122 +    }
123 +  }
124  
125   }      
126  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines