CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
L25TauAnalyzer Class Reference

#include <HLTriggerOffline/L25TauAnalyzer/src/L25TauAnalyzer.cc>

Inheritance diagram for L25TauAnalyzer:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 L25TauAnalyzer (const edm::ParameterSet &)
 
 ~L25TauAnalyzer ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob ()
 
void clearVectors ()
 
virtual void endJob ()
 
void initializeVectors ()
 
reco::PFTau match (const reco::Jet &, const reco::PFTauCollection &)
 
reco::CaloJet matchedToPFTau (const reco::PFTau &, const reco::L2TauInfoAssociation &)
 
void printInfo (const reco::PFTau &thePFTau, const reco::IsolatedTauTagInfo &theTauTagInfo)
 

Private Attributes

float _isolationCone
 
float _l25Dz
 
float _l25JetLeadTkMacthingCone
 
edm::EDGetTokenT
< IsolatedTauTagInfoCollection > 
_l25JetSource
 
float _l25LeadTkPtMin
 
float _l2l25MatchingCone
 
edm::EDGetTokenT
< L2TauInfoAssociation
_l2TauInfoAssoc
 
float _minTrackPt
 
int _nTrkIso
 
edm::EDGetTokenT
< PFTauDiscriminator
_pfTauIsoSource
 
edm::EDGetTokenT
< PFTauDiscriminator
_pfTauMuonDiscSource
 
edm::EDGetTokenT< PFTauCollection_pfTauSource
 
edm::EDGetTokenT
< VertexCollection
_pVtxSource
 
float _signalCone
 
bool hasLeadTrk
 
bool l25Disc_JetDir
 
bool l25Disc_LeadTkDir
 
bool l25Disc_Trk5_IsoPtMin2_NTrk0
 
std::vector< float > * l25IsoTrkChi2
 
std::vector< float > * l25IsoTrkChi2NdF
 
std::vector< float > * l25IsoTrkDxy
 
std::vector< float > * l25IsoTrkDz
 
std::vector< float > * l25IsoTrkEta
 
std::vector< int > * l25IsoTrkNLostHits
 
std::vector< int > * l25IsoTrkNRecHits
 
std::vector< int > * l25IsoTrkNValidHits
 
std::vector< int > * l25IsoTrkNValidPixelHits
 
std::vector< float > * l25IsoTrkPhi
 
std::vector< float > * l25IsoTrkPt
 
float l25JetEt
 
float l25JetEta
 
float l25JetPhi
 
bool L25MatchedToL2
 
bool l25MatchedToPFTau
 
std::vector< float > * l25SignalTrkChi2
 
std::vector< float > * l25SignalTrkChi2NdF
 
std::vector< float > * l25SignalTrkDxy
 
std::vector< float > * l25SignalTrkDz
 
std::vector< float > * l25SignalTrkEta
 
std::vector< int > * l25SignalTrkNLostHits
 
std::vector< int > * l25SignalTrkNRecHits
 
std::vector< int > * l25SignalTrkNValidHits
 
std::vector< int > * l25SignalTrkNValidPixelHits
 
std::vector< float > * l25SignalTrkPhi
 
std::vector< float > * l25SignalTrkPt
 
TTree * l25tree
 
std::vector< float > * l25TrkChi2
 
std::vector< float > * l25TrkChi2NdF
 
std::vector< float > * l25TrkDxy
 
std::vector< float > * l25TrkDz
 
std::vector< float > * l25TrkEta
 
std::vector< float > * l25TrkNRecHits
 
std::vector< float > * l25TrkNValidPixelHits
 
std::vector< float > * l25TrkPhi
 
std::vector< float > * l25TrkPt
 
float l2JetEt
 
float l2JetEta
 
float l2JetPhi
 
bool L2MatchedToPFtau
 
float leadIsoTrkDeltaR
 
float leadIsoTrkPtRes
 
float leadSignalTrackPt
 
float leadTrkDeltaR
 
float leadTrkJetDeltaR
 
float leadTrkPtRes
 
int myNtrkIso
 
int numPixTrkInJet
 
int numQPixTrkInAnnulus
 
int numQPixTrkInJet
 
int numQPixTrkInSignalCone
 
float pfTauElecDisc
 
float pfTauEt
 
float pfTauEta
 
float pfTauGammaIso
 
bool pfTauHasLeadTrk
 
bool pfTauInBounds
 
float pfTauIsoDisc
 
float pftauIsoTrkDeltaR
 
float pfTauIsoTrkPt
 
float pftauL25DeltaR
 
float pfTauLTPt
 
float pfTauMuonDisc
 
int pfTauNProngs
 
int pfTauNTrkIso
 
float pfTauPhi
 
float pfTauPt
 
float pftauSignalTrkDeltaR
 
float pfTauTrkIso
 
bool signal_
 
math::XYZPoint theVertexPosition
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Description: [one line class summary]

Implementation: [Notes on implementation]

Definition at line 57 of file L25TauAnalyzer.h.

Constructor & Destructor Documentation

L25TauAnalyzer::L25TauAnalyzer ( const edm::ParameterSet iConfig)
explicit

Definition at line 30 of file L25TauAnalyzer.cc.

References edm::ParameterSet::getParameter(), and TFileService::make().

30  {
31  //now do what ever initialization is needed
32 
33  _l25JetSource = consumes<IsolatedTauTagInfoCollection>(iConfig.getParameter<InputTag>("L25JetSource"));
34  _l2TauInfoAssoc = consumes<L2TauInfoAssociation>(iConfig.getParameter<InputTag>("L2TauSource"));
35  _pfTauSource = consumes<PFTauCollection>(iConfig.getParameter<InputTag>("PFTauSource"));
36  _pfTauIsoSource = consumes<PFTauDiscriminator>(iConfig.getParameter<InputTag>("PFTauIsoSource"));
37  _pfTauMuonDiscSource = consumes<PFTauDiscriminator>(iConfig.getParameter<InputTag>("PFTauMuonDiscSource"));
38  _pVtxSource = consumes<VertexCollection>(iConfig.getParameter<InputTag>("PrimaryVtxSource"));
39  _l2l25MatchingCone = iConfig.getParameter<double>("L2L25MatchingCone");
40 
41  _l25JetLeadTkMacthingCone = iConfig.getParameter<double>("L25JetLeadTkMatchingCone");
42  _minTrackPt = iConfig.getParameter<double>("MinTrackPt");
43  _signalCone = iConfig.getParameter<double>("SignalCone");
44  _isolationCone = iConfig.getParameter<double>("IsolationCone");
45  _l25Dz = iConfig.getParameter<double>("L25DzCut");
46  _nTrkIso = iConfig.getParameter<int>("NTrkIso");
47  _l25LeadTkPtMin = iConfig.getParameter<double>("L25LeadTkMinPt");
48 
49 
50  l25JetEt=0.;
51  l25JetEta=10.;
52  l25JetPhi=10.;
53  hasLeadTrk=0;
54  leadSignalTrackPt = 0.;
55  leadTrkJetDeltaR = 0.;
56  numPixTrkInJet = 0;
57  numQPixTrkInJet = 0;
60 
61  pfTauPt = 0.;
62  pfTauEt = 0.;
63  pfTauEta = 10.;
64  pfTauPhi = 10.;
65  pfTauLTPt = 0.;
66  pfTauTrkIso = 100.;
67  pfTauGammaIso = 100.;
68 
69  l2JetEt = 0;
70  l2JetEta = 10;
71  l2JetPhi = 10;
72 
74  L2MatchedToPFtau = 0;
75  L25MatchedToL2 = 0;
76 
79  l25tree = fs->make<TTree>("l25tree","Level 2.5 Tau Tree");
80 
81  l25tree->Branch("pfTauHasLeadTrk", &pfTauHasLeadTrk, "pfTauHasLeadTrk/B");
82  l25tree->Branch("pfTauInBounds", &pfTauInBounds, "pfTauInBounds/B");
83  l25tree->Branch("pfTauPt", &pfTauPt, "pfTauPt/F");
84  l25tree->Branch("pfTauEt", &pfTauEt, "pfTauEt/F");
85  l25tree->Branch("pfTauEta", &pfTauEta, "pfTauEta/F");
86  l25tree->Branch("pfTauphi", &pfTauPhi, "pfTauPhi/F");
87  l25tree->Branch("pfTauLTPt", &pfTauLTPt, "pfTauLTPt/F");
88  l25tree->Branch("pfTauIsoDisc", &pfTauIsoDisc, "pfTauIsoDisc/F");
89  l25tree->Branch("pfTauMuonDisc", &pfTauMuonDisc, "pfTauMuonDisc/F");
90  l25tree->Branch("pfTauNProngs", &pfTauNProngs, "pfTauNProngs/I");
91  l25tree->Branch("pfTauTrkIso", &pfTauTrkIso, "pfTauTrkIso/F");
92  l25tree->Branch("pfTauNTrkIso", &pfTauNTrkIso, "pfTauNTrkIso/I");
93  l25tree->Branch("pfTauIsoTrkPt", &pfTauIsoTrkPt, "pfTauIsoTrkPt/F");
94  l25tree->Branch("pfTauGammaIso", &pfTauGammaIso, "pfTauGammaIso/F");
95 
96  l25tree->Branch("pftauL25DeltaR", &pftauL25DeltaR, "pftauL25DeltaR/F");
97  l25tree->Branch("pftauSignalTrkDeltaR", &pftauSignalTrkDeltaR, "pftauSignalTrkDeltaR/F");
98  l25tree->Branch("pftauIsoTrkDeltaR", &pftauIsoTrkDeltaR, "pftauIsoTrkDeltaR/F");
99  l25tree->Branch("leadTrkPtRes", &leadTrkPtRes, "leadTrkPtRes/F");
100  l25tree->Branch("leadTrkDeltaR", &leadTrkDeltaR, "leadTrkDeltaR/F");
101  l25tree->Branch("leadIsoTrkPtRes", &leadIsoTrkPtRes, "leadIsoTrkPtRes/F");
102  l25tree->Branch("leadIsoTrkDeltaR", &leadIsoTrkDeltaR, "leadIsoTrkDeltaR/F");
103  l25tree->Branch("l25Disc_LeadTkDir", &l25Disc_LeadTkDir, "l25Disc_LeadTkDir/B");
104  l25tree->Branch("l25Disc_JetDir", &l25Disc_JetDir, "l25Disc_JetDir/B");
105 
106  l25tree->Branch("l2JetEt", &l2JetEt, "l2JetEt/F");
107  l25tree->Branch("l2JetEta", &l2JetEta, "l2JetEta/F");
108  l25tree->Branch("l2JetPhi", &l2JetPhi, "l2JetPhi/F");
109 
110  l25tree->Branch("l25MatchedToPFTau", &l25MatchedToPFTau, "l25MatchedToPFTau/B");
111  l25tree->Branch("L2MatchedToPFtau", &L2MatchedToPFtau, "L2MatchedToPFtau/B");
112  l25tree->Branch("L25MatchedToL2", &L25MatchedToL2, "L25MatchedToL2/B");
113 
114  l25tree->Branch("l25JetEt", &l25JetEt, "l25JetEt/F");
115  l25tree->Branch("l25JetEta", &l25JetEta, "l25JetEta/F");
116  l25tree->Branch("l25JetPhi", &l25JetPhi, "l25JetPhi/F");
117  l25tree->Branch("hasLeadTrack", &hasLeadTrk, "hasLeadTrack/B");
118  l25tree->Branch("leadTrackPt", &leadSignalTrackPt, "leadTrackPt/F");
119  l25tree->Branch("nTracks", &numPixTrkInJet, "nTracks/I");
120  l25tree->Branch("nQTracks", &numQPixTrkInJet, "nQTracks/I");
121  l25tree->Branch("nQTracksInSignal", &numQPixTrkInSignalCone, "nQTracksInSignal/I");
122  l25tree->Branch("nQTracksInAnnulus", &numQPixTrkInAnnulus, "nQTracksInAnnulus/I");
123 
124  l25tree->Branch("l25TrkPt", &l25TrkPt);
125  l25tree->Branch("l25TrkEta", &l25TrkEta);
126  l25tree->Branch("l25TrkPhi", &l25TrkPhi);
127  l25tree->Branch("l25TrkDz", &l25TrkDz);
128  l25tree->Branch("l25TrkDxy", &l25TrkDxy);
129  l25tree->Branch("l25TrkChi2", &l25TrkChi2);
130  l25tree->Branch("l25TrkChi2NdF", &l25TrkChi2NdF);
131  l25tree->Branch("l25TrkNRecHits", &l25TrkNRecHits);
132  l25tree->Branch("l25TrkNValidPixelHits", &l25TrkNValidPixelHits);
133 
134  l25tree->Branch("l25SignalTrkPt", &l25SignalTrkPt);
135  l25tree->Branch("l25SignalTrkEta", &l25SignalTrkEta);
136  l25tree->Branch("l25SignalTrkPhi", &l25SignalTrkPhi);
137  l25tree->Branch("l25SignalTrkDz", &l25SignalTrkDz);
138  l25tree->Branch("l25SignalTrkDxy", &l25SignalTrkDxy);
139  l25tree->Branch("l25SignalTrkChi2", &l25SignalTrkChi2);
140  l25tree->Branch("l25SignalTrkChi2NdF", &l25SignalTrkChi2NdF);
141  l25tree->Branch("l25SignalTrkNRecHits", &l25SignalTrkNRecHits);
142  l25tree->Branch("l25SignalTrkNValidHits", &l25SignalTrkNValidHits);
143  l25tree->Branch("l25SignalTrkNValidPixelHits", &l25SignalTrkNValidPixelHits);
144  l25tree->Branch("l25SignalTrkNLostHits", &l25SignalTrkNLostHits);
145 
146  l25tree->Branch("l25IsoTrkPt", &l25IsoTrkPt);
147  l25tree->Branch("l25IsoTrkEta", &l25IsoTrkEta);
148  l25tree->Branch("l25IsoTrkPhi", &l25IsoTrkPhi);
149  l25tree->Branch("l25IsoTrkDz", &l25IsoTrkDz);
150  l25tree->Branch("l25IsoTrkDxy", &l25IsoTrkDxy);
151  l25tree->Branch("l25IsoTrkChi2", &l25IsoTrkChi2);
152  l25tree->Branch("l25IsoTrkChi2NdF", &l25IsoTrkChi2NdF);
153  l25tree->Branch("l25IsoTrkNRecHits", &l25IsoTrkNRecHits);
154  l25tree->Branch("l25IsoTrkNValidHits", &l25IsoTrkNValidHits);
155  l25tree->Branch("l25IsoTrkNValidPixelHits", &l25IsoTrkNValidPixelHits);
156  l25tree->Branch("l25IsoTrkNLostHits", &l25IsoTrkNLostHits);
157 
158  l25tree->Branch("myNtrkIso", &myNtrkIso, "myNtrkIso/I");
159 }
std::vector< int > * l25SignalTrkNLostHits
T getParameter(std::string const &) const
float _l2l25MatchingCone
std::vector< float > * l25SignalTrkPt
std::vector< float > * l25TrkChi2
std::vector< float > * l25SignalTrkPhi
std::vector< int > * l25SignalTrkNRecHits
std::vector< float > * l25TrkDxy
std::vector< int > * l25SignalTrkNValidPixelHits
std::vector< float > * l25SignalTrkDxy
edm::EDGetTokenT< PFTauDiscriminator > _pfTauIsoSource
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
std::vector< int > * l25IsoTrkNValidHits
edm::EDGetTokenT< L2TauInfoAssociation > _l2TauInfoAssoc
std::vector< float > * l25IsoTrkChi2
std::vector< int > * l25IsoTrkNLostHits
edm::EDGetTokenT< PFTauCollection > _pfTauSource
int numQPixTrkInSignalCone
void initializeVectors()
edm::EDGetTokenT< PFTauDiscriminator > _pfTauMuonDiscSource
std::vector< float > * l25SignalTrkChi2NdF
std::vector< float > * l25TrkPhi
std::vector< int > * l25IsoTrkNValidPixelHits
std::vector< float > * l25TrkNValidPixelHits
edm::EDGetTokenT< IsolatedTauTagInfoCollection > _l25JetSource
std::vector< float > * l25IsoTrkPt
std::vector< float > * l25SignalTrkDz
float pftauSignalTrkDeltaR
std::vector< float > * l25IsoTrkPhi
std::vector< int > * l25SignalTrkNValidHits
std::vector< float > * l25SignalTrkEta
std::vector< float > * l25TrkEta
edm::EDGetTokenT< VertexCollection > _pVtxSource
std::vector< float > * l25SignalTrkChi2
std::vector< float > * l25IsoTrkDxy
std::vector< int > * l25IsoTrkNRecHits
float _l25JetLeadTkMacthingCone
std::vector< float > * l25TrkDz
std::vector< float > * l25IsoTrkChi2NdF
std::vector< float > * l25IsoTrkEta
std::vector< float > * l25TrkNRecHits
std::vector< float > * l25IsoTrkDz
std::vector< float > * l25TrkPt
std::vector< float > * l25TrkChi2NdF
L25TauAnalyzer::~L25TauAnalyzer ( )

Definition at line 162 of file L25TauAnalyzer.cc.

162  {
163 
164  // do anything here that needs to be done at desctruction time
165  // (e.g. close files, deallocate resources etc.)
166 
167 }

Member Function Documentation

void L25TauAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDAnalyzer.

Definition at line 175 of file L25TauAnalyzer.cc.

References reco::IsolatedTauTagInfo::allTracks(), edm::RefVector< C, T, F >::begin(), gather_cfg::cout, delta, reco::IsolatedTauTagInfo::discriminator(), edm::RefVector< C, T, F >::end(), reco::LeafCandidate::et(), reco::LeafCandidate::eta(), edm::Event::getByToken(), i, edm::Ptr< T >::isNonnull(), reco::JTATagInfo::jet(), reco::IsolatedTauTagInfo::leadingSignalTrack(), reco::LeafCandidate::momentum(), reco::TrackBase::momentum(), reco::LeafCandidate::p4(), reco::LeafCandidate::phi(), reco::TrackBase::pt(), reco::IsolatedTauTagInfo::selectedTracks(), edm::RefVector< C, T, F >::size(), and reco::IsolatedTauTagInfo::tracksInCone().

175  {
176  using namespace edm;
177 
178  //get l2 jet; match to pftau
179  Handle<PFTauCollection> thePFTaus;
180  iEvent.getByToken(_pfTauSource,thePFTaus);
181 
182  Handle<PFTauDiscriminator> thePFTauDiscriminatorByIsolation;
183  iEvent.getByToken(_pfTauIsoSource,thePFTauDiscriminatorByIsolation);
184 
185  Handle<PFTauDiscriminator> thePFTauDiscriminatorAgainstMuon;
186  iEvent.getByToken(_pfTauMuonDiscSource, thePFTauDiscriminatorAgainstMuon);
187 
188  Handle<VertexCollection> thePrimaryVertices;
189  iEvent.getByToken(_pVtxSource, thePrimaryVertices);
190  const reco::Vertex& theHltPrimaryVertex = (*thePrimaryVertices->begin());
191  theVertexPosition = math::XYZPoint(0.,0.,0.);
192  if(thePrimaryVertices->size() > 0) theVertexPosition = math::XYZPoint(theHltPrimaryVertex.position().x(),
193  theHltPrimaryVertex.position().y(),
194  theHltPrimaryVertex.position().z());
195 
196  //Loop over PFtaus
197  if(thePFTaus.isValid()){
198  edm::LogInfo("L25Analysis") << "Inside PFTau\n";
199  for(unsigned int pfTauIt = 0; pfTauIt < thePFTaus->size(); ++pfTauIt){
200  const PFTauRef thisTauRef(thePFTaus,pfTauIt);
201  pfTauIsoDisc = 0;
202  pfTauMuonDisc = 0;
203  if(thePFTauDiscriminatorByIsolation.isValid()){
204  const PFTauDiscriminator& disc = *(thePFTauDiscriminatorByIsolation.product());
205  pfTauIsoDisc = disc[thisTauRef];
206  }
207  if(thePFTauDiscriminatorAgainstMuon.isValid()){
208  const PFTauDiscriminator& disc = *(thePFTauDiscriminatorAgainstMuon.product());
209  pfTauMuonDisc = disc[thisTauRef];
210  }
211 
212  L2MatchedToPFtau = false;
213  pfTauHasLeadTrk = false;
214  pfTauInBounds = true;
215 
216  pfTauPt = thePFTaus->at(pfTauIt).pt();
217  pfTauEt = thePFTaus->at(pfTauIt).et();
218  pfTauEta = thePFTaus->at(pfTauIt).eta();
219  pfTauPhi = thePFTaus->at(pfTauIt).eta();
220 
221  const reco::PFCandidatePtr& thePFTauLeadTrack = thePFTaus->at(pfTauIt).leadPFChargedHadrCand();
222  if(thePFTauLeadTrack.isNonnull()){
223  pfTauHasLeadTrk = true;
224  pfTauNProngs = thePFTaus->at(pfTauIt).signalPFChargedHadrCands().size();
225  pfTauLTPt = thePFTaus->at(pfTauIt).leadPFChargedHadrCand()->pt();
226  pfTauTrkIso = thePFTaus->at(pfTauIt).isolationPFChargedHadrCandsPtSum();
227  pfTauGammaIso = thePFTaus->at(pfTauIt).isolationPFGammaCandsEtSum();
228  }
229 
230  const vector<reco::PFCandidatePtr>& theSignalCands = thePFTaus->at(pfTauIt).signalPFChargedHadrCands();
231  for(vector<reco::PFCandidatePtr>::const_iterator vIt = theSignalCands.begin(); vIt != theSignalCands.end(); ++vIt){
232  pftauSignalTrkDeltaR = ROOT::Math::VectorUtil::DeltaR((*vIt)->trackRef()->momentum(), thePFTauLeadTrack->momentum());
234  }
235 
236  const vector<reco::PFCandidatePtr>& theIsoCands = thePFTaus->at(pfTauIt).isolationPFChargedHadrCands();
237  pfTauNTrkIso = theIsoCands.size();
238  float PFTauLeadIsoPt = 0.;
239  Track thePFTauLeadIsoTrk;
240  for(vector<reco::PFCandidatePtr>::const_iterator vIt = theIsoCands.begin(); vIt != theIsoCands.end(); ++vIt){
241  pftauIsoTrkDeltaR = ROOT::Math::VectorUtil::DeltaR((*vIt)->trackRef()->momentum(), thePFTauLeadTrack->momentum());
243  pfTauIsoTrkPt = (*vIt)->trackRef()->pt();
244  if((*vIt)->trackRef()->pt() > PFTauLeadIsoPt){
245  thePFTauLeadIsoTrk = *((*vIt)->trackRef());
246  PFTauLeadIsoPt = (*vIt)->trackRef()->pt();
247  }
248  }
249 
250  // matched PFtau to l2 Jet with Et > 5 ... originially 15 but to strong for min bias
251  Handle<L2TauInfoAssociation> l2TauInfoAssoc; //Handle to the input (L2 Tau Info Association)
252  iEvent.getByToken(_l2TauInfoAssoc,l2TauInfoAssoc);
253  reco::CaloJet theMatchedL2Jet;
254  IsolatedTauTagInfo theMatchedL25TauTagInfo;
255  if(iEvent.getByToken(_l2TauInfoAssoc,l2TauInfoAssoc) && l2TauInfoAssoc->size()>0){
256  double matchDr = _l2l25MatchingCone;
257  for(L2TauInfoAssociation::const_iterator it = l2TauInfoAssoc->begin(); it != l2TauInfoAssoc->end(); ++it){
258  const reco::CaloJet& l2Jet =*(it->key);
259  if(l2Jet.et() < 15.) continue;
260  double delta = ROOT::Math::VectorUtil::DeltaR(thePFTaus->at(pfTauIt).p4(),l2Jet.p4());
261  if(delta < matchDr){
262  matchDr = delta;
263  L2MatchedToPFtau = true;
264  theMatchedL2Jet = l2Jet;
265  }
266  }
267  }
268 
269  //if(L2MatchedToPFtau) match to l25 and fill l25 variables
271  if(L2MatchedToPFtau){
272  l2JetEt = theMatchedL2Jet.et();
273  l2JetEta = theMatchedL2Jet.eta();
274  l2JetPhi = theMatchedL2Jet.phi();
275  if(iEvent.getByToken(_l25JetSource, tauTagInfo) && tauTagInfo->size()>0){
276  L25MatchedToL2 = false;
277  double minDeltaR = _l2l25MatchingCone;
278  //declare l25 tauTagInfo ...
279  //IsolatedTauTagInfo theMatchedL25TauTagInfo;
280  for(IsolatedTauTagInfoCollection::const_iterator i = tauTagInfo->begin();i!=tauTagInfo->end();++i){
281  double delta = ROOT::Math::VectorUtil::DeltaR(theMatchedL2Jet.p4(), i->jet()->p4());
282  if(delta < minDeltaR){
283  minDeltaR = delta;
284  L25MatchedToL2 = true;
285  theMatchedL25TauTagInfo = *i;
286  }
287  }
288  }
289 
290  pftauL25DeltaR = ROOT::Math::VectorUtil::DeltaR(thePFTaus->at(pfTauIt).p4(), theMatchedL25TauTagInfo.jet()->p4());
292 
293  const TrackRefVector theTauTagTracks = theMatchedL25TauTagInfo.allTracks();
294 
295  l25JetEt = theMatchedL25TauTagInfo.jet()->et();
296  l25JetEta = theMatchedL25TauTagInfo.jet()->eta();
297  l25JetPhi = theMatchedL25TauTagInfo.jet()->phi();
298  numPixTrkInJet = theTauTagTracks.size();
299  numQPixTrkInJet = theMatchedL25TauTagInfo.selectedTracks().size();
300  //get info for all tracks in tauTagInfo
301  for(TrackRefVector::const_iterator trkIt = theTauTagTracks.begin(); trkIt != theTauTagTracks.end(); ++trkIt){
302  l25TrkPt->push_back((*trkIt)->pt());
303  l25TrkEta->push_back((*trkIt)->eta());
304  l25TrkPhi->push_back((*trkIt)->phi());
305  l25TrkDz->push_back((*trkIt)->dz(theVertexPosition));
306  l25TrkDxy->push_back((*trkIt)->dxy(theVertexPosition));
307  l25TrkChi2->push_back((*trkIt)->chi2());
308  l25TrkChi2NdF->push_back((*trkIt)->normalizedChi2());
309  l25TrkNRecHits->push_back((*trkIt)->recHitsSize());
310  l25TrkNValidPixelHits->push_back((*trkIt)->hitPattern().numberOfValidPixelHits());
311  }
312  const TrackRef leadTk = theMatchedL25TauTagInfo.leadingSignalTrack(_l25JetLeadTkMacthingCone, _minTrackPt);
313  if(!leadTk){
314  hasLeadTrk=false;
318  leadTrkJetDeltaR=10;
319  leadTrkDeltaR=10;
320  }
321  else{
322  hasLeadTrk=true;
323  leadTrkJetDeltaR = ROOT::Math::VectorUtil::DeltaR(theMatchedL25TauTagInfo.jet()->p4().Vect(), leadTk->momentum());
324  leadSignalTrackPt=leadTk->pt();
325  if(pfTauLTPt != 0)leadTrkPtRes = (leadTk->pt() - pfTauLTPt) / pfTauLTPt;
326  leadTrkDeltaR = ROOT::Math::VectorUtil::DeltaR(thePFTauLeadTrack->momentum(), leadTk->momentum());
327 
328  //print info in the case where the pftau is isolated but the tauTag is not
329  bool l25IsoDisc = theMatchedL25TauTagInfo.discriminator(0.2,0.15,0.5,5.,1.,0,0.2);
330  if(pfTauTrkIso <= 1. && l25MatchedToPFTau && !l25IsoDisc) printInfo(thePFTaus->at(pfTauIt), theMatchedL25TauTagInfo);
331 
332  const TrackRefVector theSignalTracks = theMatchedL25TauTagInfo.tracksInCone(leadTk->momentum(), _signalCone, _minTrackPt);
333  const TrackRefVector theIsoTracks = theMatchedL25TauTagInfo.tracksInCone(leadTk->momentum(), _isolationCone, _minTrackPt);
334  numQPixTrkInSignalCone = theSignalTracks.size();
335  if(numQPixTrkInSignalCone > 0) numQPixTrkInAnnulus = theIsoTracks.size() - theSignalTracks.size();
336  //get the lead track in isolation
337  float l25LeadIsoPt = 0.;
338  Track theL25LeadIsoTrk;
339 
340  myNtrkIso = 0;
341  for(TrackRefVector::const_iterator isoIt = theIsoTracks.begin(); isoIt != theIsoTracks.end(); ++isoIt){
342  if(ROOT::Math::VectorUtil::DeltaR(leadTk->momentum(), (*isoIt)->momentum()) <= _signalCone){
343 
344  l25SignalTrkPt->push_back((*isoIt)->pt());
345  l25SignalTrkEta->push_back((*isoIt)->eta());
346  l25SignalTrkPhi->push_back((*isoIt)->phi());
347  l25SignalTrkDz->push_back((*isoIt)->dz(theVertexPosition));
348  l25SignalTrkDxy->push_back((*isoIt)->dxy(theVertexPosition));
349  l25SignalTrkChi2->push_back((*isoIt)->chi2());
350  l25SignalTrkChi2NdF->push_back((*isoIt)->normalizedChi2());
351  l25SignalTrkNRecHits->push_back((*isoIt)->recHitsSize());
352  l25SignalTrkNValidHits->push_back((*isoIt)->numberOfValidHits());
353  l25SignalTrkNValidPixelHits->push_back((*isoIt)->hitPattern().numberOfValidPixelHits());
354  l25SignalTrkNLostHits->push_back((*isoIt)->lost());
355 
356  }
357  else{
358  myNtrkIso++;
359 
360  l25IsoTrkPt->push_back((*isoIt)->pt());
361  l25IsoTrkChi2NdF->push_back((*isoIt)->normalizedChi2());
362  l25IsoTrkChi2->push_back((*isoIt)->chi2());
363  l25IsoTrkNValidHits->push_back((*isoIt)->numberOfValidHits());
364  l25IsoTrkNRecHits->push_back((*isoIt)->recHitsSize());
365  l25IsoTrkNValidPixelHits->push_back((*isoIt)->hitPattern().numberOfValidPixelHits());
366  l25IsoTrkNLostHits->push_back((*isoIt)->lost());
367  l25IsoTrkDxy->push_back((*isoIt)->dxy(theVertexPosition));
368  l25IsoTrkDz->push_back((*isoIt)->dz(theVertexPosition));
369  l25IsoTrkEta->push_back((*isoIt)->eta());
370  l25IsoTrkPhi->push_back((*isoIt)->phi());
371  if((*isoIt)->pt() > l25LeadIsoPt){
372  theL25LeadIsoTrk = **isoIt;
373  l25LeadIsoPt = (*isoIt)->pt();
374  }
375  }
376  }
377  //if((nIsoTraks > numQPixTrkInAnnulus) ? std::cout << "FUCK \n" : std::cout << "GREAT\n" );
378  if(thePFTauLeadIsoTrk.pt() != 0) leadIsoTrkPtRes = (theL25LeadIsoTrk.pt() - thePFTauLeadIsoTrk.pt()) /thePFTauLeadIsoTrk.pt();
379  leadIsoTrkDeltaR = ROOT::Math::VectorUtil::DeltaR(theL25LeadIsoTrk.momentum(), thePFTauLeadIsoTrk.momentum());
382  }
383  }
384  //Fill here per pfTau ...
385  l25tree->Fill();
386  clearVectors();
387  }
388  }
389  else std::cout << "Invalid PFTau Collection\n";
390 }
dbl * delta
Definition: mlp_gen.cc:36
std::vector< int > * l25SignalTrkNLostHits
virtual double et() const GCC11_FINAL
transverse energy
int i
Definition: DBlmapReader.cc:9
float _l2l25MatchingCone
Jets made from CaloTowers.
Definition: CaloJet.h:29
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:148
std::vector< float > * l25SignalTrkPt
virtual const LorentzVector & p4() const GCC11_FINAL
four-momentum Lorentz vector
std::vector< float > * l25TrkChi2
std::vector< float > * l25SignalTrkPhi
std::vector< int > * l25SignalTrkNRecHits
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
std::vector< float > * l25TrkDxy
std::vector< int > * l25SignalTrkNValidPixelHits
std::vector< float > * l25SignalTrkDxy
edm::EDGetTokenT< PFTauDiscriminator > _pfTauIsoSource
std::vector< int > * l25IsoTrkNValidHits
const_iterator end() const
Termination of iteration.
Definition: RefVector.h:249
edm::EDGetTokenT< L2TauInfoAssociation > _l2TauInfoAssoc
void printInfo(const reco::PFTau &thePFTau, const reco::IsolatedTauTagInfo &theTauTagInfo)
std::vector< float > * l25IsoTrkChi2
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:244
std::vector< int > * l25IsoTrkNLostHits
const TrackRefVector selectedTracks() const
edm::EDGetTokenT< PFTauCollection > _pfTauSource
int numQPixTrkInSignalCone
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
bool isNonnull() const
Checks for non-null.
Definition: Ptr.h:152
edm::EDGetTokenT< PFTauDiscriminator > _pfTauMuonDiscSource
std::vector< float > * l25SignalTrkChi2NdF
double pt() const
track transverse momentum
Definition: TrackBase.h:129
std::vector< float > * l25TrkPhi
std::vector< int > * l25IsoTrkNValidPixelHits
const TrackRefVector tracksInCone(const math::XYZVector &myVector, const float size, const float pt_min) const
std::vector< float > * l25TrkNValidPixelHits
edm::EDGetTokenT< IsolatedTauTagInfoCollection > _l25JetSource
std::vector< float > * l25IsoTrkPt
std::vector< float > * l25SignalTrkDz
virtual edm::RefToBase< Jet > jet(void) const
returns a polymorphic reference to the tagged jet
Definition: JTATagInfo.h:20
float pftauSignalTrkDeltaR
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
std::vector< float > * l25IsoTrkPhi
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::vector< int > * l25SignalTrkNValidHits
std::vector< float > * l25SignalTrkEta
virtual Vector momentum() const GCC11_FINAL
spatial momentum vector
std::vector< float > * l25TrkEta
edm::EDGetTokenT< VertexCollection > _pVtxSource
const TrackRef leadingSignalTrack() const
std::vector< float > * l25SignalTrkChi2
math::XYZPoint theVertexPosition
std::vector< float > * l25IsoTrkDxy
std::vector< int > * l25IsoTrkNRecHits
size_type size() const
Size of the RefVector.
Definition: RefVector.h:89
tuple cout
Definition: gather_cfg.py:121
float _l25JetLeadTkMacthingCone
std::vector< float > * l25TrkDz
std::vector< float > * l25IsoTrkChi2NdF
const TrackRefVector allTracks() const
std::vector< float > * l25IsoTrkEta
std::vector< float > * l25TrkNRecHits
std::vector< float > * l25IsoTrkDz
std::vector< float > * l25TrkPt
std::vector< float > * l25TrkChi2NdF
void L25TauAnalyzer::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 549 of file L25TauAnalyzer.cc.

549  {
550 }
void L25TauAnalyzer::clearVectors ( )
private

Definition at line 476 of file L25TauAnalyzer.cc.

476  {
477  l25TrkPt->clear();
478  l25TrkEta->clear();
479  l25TrkPhi->clear();
480  l25TrkDz->clear();
481  l25TrkDxy->clear();
482  l25TrkChi2->clear();
483  l25TrkChi2NdF->clear();
484  l25TrkNRecHits->clear();
485  l25TrkNValidPixelHits->clear();
486 
487  l25SignalTrkPt->clear();
488  l25SignalTrkEta->clear();
489  l25SignalTrkPhi->clear();
490  l25SignalTrkDz->clear();
491  l25SignalTrkDxy->clear();
492  l25SignalTrkChi2NdF->clear();
493  l25SignalTrkChi2->clear();
494  l25SignalTrkNRecHits->clear();
495  l25SignalTrkNValidHits->clear();
497  l25SignalTrkNLostHits->clear();
498 
499  l25IsoTrkPt->clear();
500  l25IsoTrkEta->clear();
501  l25IsoTrkPhi->clear();
502  l25IsoTrkDz->clear();
503  l25IsoTrkDxy->clear();
504  l25IsoTrkChi2->clear();
505  l25IsoTrkChi2NdF->clear();
506  l25IsoTrkNRecHits->clear();
507  l25IsoTrkNValidHits->clear();
508  l25IsoTrkNValidPixelHits->clear();
509  l25IsoTrkNLostHits->clear();
510 }
std::vector< int > * l25SignalTrkNLostHits
std::vector< float > * l25SignalTrkPt
std::vector< float > * l25TrkChi2
std::vector< float > * l25SignalTrkPhi
std::vector< int > * l25SignalTrkNRecHits
std::vector< float > * l25TrkDxy
std::vector< int > * l25SignalTrkNValidPixelHits
std::vector< float > * l25SignalTrkDxy
std::vector< int > * l25IsoTrkNValidHits
std::vector< float > * l25IsoTrkChi2
std::vector< int > * l25IsoTrkNLostHits
std::vector< float > * l25SignalTrkChi2NdF
std::vector< float > * l25TrkPhi
std::vector< int > * l25IsoTrkNValidPixelHits
std::vector< float > * l25TrkNValidPixelHits
std::vector< float > * l25IsoTrkPt
std::vector< float > * l25SignalTrkDz
std::vector< float > * l25IsoTrkPhi
std::vector< int > * l25SignalTrkNValidHits
std::vector< float > * l25SignalTrkEta
std::vector< float > * l25TrkEta
std::vector< float > * l25SignalTrkChi2
std::vector< float > * l25IsoTrkDxy
std::vector< int > * l25IsoTrkNRecHits
std::vector< float > * l25TrkDz
std::vector< float > * l25IsoTrkChi2NdF
std::vector< float > * l25IsoTrkEta
std::vector< float > * l25TrkNRecHits
std::vector< float > * l25IsoTrkDz
std::vector< float > * l25TrkPt
std::vector< float > * l25TrkChi2NdF
void L25TauAnalyzer::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 553 of file L25TauAnalyzer.cc.

553  {
554 }
void L25TauAnalyzer::initializeVectors ( )
private

Definition at line 512 of file L25TauAnalyzer.cc.

References NULL.

512  {
513  l25TrkPt = NULL;
514  l25TrkEta= NULL;
515  l25TrkPhi= NULL;
516  l25TrkDz= NULL;
517  l25TrkDxy= NULL;
518  l25TrkChi2= NULL;
522 
534 
535  l25IsoTrkPt= NULL;
543  l25IsoTrkDz= NULL;
546 }
std::vector< int > * l25SignalTrkNLostHits
std::vector< float > * l25SignalTrkPt
std::vector< float > * l25TrkChi2
std::vector< float > * l25SignalTrkPhi
std::vector< int > * l25SignalTrkNRecHits
std::vector< float > * l25TrkDxy
std::vector< int > * l25SignalTrkNValidPixelHits
std::vector< float > * l25SignalTrkDxy
#define NULL
Definition: scimark2.h:8
std::vector< int > * l25IsoTrkNValidHits
std::vector< float > * l25IsoTrkChi2
std::vector< int > * l25IsoTrkNLostHits
std::vector< float > * l25SignalTrkChi2NdF
std::vector< float > * l25TrkPhi
std::vector< int > * l25IsoTrkNValidPixelHits
std::vector< float > * l25TrkNValidPixelHits
std::vector< float > * l25IsoTrkPt
std::vector< float > * l25SignalTrkDz
std::vector< float > * l25IsoTrkPhi
std::vector< int > * l25SignalTrkNValidHits
std::vector< float > * l25SignalTrkEta
std::vector< float > * l25TrkEta
std::vector< float > * l25SignalTrkChi2
std::vector< float > * l25IsoTrkDxy
std::vector< int > * l25IsoTrkNRecHits
std::vector< float > * l25TrkDz
std::vector< float > * l25IsoTrkChi2NdF
std::vector< float > * l25IsoTrkEta
std::vector< float > * l25TrkNRecHits
std::vector< float > * l25IsoTrkDz
std::vector< float > * l25TrkPt
std::vector< float > * l25TrkChi2NdF
reco::PFTau L25TauAnalyzer::match ( const reco::Jet jet,
const reco::PFTauCollection thePFTauColl 
)
private

Definition at line 394 of file L25TauAnalyzer.cc.

References delta, and reco::LeafCandidate::p4().

394  {
395 
396  //Loop On the Collection and see if your tau jet is matched to one there
397  //Also find the nearest Matched MC Particle to your Jet (to be complete)
398  // switch reference collection to pftau; match to this.
399 
400  reco::PFTau theMatchedPFTau;
401  double matchDr=0.3;
402 
403  if(thePFTauColl.size()>0)
404  for(reco::PFTauCollection::const_iterator it = thePFTauColl.begin(); it != thePFTauColl.end(); ++it){
405  double delta = ROOT::Math::VectorUtil::DeltaR(jet.p4(),(*it).p4());
406  if(delta<matchDr){
407  matchDr = delta;
408  theMatchedPFTau = *it;
409  }
410  }
411  return theMatchedPFTau;
412 }
dbl * delta
Definition: mlp_gen.cc:36
virtual const LorentzVector & p4() const GCC11_FINAL
four-momentum Lorentz vector
reco::CaloJet L25TauAnalyzer::matchedToPFTau ( const reco::PFTau thePFTau,
const reco::L2TauInfoAssociation theL2Info 
)
private

Definition at line 414 of file L25TauAnalyzer.cc.

References edm::AssociationMap< Tag >::begin(), delta, edm::AssociationMap< Tag >::end(), reco::LeafCandidate::et(), and reco::LeafCandidate::p4().

414  {
415  double matchDr = 0.5;
416  reco::CaloJet theMatchedJet;
417  for(L2TauInfoAssociation::const_iterator it = theL2Info.begin(); it != theL2Info.end(); ++it){
418  const reco::CaloJet& l2Jet =*(it->key);
419  if(l2Jet.et() < 15.) continue;
420  double delta = ROOT::Math::VectorUtil::DeltaR(thePFTau.p4(),l2Jet.p4());
421  if(delta < matchDr){
422  matchDr = delta;
423  theMatchedJet = l2Jet;
424  }
425  }
426  return theMatchedJet;
427 }
dbl * delta
Definition: mlp_gen.cc:36
virtual double et() const GCC11_FINAL
transverse energy
Jets made from CaloTowers.
Definition: CaloJet.h:29
virtual const LorentzVector & p4() const GCC11_FINAL
four-momentum Lorentz vector
const_iterator end() const
last iterator over the map (read only)
const_iterator begin() const
first iterator over the map (read only)
void L25TauAnalyzer::printInfo ( const reco::PFTau thePFTau,
const reco::IsolatedTauTagInfo theTauTagInfo 
)
private

Definition at line 429 of file L25TauAnalyzer.cc.

References edm::RefVector< C, T, F >::begin(), gather_cfg::cout, deltaR(), edm::RefVector< C, T, F >::end(), reco::LeafCandidate::et(), reco::LeafCandidate::eta(), reco::PFTau::isolationPFChargedHadrCands(), reco::JTATagInfo::jet(), reco::IsolatedTauTagInfo::leadingSignalTrack(), reco::PFTau::leadPFChargedHadrCand(), reco::LeafCandidate::phi(), edm::RefVector< C, T, F >::size(), and reco::IsolatedTauTagInfo::tracksInCone().

429  {
430  const TrackRef theLeadTrack = theTauTagInfo.leadingSignalTrack(_l25JetLeadTkMacthingCone, _minTrackPt);
431  const TrackRefVector theSignalTracks = theTauTagInfo.tracksInCone(theLeadTrack->momentum(), _signalCone, _minTrackPt);
432  const TrackRefVector theIsoTracks = theTauTagInfo.tracksInCone(theLeadTrack->momentum(), _isolationCone, _minTrackPt);
433 
434  std::cout << " Isolated PFTau Matched to Non-Isolated L25 Object( PFTau:L25)"
435  << "\n Et\t" << thePFTau.et() << "\t" << theTauTagInfo.jet()->et()
436  << "\n Eta\t" << thePFTau.eta() << "\t" << theTauTagInfo.jet()->eta()
437  << "\n Phi\t" << thePFTau.phi() << "\t" << theTauTagInfo.jet()->phi()
438  << "\n LTPt\t" << thePFTau.leadPFChargedHadrCand()->pt() << "\t" << theLeadTrack->pt()
439  << "\n LTEta\t" << thePFTau.leadPFChargedHadrCand()->eta() << "\t" << theLeadTrack->eta()
440  << "\n LTPhi\t" << thePFTau.leadPFChargedHadrCand()->phi() << "\t" << theLeadTrack->phi()
441  << "\n NIso\t" << thePFTau.isolationPFChargedHadrCands().size() << "\t" << theIsoTracks.size() - theSignalTracks.size()
442  <<"\n";
443 
444  unsigned int nIsoTrk = 0;
445  std::cout << " Tracks in L2.5 Iso: (Pt:Eta:Phi:DR:Chi2:Chi2/NdF:PxlHits:dxy:dz)\n";
446  for(TrackRefVector::const_iterator isoIt = theIsoTracks.begin(); isoIt != theIsoTracks.end(); ++isoIt){
447  double isoTrackLeadTrkDeltaR = deltaR(theLeadTrack->eta(), theLeadTrack->phi(), (*isoIt)->eta(), (*isoIt)->phi());
448  if(isoTrackLeadTrkDeltaR > _signalCone){
449  nIsoTrk++;
450  cout << nIsoTrk
451  << "\t" << (*isoIt)->pt()
452  << "\t" << (*isoIt)->eta()
453  << "\t" << (*isoIt)->phi()
454  << "\t" << isoTrackLeadTrkDeltaR
455  << "\t" << (*isoIt)->chi2()
456  << "\t" << (*isoIt)->normalizedChi2()
457  << "\t" << (*isoIt)->hitPattern().numberOfValidPixelHits()
458  << "\t" << (*isoIt)->dxy(theVertexPosition)
459  << "\t" << (*isoIt)->dz(theVertexPosition)
460  << "\t" << theVertexPosition
461  << "\n";
462  }
463  }
464  nIsoTrk = 0;
465  std::cout << "Tracks in PFTau Iso: (Pt:Eta:Phi)\n";
466  for(vector<reco::PFCandidatePtr>::const_iterator isoIt = thePFTau.isolationPFChargedHadrCands().begin();
467  isoIt != thePFTau.isolationPFChargedHadrCands().end(); ++isoIt){
468  nIsoTrk++;
469  cout << nIsoTrk << "\t"
470  << (*isoIt)->pt() << "\t"
471  << (*isoIt)->eta() << "\t"
472  << (*isoIt)->phi() << "\n";
473  }
474 }
virtual double et() const GCC11_FINAL
transverse energy
const PFCandidatePtr & leadPFChargedHadrCand() const
Definition: PFTau.cc:61
const_iterator end() const
Termination of iteration.
Definition: RefVector.h:249
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:244
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
const TrackRefVector tracksInCone(const math::XYZVector &myVector, const float size, const float pt_min) const
const std::vector< reco::PFCandidatePtr > & isolationPFChargedHadrCands() const
Charged candidates in isolation region.
Definition: PFTau.cc:83
virtual edm::RefToBase< Jet > jet(void) const
returns a polymorphic reference to the tagged jet
Definition: JTATagInfo.h:20
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
const TrackRef leadingSignalTrack() const
math::XYZPoint theVertexPosition
size_type size() const
Size of the RefVector.
Definition: RefVector.h:89
tuple cout
Definition: gather_cfg.py:121
float _l25JetLeadTkMacthingCone

Member Data Documentation

float L25TauAnalyzer::_isolationCone
private

Definition at line 84 of file L25TauAnalyzer.h.

float L25TauAnalyzer::_l25Dz
private

Definition at line 87 of file L25TauAnalyzer.h.

float L25TauAnalyzer::_l25JetLeadTkMacthingCone
private

Definition at line 86 of file L25TauAnalyzer.h.

edm::EDGetTokenT<IsolatedTauTagInfoCollection> L25TauAnalyzer::_l25JetSource
private

Definition at line 73 of file L25TauAnalyzer.h.

float L25TauAnalyzer::_l25LeadTkPtMin
private

Definition at line 88 of file L25TauAnalyzer.h.

float L25TauAnalyzer::_l2l25MatchingCone
private

Definition at line 85 of file L25TauAnalyzer.h.

edm::EDGetTokenT<L2TauInfoAssociation> L25TauAnalyzer::_l2TauInfoAssoc
private

Definition at line 74 of file L25TauAnalyzer.h.

float L25TauAnalyzer::_minTrackPt
private

Definition at line 82 of file L25TauAnalyzer.h.

int L25TauAnalyzer::_nTrkIso
private

Definition at line 89 of file L25TauAnalyzer.h.

edm::EDGetTokenT<PFTauDiscriminator> L25TauAnalyzer::_pfTauIsoSource
private

Definition at line 77 of file L25TauAnalyzer.h.

edm::EDGetTokenT<PFTauDiscriminator> L25TauAnalyzer::_pfTauMuonDiscSource
private

Definition at line 78 of file L25TauAnalyzer.h.

edm::EDGetTokenT<PFTauCollection> L25TauAnalyzer::_pfTauSource
private

Definition at line 75 of file L25TauAnalyzer.h.

edm::EDGetTokenT<VertexCollection> L25TauAnalyzer::_pVtxSource
private

Definition at line 76 of file L25TauAnalyzer.h.

float L25TauAnalyzer::_signalCone
private

Definition at line 83 of file L25TauAnalyzer.h.

bool L25TauAnalyzer::hasLeadTrk
private

Definition at line 137 of file L25TauAnalyzer.h.

bool L25TauAnalyzer::l25Disc_JetDir
private

Definition at line 173 of file L25TauAnalyzer.h.

bool L25TauAnalyzer::l25Disc_LeadTkDir
private

Definition at line 172 of file L25TauAnalyzer.h.

bool L25TauAnalyzer::l25Disc_Trk5_IsoPtMin2_NTrk0
private

Definition at line 174 of file L25TauAnalyzer.h.

std::vector<float>* L25TauAnalyzer::l25IsoTrkChi2
private

Definition at line 127 of file L25TauAnalyzer.h.

std::vector<float>* L25TauAnalyzer::l25IsoTrkChi2NdF
private

Definition at line 126 of file L25TauAnalyzer.h.

std::vector<float>* L25TauAnalyzer::l25IsoTrkDxy
private

Definition at line 128 of file L25TauAnalyzer.h.

std::vector<float>* L25TauAnalyzer::l25IsoTrkDz
private

Definition at line 129 of file L25TauAnalyzer.h.

std::vector<float>* L25TauAnalyzer::l25IsoTrkEta
private

Definition at line 130 of file L25TauAnalyzer.h.

std::vector<int>* L25TauAnalyzer::l25IsoTrkNLostHits
private

Definition at line 135 of file L25TauAnalyzer.h.

std::vector<int>* L25TauAnalyzer::l25IsoTrkNRecHits
private

Definition at line 133 of file L25TauAnalyzer.h.

std::vector<int>* L25TauAnalyzer::l25IsoTrkNValidHits
private

Definition at line 132 of file L25TauAnalyzer.h.

std::vector<int>* L25TauAnalyzer::l25IsoTrkNValidPixelHits
private

Definition at line 134 of file L25TauAnalyzer.h.

std::vector<float>* L25TauAnalyzer::l25IsoTrkPhi
private

Definition at line 131 of file L25TauAnalyzer.h.

std::vector<float>* L25TauAnalyzer::l25IsoTrkPt
private

Definition at line 125 of file L25TauAnalyzer.h.

float L25TauAnalyzer::l25JetEt
private

Definition at line 99 of file L25TauAnalyzer.h.

float L25TauAnalyzer::l25JetEta
private

Definition at line 100 of file L25TauAnalyzer.h.

float L25TauAnalyzer::l25JetPhi
private

Definition at line 101 of file L25TauAnalyzer.h.

bool L25TauAnalyzer::L25MatchedToL2
private

Definition at line 170 of file L25TauAnalyzer.h.

bool L25TauAnalyzer::l25MatchedToPFTau
private

Definition at line 168 of file L25TauAnalyzer.h.

std::vector<float>* L25TauAnalyzer::l25SignalTrkChi2
private

Definition at line 115 of file L25TauAnalyzer.h.

std::vector<float>* L25TauAnalyzer::l25SignalTrkChi2NdF
private

Definition at line 114 of file L25TauAnalyzer.h.

std::vector<float>* L25TauAnalyzer::l25SignalTrkDxy
private

Definition at line 116 of file L25TauAnalyzer.h.

std::vector<float>* L25TauAnalyzer::l25SignalTrkDz
private

Definition at line 117 of file L25TauAnalyzer.h.

std::vector<float>* L25TauAnalyzer::l25SignalTrkEta
private

Definition at line 118 of file L25TauAnalyzer.h.

std::vector<int>* L25TauAnalyzer::l25SignalTrkNLostHits
private

Definition at line 123 of file L25TauAnalyzer.h.

std::vector<int>* L25TauAnalyzer::l25SignalTrkNRecHits
private

Definition at line 121 of file L25TauAnalyzer.h.

std::vector<int>* L25TauAnalyzer::l25SignalTrkNValidHits
private

Definition at line 120 of file L25TauAnalyzer.h.

std::vector<int>* L25TauAnalyzer::l25SignalTrkNValidPixelHits
private

Definition at line 122 of file L25TauAnalyzer.h.

std::vector<float>* L25TauAnalyzer::l25SignalTrkPhi
private

Definition at line 119 of file L25TauAnalyzer.h.

std::vector<float>* L25TauAnalyzer::l25SignalTrkPt
private

Definition at line 113 of file L25TauAnalyzer.h.

TTree* L25TauAnalyzer::l25tree
private

Definition at line 91 of file L25TauAnalyzer.h.

std::vector<float>* L25TauAnalyzer::l25TrkChi2
private

Definition at line 108 of file L25TauAnalyzer.h.

std::vector<float>* L25TauAnalyzer::l25TrkChi2NdF
private

Definition at line 109 of file L25TauAnalyzer.h.

std::vector<float>* L25TauAnalyzer::l25TrkDxy
private

Definition at line 107 of file L25TauAnalyzer.h.

std::vector<float>* L25TauAnalyzer::l25TrkDz
private

Definition at line 106 of file L25TauAnalyzer.h.

std::vector<float>* L25TauAnalyzer::l25TrkEta
private

Definition at line 104 of file L25TauAnalyzer.h.

std::vector<float>* L25TauAnalyzer::l25TrkNRecHits
private

Definition at line 110 of file L25TauAnalyzer.h.

std::vector<float>* L25TauAnalyzer::l25TrkNValidPixelHits
private

Definition at line 111 of file L25TauAnalyzer.h.

std::vector<float>* L25TauAnalyzer::l25TrkPhi
private

Definition at line 105 of file L25TauAnalyzer.h.

std::vector<float>* L25TauAnalyzer::l25TrkPt
private

Definition at line 103 of file L25TauAnalyzer.h.

float L25TauAnalyzer::l2JetEt
private

Definition at line 164 of file L25TauAnalyzer.h.

float L25TauAnalyzer::l2JetEta
private

Definition at line 165 of file L25TauAnalyzer.h.

float L25TauAnalyzer::l2JetPhi
private

Definition at line 166 of file L25TauAnalyzer.h.

bool L25TauAnalyzer::L2MatchedToPFtau
private

Definition at line 169 of file L25TauAnalyzer.h.

float L25TauAnalyzer::leadIsoTrkDeltaR
private

Definition at line 160 of file L25TauAnalyzer.h.

float L25TauAnalyzer::leadIsoTrkPtRes
private

Definition at line 159 of file L25TauAnalyzer.h.

float L25TauAnalyzer::leadSignalTrackPt
private

Definition at line 138 of file L25TauAnalyzer.h.

float L25TauAnalyzer::leadTrkDeltaR
private

Definition at line 158 of file L25TauAnalyzer.h.

float L25TauAnalyzer::leadTrkJetDeltaR
private

Definition at line 139 of file L25TauAnalyzer.h.

float L25TauAnalyzer::leadTrkPtRes
private

Definition at line 157 of file L25TauAnalyzer.h.

int L25TauAnalyzer::myNtrkIso
private

Definition at line 97 of file L25TauAnalyzer.h.

int L25TauAnalyzer::numPixTrkInJet
private

Definition at line 93 of file L25TauAnalyzer.h.

int L25TauAnalyzer::numQPixTrkInAnnulus
private

Definition at line 96 of file L25TauAnalyzer.h.

int L25TauAnalyzer::numQPixTrkInJet
private

Definition at line 94 of file L25TauAnalyzer.h.

int L25TauAnalyzer::numQPixTrkInSignalCone
private

Definition at line 95 of file L25TauAnalyzer.h.

float L25TauAnalyzer::pfTauElecDisc
private

Definition at line 146 of file L25TauAnalyzer.h.

float L25TauAnalyzer::pfTauEt
private

Definition at line 147 of file L25TauAnalyzer.h.

float L25TauAnalyzer::pfTauEta
private

Definition at line 149 of file L25TauAnalyzer.h.

float L25TauAnalyzer::pfTauGammaIso
private

Definition at line 154 of file L25TauAnalyzer.h.

bool L25TauAnalyzer::pfTauHasLeadTrk
private

Definition at line 142 of file L25TauAnalyzer.h.

bool L25TauAnalyzer::pfTauInBounds
private

Definition at line 143 of file L25TauAnalyzer.h.

float L25TauAnalyzer::pfTauIsoDisc
private

Definition at line 144 of file L25TauAnalyzer.h.

float L25TauAnalyzer::pftauIsoTrkDeltaR
private

Definition at line 162 of file L25TauAnalyzer.h.

float L25TauAnalyzer::pfTauIsoTrkPt
private

Definition at line 156 of file L25TauAnalyzer.h.

float L25TauAnalyzer::pftauL25DeltaR
private

Definition at line 140 of file L25TauAnalyzer.h.

float L25TauAnalyzer::pfTauLTPt
private

Definition at line 151 of file L25TauAnalyzer.h.

float L25TauAnalyzer::pfTauMuonDisc
private

Definition at line 145 of file L25TauAnalyzer.h.

int L25TauAnalyzer::pfTauNProngs
private

Definition at line 152 of file L25TauAnalyzer.h.

int L25TauAnalyzer::pfTauNTrkIso
private

Definition at line 155 of file L25TauAnalyzer.h.

float L25TauAnalyzer::pfTauPhi
private

Definition at line 150 of file L25TauAnalyzer.h.

float L25TauAnalyzer::pfTauPt
private

Definition at line 148 of file L25TauAnalyzer.h.

float L25TauAnalyzer::pftauSignalTrkDeltaR
private

Definition at line 161 of file L25TauAnalyzer.h.

float L25TauAnalyzer::pfTauTrkIso
private

Definition at line 153 of file L25TauAnalyzer.h.

bool L25TauAnalyzer::signal_
private

Definition at line 81 of file L25TauAnalyzer.h.

math::XYZPoint L25TauAnalyzer::theVertexPosition
private

Definition at line 79 of file L25TauAnalyzer.h.