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.3 by amagnan, Tue Feb 9 14:52:25 2010 UTC vs.
Revision 1.4 by amagnan, Fri Mar 26 15:26:10 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,-4,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,-4,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,-4,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,-4,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,-4,4);
26 +
27 +    p_deltaRJet[0] = aDir.make<TH1F>("p_deltaRJetFlav0",";#Delta R;N_{entries}",100,0,5);
28 +    p_deltaRJet[1] = aDir.make<TH1F>("p_deltaRJetFlav1",";#Delta R;N_{entries}",100,0,5);
29 +    p_deltaRJet[2] = aDir.make<TH1F>("p_deltaRJetFlav2",";#Delta R;N_{entries}",100,0,5);
30 +    p_deltaRJet[3] = aDir.make<TH1F>("p_deltaRJetFlav3",";#Delta R;N_{entries}",100,0,5);
31 +
32      p_recoOverGen = aDir.make<TH1F>("p_recoOverGen",";p_{T}^{reco}/p_{T}^{gen};N_{entries}",300,0,3);
33  
34      for (unsigned int bin(0); bin<20; bin++){//loop on eta bins
# Line 30 | Line 46 | namespace HbbAnalysis {//namespace
46  
47      p_nElectrons = aDir.make<TH1F>("p_nElectrons",";N_{electrons};N_{entries}",10,0,10);
48  
49 <    p_electronID = aDir.make<TH1F>("p_electronID",";electronID;N_{entries}",8,0,8);
49 >    p_electronID = aDir.make<TH1F>("p_electronID",";electronID;N_{entries}",20,0,20);
50  
51      p_scSigmaEtaEta = aDir.make<TH1F>("p_scSigmaEtaEta",";#sigma_{#eta,#eta};N_{entries}",500,0,0.1);
52      p_scSigmaIEtaIEta = aDir.make<TH1F>("p_scSigmaIEtaIEta",";#sigma_{i#eta,i#eta};N_{entries}",500,0,0.1);
# Line 122 | Line 138 | namespace HbbAnalysis {//namespace
138      }
139    }
140  
141 +  void HistosElecsBase::FillHistograms(const HbbAnalysis::Electron & aElec, const std::vector<float> & dR)
142 +  {
143 +    bool lIsGenMatched = !doGenMatched_ || (doGenMatched_ && MatchesGenElectron(aElec));
144 +    if (lIsGenMatched) {//genMatched
145 +      for (unsigned int lFlav(0); lFlav<dR.size(); lFlav++){
146 +        p_deltaRJet[lFlav]->Fill(dR[lFlav]);
147 +      }
148 +    }
149 +  }
150 +
151    void HistosElecsBase::FillHistograms(const HbbAnalysis::Electron & aElec, bool isLead){//FillHistograms
152  
153      bool lIsGenMatched = !doGenMatched_ || (doGenMatched_ && MatchesGenElectron(aElec));
# Line 155 | Line 181 | namespace HbbAnalysis {//namespace
181          std::vector<std::pair<std::string,float> > lIds = aElec.idVars().electronIDs;
182          if (lIds.size() > 5) std::cout << "--- WARNING: histo will be out-of-range, number of electron IDs = " << lIds.size() << std::endl;
183          for (unsigned int iId(0); iId<lIds.size(); iId++){
184 +          float lVal = lIds.at(iId).second;
185            //const std::string & lName =  lIds.at(iId).first;
186 <          //std::cout << "--- ElectronID : Bin " << iId << ", id name = " << lName << std::endl;
187 <          p_electronID->Fill(2*iId+lIds.at(iId).second);
186 >          //std::cout << "--- ElectronID : Bin " << iId << ", id name = " << lName << ", id val = " << lVal << std::endl;
187 >          //if (lIds.at(iId).second > 1) std::cout <<  "--- ElectronID : Bin " << iId << ", id name = " << lName << ", id val = " << lVal << std::endl;
188 >          //val = 0,1(id),2(iso),3(id+iso) in new ids
189 >          p_electronID->Fill(4*iId+lVal);
190 >
191 >          if (iId==0 && lVal>0.5) {
192 >            p_pTLoose->Fill(aElec.recoVars().pT);
193 >            p_etaLoose->Fill(aElec.recoVars().eta);
194 >          }
195 >          if (iId==1 && lVal>0.5) {
196 >            p_pTSuperTight->Fill(aElec.recoVars().pT);
197 >            p_etaSuperTight->Fill(aElec.recoVars().eta);
198 >          }
199 >          if (iId==2 && lVal>0.5) {
200 >            p_pTVeryLoose->Fill(aElec.recoVars().pT);
201 >            p_etaVeryLoose->Fill(aElec.recoVars().eta);
202 >          }
203 >          if (iId==3 && lVal>0.5) {
204 >            p_pTMedium->Fill(aElec.recoVars().pT);
205 >            p_etaMedium->Fill(aElec.recoVars().eta);
206 >          }
207 >          if (iId==4 && lVal>0.5) {
208 >            p_pTTight->Fill(aElec.recoVars().pT);
209 >            p_etaTight->Fill(aElec.recoVars().eta);
210 >          }
211 >
212 >
213          }
214      
215          p_scSigmaEtaEta->Fill(aElec.scVars().sigmaEtaEta);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines