9 tkminPixelHitsn_ = parameters.
getParameter<
int>(
"tkminPixelHitsn");
10 tkminTrackerHitsn_ = parameters.
getParameter<
int>(
"tkminTrackerHitsn");
12 tkmaxChi2_ = parameters.
getParameter<
double>(
"tkmaxChi2");
14 UsePVconstraint_ = parameters.
getParameter<
bool>(
"UsePVconstraint");
15 tkPVmaxDZ_ = parameters.
getParameter<
double>(
"tkPVmaxDZ");
17 UseTrackQuality_ = parameters.
getParameter<
bool>(
"UseTrackQuality");
18 if (UseTrackQuality_) {
25 ECALBasicClustersAroundCaloJet_DRConeSize_ = parameters.
getParameter<
double>(
"ECALBasicClustersAroundCaloJet_DRConeSize");
26 ECALBasicClusterminE_ = parameters.
getParameter<
double>(
"ECALBasicClusterminE");
27 ECALBasicClusterpropagTrack_matchingDRConeSize_ = parameters.
getParameter<
double>(
"ECALBasicClusterpropagTrack_matchingDRConeSize");
35 if (UsePVconstraint_) theFilteredTracks=
TauTagTools::filteredTracks(theTracks,tkminPt_,tkminPixelHitsn_,tkminTrackerHitsn_,tkmaxipt_,tkmaxChi2_,tkPVmaxDZ_,thePV, thePV.
z());
36 else theFilteredTracks=
TauTagTools::filteredTracks(theTracks,tkminPt_,tkminPixelHitsn_,tkminTrackerHitsn_,tkmaxipt_,tkmaxChi2_,thePV);
37 if (UseTrackQuality_) theFilteredTracks = filterTracksByQualityBit(theFilteredTracks,tkQuality_);
38 resultExtended.
setTracks(theFilteredTracks);
42 std::vector<BasicClusterRef> theNeutralEcalBasicClusters=getNeutralEcalBasicClusters(theEvent,theEventSetup,theCaloJet,theFilteredTracks,ECALBasicClustersAroundCaloJet_DRConeSize_,ECALBasicClusterminE_,ECALBasicClusterpropagTrack_matchingDRConeSize_);
45 return resultExtended;
52 if (UsePVconstraint_) theFilteredTracks=
TauTagTools::filteredTracks(theTracks,tkminPt_,tkminPixelHitsn_,tkminTrackerHitsn_,tkmaxipt_,tkmaxChi2_,tkPVmaxDZ_,thePV, thePV.
z());
53 else theFilteredTracks=
TauTagTools::filteredTracks(theTracks,tkminPt_,tkminPixelHitsn_,tkminTrackerHitsn_,tkmaxipt_,tkmaxChi2_,thePV);
54 if (UseTrackQuality_) theFilteredTracks = filterTracksByQualityBit(theFilteredTracks,tkQuality_);
55 resultExtended.
setTracks(theFilteredTracks);
62 std::vector<BasicClusterRef> theNeutralEcalBasicClusters=getNeutralEcalBasicClusters(theEvent,theEventSetup,theCaloJet,theFilteredTracks,ECALBasicClustersAroundCaloJet_DRConeSize_,ECALBasicClusterminE_,ECALBasicClusterpropagTrack_matchingDRConeSize_);
65 return resultExtended;
121 std::vector<CaloTowerPtr> theCaloTowers=theCaloJet->getCaloConstituents();
122 std::vector<DetId> myDetIds;
125 for(std::vector<CaloTowerPtr>::const_iterator i_Tower=theCaloTowers.begin();i_Tower!=theCaloTowers.end();i_Tower++){
126 size_t numRecHits = (**i_Tower).constituentsSize();
127 for(
size_t j=0;j<numRecHits;j++) {
128 DetId RecHitDetID=(**i_Tower).constituent(j);
130 myDetIds.push_back(RecHitDetID);
138 std::vector<math::XYZPoint> thepropagTracksECALSurfContactPoints;
144 if(thepropagTrackECALSurfContactPoint.R()!=0.) thepropagTracksECALSurfContactPoints.push_back(thepropagTrackECALSurfContactPoint);
147 math::XYZPoint aCaloJetFakePosition((*theCaloJet).px(),(*theCaloJet).py(),(*theCaloJet).pz());
149 std::vector<BasicClusterRef> theBasicClusters;
153 theEvent.
getByLabel(BarrelBasicClusters_,theBarrelBCCollection);
154 for(
unsigned int i_BC=0;i_BC!=theBarrelBCCollection->size();i_BC++) {
156 if (theBasicClusterRef.
isNull())
continue;
157 if (
ROOT::Math::VectorUtil::DeltaR(aCaloJetFakePosition,(*theBasicClusterRef).position())<=theECALBasicClustersAroundCaloJet_DRConeSize && (*theBasicClusterRef).energy()>=theECALBasicClusterminE) theBasicClusters.push_back(theBasicClusterRef);
161 theEvent.
getByLabel(EndcapBasicClusters_,theEndcapBCCollection);
162 for(
unsigned int j_BC=0;j_BC!=theEndcapBCCollection->size();j_BC++) {
164 if (theBasicClusterRef.
isNull())
continue;
165 if (
ROOT::Math::VectorUtil::DeltaR(aCaloJetFakePosition,(*theBasicClusterRef).position())<=theECALBasicClustersAroundCaloJet_DRConeSize && (*theBasicClusterRef).energy()>=theECALBasicClusterminE) theBasicClusters.push_back(theBasicClusterRef);
168 std::vector<BasicClusterRef> theNeutralBasicClusters=theBasicClusters;
169 std::vector<BasicClusterRef>::iterator kmatchedBasicCluster;
170 for (std::vector<math::XYZPoint>::iterator ipropagTrackECALSurfContactPoint=thepropagTracksECALSurfContactPoints.begin();ipropagTrackECALSurfContactPoint!=thepropagTracksECALSurfContactPoints.end();ipropagTrackECALSurfContactPoint++) {
171 double theMatchedEcalBasicClusterpropagTrack_minDR=theECALBasicClusterpropagTrack_matchingDRConeSize;
172 bool Track_matchedwithEcalBasicCluster=
false;
173 for (std::vector<BasicClusterRef>::iterator jBasicCluster=theNeutralBasicClusters.begin();jBasicCluster!=theNeutralBasicClusters.end();jBasicCluster++) {
175 Track_matchedwithEcalBasicCluster=
true;
177 kmatchedBasicCluster=jBasicCluster;
180 if(Track_matchedwithEcalBasicCluster) kmatchedBasicCluster=theNeutralBasicClusters.erase(kmatchedBasicCluster);
182 return theNeutralBasicClusters;
189 if ((*iTrack)->quality(quality)) filteredTracks.
push_back(*iTrack);
T getParameter(std::string const &) const
void setTracks(const TrackRefVector &)
const CaloJetRef & calojetRef() const
TrackQuality
track quality
reco::CaloTauTagInfo buildCaloTauTagInfo(edm::Event &, const edm::EventSetup &, const reco::CaloJetRef &, const reco::TrackRefVector &, const reco::Vertex &)
void setJetRef(const JetBaseRef)
const_iterator end() const
Termination of iteration.
const_iterator begin() const
Initialize an iterator over the RefVector.
double z() const
z coordinate
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
bool isNull() const
Checks for null.
void setcalojetRef(const CaloJetRef)
std::vector< reco::BasicClusterRef > getNeutralEcalBasicClusters(edm::Event &, const edm::EventSetup &theEventSetup, const reco::CaloJetRef &, const reco::TrackRefVector &, float theECALBasicClustersAroundCaloJet_DRConeSize, float theECALBasicClusterminE, float theECALBasicClusterpropagTrack_matchingDRConeSize)
static TrackQuality qualityByName(const std::string &name)
XYZPointD XYZPoint
point in space with cartesian internal representation
reco::TrackRefVector filterTracksByQualityBit(const reco::TrackRefVector &tracks, reco::TrackBase::TrackQuality quality) const
std::vector< DetId > getVectorDetId(const reco::CaloJetRef &)
CaloRecoTauTagInfoAlgorithm()
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
void setneutralECALBasicClusters(const std::vector< BasicClusterRef > &)
T const * product() const