Revision: | 1.2 |
Committed: | Thu Sep 15 22:59:09 2011 UTC (13 years, 7 months ago) by yilmaz |
Content type: | text/plain |
Branch: | MAIN |
CVS Tags: | HiForest_V02_85, HiForest_V02_84, HiForest_V02_83, HiForest_V02_82, HiForest_V02_81, HiForest_V02_80, HiForest_V02_79, HiForest_V02_78, HiForest_V02_77, HiForest_V02_76, HiForest_V02_75, HiForest_V02_74, HiForest_V02_73, HiForest_V02_72, HiForest_V02_71, HiForest_V02_70, HiForest_V02_69, HiForest_V02_68, HiForest_V02_67, HiForest_V02_66, HiForest_V02_65, HiForest_V02_64, HiForest_V02_63, HiForest_V02_62, HiForest_V02_61, HiForest_V02_60, HiForest_V02_59, HiForest_V02_58, HiForest_V02_57, HiForest_V02_56, HiForest_V02_55, HiForest_V02_54, HiForest_V02_53, HiForest_V02_52, HiForest_V02_51, HiForest_V02_50, HiForest_V02_49, HiForest_V02_48, HiForest_V02_47, HiForest_V02_46, HiForest_V02_45, HiForest_V02_44, HiForest_V02_43, HiForest_V02_42, HiForest_V02_41, HiForest_V02_40, HiForest_V02_39, HiForest_V02_38, HiForest_V02_37, HiForest_V02_36, HiForest_V02_35, HiForest_V02_34, HiForest_V02_33, HiForest_V02_32, HiForest_V02_31, HiForest_V02_30, HiForest_V02_27, HiForest_V02_26, QM_2012, HiForest_V02_25, HiForest_V02_24, HiForest_V02_23, HiForest_V02_22, HiForest_V02_21, HiForest_V02_20, HiForest_V02_19, HiForest_V02_18, HiForest_V02_17, HiForest_V02_16, HiForest_V02_15, HiForest_V02_14, HiForest_V02_13, HiForest_V02_12, HiForest_V02_11, HiForest_V02_10, HiForest_V02_09, HiForest_V02_08, HiForest_V02_07, HiForest_V02_06, HiForest_V02_05, HiForest_V02_04, HiForest_V02_03, HiForest_V02_02, HiForest_V02_01, HiForest_V02_00, hi44X_02, hi413_03, hi441_1, hi441_0, hi413_11, hi413_10, hi413_09, hi413_08, hi413_07, hi413_06, hi413_05, hi413_04, hi413_02, hi39X_01, HEAD |
Branch point for: | branch_44x |
Changes since 1.1: | +4 -0 lines |
Log Message: | updates for muons |
# | User | Rev | Content |
---|---|---|---|
1 | frankma | 1.1 | #ifndef __PUSubtractor__ |
2 | #define __PUSubtractor__ | ||
3 | |||
4 | #include <vector> | ||
5 | #include "fastjet/PseudoJet.hh" | ||
6 | #include "fastjet/ClusterSequence.hh" | ||
7 | #include "fastjet/ClusterSequenceArea.hh" | ||
8 | #include "fastjet/ActiveAreaSpec.hh" | ||
9 | |||
10 | #include "FWCore/Framework/interface/Event.h" | ||
11 | #include "FWCore/Framework/interface/EventSetup.h" | ||
12 | #include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
13 | |||
14 | #include "DataFormats/JetReco/interface/CaloJet.h" | ||
15 | #include "DataFormats/HcalDetId/interface/HcalDetId.h" | ||
16 | #include "DataFormats/Candidate/interface/CandidateFwd.h" | ||
17 | #include "Geometry/CaloGeometry/interface/CaloGeometry.h" | ||
18 | |||
19 | class PileUpSubtractor{ | ||
20 | |||
21 | public: | ||
22 | |||
23 | typedef boost::shared_ptr<fastjet::ClusterSequence> ClusterSequencePtr; | ||
24 | typedef boost::shared_ptr<fastjet::ActiveAreaSpec> ActiveAreaSpecPtr; | ||
25 | typedef boost::shared_ptr<fastjet::RangeDefinition> RangeDefPtr; | ||
26 | |||
27 | PileUpSubtractor(const edm::ParameterSet& iConfig); | ||
28 | ~PileUpSubtractor(){;} | ||
29 | |||
30 | virtual void setAlgorithm(ClusterSequencePtr& algorithm); | ||
31 | virtual void reset(std::vector<edm::Ptr<reco::Candidate> >& input, | ||
32 | std::vector<fastjet::PseudoJet>& towers, | ||
33 | std::vector<fastjet::PseudoJet>& output); | ||
34 | virtual void setupGeometryMap(edm::Event& iEvent,const edm::EventSetup& iSetup); | ||
35 | virtual void calculatePedestal(std::vector<fastjet::PseudoJet> const & coll); | ||
36 | virtual void subtractPedestal(std::vector<fastjet::PseudoJet> & coll); | ||
37 | virtual void calculateOrphanInput(std::vector<fastjet::PseudoJet> & orphanInput); | ||
38 | virtual void offsetCorrectJets(); | ||
39 | virtual double getMeanAtTower(const reco::CandidatePtr & in) const; | ||
40 | virtual double getSigmaAtTower(const reco::CandidatePtr & in) const; | ||
41 | virtual double getPileUpAtTower(const reco::CandidatePtr & in) const; | ||
42 | virtual double getPileUpEnergy(int ijet) const {return jetOffset_[ijet];} | ||
43 | yilmaz | 1.2 | virtual double getCone(double cone, double eta, double phi, double& et, double& pu); |
44 | int getN(const reco::CandidatePtr & in) const; | ||
45 | int getNwithJets(const reco::CandidatePtr & in) const; | ||
46 | |||
47 | frankma | 1.1 | int ieta(const reco::CandidatePtr & in) const; |
48 | int iphi(const reco::CandidatePtr & in) const; | ||
49 | |||
50 | protected: | ||
51 | |||
52 | // From jet producer | ||
53 | ClusterSequencePtr fjClusterSeq_; // fastjet cluster sequence | ||
54 | std::vector<edm::Ptr<reco::Candidate> >* inputs_; // input candidates | ||
55 | std::vector<fastjet::PseudoJet>* fjInputs_; // fastjet inputs | ||
56 | std::vector<fastjet::PseudoJet>* fjJets_; // fastjet jets | ||
57 | std::vector<fastjet::PseudoJet> fjOriginalInputs_; // to back-up unsubtracted fastjet inputs | ||
58 | |||
59 | // PU subtraction parameters | ||
60 | bool reRunAlgo_; | ||
61 | bool doAreaFastjet_; | ||
62 | bool doRhoFastjet_; | ||
63 | double jetPtMin_; | ||
64 | double puPtMin_; | ||
65 | |||
66 | double nSigmaPU_; // number of sigma for pileup | ||
67 | double radiusPU_; // pileup radius | ||
68 | ActiveAreaSpecPtr fjActiveArea_; // fastjet active area definition | ||
69 | RangeDefPtr fjRangeDef_; // range definition | ||
70 | |||
71 | CaloGeometry const * geo_; // geometry | ||
72 | int ietamax_; // maximum eta in geometry | ||
73 | int ietamin_; // minimum eta in geometry | ||
74 | std::vector<HcalDetId> allgeomid_; // all det ids in the geometry | ||
75 | std::map<int,int> geomtowers_; // map of geometry towers to det id | ||
76 | std::map<int,int> ntowersWithJets_; // number of towers with jets | ||
77 | std::map<int,double> esigma_; // energy sigma | ||
78 | std::map<int,double> emean_; // energy mean | ||
79 | |||
80 | std::vector<double> jetOffset_; | ||
81 | |||
82 | }; | ||
83 | |||
84 | #include "FWCore/PluginManager/interface/PluginFactory.h" | ||
85 | namespace edm {class ParameterSet; class EventSetup; } | ||
86 | typedef edmplugin::PluginFactory<PileUpSubtractor *(const edm::ParameterSet & )> PileUpSubtractorFactory; | ||
87 | |||
88 | #endif |