Fork me on GitHub

source: git/external/PUPPI/puppiCleanContainer.hh@ 0a297f2

ImprovedOutputFile Timing dual_readout llp
Last change on this file since 0a297f2 was fa33983, checked in by Pavel Demin <pavel.demin@…>, 10 years ago

add PUPPI and RunPUPPI module

  • Property mode set to 100644
File size: 3.0 KB
Line 
1#ifndef PUPPICLEANCONTAINER_HH
2#define PUPPICLEANCONTAINER_HH
3
4
5#include "PUPPI/RecoObj.hh"
6#include "PUPPI/puppiParticle.hh"
7#include "PUPPI/puppiAlgoBin.hh"
8
9#include "fastjet/internal/base.hh"
10#include "fastjet/PseudoJet.hh"
11#include <algorithm>
12
13using namespace std;
14
15//......................
16
17class puppiCleanContainer{
18
19 public:
20
21 // basic constructor which takes input particles as RecoObj, the tracker eta extension and other two boolean info
22 puppiCleanContainer(std::vector<RecoObj> inParticles, // incoming particles of the event
23 std::vector<puppiAlgoBin> puppiAlgo, // vector with the definition of the puppi algorithm in different eta region (one for each eta)
24 float minPuppiWeight = 0.01, // min puppi weight cut
25 bool useExp = false // useDz vertex probability
26 );
27
28 ~puppiCleanContainer();
29
30 // ----- get methods
31
32 // get all the PF particles
33 std::vector<fastjet::PseudoJet> pfParticles() { return fPFParticles_; }
34 // get all the PF charged from PV
35 std::vector<fastjet::PseudoJet> pvParticles() { return fChargedPV_; }
36 // get all the PF charged from PU
37 std::vector<fastjet::PseudoJet> puParticles() { return fChargedNoPV_; }
38 // get CHS particle collection
39 std::vector<fastjet::PseudoJet> pfchsParticles(){ return fPFchsParticles_; }
40 // get puppi weight for all particles
41 std::vector<float> getPuppiWeights() { return fPuppiWeights_; };
42
43 // process puppi
44 std::vector<fastjet::PseudoJet> puppiEvent();
45
46 protected:
47
48 void getRMSAvg(const int &, std::vector<fastjet::PseudoJet> &, std::vector<fastjet::PseudoJet> &);
49 float goodVar (const fastjet::PseudoJet &, const std::vector<fastjet::PseudoJet> &, const int &, const float &);
50 void computeMedRMS(const int &);
51 float compute(const float &, const std::vector<puppiParticle> &, const std::vector<puppiAlgoBin> &, const std::vector<int> &);
52
53 // some get functions
54 float getNeutralPtCut(const float&, const float&, const int&);
55 std::vector<int> getPuppiId(const float &, const float &, const std::vector<puppiAlgoBin> &);
56 bool isGoodPuppiId(const float &, const float &, const puppiAlgoBin &);
57 float getChi2FromdZ(float);
58 // other functions
59 float var_within_R(const int &, const vector<fastjet::PseudoJet> &, const fastjet::PseudoJet &, const float &);
60 float pt_within_R(const std::vector<fastjet::PseudoJet> &, const fastjet::PseudoJet &, const float &);
61 fastjet::PseudoJet flow_within_R(const vector<fastjet::PseudoJet> &, const fastjet::PseudoJet &, const float &);
62
63
64 private:
65
66 std::vector<RecoObj> fRecoParticles_;
67 std::vector<fastjet::PseudoJet> fPFParticles_;
68 std::vector<fastjet::PseudoJet> fPFchsParticles_;
69 std::vector<fastjet::PseudoJet> fChargedPV_;
70 std::vector<fastjet::PseudoJet> fChargedNoPV_;
71
72 std::vector<puppiAlgoBin> puppiAlgo_;
73 std::vector<float> fPuppiWeights_;
74
75 float fMinPuppiWeight_;
76 float fPVFrac_;
77
78 int fNPV_;
79 bool fUseExp_ ;
80
81};
82
83#endif
Note: See TracBrowser for help on using the repository browser.