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.41 by ahart, Tue Jun 11 00:35:34 2013 UTC vs.
Revision 1.56 by lantonel, Tue Sep 3 09:19:54 2013 UTC

# Line 15 | Line 15
15   #include "TH1D.h"
16   #include "TH2D.h"
17   #include "TLorentzVector.h"
18 + #include "TVector3.h"
19 + #include "TVector2.h"
20   #include "TTree.h"
21  
22   #include "FWCore/Framework/interface/EDProducer.h"
# Line 69 | Line 71 | class OSUAnalysis : public edm::EDProduc
71        double valueLookup (const BNjet* object, string variable, string function, string &stringValue);
72        double valueLookup (const BNmuon* object, string variable, string function, string &stringValue);
73        double valueLookup (const BNmuon* object1, const BNmuon* object2, string variable, string function, string &stringValue);
74 +
75        double valueLookup (const BNelectron* object, string variable, string function, string &stringValue);
76        double valueLookup (const BNelectron* object1, const BNelectron* object2, string variable, string function, string &stringValue);
77        double valueLookup (const BNelectron* object1, const BNmuon* object2, string variable, string function, string &stringValue);
78        double valueLookup (const BNelectron* object1, const BNjet* object2, string variable, string function, string &stringValue);
79 +      double valueLookup (const BNelectron* object1, const BNphoton* object2, string variable, string function, string &stringValue);
80 +
81 +      double valueLookup (const BNmuon* object1, const BNphoton* object2, string variable, string function, string &stringValue);
82 +      double valueLookup (const BNmuon* object1, const BNevent* object2, string variable, string function, string &stringValue);
83 +
84 +      double valueLookup (const BNphoton* object1, const BNjet* object2, string variable, string function, string &stringValue);
85 +
86        double valueLookup (const BNelectron* object1, const BNtrack* object2, string variable, string function, string &stringValue);
87        double valueLookup (const BNmuon* object1, const BNjet* object2, string variable, string function, string &stringValue);
88 +      double valueLookup (const BNmet* object1, const BNjet* object2, string variable, string function, string &stringValue);  
89 +      double valueLookup (const BNtrack* object1, const BNjet* object2, string variable, string function, string &stringValue);  
90        double valueLookup (const BNmuon* object1, const BNtrack* object2, string variable, string function, string &stringValue);
91        double valueLookup (const BNmuon* object1, const BNtau* object2, string variable, string function, string &stringValue);
92        double valueLookup (const BNtau* object1, const BNtau* object2, string variable, string function, string &stringValue);
93        double valueLookup (const BNtau* object1, const BNtrack* object2, string variable, string function, string &stringValue);
94        double valueLookup (const BNjet* object1, const BNjet* object2, string variable, string function, string &stringValue);
95 +
96        double valueLookup (const BNevent* object, string variable, string function, string &stringValue);
97        double valueLookup (const BNtau* object, string variable, string function, string &stringValue);
98        double valueLookup (const BNmet* object, string variable, string function, string &stringValue);
99        double valueLookup (const BNtrack* object, string variable, string function, string &stringValue);
100 +
101        double valueLookup (const BNtrack* object1, const BNevent* object2, string variable, string function, string &stringValue);
102        double valueLookup (const BNgenjet* object, string variable, string function, string &stringValue);
103        double valueLookup (const BNmcparticle* object, string variable, string function, string &stringValue);
104 +
105 +      double valueLookup (const BNelectron* object1, const BNmcparticle* object, string variable, string function, string &stringValue);
106 +
107        double valueLookup (const BNprimaryvertex* object, string variable, string function, string &stringValue);
108        double valueLookup (const BNbxlumi* object, string variable, string function, string &stringValue);
109        double valueLookup (const BNphoton* object, string variable, string function, string &stringValue);
# Line 98 | Line 115 | class OSUAnalysis : public edm::EDProduc
115  
116        int getTrkIsIso (const BNtrack* track1, const BNtrackCollection* trackColl);
117        double getTrkPtTrue (const BNtrack* track1, const BNmcparticleCollection* genPartColl);
118 +      double getHt (const BNjetCollection* jetColl);
119        double getTrkPtRes (const BNtrack* track1);
120        double getTrkIsIso (const BNtrack* track1);
121        double getTrkCaloTotRhoCorr(const BNtrack* track);
122 +      double getTrkDepTrkRp5RhoCorr(const BNtrack* track);
123 +      double getTrkDepTrkRp3RhoCorr(const BNtrack* track);
124        void WriteDeadEcal ();
125        int getTrkIsMatchedDeadEcal (const BNtrack* track1);
126  
# Line 117 | Line 137 | class OSUAnalysis : public edm::EDProduc
137        //string       holds input collection type
138        //outer vector corresponds to each cut
139        //inner vector corresponds to each object in input collection
140 <      //bool         tells if object passes or fails cuts
141 <      typedef map<string, vector < vector<bool> > > flagMap;
140 >      //pair(bool) first bool counts towards the event passing, second bool determines whether to plot the object        
141 >      typedef map<string, vector<vector<pair<bool,bool> > > > flagMap;
142 >
143 >      //flagPair (corresponds to flagMap):  
144 >      //vector corresponds to each object in input collection
145 >      //pair(bool) first bool counts towards the event passing, second bool determines whether to plot the object        
146 >      typedef vector<pair<bool,bool> > flagPair;
147  
148        //counterMap:
149        //string holds input collection type
# Line 129 | Line 154 | class OSUAnalysis : public edm::EDProduc
154        // Remember to define parameters to be retrieved from the configuration file.
155        edm::InputTag jets_;
156        edm::InputTag muons_;
157 +      edm::InputTag secMuons_;
158        edm::InputTag electrons_;
159        edm::InputTag events_;
160        edm::InputTag taus_;
# Line 157 | Line 183 | class OSUAnalysis : public edm::EDProduc
183        vector<edm::ParameterSet> treeBranchSets_;  
184        bool plotAllObjectsInPassingEvents_;
185        bool doPileupReweighting_;
186 +      bool doTopPtReweighting_;
187        bool applyLeptonSF_;
188        bool applyBtagSF_;
189        int  minBtag_;
163      int  maxBtag_;
190        bool printEventInfo_;
191        bool printAllTriggers_;
192        bool useTrackCaloRhoCorr_;  // to use the calo-based rho correction for the by-hand calculation of the track isolation energy
193        vector<double> stopCTau_;
194        bool GetPlotsAfterEachCut_;
195 +      int verbose_;
196        
197        struct DeadEcal {
198          double etaEcal;
# Line 180 | Line 207 | class OSUAnalysis : public edm::EDProduc
207        edm::Handle<BNtrigobjCollection> trigobjs;
208        edm::Handle<BNjetCollection> jets;
209        edm::Handle<BNmuonCollection> muons;
210 +      edm::Handle<BNmuonCollection> secMuons;
211        edm::Handle<BNelectronCollection> electrons;
212        edm::Handle<BNeventCollection> events;
213        edm::Handle<BNtauCollection> taus;
# Line 196 | Line 224 | class OSUAnalysis : public edm::EDProduc
224        edm::Handle<double> rhokt6CaloJetsHandle_;
225  
226        flagMap cumulativeFlags;
227 +      flagMap vetoFlags;
228  
229        vector<vector<map<string, TH1D*>>> oneDHists_;
230        vector<vector<map<string, TH2D*>>> twoDHists_;
231        vector<TTree*> BNTrees_;  // one tree per channel  
232        map<string, vector<float>> BNTreeBranchVals_;  // data structure to hold the values of the branches to be stored in the BNTrees_; the string is the name of a variable  
233 +      long BNTreeBranchVals_evtLong_;  // event number  
234 +      int  BNTreeBranchVals_runInt_;   // run number  
235 +      int  BNTreeBranchVals_lumiInt_;  // lumi number  
236  
237        edm::Service<TFileService> fs_;
238  
# Line 232 | Line 264 | class OSUAnalysis : public edm::EDProduc
264          vector<double> cutValues;
265          vector<string> cutStringValues;
266          vector<string> logicalOperators;//and, or
267 <        int numSubcuts;
267 >        int    numSubcuts;
268          int    numberRequired;
269          string eventComparativeOperator;
270          string name;
271 +        bool   isVeto;
272        };
273  
274        struct channel {
# Line 248 | Line 281 | class OSUAnalysis : public edm::EDProduc
281        vector<string>  objectsToGet;
282        vector<string>  objectsToCut;
283        vector<string>  objectsToPlot;
284 +      vector<string>  objectsToFlag;
285 +
286        vector<channel> channels;
287        vector<histogram> histograms;
288        vector<BranchSpecs> treeBranches_;
# Line 260 | Line 295 | class OSUAnalysis : public edm::EDProduc
295        BtagSFWeight *bTagSFWeight_;
296        double bTagScaleFactor_;    
297  
298 +      double topPtScaleFactor_;
299 +
300        StopCTauWeight *stopCTauWeight_;
301        double stopCTauScaleFactor_;
302  
303 +      double eventScaleFactor_;
304 +
305 +      ofstream* findEventsLog;
306 +      bool isFirstEvent_;  
307 +
308        template <class InputCollection> void setObjectFlags(cut &, uint, flagMap &, flagMap &, InputCollection, string);
309 <      template <class InputCollection1, class InputCollection2> void setObjectFlags(cut &, uint, flagMap &, flagMap &, InputCollection1, InputCollection2, vector<bool>, vector<bool>, string);
309 >      template <class InputCollection1, class InputCollection2> void setObjectFlags(cut &, uint, flagMap &, flagMap &, InputCollection1, InputCollection2, string);
310 >
311 >      template <class InputCollection> void assignTreeBranch(BranchSpecs brSpecs, InputCollection inputCollection, flagPair flags);  
312 >      template <class InputCollection> void fill1DHistogram(TH1*, histogram, InputCollection, flagPair, double);
313 >      template <class InputCollection1, class InputCollection2> void fill1DHistogram(TH1*, histogram, InputCollection1, InputCollection2, flagPair, double);
314 >      template <class InputCollection> void fill2DHistogram(TH2*, histogram, InputCollection, flagPair, double);
315 >      template <class InputCollection1, class InputCollection2> void fill2DHistogram(TH2*, histogram, InputCollection1, InputCollection2, flagPair, double);
316 >      bool getPreviousCumulativeFlags(uint currentCutIndex, flagMap &individualFlags, string obj1Type, uint object1, string flagType);
317 >
318  
269      template <class InputCollection> void assignTreeBranch(BranchSpecs brSpecs, InputCollection inputCollection, vector<bool> flags);  
270      template <class InputCollection> void fill1DHistogram(TH1*, histogram, InputCollection, vector<bool>, double);
271      template <class InputCollection1, class InputCollection2> void fill1DHistogram(TH1*, histogram, InputCollection1, InputCollection2, vector<bool>, vector<bool>, vector<bool>, double);
272      template <class InputCollection> void fill2DHistogram(TH2*, histogram, InputCollection, vector<bool>, double);
273      template <class InputCollection1, class InputCollection2> void fill2DHistogram(TH2*, histogram, InputCollection1, InputCollection2, vector<bool>, vector<bool>, vector<bool>, double);
274      bool getPreviousCumulativeFlags(uint currentCutIndex, flagMap &individualFlags, string obj1Type, uint object1);
319  
320        template <class InputObject> int getGenMatchedParticleIndex(InputObject);
321        int getPdgIdBinValue(int);
# Line 284 | Line 328 | class OSUAnalysis : public edm::EDProduc
328        const BNmet *chosenMET ();
329        const BNelectron *chosenElectron ();
330        const BNmuon *chosenMuon ();
331 +      double chosenHT ();
332 +
333 +      pair<const BNmuon *, const BNmuon*> leadMuonPair ();
334 +      pair<const BNelectron *, const BNelectron*> leadElectronPair ();
335  
336 +      double getTopPtWeight();
337    };
338  
339   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines