71 return StatusCode::SUCCESS;
97 if(!handle.record(std::unique_ptr<OutContTypeCl>(filtered_clusters))){
113 if(!handle_out.record(std::unique_ptr<OutContTypeTr>(filtered_tracks))){
123 return StatusCode::SUCCESS;
130 std::vector<const xAOD::Electron*> selected_electrons_v;
133 if(!handle.isValid()){
135 return selected_electrons_v;
138 const auto *electrons = handle.cptr();
140 selected_electrons_v.clear();
144 for (
const auto *electron_itr : *electrons){
149 if (idflagDec (*electron_itr)==1){
153 if (! isTight) continue ;
157 if (electron_itr->pt()<
m_elPt)
continue;
159 selected_electrons_v.push_back(
dynamic_cast<const xAOD::Electron*
>(electron_itr));
164 return selected_electrons_v ;
176 int countRemoved_clusters=0;
182 if(!handle.isValid()){
187 const auto *clusterContainer = handle.cptr();
195 double EMB_Enegy=cluster_itr->eSample(CaloSampling::CaloSample::PreSamplerB)+cluster_itr->eSample(CaloSampling::CaloSample::EMB1)+cluster_itr->eSample(CaloSampling::CaloSample::EMB2)+cluster_itr->eSample(CaloSampling::CaloSample::EMB3);
197 double EMEC_Energy=cluster_itr->eSample(CaloSampling::CaloSample::PreSamplerE)+cluster_itr->eSample(CaloSampling::CaloSample::EME1)+cluster_itr->eSample(CaloSampling::CaloSample::EME2)+cluster_itr->eSample(CaloSampling::CaloSample::EME3);
200 if (cluster_itr->rawE()==0) {
203 propEM=(EMB_Enegy+EMEC_Energy)/cluster_itr->rawE();
208 bool closetoel=
false;
210 std::vector<const xAOD::Electron*>::iterator it=selected_el.begin();
211 std::vector<const xAOD::Electron*>::iterator itE =selected_el.end();
213 for ( ; it != itE ;++it){
214 ATH_MSG_DEBUG(
"Deleta R electron cluster = "<<(*it)->p4().DeltaR(cluster_itr->p4()) );
217 if ((*it)->caloCluster()->p4().DeltaR(cluster_itr->p4())<
m_clRemovRadius){
220 if (TMath::Abs(cluster_itr->eta())<1.52 && TMath::Abs(cluster_itr->eta())>1.37){
236 countRemoved_clusters+=1;
243 return countRemoved_clusters;
256 int countRemoved_clusters=0;
260 if(!handle.isValid()){
265 const auto *jetsContainer = handle.cptr();
274 for (
const xAOD::Jet* jet_itr : *jetsContainer){
280 if (!jetcons.
isValid()) continue ;
285 for( ; jetcons_it != jetcons_itE; ++jetcons_it){
291 double EMB_Enegy=cluster_itr->
eSample(CaloSampling::CaloSample::PreSamplerB)+cluster_itr->
eSample(CaloSampling::CaloSample::EMB1)+cluster_itr->
eSample(CaloSampling::CaloSample::EMB2)+cluster_itr->
eSample(CaloSampling::CaloSample::EMB3);
293 double EMEC_Energy=cluster_itr->
eSample(CaloSampling::CaloSample::PreSamplerE)+cluster_itr->
eSample(CaloSampling::CaloSample::EME1)+cluster_itr->
eSample(CaloSampling::CaloSample::EME2)+cluster_itr->
eSample(CaloSampling::CaloSample::EME3);
297 if (cluster_itr->
rawE()==0) {
301 propEM=(EMB_Enegy+EMEC_Energy)/cluster_itr->
rawE();
303 bool closetoel=
false;
304 std::vector<const xAOD::Electron*>::iterator it=selected_el.begin();
305 std::vector<const xAOD::Electron*>::iterator itE =selected_el.end();
307 for ( ; it != itE ;++it){
308 ATH_MSG_DEBUG(
"Deleta R electron cluster = "<<(*it)->p4().DeltaR(cluster_itr->
p4()) );
320 countRemoved_clusters+=1;
328 return countRemoved_clusters;
334 int countRemoved_trk=0;
337 if(!handle.isValid()){
342 const auto *tkPrtclContainer = handle.cptr();
358 std::vector<const xAOD::Electron*>::iterator it=selected_el.begin();
359 std::vector<const xAOD::Electron*>::iterator itE =selected_el.end();
361 for ( ; it != itE ;++it){
365 ATH_MSG_DEBUG(
"Deleta R electron trkack = "<<(*it)->p4().DeltaR(trk_itr->p4()) );
367 if (el_trk==trk_itr){
382 return countRemoved_trk;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Helper class to provide type-safe access to aux data.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
DataVector adapter that acts like it holds const pointers.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
float eSample(const CaloSample sampling) const
virtual FourMom_t p4() const
The full 4-momentum of the particle.
A vector of jet constituents at the scale used during jet finding.
iterator begin() const
iterator on the first constituent
bool isValid() const
Check if element links are valid.
iterator end() const
iterator after the last constituent
const IParticle * rawConstituent() const
Access the real underlying IParticle.
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Jet_v1 Jet
Definition of the current "jet version".
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
Electron_v1 Electron
Definition of the current "egamma version".