CMS 3D CMS Logo

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

#include <TCTauAlgorithm.h>

Public Types

enum  {
  TCAlgoUndetermined, TCAlgoMomentum, TCAlgoTrackProblem, TCAlgoMomentumECAL,
  TCAlgoCaloJet, TCAlgoHadronicJet
}
 

Public Member Functions

int algoComponent ()
 
int allTauCandidates ()
 
double efficiency ()
 
void eventSetup (const edm::Event &, const edm::EventSetup &)
 
void inputConfig (const edm::ParameterSet &iConfig, edm::ConsumesCollector &iC)
 
math::XYZTLorentzVector recalculateEnergy (const reco::CaloTau &)
 
math::XYZTLorentzVector recalculateEnergy (const reco::CaloJet &, const reco::TrackRef &, const reco::TrackRefVector &)
 
int statistics ()
 
 TCTauAlgorithm ()
 
 TCTauAlgorithm (const edm::ParameterSet &, edm::ConsumesCollector &&)
 
 ~TCTauAlgorithm ()
 

Private Member Functions

math::XYZVector getCellMomentum (const CaloCellGeometry *, double &)
 
std::pair< math::XYZVector,
math::XYZVector
getClusterEnergy (const reco::CaloJet &, math::XYZVector &, double)
 
void init ()
 
math::XYZVector trackEcalHitPoint (const reco::TransientTrack &, const reco::CaloJet &)
 
math::XYZVector trackEcalHitPoint (const reco::Track &)
 

Private Attributes

int algoComponentUsed
 
int all
 
bool dropCaloJets
 
bool dropRejected
 
const CaloSubdetectorGeometryEB
 
edm::Handle< EBRecHitCollectionEBRecHits
 
double ecalCone
 
edm::InputTag EcalRecHitsEB_input
 
edm::InputTag EcalRecHitsEE_input
 
const CaloSubdetectorGeometryEE
 
edm::Handle< EERecHitCollectionEERecHits
 
double etCaloOverTrackMax
 
double etCaloOverTrackMin
 
double etHcalOverTrackMax
 
double etHcalOverTrackMin
 
const edm::Eventevent
 
const CaloSubdetectorGeometryHB
 
edm::Handle< HBHERecHitCollectionHBHERecHits
 
edm::InputTag HBHERecHits_input
 
const CaloSubdetectorGeometryHE
 
const CaloSubdetectorGeometryHF
 
edm::Handle< HFRecHitCollectionHFRecHits
 
edm::InputTag HFRecHits_input
 
const CaloSubdetectorGeometryHO
 
edm::Handle< HORecHitCollectionHORecHits
 
edm::InputTag HORecHits_input
 
int passed
 
int prongs
 
const edm::EventSetupsetup
 
double signalCone
 
TrackDetectorAssociatortrackAssociator
 
TrackAssociatorParameters trackAssociatorParameters
 
const TransientTrackBuildertransientTrackBuilder
 

Detailed Description

Definition at line 45 of file TCTauAlgorithm.h.

Member Enumeration Documentation

anonymous enum

Constructor & Destructor Documentation

TCTauAlgorithm::TCTauAlgorithm ( )

Definition at line 15 of file TCTauAlgorithm.cc.

References init.

15  {
16  init();
17 }
TCTauAlgorithm::TCTauAlgorithm ( const edm::ParameterSet iConfig,
edm::ConsumesCollector &&  iC 
)

Definition at line 19 of file TCTauAlgorithm.cc.

References init.

19  {
20  init();
21  inputConfig(iConfig, iC);
22 }
void inputConfig(const edm::ParameterSet &iConfig, edm::ConsumesCollector &iC)
TCTauAlgorithm::~TCTauAlgorithm ( )

Definition at line 24 of file TCTauAlgorithm.cc.

24 {}

Member Function Documentation

int TCTauAlgorithm::algoComponent ( )

Definition at line 76 of file TCTauAlgorithm.cc.

Referenced by TCTauCorrector::algoComponent().

76  {
77  return algoComponentUsed;
78 }
int TCTauAlgorithm::allTauCandidates ( )

Definition at line 72 of file TCTauAlgorithm.cc.

References cond::ecalcond::all.

Referenced by TCTauCorrector::allTauCandidates().

72  {
73  return all;
74 }
double TCTauAlgorithm::efficiency ( )

Definition at line 64 of file TCTauAlgorithm.cc.

References cond::ecalcond::all.

Referenced by TCTauCorrector::efficiency().

64  {
65  return double(passed)/all;
66 }
void TCTauAlgorithm::eventSetup ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)

Definition at line 80 of file TCTauAlgorithm.cc.

References egHLT::errCodes::EBRecHits, DetId::Ecal, EcalBarrel, EcalEndcap, HWWFunctions::EE, egHLT::errCodes::EERecHits, geometry, edm::EventSetup::get(), edm::Event::getByLabel(), egHLT::errCodes::HBHERecHits, DetId::Hcal, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, HF, egHLT::errCodes::HFRecHits, iEvent, edm::ESHandle< class >::product(), and HcalObjRepresent::setup().

Referenced by TCTauCorrector::eventSetup().

80  {
81 
82  event = &iEvent;
83  setup = &iSetup;
84 
86  iSetup.get<TransientTrackRecord>().get("TransientTrackBuilder",builder);
87  transientTrackBuilder = builder.product();
88 
89  // geometry initialization
91  iSetup.get<CaloGeometryRecord>().get(geometry);
92 
93 
94  EB = geometry->getSubdetectorGeometry(DetId::Ecal,EcalBarrel);
95  EE = geometry->getSubdetectorGeometry(DetId::Ecal,EcalEndcap);
96  HB = geometry->getSubdetectorGeometry(DetId::Hcal,HcalBarrel);
97  HE = geometry->getSubdetectorGeometry(DetId::Hcal,HcalEndcap);
98  HO = geometry->getSubdetectorGeometry(DetId::Hcal,HcalOuter);
99  HF = geometry->getSubdetectorGeometry(DetId::Hcal,HcalForward);
100 
101  //hits
104 
108 }
edm::Handle< HORecHitCollection > HORecHits
const edm::EventSetup * setup
const CaloSubdetectorGeometry * HO
const CaloSubdetectorGeometry * HE
const CaloSubdetectorGeometry * EB
int iEvent
Definition: GenABIO.cc:230
edm::InputTag EcalRecHitsEB_input
edm::Handle< HBHERecHitCollection > HBHERecHits
const CaloSubdetectorGeometry * HF
const CaloSubdetectorGeometry * EE
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
edm::InputTag HBHERecHits_input
edm::Handle< EERecHitCollection > EERecHits
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
const TransientTrackBuilder * transientTrackBuilder
edm::InputTag HORecHits_input
ESHandle< TrackerGeometry > geometry
edm::Handle< HFRecHitCollection > HFRecHits
edm::InputTag EcalRecHitsEE_input
edm::InputTag HFRecHits_input
edm::Handle< EBRecHitCollection > EBRecHits
const CaloSubdetectorGeometry * HB
XYZVector TCTauAlgorithm::getCellMomentum ( const CaloCellGeometry cell,
double &  energy 
)
private

Definition at line 352 of file TCTauAlgorithm.cc.

References funct::cos(), CaloCellGeometry::getPosition(), phi, PV3DBase< T, PVType, FrameType >::phi(), funct::sin(), PV3DBase< T, PVType, FrameType >::theta(), and theta().

352  {
353  XYZVector momentum(0,0,0);
354  if(cell){
355  GlobalPoint hitPosition = cell->getPosition();
356 
357  double phi = hitPosition.phi();
358  double theta = hitPosition.theta();
359  if(theta > 3.14159) theta = 2*3.14159 - theta;
360  double px = energy * sin(theta)*cos(phi);
361  double py = energy * sin(theta)*sin(phi);
362  double pz = energy * cos(theta);
363 
364  momentum = XYZVector(px,py,pz);
365  }
366  return momentum;
367 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
Geom::Theta< T > theta() const
Geom::Theta< T > theta() const
Definition: PV3DBase.h:75
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
const GlobalPoint & getPosition() const
Returns the position of reference for this cell.
Definition: DDAxes.h:10
std::pair< XYZVector, XYZVector > TCTauAlgorithm::getClusterEnergy ( const reco::CaloJet ,
math::XYZVector ,
double   
)
private

Definition at line 252 of file TCTauAlgorithm.cc.

References DetId::det(), egHLT::errCodes::EBRecHits, DetId::Ecal, ecaldqm::ecalID(), HWWFunctions::EE, egHLT::errCodes::EERecHits, relval_parameters_module::energy, reco::CaloJet::getCaloConstituents(), egHLT::errCodes::HBHERecHits, DetId::Hcal, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, HF, egHLT::errCodes::HFRecHits, i, j, and DetId::subdetId().

252  {
253 
254  XYZVector ecalCluster(0,0,0);
255  XYZVector hcalCluster(0,0,0);
256 
257  std::vector<CaloTowerPtr> towers = caloJet.getCaloConstituents();
258 
259  for(std::vector<CaloTowerPtr>::const_iterator iTower = towers.begin();
260  iTower!= towers.end(); ++iTower){
261  std::vector<XYZVector> ECALCells;
262  std::vector<XYZVector> HCALCells;
263 
264  size_t numRecHits = (**iTower).constituentsSize();
265 
266  // access CaloRecHits
267  for(size_t j = 0; j < numRecHits; j++) {
268  DetId recHitDetID = (**iTower).constituent(j);
269  //DetId::Detector detNum=recHitDetID.det();
270  if( recHitDetID.det() == DetId::Ecal ){
271  if( recHitDetID.subdetId() == 1 ){ // Ecal Barrel
272  EBDetId ecalID = recHitDetID;
273  EBRecHitCollection::const_iterator theRecHit = EBRecHits->find(ecalID);
274  if(theRecHit != EBRecHits->end()){
275  DetId id = theRecHit->detid();
276  const CaloCellGeometry* this_cell = EB->getGeometry(id);
277  double energy = theRecHit->energy();
278  ECALCells.push_back(getCellMomentum(this_cell,energy));
279  }
280  }
281  if( recHitDetID.subdetId() == 2 ){ // Ecal Endcap
282  EEDetId ecalID = recHitDetID;
283  EERecHitCollection::const_iterator theRecHit = EERecHits->find(ecalID);
284  if(theRecHit != EERecHits->end()){
285  DetId id = theRecHit->detid();
286  const CaloCellGeometry* this_cell = EE->getGeometry(id);
287  double energy = theRecHit->energy();
288  ECALCells.push_back(getCellMomentum(this_cell,energy));
289  }
290  }
291  }
292  if( recHitDetID.det() == DetId::Hcal ){
293  HcalDetId hcalID = recHitDetID;
294  if( recHitDetID.subdetId() == HcalBarrel ){
295  //int depth = hcalID.depth();
296  //if (depth==1){
297  HBHERecHitCollection::const_iterator theRecHit=HBHERecHits->find(hcalID);
298  if(theRecHit != HBHERecHits->end()){
299  DetId id = theRecHit->detid();
300  const CaloCellGeometry* this_cell = HB->getGeometry(id);
301  double energy = theRecHit->energy();
302  HCALCells.push_back(getCellMomentum(this_cell,energy));
303  }
304  //}
305  }
306  if( recHitDetID.subdetId() == HcalEndcap ){
307  //int depth = hcalID.depth();
308  //if (depth==1){
309  HBHERecHitCollection::const_iterator theRecHit=HBHERecHits->find(hcalID);
310  if(theRecHit != HBHERecHits->end()){
311  DetId id = theRecHit->detid();
312  const CaloCellGeometry* this_cell = HE->getGeometry(id);
313  double energy = theRecHit->energy();
314  HCALCells.push_back(getCellMomentum(this_cell,energy));
315  }
316  //}
317  }
318  if( recHitDetID.subdetId() == HcalOuter ){
319  HORecHitCollection::const_iterator theRecHit=HORecHits->find(hcalID);
320  if(theRecHit != HORecHits->end()){
321  DetId id = theRecHit->detid();
322  const CaloCellGeometry* this_cell = HO->getGeometry(id);
323  double energy = theRecHit->energy();
324  HCALCells.push_back(getCellMomentum(this_cell,energy));
325  }
326  }
327  if( recHitDetID.subdetId() == HcalForward ){
328  HFRecHitCollection::const_iterator theRecHit=HFRecHits->find(hcalID);
329  if(theRecHit != HFRecHits->end()){
330  DetId id = theRecHit->detid();
331  const CaloCellGeometry* this_cell = HF->getGeometry(id);
332  double energy = theRecHit->energy();
333  HCALCells.push_back(getCellMomentum(this_cell,energy));
334  }
335  }
336  }
337  }
338 
339  std::vector<XYZVector>::const_iterator i;
340  for(i = ECALCells.begin(); i != ECALCells.end(); ++i) {
341  double DR = ROOT::Math::VectorUtil::DeltaR(trackEcalHitPoint,*i);
342  if( DR < cone ) ecalCluster += *i;
343  }
344  for(i = HCALCells.begin(); i != HCALCells.end(); ++i) {
345  double DR = ROOT::Math::VectorUtil::DeltaR(trackEcalHitPoint,*i);
346  if( DR < cone ) hcalCluster += *i;
347  }
348  }
349  return std::pair<XYZVector,XYZVector> (ecalCluster,hcalCluster);
350 }
int i
Definition: DBlmapReader.cc:9
edm::Handle< HORecHitCollection > HORecHits
std::vector< EcalRecHit >::const_iterator const_iterator
const CaloSubdetectorGeometry * HO
virtual const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
math::XYZVector trackEcalHitPoint(const reco::TransientTrack &, const reco::CaloJet &)
const CaloSubdetectorGeometry * HE
const CaloSubdetectorGeometry * EB
edm::Handle< HBHERecHitCollection > HBHERecHits
int j
Definition: DBlmapReader.cc:9
const CaloSubdetectorGeometry * HF
const CaloSubdetectorGeometry * EE
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
EcalLogicID ecalID()
math::XYZVector getCellMomentum(const CaloCellGeometry *, double &)
Definition: DetId.h:18
edm::Handle< EERecHitCollection > EERecHits
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
edm::Handle< HFRecHitCollection > HFRecHits
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
edm::Handle< EBRecHitCollection > EBRecHits
const CaloSubdetectorGeometry * HB
void TCTauAlgorithm::init ( void  )
private

Definition at line 26 of file TCTauAlgorithm.cc.

References cond::ecalcond::all, and HcalObjRepresent::setup().

26  {
27 
28  event = 0;
29  setup = 0;
30 
33 
34  all = 0;
35  passed = 0;
36  prongs = -1;
38 }
const edm::EventSetup * setup
void useDefaultPropagator()
use the default propagator
TrackDetectorAssociator * trackAssociator
void TCTauAlgorithm::inputConfig ( const edm::ParameterSet iConfig,
edm::ConsumesCollector iC 
)

Definition at line 40 of file TCTauAlgorithm.cc.

References edm::ParameterSet::getParameter(), and edm::ParameterSet::getUntrackedParameter().

Referenced by TCTauCorrector::inputConfig().

40  {
41 
42  etCaloOverTrackMin = iConfig.getParameter<double>("EtCaloOverTrackMin");
43  etCaloOverTrackMax = iConfig.getParameter<double>("EtCaloOverTrackMax");
44  etHcalOverTrackMin = iConfig.getParameter<double>("EtHcalOverTrackMin");
45  etHcalOverTrackMax = iConfig.getParameter<double>("EtHcalOverTrackMax");
46 
47  signalCone = iConfig.getParameter<double>("SignalConeSize");
48  ecalCone = iConfig.getParameter<double>("EcalConeSize");
49 
50  EcalRecHitsEB_input= iConfig.getParameter<edm::InputTag>("EBRecHitCollection");
51  EcalRecHitsEE_input= iConfig.getParameter<edm::InputTag>("EERecHitCollection");
52  HBHERecHits_input = iConfig.getParameter<edm::InputTag>("HBHERecHitCollection");
53  HORecHits_input = iConfig.getParameter<edm::InputTag>("HORecHitCollection");
54  HFRecHits_input = iConfig.getParameter<edm::InputTag>("HFRecHitCollection");
55 
56  edm::ParameterSet pset = iConfig.getParameter<edm::ParameterSet>("TrackAssociatorParameters");
58 
59  dropCaloJets = iConfig.getUntrackedParameter<bool>("DropCaloJets",false);
60  dropRejected = iConfig.getUntrackedParameter<bool>("DropRejectedJets",true);
61 }
double etCaloOverTrackMax
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
double etHcalOverTrackMin
void loadParameters(const edm::ParameterSet &, edm::ConsumesCollector &)
double etHcalOverTrackMax
double etCaloOverTrackMin
edm::InputTag EcalRecHitsEB_input
edm::InputTag HBHERecHits_input
edm::InputTag HORecHits_input
edm::InputTag EcalRecHitsEE_input
edm::InputTag HFRecHits_input
TrackAssociatorParameters trackAssociatorParameters
math::XYZTLorentzVector TCTauAlgorithm::recalculateEnergy ( const reco::CaloTau jet)

Definition at line 111 of file TCTauAlgorithm.cc.

References reco::CaloTau::caloTauTagInfoRef(), edm::Ref< C, T, F >::get(), reco::BaseTau::leadTrack(), reco::LeafCandidate::p4(), and reco::LeafCandidate::setP4().

Referenced by TCTauCorrector::correctedP4(), and TCTauCorrector::correction().

111  {
112 
113  const TrackRef& leadTk = jet.leadTrack();
114 
115  const TrackRefVector associatedTracks = jet.caloTauTagInfoRef()->Tracks();
116 
117  const CaloJet* cJet = jet.caloTauTagInfoRef()->calojetRef().get();
118  CaloJet caloJet = *cJet;
119  caloJet.setP4(jet.p4());
120 
121  return recalculateEnergy(caloJet,leadTk,associatedTracks);
122 }
virtual reco::TrackRef leadTrack() const
Definition: BaseTau.cc:26
Jets made from CaloTowers.
Definition: CaloJet.h:29
virtual const LorentzVector & p4() const GCC11_FINAL
four-momentum Lorentz vector
math::XYZTLorentzVector recalculateEnergy(const reco::CaloTau &)
const CaloTauTagInfoRef & caloTauTagInfoRef() const
Definition: CaloTau.cc:29
virtual void setP4(const LorentzVector &p4) GCC11_FINAL
set 4-momentum
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:242
math::XYZTLorentzVector TCTauAlgorithm::recalculateEnergy ( const reco::CaloJet caloJet,
const reco::TrackRef leadTk,
const reco::TrackRefVector associatedTracks 
)

Definition at line 124 of file TCTauAlgorithm.cc.

References cond::ecalcond::all, edm::RefVector< C, T, F >::begin(), edm::RefVector< C, T, F >::end(), reco::LeafCandidate::energy(), edm::Ref< C, T, F >::isNull(), p4, reco::LeafCandidate::p4(), reco::LeafCandidate::px(), reco::LeafCandidate::py(), and reco::LeafCandidate::pz().

124  {
125 
126  all++;
127 
128  math::XYZTLorentzVector p4(0,0,0,0);
130 
131  //if(!dropRejected)
132  p4 = caloJet.p4();
133 
134  if(leadTk.isNull()) return p4;
135 
136  XYZVector momentum(0,0,0);
137  int prongCounter = 0;
139  for(iTrack = associatedTracks.begin(); iTrack!= associatedTracks.end(); ++iTrack){
140  double DR = ROOT::Math::VectorUtil::DeltaR(leadTk->momentum(),(*iTrack)->momentum());
141  if(DR < signalCone) {
142  momentum+=(*iTrack)->momentum();
143  prongCounter++;
144  }
145  }
146  if(momentum.Rho() == 0) return p4;
147 
148  XYZVector ltrackEcalHitPoint = trackEcalHitPoint(*leadTk);
149 
150  if(! (ltrackEcalHitPoint.Rho() > 0 && ltrackEcalHitPoint.Rho() < 9999) ) return p4;
151 
152  std::pair<XYZVector,XYZVector> caloClusters = getClusterEnergy(caloJet,ltrackEcalHitPoint,signalCone);
153  XYZVector EcalCluster = caloClusters.first;
154  XYZVector HcalCluster = caloClusters.second;
155 
156  double eCaloOverTrack = (EcalCluster.R()+HcalCluster.R()-momentum.R())/momentum.R();
157 
158  std::pair<XYZVector,XYZVector> caloClustersPhoton = getClusterEnergy(caloJet,ltrackEcalHitPoint,ecalCone);
159  XYZVector EcalClusterPhoton = caloClustersPhoton.first;
160 
161  math::XYZTLorentzVector p4photons(0,0,0,EcalClusterPhoton.R() - EcalCluster.R());
162 
163  if( eCaloOverTrack > etCaloOverTrackMin && eCaloOverTrack < etCaloOverTrackMax ) {
164 
165  double eHcalOverTrack = (HcalCluster.R()-momentum.R())/momentum.R();
166 
167  if ( eHcalOverTrack > etHcalOverTrackMin && eHcalOverTrack < etHcalOverTrackMax ) {
168  p4.SetXYZT(EcalCluster.X() + momentum.X(),
169  EcalCluster.Y() + momentum.Y(),
170  EcalCluster.Z() + momentum.Z(),
171  EcalCluster.R() + momentum.R());
172  p4 += p4photons;
174  }else{
175  p4.SetXYZT(momentum.X(),
176  momentum.Y(),
177  momentum.Z(),
178  momentum.R());
180  }
181  }
182  if( eCaloOverTrack > etCaloOverTrackMax ) {
183  double eHcalOverTrack = (HcalCluster.R()-momentum.R())/momentum.R();
184 
185  if ( eHcalOverTrack > etHcalOverTrackMin && eHcalOverTrack < etHcalOverTrackMax ) {
186  p4.SetXYZT(EcalCluster.X() + momentum.X(),
187  EcalCluster.Y() + momentum.Y(),
188  EcalCluster.Z() + momentum.Z(),
189  EcalCluster.R() + momentum.R());
190  p4 += p4photons;
192  }
193  if ( eHcalOverTrack < etHcalOverTrackMin ) {
194  if(!dropCaloJets) p4.SetXYZT(caloJet.px(),caloJet.py(),caloJet.pz(),caloJet.energy());
195  else p4.SetXYZT(0,0,0,0);
197  }
198  if ( eHcalOverTrack > etHcalOverTrackMax ) {
200  if(!dropRejected) p4.SetXYZT(caloJet.px(),caloJet.py(),caloJet.pz(),caloJet.energy());
201  else p4.SetXYZT(0,0,0,0);
202  }
203  }
204  if( eCaloOverTrack < etCaloOverTrackMin ) {
206  if(!dropRejected) p4.SetXYZT(caloJet.px(),caloJet.py(),caloJet.pz(),caloJet.energy());
207  }
208 
209  if(p4.Et() > 0) passed++;
210 
211  return p4;
212 }
double etCaloOverTrackMax
virtual double energy() const GCC11_FINAL
energy
double etHcalOverTrackMin
virtual const LorentzVector & p4() const GCC11_FINAL
four-momentum Lorentz vector
const_iterator end() const
Termination of iteration.
Definition: RefVector.h:249
double etHcalOverTrackMax
virtual double pz() const GCC11_FINAL
z coordinate of momentum vector
virtual double py() const GCC11_FINAL
y coordinate of momentum vector
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:244
math::XYZVector trackEcalHitPoint(const reco::TransientTrack &, const reco::CaloJet &)
double etCaloOverTrackMin
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
std::pair< math::XYZVector, math::XYZVector > getClusterEnergy(const reco::CaloJet &, math::XYZVector &, double)
bool isNull() const
Checks for null.
Definition: Ref.h:247
double p4[4]
Definition: TauolaWrapper.h:92
virtual double px() const GCC11_FINAL
x coordinate of momentum vector
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
int TCTauAlgorithm::statistics ( )

Definition at line 68 of file TCTauAlgorithm.cc.

Referenced by TCTauCorrector::statistics().

68  {
69  return passed;
70 }
XYZVector TCTauAlgorithm::trackEcalHitPoint ( const reco::TransientTrack transientTrack,
const reco::CaloJet caloJet 
)
private

Definition at line 215 of file TCTauAlgorithm.cc.

References reco::CaloJet::getCaloConstituents(), TrajectoryStateOnSurface::globalPosition(), reco::TransientTrack::stateOnSurface(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

215  {
216 
217 
218  GlobalPoint ecalHitPosition(0,0,0);
219 
220  double maxTowerEt = 0;
221  std::vector<CaloTowerPtr> towers = caloJet.getCaloConstituents();
222  for(std::vector<CaloTowerPtr>::const_iterator iTower = towers.begin();
223  iTower!= towers.end(); ++iTower){
224  if((*iTower)->et() > maxTowerEt){
225  maxTowerEt = (*iTower)->et();
226  ecalHitPosition = (*iTower)->emPosition();
227  }
228  }
229 
230 
231  XYZVector ecalHitPoint(0,0,0);
232 
233  GlobalPoint trackEcalHitPoint = transientTrack.stateOnSurface(ecalHitPosition).globalPosition();
234 
235  ecalHitPoint.SetXYZ(trackEcalHitPoint.x(),
236  trackEcalHitPoint.y(),
237  trackEcalHitPoint.z());
238 
239  return ecalHitPoint;
240 }
T y() const
Definition: PV3DBase.h:63
GlobalPoint globalPosition() const
virtual std::vector< CaloTowerPtr > getCaloConstituents() const
get all constituents
Definition: CaloJet.cc:93
math::XYZVector trackEcalHitPoint(const reco::TransientTrack &, const reco::CaloJet &)
T z() const
Definition: PV3DBase.h:64
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
TrajectoryStateOnSurface stateOnSurface(const GlobalPoint &point) const
T x() const
Definition: PV3DBase.h:62
XYZVector TCTauAlgorithm::trackEcalHitPoint ( const reco::Track track)
private

Definition at line 242 of file TCTauAlgorithm.cc.

References event(), info(), TrackDetMatchInfo::isGoodEcal, HcalObjRepresent::setup(), and TrackDetMatchInfo::trkGlobPosAtEcal.

242  {
243 
246  if( info.isGoodEcal != 0 ) {
247  return XYZVector(info.trkGlobPosAtEcal.x(),info.trkGlobPosAtEcal.y(),info.trkGlobPosAtEcal.z());
248  }
249  return XYZVector(0,0,0);
250 }
static const TGPicture * info(bool iBackgroundIsBlack)
const edm::EventSetup * setup
static FreeTrajectoryState getFreeTrajectoryState(const edm::EventSetup &, const reco::Track &)
get FreeTrajectoryState from different track representations
const edm::Event * event
TrackDetectorAssociator * trackAssociator
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
TrackDetMatchInfo associate(const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const AssociatorParameters &)
math::XYZPoint trkGlobPosAtEcal
Track position at different parts of the calorimeter.
TrackAssociatorParameters trackAssociatorParameters

Member Data Documentation

int TCTauAlgorithm::algoComponentUsed
private

Definition at line 89 of file TCTauAlgorithm.h.

int TCTauAlgorithm::all
private

Definition at line 86 of file TCTauAlgorithm.h.

bool TCTauAlgorithm::dropCaloJets
private

Definition at line 93 of file TCTauAlgorithm.h.

bool TCTauAlgorithm::dropRejected
private

Definition at line 94 of file TCTauAlgorithm.h.

const CaloSubdetectorGeometry* TCTauAlgorithm::EB
private

Definition at line 112 of file TCTauAlgorithm.h.

edm::Handle<EBRecHitCollection> TCTauAlgorithm::EBRecHits
private

Definition at line 119 of file TCTauAlgorithm.h.

double TCTauAlgorithm::ecalCone
private

Definition at line 99 of file TCTauAlgorithm.h.

edm::InputTag TCTauAlgorithm::EcalRecHitsEB_input
private

Definition at line 106 of file TCTauAlgorithm.h.

edm::InputTag TCTauAlgorithm::EcalRecHitsEE_input
private

Definition at line 107 of file TCTauAlgorithm.h.

const CaloSubdetectorGeometry* TCTauAlgorithm::EE
private

Definition at line 113 of file TCTauAlgorithm.h.

edm::Handle<EERecHitCollection> TCTauAlgorithm::EERecHits
private

Definition at line 120 of file TCTauAlgorithm.h.

double TCTauAlgorithm::etCaloOverTrackMax
private

Definition at line 101 of file TCTauAlgorithm.h.

double TCTauAlgorithm::etCaloOverTrackMin
private

Definition at line 101 of file TCTauAlgorithm.h.

double TCTauAlgorithm::etHcalOverTrackMax
private

Definition at line 101 of file TCTauAlgorithm.h.

double TCTauAlgorithm::etHcalOverTrackMin
private

Definition at line 101 of file TCTauAlgorithm.h.

const edm::Event* TCTauAlgorithm::event
private

Definition at line 72 of file TCTauAlgorithm.h.

Referenced by Types.EventID::cppID().

const CaloSubdetectorGeometry* TCTauAlgorithm::HB
private

Definition at line 114 of file TCTauAlgorithm.h.

edm::Handle<HBHERecHitCollection> TCTauAlgorithm::HBHERecHits
private

Definition at line 122 of file TCTauAlgorithm.h.

edm::InputTag TCTauAlgorithm::HBHERecHits_input
private

Definition at line 108 of file TCTauAlgorithm.h.

const CaloSubdetectorGeometry* TCTauAlgorithm::HE
private

Definition at line 115 of file TCTauAlgorithm.h.

const CaloSubdetectorGeometry* TCTauAlgorithm::HF
private

Definition at line 117 of file TCTauAlgorithm.h.

edm::Handle<HFRecHitCollection> TCTauAlgorithm::HFRecHits
private

Definition at line 124 of file TCTauAlgorithm.h.

edm::InputTag TCTauAlgorithm::HFRecHits_input
private

Definition at line 110 of file TCTauAlgorithm.h.

const CaloSubdetectorGeometry* TCTauAlgorithm::HO
private

Definition at line 116 of file TCTauAlgorithm.h.

edm::Handle<HORecHitCollection> TCTauAlgorithm::HORecHits
private

Definition at line 123 of file TCTauAlgorithm.h.

edm::InputTag TCTauAlgorithm::HORecHits_input
private

Definition at line 109 of file TCTauAlgorithm.h.

int TCTauAlgorithm::passed
private

Definition at line 86 of file TCTauAlgorithm.h.

int TCTauAlgorithm::prongs
private

Definition at line 91 of file TCTauAlgorithm.h.

const edm::EventSetup* TCTauAlgorithm::setup
private

Definition at line 73 of file TCTauAlgorithm.h.

double TCTauAlgorithm::signalCone
private

Definition at line 98 of file TCTauAlgorithm.h.

TrackDetectorAssociator* TCTauAlgorithm::trackAssociator
private

Definition at line 75 of file TCTauAlgorithm.h.

TrackAssociatorParameters TCTauAlgorithm::trackAssociatorParameters
private

Definition at line 74 of file TCTauAlgorithm.h.

const TransientTrackBuilder* TCTauAlgorithm::transientTrackBuilder
private

Definition at line 96 of file TCTauAlgorithm.h.