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

Comparing UserCode/HbbAnalysis/src/HistosElecsBase.cc (file contents):
Revision 1.1 by amagnan, Fri Oct 2 11:05:53 2009 UTC vs.
Revision 1.5 by amagnan, Fri Mar 26 17:03:58 2010 UTC

# Line 13 | Line 13 | namespace HbbAnalysis {//namespace
13      doGenMatched_ = aDoGenMatched;
14      CreateHistos(aName,aDir);
15  
16 +    p_pTVeryLoose =  aDir.make<TH1F>("p_pTVeryLoose",";p_{T}^{VeryLoose};N_{entries}",200,0,200);
17 +    p_etaVeryLoose =  aDir.make<TH1F>("p_etaVeryLoose",";|#eta^{VeryLoose}|;N_{entries}",80,0,4);
18 +    p_pTLoose =  aDir.make<TH1F>("p_pTLoose",";p_{T}^{Loose};N_{entries}",200,0,200);
19 +    p_etaLoose =  aDir.make<TH1F>("p_etaLoose",";|#eta^{Loose}|;N_{entries}",80,0,4);
20 +    p_pTMedium =  aDir.make<TH1F>("p_pTMedium",";p_{T}^{Medium};N_{entries}",200,0,200);
21 +    p_etaMedium =  aDir.make<TH1F>("p_etaMedium",";|#eta^{Medium}|;N_{entries}",80,0,4);
22 +    p_pTTight =  aDir.make<TH1F>("p_pTTight",";p_{T}^{Tight};N_{entries}",200,0,200);
23 +    p_etaTight =  aDir.make<TH1F>("p_etaTight",";|#eta^{Tight}|;N_{entries}",80,0,4);
24 +    p_pTSuperTight =  aDir.make<TH1F>("p_pTSuperTight",";p_{T}^{SuperTight};N_{entries}",200,0,200);
25 +    p_etaSuperTight =  aDir.make<TH1F>("p_etaSuperTight",";|#eta^{SuperTight}|;N_{entries}",80,0,4);
26 +
27 +    p_abseta =  aDir.make<TH1F>("p_abseta",";|#eta|;N_{entries}",80,0,4);
28 +
29 +    p_deltaRJet[0] = aDir.make<TH1F>("p_deltaRJetFlav0",";#Delta R;N_{entries}",100,0,5);
30 +    p_deltaRJet[1] = aDir.make<TH1F>("p_deltaRJetFlav1",";#Delta R;N_{entries}",100,0,5);
31 +    p_deltaRJet[2] = aDir.make<TH1F>("p_deltaRJetFlav2",";#Delta R;N_{entries}",100,0,5);
32 +    p_deltaRJet[3] = aDir.make<TH1F>("p_deltaRJetFlav3",";#Delta R;N_{entries}",100,0,5);
33 +
34      p_recoOverGen = aDir.make<TH1F>("p_recoOverGen",";p_{T}^{reco}/p_{T}^{gen};N_{entries}",300,0,3);
35  
36      for (unsigned int bin(0); bin<20; bin++){//loop on eta bins
# Line 30 | Line 48 | namespace HbbAnalysis {//namespace
48  
49      p_nElectrons = aDir.make<TH1F>("p_nElectrons",";N_{electrons};N_{entries}",10,0,10);
50  
51 <    p_electronID = aDir.make<TH1F>("p_electronID",";electronID;N_{entries}",8,0,8);
51 >    p_electronID = aDir.make<TH1F>("p_electronID",";electronID;N_{entries}",20,0,20);
52  
53      p_scSigmaEtaEta = aDir.make<TH1F>("p_scSigmaEtaEta",";#sigma_{#eta,#eta};N_{entries}",500,0,0.1);
54      p_scSigmaIEtaIEta = aDir.make<TH1F>("p_scSigmaIEtaIEta",";#sigma_{i#eta,i#eta};N_{entries}",500,0,0.1);
# Line 122 | Line 140 | namespace HbbAnalysis {//namespace
140      }
141    }
142  
143 +  void HistosElecsBase::FillHistograms(const HbbAnalysis::Electron & aElec, const std::vector<float> & dR)
144 +  {
145 +    bool lIsGenMatched = !doGenMatched_ || (doGenMatched_ && MatchesGenElectron(aElec));
146 +    if (lIsGenMatched) {//genMatched
147 +      for (unsigned int lFlav(0); lFlav<dR.size(); lFlav++){
148 +        p_deltaRJet[lFlav]->Fill(dR[lFlav]);
149 +      }
150 +    }
151 +  }
152 +
153    void HistosElecsBase::FillHistograms(const HbbAnalysis::Electron & aElec, bool isLead){//FillHistograms
154  
155      bool lIsGenMatched = !doGenMatched_ || (doGenMatched_ && MatchesGenElectron(aElec));
# Line 148 | Line 176 | namespace HbbAnalysis {//namespace
176  
177            p_recoOverGen_vsEta[binEta]->Fill(aElec.recoVars().pT/aElec.genVars().pT);
178            p_recoOverGen_vsPt[binpt]->Fill(aElec.recoVars().pT/aElec.genVars().pT);
179 +          p_recoOverGen->Fill(aElec.recoVars().pT/aElec.genVars().pT);
180          }
181      
182  
183          std::vector<std::pair<std::string,float> > lIds = aElec.idVars().electronIDs;
184          if (lIds.size() > 5) std::cout << "--- WARNING: histo will be out-of-range, number of electron IDs = " << lIds.size() << std::endl;
185          for (unsigned int iId(0); iId<lIds.size(); iId++){
186 <          const std::string & lName =  lIds.at(iId).first;
187 <          //std::cout << "--- ElectronID : Bin " << iId << ", id name = " << lName << std::endl;
188 <          p_electronID->Fill(2*iId+lIds.at(iId).second);
186 >          float lVal = lIds.at(iId).second;
187 >          //const std::string & lName =  lIds.at(iId).first;
188 >          //std::cout << "--- ElectronID : Bin " << iId << ", id name = " << lName << ", id val = " << lVal << std::endl;
189 >          //if (lIds.at(iId).second > 1) std::cout <<  "--- ElectronID : Bin " << iId << ", id name = " << lName << ", id val = " << lVal << std::endl;
190 >          //val = 0,1(id),2(iso),3(id+iso) in new ids
191 >          p_electronID->Fill(4*iId+lVal);
192 >
193 >          if (iId==0 && lVal>0.5) {
194 >            p_pTLoose->Fill(aElec.recoVars().pT);
195 >            p_etaLoose->Fill(fabs(aElec.recoVars().eta));
196 >          }
197 >          if (iId==1 && lVal>0.5) {
198 >            p_pTSuperTight->Fill(aElec.recoVars().pT);
199 >            p_etaSuperTight->Fill(fabs(aElec.recoVars().eta));
200 >          }
201 >          if (iId==2 && lVal>0.5) {
202 >            p_pTVeryLoose->Fill(aElec.recoVars().pT);
203 >            p_etaVeryLoose->Fill(fabs(aElec.recoVars().eta));
204 >          }
205 >          if (iId==3 && lVal>0.5) {
206 >            p_pTMedium->Fill(aElec.recoVars().pT);
207 >            p_etaMedium->Fill(fabs(aElec.recoVars().eta));
208 >          }
209 >          if (iId==4 && lVal>0.5) {
210 >            p_pTTight->Fill(aElec.recoVars().pT);
211 >            p_etaTight->Fill(fabs(aElec.recoVars().eta));
212 >          }
213 >
214 >
215          }
216      
217 +        p_abseta->Fill(fabs(aElec.recoVars().eta));
218 +
219          p_scSigmaEtaEta->Fill(aElec.scVars().sigmaEtaEta);
220          p_scSigmaIEtaIEta->Fill(aElec.scVars().sigmaIEtaIEta);
221          p_scE1x5->Fill(aElec.scVars().e1x5);
# Line 195 | Line 252 | namespace HbbAnalysis {//namespace
252          p_combIso->Fill(lIsoVar[4]);
253          p_combIsoOverEt->Fill(lIsoVar[5]);
254  
255 <        double lIsoCut[6] = {1.,0.1,4.,0.1,5.,0.2};
255 >        double lIsoCut[6] = {2.4,0.05,2.4,0.09,3.,0.1};
256  
257          for (unsigned int i(0); i<6; i++){//loop on iso variables
258  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines