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.52 by wulsin, Wed Jul 24 16:23:49 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 73 | Line 75 | class OSUAnalysis : public edm::EDProduc
75        double valueLookup (const BNelectron* object1, const BNelectron* object2, string variable, string function, string &stringValue);
76        double valueLookup (const BNelectron* object1, const BNmuon* object2, string variable, string function, string &stringValue);
77        double valueLookup (const BNelectron* object1, const BNjet* object2, string variable, string function, string &stringValue);
78 +      double valueLookup (const BNelectron* object1, const BNphoton* object2, string variable, string function, string &stringValue);
79 +      double valueLookup (const BNmuon* object1, const BNphoton* object2, string variable, string function, string &stringValue);
80 +      double valueLookup (const BNmuon* object1, const BNevent* object2, string variable, string function, string &stringValue);
81 +      double valueLookup (const BNphoton* object1, const BNjet* object2, string variable, string function, string &stringValue);
82        double valueLookup (const BNelectron* object1, const BNtrack* object2, string variable, string function, string &stringValue);
83        double valueLookup (const BNmuon* object1, const BNjet* object2, string variable, string function, string &stringValue);
84 +      double valueLookup (const BNmet* object1, const BNjet* object2, string variable, string function, string &stringValue);  
85 +      double valueLookup (const BNtrack* object1, const BNjet* object2, string variable, string function, string &stringValue);  
86        double valueLookup (const BNmuon* object1, const BNtrack* object2, string variable, string function, string &stringValue);
87        double valueLookup (const BNmuon* object1, const BNtau* object2, string variable, string function, string &stringValue);
88        double valueLookup (const BNtau* object1, const BNtau* object2, string variable, string function, string &stringValue);
# Line 98 | Line 106 | class OSUAnalysis : public edm::EDProduc
106  
107        int getTrkIsIso (const BNtrack* track1, const BNtrackCollection* trackColl);
108        double getTrkPtTrue (const BNtrack* track1, const BNmcparticleCollection* genPartColl);
109 +      double getHt (const BNjetCollection* jetColl);
110        double getTrkPtRes (const BNtrack* track1);
111        double getTrkIsIso (const BNtrack* track1);
112        double getTrkCaloTotRhoCorr(const BNtrack* track);
113 +      double getTrkDepTrkRp5RhoCorr(const BNtrack* track);
114 +      double getTrkDepTrkRp3RhoCorr(const BNtrack* track);
115        void WriteDeadEcal ();
116        int getTrkIsMatchedDeadEcal (const BNtrack* track1);
117  
# Line 117 | Line 128 | class OSUAnalysis : public edm::EDProduc
128        //string       holds input collection type
129        //outer vector corresponds to each cut
130        //inner vector corresponds to each object in input collection
131 <      //bool         tells if object passes or fails cuts
132 <      typedef map<string, vector < vector<bool> > > flagMap;
131 >      //pair(bool) first bool counts towards the event passing, second bool determines whether to plot the object        
132 >      typedef map<string, vector<vector<pair<bool,bool> > > > flagMap;
133 >
134 >      //flagPair (corresponds to flagMap):  
135 >      //vector corresponds to each object in input collection
136 >      //pair(bool) first bool counts towards the event passing, second bool determines whether to plot the object        
137 >      typedef vector<pair<bool,bool> > flagPair;
138  
139        //counterMap:
140        //string holds input collection type
# Line 160 | Line 176 | class OSUAnalysis : public edm::EDProduc
176        bool applyLeptonSF_;
177        bool applyBtagSF_;
178        int  minBtag_;
163      int  maxBtag_;
179        bool printEventInfo_;
180        bool printAllTriggers_;
181        bool useTrackCaloRhoCorr_;  // to use the calo-based rho correction for the by-hand calculation of the track isolation energy
182        vector<double> stopCTau_;
183        bool GetPlotsAfterEachCut_;
184 +      int verbose_;
185        
186        struct DeadEcal {
187          double etaEcal;
# Line 196 | Line 212 | class OSUAnalysis : public edm::EDProduc
212        edm::Handle<double> rhokt6CaloJetsHandle_;
213  
214        flagMap cumulativeFlags;
215 +      flagMap vetoFlags;
216  
217        vector<vector<map<string, TH1D*>>> oneDHists_;
218        vector<vector<map<string, TH2D*>>> twoDHists_;
# Line 232 | Line 249 | class OSUAnalysis : public edm::EDProduc
249          vector<double> cutValues;
250          vector<string> cutStringValues;
251          vector<string> logicalOperators;//and, or
252 <        int numSubcuts;
252 >        int    numSubcuts;
253          int    numberRequired;
254          string eventComparativeOperator;
255          string name;
256 +        bool   isVeto;
257        };
258  
259        struct channel {
# Line 248 | Line 266 | class OSUAnalysis : public edm::EDProduc
266        vector<string>  objectsToGet;
267        vector<string>  objectsToCut;
268        vector<string>  objectsToPlot;
269 +      vector<string>  objectsToFlag;
270 +
271        vector<channel> channels;
272        vector<histogram> histograms;
273        vector<BranchSpecs> treeBranches_;
# Line 263 | Line 283 | class OSUAnalysis : public edm::EDProduc
283        StopCTauWeight *stopCTauWeight_;
284        double stopCTauScaleFactor_;
285  
286 +      ofstream* findEventsLog;
287 +      bool isFirstEvent_;  
288 +
289        template <class InputCollection> void setObjectFlags(cut &, uint, flagMap &, flagMap &, InputCollection, string);
290 <      template <class InputCollection1, class InputCollection2> void setObjectFlags(cut &, uint, flagMap &, flagMap &, InputCollection1, InputCollection2, vector<bool>, vector<bool>, string);
290 >      template <class InputCollection1, class InputCollection2> void setObjectFlags(cut &, uint, flagMap &, flagMap &, InputCollection1, InputCollection2, string);
291 >
292 >      template <class InputCollection> void assignTreeBranch(BranchSpecs brSpecs, InputCollection inputCollection, flagPair flags);  
293 >      template <class InputCollection> void fill1DHistogram(TH1*, histogram, InputCollection, flagPair, double);
294 >      template <class InputCollection1, class InputCollection2> void fill1DHistogram(TH1*, histogram, InputCollection1, InputCollection2, flagPair, double);
295 >      template <class InputCollection> void fill2DHistogram(TH2*, histogram, InputCollection, flagPair, double);
296 >      template <class InputCollection1, class InputCollection2> void fill2DHistogram(TH2*, histogram, InputCollection1, InputCollection2, flagPair, double);
297 >      bool getPreviousCumulativeFlags(uint currentCutIndex, flagMap &individualFlags, string obj1Type, uint object1, string flagType);
298 >
299  
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);
300  
301        template <class InputObject> int getGenMatchedParticleIndex(InputObject);
302        int getPdgIdBinValue(int);
# Line 284 | Line 309 | class OSUAnalysis : public edm::EDProduc
309        const BNmet *chosenMET ();
310        const BNelectron *chosenElectron ();
311        const BNmuon *chosenMuon ();
312 +      double chosenHT ();
313 +      pair<const BNmuon *, const BNmuon*> leadMuonPair ();
314 +      pair<const BNelectron *, const BNelectron*> leadElectronPair ();
315  
316    };
317  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines