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.45 by jbrinson, Wed Jul 3 09:30:38 2013 UTC vs.
Revision 1.54 by lantonel, Wed Jul 31 09:28:26 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);  
# Line 85 | Line 92 | class OSUAnalysis : public edm::EDProduc
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 103 | 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 125 | Line 140 | class OSUAnalysis : public edm::EDProduc
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:
# Line 167 | Line 185 | class OSUAnalysis : public edm::EDProduc
185        bool applyLeptonSF_;
186        bool applyBtagSF_;
187        int  minBtag_;
170      int  maxBtag_;
188        bool printEventInfo_;
189        bool printAllTriggers_;
190        bool useTrackCaloRhoCorr_;  // to use the calo-based rho correction for the by-hand calculation of the track isolation energy
191        vector<double> stopCTau_;
192        bool GetPlotsAfterEachCut_;
193 +      int verbose_;
194        
195        struct DeadEcal {
196          double etaEcal;
# Line 209 | Line 227 | class OSUAnalysis : public edm::EDProduc
227        vector<vector<map<string, TH2D*>>> twoDHists_;
228        vector<TTree*> BNTrees_;  // one tree per channel  
229        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  
230 +      long BNTreeBranchVals_evtLong_;  // event number  
231 +      int  BNTreeBranchVals_runInt_;   // run number  
232 +      int  BNTreeBranchVals_lumiInt_;  // lumi number  
233  
234        edm::Service<TFileService> fs_;
235  
# Line 257 | Line 278 | class OSUAnalysis : public edm::EDProduc
278        vector<string>  objectsToGet;
279        vector<string>  objectsToCut;
280        vector<string>  objectsToPlot;
281 +      vector<string>  objectsToFlag;
282 +
283        vector<channel> channels;
284        vector<histogram> histograms;
285        vector<BranchSpecs> treeBranches_;
# Line 272 | Line 295 | class OSUAnalysis : public edm::EDProduc
295        StopCTauWeight *stopCTauWeight_;
296        double stopCTauScaleFactor_;
297  
298 +      ofstream* findEventsLog;
299 +      bool isFirstEvent_;  
300 +
301        template <class InputCollection> void setObjectFlags(cut &, uint, flagMap &, flagMap &, InputCollection, string);
302 <      template <class InputCollection1, class InputCollection2> void setObjectFlags(cut &, uint, flagMap &, flagMap &, InputCollection1, InputCollection2, flagPair, flagPair, string);
302 >      template <class InputCollection1, class InputCollection2> void setObjectFlags(cut &, uint, flagMap &, flagMap &, InputCollection1, InputCollection2, string);
303  
304        template <class InputCollection> void assignTreeBranch(BranchSpecs brSpecs, InputCollection inputCollection, flagPair flags);  
305        template <class InputCollection> void fill1DHistogram(TH1*, histogram, InputCollection, flagPair, double);
306 <      template <class InputCollection1, class InputCollection2> void fill1DHistogram(TH1*, histogram, InputCollection1, InputCollection2, flagPair, flagPair, flagPair, double);
306 >      template <class InputCollection1, class InputCollection2> void fill1DHistogram(TH1*, histogram, InputCollection1, InputCollection2, flagPair, double);
307        template <class InputCollection> void fill2DHistogram(TH2*, histogram, InputCollection, flagPair, double);
308 <      template <class InputCollection1, class InputCollection2> void fill2DHistogram(TH2*, histogram, InputCollection1, InputCollection2, flagPair, flagPair, flagPair, double);
308 >      template <class InputCollection1, class InputCollection2> void fill2DHistogram(TH2*, histogram, InputCollection1, InputCollection2, flagPair, double);
309        bool getPreviousCumulativeFlags(uint currentCutIndex, flagMap &individualFlags, string obj1Type, uint object1, string flagType);
310  
311  
# Line 295 | Line 321 | class OSUAnalysis : public edm::EDProduc
321        const BNmet *chosenMET ();
322        const BNelectron *chosenElectron ();
323        const BNmuon *chosenMuon ();
324 +      double chosenHT ();
325 +      pair<const BNmuon *, const BNmuon*> leadMuonPair ();
326 +      pair<const BNelectron *, const BNelectron*> leadElectronPair ();
327  
328    };
329  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines