CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Attributes
IsolatedPixelTrackCandidateL1TProducer Class Reference

#include <IsolatedPixelTrackCandidateL1TProducer.h>

Inheritance diagram for IsolatedPixelTrackCandidateL1TProducer:
edm::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Classes

struct  seedAtEC
 

Public Member Functions

virtual void beginRun (const edm::Run &, const edm::EventSetup &) override
 
double getDistInCM (double eta1, double phi1, double eta2, double phi2)
 
std::pair< double, double > GetEtaPhiAtEcal (double etaIP, double phiIP, double pT, int charge, double vtxZ)
 
 IsolatedPixelTrackCandidateL1TProducer (const edm::ParameterSet &ps)
 
virtual void produce (edm::Event &evt, const edm::EventSetup &es) override
 
 ~IsolatedPixelTrackCandidateL1TProducer ()
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

const std::string bfield_
 
double bfVal_
 
const double ebEtaBoundary_
 
const double maxPForIsolationValue_
 
const double minPTrackValue_
 
const double pixelIsolationConeSizeAtEC_
 
const double prelimCone_
 
double rEB_
 
const double tauAssocCone_
 
const double tauUnbiasCone_
 
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefstok_hlt_
 
const edm::EDGetTokenT< l1t::TauBxCollectiontok_l1_
 
const edm::EDGetTokenT< reco::VertexCollectiontok_vert_
 
const std::vector< edm::EDGetTokenT< reco::TrackCollection > > toks_pix_
 
const double vtxCutIsol_
 
const double vtxCutSeed_
 
double zEE_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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

Definition at line 44 of file IsolatedPixelTrackCandidateL1TProducer.h.

Constructor & Destructor Documentation

IsolatedPixelTrackCandidateL1TProducer::IsolatedPixelTrackCandidateL1TProducer ( const edm::ParameterSet ps)

Definition at line 41 of file IsolatedPixelTrackCandidateL1TProducer.cc.

References bfield_, bfVal_, ebEtaBoundary_, maxPForIsolationValue_, minPTrackValue_, pixelIsolationConeSizeAtEC_, prelimCone_, rEB_, AlCaHLTBitMon_QueryRunRegistry::string, GlobalPosition_Frontier_DevDB_cff::tag, tauAssocCone_, tauUnbiasCone_, vtxCutIsol_, vtxCutSeed_, and zEE_.

41  :
42  tok_hlt_( consumes<trigger::TriggerFilterObjectWithRefs>(config.getParameter<edm::InputTag>("L1GTSeedLabel")) ),
43  tok_l1_( consumes<l1t::TauBxCollection>(config.getParameter<edm::InputTag>("L1eTauJetsSource")) ),
44  tok_vert_( consumes<reco::VertexCollection>(config.getParameter<edm::InputTag>("VertexLabel")) ),
46  config.getParameter<std::vector<edm::InputTag> >("PixelTracksSources"),
47  [this](edm::InputTag const & tag){return consumes<reco::TrackCollection>(tag);}) ),
48  bfield_( config.getParameter<std::string>("MagFieldRecordName") ),
49  prelimCone_( config.getParameter<double>("ExtrapolationConeSize") ),
50  pixelIsolationConeSizeAtEC_( config.getParameter<double>("PixelIsolationConeSizeAtEC") ),
51  vtxCutSeed_( config.getParameter<double>("MaxVtxDXYSeed") ),
52  vtxCutIsol_( config.getParameter<double>("MaxVtxDXYIsol") ),
53  tauAssocCone_( config.getParameter<double>("tauAssociationCone") ),
54  tauUnbiasCone_( config.getParameter<double>("tauUnbiasCone") ),
55  minPTrackValue_( config.getParameter<double>("minPTrack") ),
56  maxPForIsolationValue_( config.getParameter<double>("maxPTrackForIsolation") ),
57  ebEtaBoundary_( config.getParameter<double>("EBEtaBoundary") ),
58  rEB_( -1 ),
59  zEE_( -1 ),
60  bfVal_( 0 )
61 {
62  // Register the product
63  produces< reco::IsolatedPixelTrackCandidateCollection >();
64 }
Definition: config.py:1
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
Definition: transform.h:11
const edm::EDGetTokenT< reco::VertexCollection > tok_vert_
const edm::EDGetTokenT< l1t::TauBxCollection > tok_l1_
const std::vector< edm::EDGetTokenT< reco::TrackCollection > > toks_pix_
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_hlt_
IsolatedPixelTrackCandidateL1TProducer::~IsolatedPixelTrackCandidateL1TProducer ( )

Definition at line 66 of file IsolatedPixelTrackCandidateL1TProducer.cc.

66  {
67 
68 }

Member Function Documentation

void IsolatedPixelTrackCandidateL1TProducer::beginRun ( const edm::Run run,
const edm::EventSetup theEventSetup 
)
overridevirtual

Definition at line 70 of file IsolatedPixelTrackCandidateL1TProducer.cc.

References g4SimHits_cfi::BField, bfVal_, DetId::Ecal, EcalBarrel, EcalEndcap, edm::EventSetup::get(), CaloGeometry::getSubdetectorGeometry(), VolumeBasedMagneticField::inTesla(), PV3DBase< T, PVType, FrameType >::mag(), rEB_, zEE_, and geometryCSVtoXML::zz.

70  {
71 
73  theEventSetup.get<CaloGeometryRecord>().get(pG);
74 
75  const double rad (dynamic_cast<const EcalBarrelGeometry*>( pG->getSubdetectorGeometry(DetId::Ecal, EcalBarrel ))->avgRadiusXYFrontFaceCenter() ) ;
76  const double zz (dynamic_cast<const EcalEndcapGeometry*>( pG->getSubdetectorGeometry(DetId::Ecal, EcalEndcap ))->avgAbsZFrontFaceCenter() ) ;
77 
78  rEB_ = rad;
79  zEE_ = zz;
80 
82  theEventSetup.get<IdealMagneticFieldRecord>().get(vbfField);
83  const VolumeBasedMagneticField* vbfCPtr = dynamic_cast<const VolumeBasedMagneticField*>(&(*vbfField));
84  GlobalVector BField = vbfCPtr->inTesla(GlobalPoint(0,0,0));
85  bfVal_=BField.mag();
86 }
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:45
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
T mag() const
Definition: PV3DBase.h:67
GlobalVector inTesla(const GlobalPoint &g) const
Field value ad specified global point, in Tesla.
const T & get() const
Definition: EventSetup.h:56
double IsolatedPixelTrackCandidateL1TProducer::getDistInCM ( double  eta1,
double  phi1,
double  eta2,
double  phi2 
)

Definition at line 233 of file IsolatedPixelTrackCandidateL1TProducer.cc.

References funct::abs(), angle(), funct::cos(), JetChargeProducer_cfi::exp, M_PI_2, rEB_, funct::sin(), funct::tan(), and zEE_.

Referenced by produce().

233  {
234  double Rec;
235  double theta1=2*atan(exp(-eta1));
236  double theta2=2*atan(exp(-eta2));
237  if (std::abs(eta1)<1.479) Rec=rEB_; //radius of ECAL barrel
238  else if (std::abs(eta1)>1.479&&std::abs(eta1)<7.0) Rec=tan(theta1)*zEE_; //distance from IP to ECAL endcap
239  else return 1000;
240 
241  //|vect| times tg of acos(scalar product)
242  double angle=acos((sin(theta1)*sin(theta2)*(sin(phi1)*sin(phi2)+cos(phi1)*cos(phi2))+cos(theta1)*cos(theta2)));
243  if (angle<M_PI_2) return std::abs((Rec/sin(theta1))*tan(angle));
244  else return 1000;
245 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
#define M_PI_2
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11
std::pair< double, double > IsolatedPixelTrackCandidateL1TProducer::GetEtaPhiAtEcal ( double  etaIP,
double  phiIP,
double  pT,
int  charge,
double  vtxZ 
)

Definition at line 248 of file IsolatedPixelTrackCandidateL1TProducer.cc.

References funct::abs(), alpha, bfVal_, ALCARECOTkAlJpsiMuMu_cff::charge, MuonCkfTrajectoryBuilder_cfi::deltaPhi, ebEtaBoundary_, JetChargeProducer_cfi::exp, cmsBatch::log, M_PI, M_PI_2, rEB_, funct::sin(), funct::tan(), theta(), z, and zEE_.

Referenced by produce().

248  {
249 
250  double deltaPhi=0;
251  double etaEC = 100;
252  double phiEC = 100;
253 
254  double Rcurv = 9999999;
255  if (bfVal_!=0) Rcurv=pT*33.3*100/(bfVal_*10); //r(m)=pT(GeV)*33.3/B(kG)
256 
257  double ecDist = zEE_; //distance to ECAL andcap from IP (cm), 317 - ecal (not preshower), preshower -300
258  double ecRad = rEB_; //radius of ECAL barrel (cm)
259  double theta = 2*atan(exp(-etaIP));
260  double zNew = 0;
261  if (theta>M_PI_2) theta=M_PI-theta;
262  if (std::abs(etaIP)<ebEtaBoundary_) {
263  if ((0.5*ecRad/Rcurv)>1) {
264  etaEC = 10000;
265  deltaPhi = 0;
266  } else {
267  deltaPhi =-charge*asin(0.5*ecRad/Rcurv);
268  double alpha1 = 2*asin(0.5*ecRad/Rcurv);
269  double z = ecRad/tan(theta);
270  if (etaIP>0) zNew = z*(Rcurv*alpha1)/ecRad+vtxZ; //new z-coordinate of track
271  else zNew =-z*(Rcurv*alpha1)/ecRad+vtxZ; //new z-coordinate of track
272  double zAbs=std::abs(zNew);
273  if (zAbs<ecDist) {
274  etaEC = -log(tan(0.5*atan(ecRad/zAbs)));
275  deltaPhi = -charge*asin(0.5*ecRad/Rcurv);
276  }
277  if (zAbs>ecDist) {
278  zAbs = (std::abs(etaIP)/etaIP)*ecDist;
279  double Zflight = std::abs(zAbs-vtxZ);
280  double alpha = (Zflight*ecRad)/(z*Rcurv);
281  double Rec = 2*Rcurv*sin(alpha/2);
282  deltaPhi =-charge*alpha/2;
283  etaEC =-log(tan(0.5*atan(Rec/ecDist)));
284  }
285  }
286  } else {
287  zNew = (std::abs(etaIP)/etaIP)*ecDist;
288  double Zflight = std::abs(zNew-vtxZ);
289  double Rvirt = std::abs(Zflight*tan(theta));
290  double Rec = 2*Rcurv*sin(Rvirt/(2*Rcurv));
291  deltaPhi =-(charge)*(Rvirt/(2*Rcurv));
292  etaEC =-log(tan(0.5*atan(Rec/ecDist)));
293  }
294 
295  if (zNew<0) etaEC=-etaEC;
296  phiEC = phiIP+deltaPhi;
297 
298  if (phiEC<-M_PI) phiEC += M_2_PI;
299  if (phiEC>M_PI) phiEC -= M_2_PI;
300 
301  std::pair<double,double> retVal(etaEC,phiEC);
302  return retVal;
303 }
float alpha
Definition: AMPTWrapper.h:95
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Theta< T > theta() const
#define M_PI_2
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
#define M_PI
void IsolatedPixelTrackCandidateL1TProducer::produce ( edm::Event evt,
const edm::EventSetup es 
)
overridevirtual

Definition at line 88 of file IsolatedPixelTrackCandidateL1TProducer.cc.

References funct::abs(), BXVector< T >::begin(), ALCARECOTkAlJpsiMuMu_cff::charge, reco::deltaR(), particleFlowDisplacedVertexCandidate_cfi::dxy, allConversions_cfi::dz, BXVector< T >::end(), stringResolutionProvider_cfi::eta, runEdmFileComparison::found, edm::Event::getByToken(), getDistInCM(), GetEtaPhiAtEcal(), trigger::TriggerRefsCollections::getObjects(), mps_fire::i, NewRecoMuonValidator_cfi::maxP, maxPForIsolationValue_, minPTrackValue_, eostools::move(), convertSQLiteXML::ok, AlCaHLTBitMon_ParallelJobs::p, phi, pixelIsolationConeSizeAtEC_, prelimCone_, EnergyCorrector::pt, edm::Event::put(), dttmaxenums::R, SurveyInfoScenario_cff::seed, reco::IsolatedPixelTrackCandidate::setEtaPhiEcal(), tauAssocCone_, tauUnbiasCone_, tok_hlt_, tok_l1_, tok_vert_, toks_pix_, findElectronsInSiStrips_cfi::trackCollection, trigger::TriggerJet, trigger::TriggerTau, vtxCutIsol_, and vtxCutSeed_.

Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().

88  {
89 
90  auto trackCollection = std::make_unique<reco::IsolatedPixelTrackCandidateCollection>();
91 
92  //create vector of refs from input collections
93  std::vector<reco::TrackRef> pixelTrackRefs;
94 
95  for (unsigned int iPix=0; iPix<toks_pix_.size(); iPix++) {
97  theEvent.getByToken(toks_pix_[iPix],iPixCol);
98  for (reco::TrackCollection::const_iterator pit=iPixCol->begin(); pit!=iPixCol->end(); pit++) {
99  pixelTrackRefs.push_back(reco::TrackRef(iPixCol,pit-iPixCol->begin()));
100  }
101  }
102 
104  theEvent.getByToken(tok_l1_,l1eTauJets);
105 
107  theEvent.getByToken(tok_vert_,pVert);
108 
109  double ptTriggered = -10;
110  double etaTriggered = -100;
111  double phiTriggered = -100;
112 
114  theEvent.getByToken(tok_hlt_, l1trigobj);
115 
116  std::vector< edm::Ref<l1t::TauBxCollection> > l1tauobjref;
117  std::vector< edm::Ref<l1t::JetBxCollection> > l1jetobjref;
118 
119  l1trigobj->getObjects(trigger::TriggerTau, l1tauobjref);
120  l1trigobj->getObjects(trigger::TriggerJet, l1jetobjref);
121 
122  for (unsigned int p=0; p<l1tauobjref.size(); p++) {
123  if (l1tauobjref[p]->pt()>ptTriggered) {
124  ptTriggered = l1tauobjref[p]->pt();
125  phiTriggered = l1tauobjref[p]->phi();
126  etaTriggered = l1tauobjref[p]->eta();
127  }
128  }
129  for (unsigned int p=0; p<l1jetobjref.size(); p++) {
130  if (l1jetobjref[p]->pt()>ptTriggered) {
131  ptTriggered = l1jetobjref[p]->pt();
132  phiTriggered = l1jetobjref[p]->phi();
133  etaTriggered = l1jetobjref[p]->eta();
134  }
135  }
136 
137  double drMaxL1Track_ = tauAssocCone_;
138 
139  int ntr = 0;
140  std::vector<seedAtEC> VecSeedsatEC;
141  //loop to select isolated tracks
142  for (unsigned iS=0; iS<pixelTrackRefs.size(); iS++) {
143  bool vtxMatch = false;
144  //associate to vertex (in Z)
145  reco::VertexCollection::const_iterator vitSel;
146  double minDZ = 1000;
147  bool found(false);
148  for (reco::VertexCollection::const_iterator vit=pVert->begin(); vit!=pVert->end(); vit++) {
149  if (std::abs(pixelTrackRefs[iS]->dz(vit->position()))<minDZ) {
150  minDZ = std::abs(pixelTrackRefs[iS]->dz(vit->position()));
151  vitSel = vit;
152  found = true;
153  }
154  }
155  //cut on dYX:
156  if (found) {
157  if(std::abs(pixelTrackRefs[iS]->dxy(vitSel->position()))<vtxCutSeed_) vtxMatch=true;
158  } else {
159  vtxMatch=true;
160  }
161 
162  //select tracks not matched to triggered L1 jet
163  double R=reco::deltaR(etaTriggered, phiTriggered,
164  pixelTrackRefs[iS]->eta(), pixelTrackRefs[iS]->phi());
165  if (R<tauUnbiasCone_) continue;
166 
167  //check taujet matching
168  bool tmatch=false;
170  for (l1t::TauBxCollection::const_iterator tj=l1eTauJets->begin(); tj!=l1eTauJets->end(); tj++) {
171  if (reco::deltaR(pixelTrackRefs[iS]->momentum().eta(), pixelTrackRefs[iS]->momentum().phi(), tj->momentum().eta(), tj->momentum().phi()) > drMaxL1Track_) continue;
172  selj = tj;
173  tmatch = true;
174  } //loop over L1 tau
175 
176 
177  //propagate seed track to ECAL surface:
178  std::pair<double,double> seedCooAtEC;
179  // in case vertex is found:
180  if (found) seedCooAtEC=GetEtaPhiAtEcal(pixelTrackRefs[iS]->eta(), pixelTrackRefs[iS]->phi(), pixelTrackRefs[iS]->pt(), pixelTrackRefs[iS]->charge(), vitSel->z());
181  //in case vertex is not found:
182  else seedCooAtEC=GetEtaPhiAtEcal(pixelTrackRefs[iS]->eta(), pixelTrackRefs[iS]->phi(), pixelTrackRefs[iS]->pt(), pixelTrackRefs[iS]->charge(), 0);
183  seedAtEC seed(iS,(tmatch||vtxMatch),seedCooAtEC.first,seedCooAtEC.second);
184  VecSeedsatEC.push_back(seed);
185  }
186 
187  for (unsigned int i=0; i<VecSeedsatEC.size(); i++) {
188  unsigned int iSeed = VecSeedsatEC[i].index;
189  if (!VecSeedsatEC[i].ok) continue;
190  if(pixelTrackRefs[iSeed]->p()<minPTrackValue_) continue;
192  for (l1t::TauBxCollection::const_iterator tj=l1eTauJets->begin(); tj!=l1eTauJets->end(); tj++) {
193  if (reco::deltaR(pixelTrackRefs[iSeed]->momentum().eta(),pixelTrackRefs[iSeed]->momentum().phi(),tj->momentum().eta(),tj->momentum().phi()) > drMaxL1Track_) continue;
194  selj = tj;
195  } //loop over L1 tau
196  double maxP = 0;
197  double sumP = 0;
198  for(unsigned int j=0; j<VecSeedsatEC.size(); j++) {
199  if (i==j) continue;
200  unsigned int iSurr = VecSeedsatEC[j].index;
201  //define preliminary cone around seed track impact point from which tracks will be extrapolated:
202  if (reco::deltaR(pixelTrackRefs[iSeed]->eta(), pixelTrackRefs[iSeed]->phi(), pixelTrackRefs[iSurr]->eta(), pixelTrackRefs[iSurr]->phi())>prelimCone_) continue;
203  double minDZ2(1000);
204  bool found(false);
205  reco::VertexCollection::const_iterator vitSel2;
206  for (reco::VertexCollection::const_iterator vit=pVert->begin(); vit!=pVert->end(); vit++) {
207  if (std::abs(pixelTrackRefs[iSurr]->dz(vit->position()))<minDZ2) {
208  minDZ2 = std::abs(pixelTrackRefs[iSurr]->dz(vit->position()));
209  vitSel2 = vit;
210  found = true;
211  }
212  }
213  //cut ot dXY:
214  if (found&&std::abs(pixelTrackRefs[iSurr]->dxy(vitSel2->position()))>vtxCutIsol_) continue;
215  //calculate distance at ECAL surface and update isolation:
216  if (getDistInCM(VecSeedsatEC[i].eta, VecSeedsatEC[i].phi, VecSeedsatEC[j].eta, VecSeedsatEC[j].phi)<pixelIsolationConeSizeAtEC_) {
217  sumP+=pixelTrackRefs[iSurr]->p();
218  if(pixelTrackRefs[iSurr]->p()>maxP) maxP=pixelTrackRefs[iSurr]->p();
219  }
220  }
221  if (maxP<maxPForIsolationValue_) {
222  reco::IsolatedPixelTrackCandidate newCandidate(pixelTrackRefs[iSeed], l1t::TauRef(l1eTauJets,selj-l1eTauJets->begin()), maxP, sumP);
223  newCandidate.setEtaPhiEcal(VecSeedsatEC[i].eta, VecSeedsatEC[i].phi);
224  trackCollection->push_back(newCandidate);
225  ntr++;
226  }
227  }
228  // put the product in the event
229  theEvent.put(std::move(trackCollection));
230 }
const_iterator end(int bx) const
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
double getDistInCM(double eta1, double phi1, double eta2, double phi2)
const edm::EDGetTokenT< reco::VertexCollection > tok_vert_
const edm::EDGetTokenT< l1t::TauBxCollection > tok_l1_
const std::vector< edm::EDGetTokenT< reco::TrackCollection > > toks_pix_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:28
std::pair< double, double > GetEtaPhiAtEcal(double etaIP, double phiIP, double pT, int charge, double vtxZ)
const_iterator begin(int bx) const
def move(src, dest)
Definition: eostools.py:510
std::vector< Tau >::const_iterator const_iterator
Definition: BXVector.h:20
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > tok_hlt_

Member Data Documentation

const std::string IsolatedPixelTrackCandidateL1TProducer::bfield_
private
double IsolatedPixelTrackCandidateL1TProducer::bfVal_
private
const double IsolatedPixelTrackCandidateL1TProducer::ebEtaBoundary_
private
const double IsolatedPixelTrackCandidateL1TProducer::maxPForIsolationValue_
private
const double IsolatedPixelTrackCandidateL1TProducer::minPTrackValue_
private
const double IsolatedPixelTrackCandidateL1TProducer::pixelIsolationConeSizeAtEC_
private
const double IsolatedPixelTrackCandidateL1TProducer::prelimCone_
private
double IsolatedPixelTrackCandidateL1TProducer::rEB_
private
const double IsolatedPixelTrackCandidateL1TProducer::tauAssocCone_
private
const double IsolatedPixelTrackCandidateL1TProducer::tauUnbiasCone_
private
const edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> IsolatedPixelTrackCandidateL1TProducer::tok_hlt_
private

Definition at line 66 of file IsolatedPixelTrackCandidateL1TProducer.h.

Referenced by produce().

const edm::EDGetTokenT<l1t::TauBxCollection> IsolatedPixelTrackCandidateL1TProducer::tok_l1_
private

Definition at line 67 of file IsolatedPixelTrackCandidateL1TProducer.h.

Referenced by produce().

const edm::EDGetTokenT<reco::VertexCollection> IsolatedPixelTrackCandidateL1TProducer::tok_vert_
private

Definition at line 68 of file IsolatedPixelTrackCandidateL1TProducer.h.

Referenced by produce().

const std::vector<edm::EDGetTokenT<reco::TrackCollection> > IsolatedPixelTrackCandidateL1TProducer::toks_pix_
private

Definition at line 69 of file IsolatedPixelTrackCandidateL1TProducer.h.

Referenced by produce().

const double IsolatedPixelTrackCandidateL1TProducer::vtxCutIsol_
private
const double IsolatedPixelTrackCandidateL1TProducer::vtxCutSeed_
private
double IsolatedPixelTrackCandidateL1TProducer::zEE_
private