ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/OSUT3Analysis/AnaTools/plugins/OSUAnalysis.h
(Generate patch)

Comparing UserCode/OSUT3Analysis/AnaTools/plugins/OSUAnalysis.h (file contents):
Revision 1.11 by lantonel, Sun Mar 3 17:14:18 2013 UTC vs.
Revision 1.18 by wulsin, Tue Mar 26 13:17:54 2013 UTC

# Line 6 | Line 6
6   #include <string>
7   #include <vector>
8  
9 + #include <fstream>
10 + #include <iostream>
11 + #include <algorithm>
12   #include "TH1.h"
13   #include "TH2.h"
14   #include "TH1D.h"
# Line 42 | Line 45
45  
46   #include "OSUT3Analysis/AnaTools/interface/CutFlow.h"
47   #include "OSUT3Analysis/AnaTools/interface/PUWeight.h"
48 + #include "OSUT3Analysis/AnaTools/interface/SFWeight.h"
49  
50  
51  
# Line 75 | Line 79 | class OSUAnalysis : public edm::EDAnalyz
79        double valueLookup (const BNbxlumi* object, string variable, string function = "");
80        double valueLookup (const BNphoton* object, string variable, string function = "");
81        double valueLookup (const BNsupercluster* object, string variable, string function = "");
82 +
83 +      int getTrkIsIso (const BNtrack* track1, const BNtrackCollection* trackColl);
84 +      double getTrkPtTrue (const BNtrack* track1, const BNmcparticleCollection* genPartColl);
85 +      double getTrkPtRes (const BNtrack* track1);
86 +      double getTrkIsIso (const BNtrack* track1);
87 +      void WriteDeadEcal ();
88 +      int getTrkIsMatchedDeadEcal (const BNtrack* track1);
89 +
90        //BNskimbits
91        //BNtrigobj
92  
# Line 89 | Line 101 | class OSUAnalysis : public edm::EDAnalyz
101        //inner vector corresponds to each object in input collection
102        //bool         tells if object passes or fails cuts
103        typedef map<string, vector < vector<bool> > > flagMap;
104 <      
104 >
105        //counterMap:
106        //string holds input collection type
107        //vector corresponds to each cut
# Line 112 | Line 124 | class OSUAnalysis : public edm::EDAnalyz
124        edm::InputTag superclusters_;
125        edm::InputTag triggers_;
126        std::string puFile_;
127 +      std::string deadEcalFile_;
128 +      std::string muonSFFile_;
129        std::string dataPU_;
130 +      std::string electronSFID_;
131 +      std::string muonSF_;
132        std::string dataset_;
133        std::string datasetType_;
134        vector<edm::ParameterSet> channels_;
135        vector<edm::ParameterSet> histogramSets_;
136        bool plotAllObjectsInPassingEvents_;
137 +      bool doPileupReweighting_;
138 +      bool printEventInfo_;  
139 +
140 +      struct DeadEcal {
141 +        double etaEcal;
142 +        double phiEcal;
143 +      };
144 +
145 +      std::vector<DeadEcal> DeadEcalVec;
146  
147 +
148 +      //Collections
149        edm::Handle<BNtriggerCollection> triggers;
150        edm::Handle<BNjetCollection> jets;
151        edm::Handle<BNmuonCollection> muons;
# Line 134 | Line 161 | class OSUAnalysis : public edm::EDAnalyz
161        edm::Handle<BNphotonCollection> photons;
162        edm::Handle<BNsuperclusterCollection> superclusters;
163  
164 <      const BNprimaryvertex *chosenPrimaryVertex;
138 <
164 >      flagMap cumulativeFlags;
165  
166        vector<map<string, TH1D*> > oneDHists_;
167        vector<map<string, TH2D*> > twoDHists_;
# Line 146 | Line 172 | class OSUAnalysis : public edm::EDAnalyz
172        vector<CutFlow *> cutFlows_;
173  
174        typedef struct {
175 <        string name;
176 <        string title;
177 <        vector<double> bins;
178 <        string inputCollection;
179 <        vector<string> inputVariables;
175 >        string name;
176 >        string title;
177 >        vector<double> bins;
178 >        string inputCollection;
179 >        vector<string> inputVariables;
180        } histogram;
181  
182        struct cut {
183 <        string inputCollection;
184 <        vector<string> functions;
185 <        vector<string> variables;
186 <        vector<string> comparativeOperators;// >, <, =, etc.
187 <        vector<double> cutValues;
188 <        vector<string> logicalOperators;//and, or
189 <        int numSubcuts;
190 <        int    numberRequired;
191 <        string eventComparativeOperator;
192 <        string name;
183 >        string inputCollection;
184 >        vector<string> functions;
185 >        vector<string> variables;
186 >        vector<string> comparativeOperators;// >, <, =, etc.
187 >        vector<double> cutValues;
188 >        vector<string> logicalOperators;//and, or
189 >        int numSubcuts;
190 >        int    numberRequired;
191 >        string eventComparativeOperator;
192 >        string name;
193        };
194  
195        struct channel {
196 <        string name;
197 <        vector<string> triggers;
198 <        vector<cut> cuts;
196 >        string name;
197 >        vector<string> triggers;
198 >        vector<cut> cuts;
199        };
200  
201 +      vector<string>  objectsToGet;
202 +      vector<string>  objectsToCut;
203        vector<string>  objectsToPlot;
176      vector<string>  allNecessaryObjects;
204        vector<channel> channels;
205        vector<histogram> histograms;
206  
207        PUWeight *puWeight_;
208 +      MuonSFWeight *muonSFWeight_;
209 +      ElectronSFWeight *electronSFWeight_;
210  
211        template <class InputCollection> void setObjectFlags(cut &, uint, flagMap &, flagMap &, InputCollection, string);
212 <      template <class InputCollection1, class InputCollection2> void setObjectFlags(cut &, uint, flagMap &, flagMap &, InputCollection1, InputCollection2, string);
212 >      template <class InputCollection1, class InputCollection2> void setObjectFlags(cut &, uint, flagMap &, flagMap &, InputCollection1, InputCollection2, vector<bool>, vector<bool>, string);
213 >
214        template <class InputCollection> void fill1DHistogram(TH1*, histogram, InputCollection, vector<bool>, double);
215        template <class InputCollection1, class InputCollection2> void fill1DHistogram(TH1*, histogram, InputCollection1, InputCollection2, vector<bool>, vector<bool>, vector<bool>, double);
216        template <class InputCollection> void fill2DHistogram(TH2*, histogram, InputCollection, vector<bool>, double);
# Line 190 | Line 220 | class OSUAnalysis : public edm::EDAnalyz
220        int getPdgIdBinValue(int);
221        int findTauMotherIndex(const BNmcparticle*);
222  
223 +      template <class InputObject> double getGenDeltaRLowest(InputObject);
224 +
225 +
226 +      const BNprimaryvertex *chosenVertex ();
227 +      const BNmet *chosenMET ();
228 +      const BNelectron *chosenElectron ();
229 +      const BNmuon *chosenMuon ();
230  
231    };
232  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines