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 Types | Private Attributes
PiZeroDiscriminatorProducer Class Reference

#include <PiZeroDiscriminatorProducer.h>

Inheritance diagram for PiZeroDiscriminatorProducer:
edm::EDProducer edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper edm::ProductRegistryHelper

Public Types

typedef math::XYZPoint Point
 
- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 

Public Member Functions

 PiZeroDiscriminatorProducer (const edm::ParameterSet &ps)
 
More...
 
 PiZeroDiscriminatorProducer (const edm::ParameterSet &ps)
 
virtual void produce (edm::Event &evt, const edm::EventSetup &es)
 
virtual void produce (edm::Event &evt, const edm::EventSetup &es)
 
 ~PiZeroDiscriminatorProducer ()
 
 ~PiZeroDiscriminatorProducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- 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 Types

enum  DebugLevel_pi0 { pDEBUG = 0, pINFO = 1, pERROR = 2 }
 

Private Attributes

std::string barrelClusterShapeMapCollection_
 
std::string barrelClusterShapeMapProducer_
 
edm::InputTag barrelRecHitCollection_
 
std::string correctedPhotonCollection_
 
EndcapPiZeroDiscriminatorAlgo::DebugLevel_pi0 debugL_pi0
 
DebugLevel_pi0 debugL_pi0
 
std::string endcapClusterShapeMapCollection_
 
std::string endcapClusterShapeMapProducer_
 
edm::InputTag endcapRecHitCollection_
 
int EScorr_
 
int nEvt_
 
std::string photonCorrCollectionProducer_
 
std::string PhotonPi0DiscriminatorAssociationMap_
 
EndcapPiZeroDiscriminatorAlgopresh_pi0_algo
 
std::string preshClusterShapeCollectionX_
 
std::string preshClusterShapeCollectionY_
 
std::string preshClusterShapeProducer_
 
int preshNst_
 
double preshStripECut_
 
double w0_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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 22 of file PiZeroDiscriminatorProducer.h.

Member Typedef Documentation

Definition at line 28 of file PiZeroDiscriminatorProducer.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

PiZeroDiscriminatorProducer::PiZeroDiscriminatorProducer ( const edm::ParameterSet ps)
explicit


Definition at line 43 of file PiZeroDiscriminatorProducer.cc.

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

43  {
44  // use configuration file to setup input/output collection names
45 
46  preshClusterShapeCollectionX_ = ps.getParameter<std::string>("preshClusterShapeCollectionX");
47  preshClusterShapeCollectionY_ = ps.getParameter<std::string>("preshClusterShapeCollectionY");
48  preshClusterShapeProducer_ = ps.getParameter<std::string>("preshClusterShapeProducer");
49 
50  photonCorrCollectionProducer_ = ps.getParameter<string>("corrPhoProducer");
51  correctedPhotonCollection_ = ps.getParameter<string>("correctedPhotonCollection");
52 
53  barrelRecHitCollection_ = ps.getParameter<edm::InputTag>("barrelRecHitCollection");
54  endcapRecHitCollection_ = ps.getParameter<edm::InputTag>("endcapRecHitCollection");
55 
56  EScorr_ = ps.getParameter<int>("EScorr");
57 
58  preshNst_ = ps.getParameter<int>("preshPi0Nstrip");
59 
60  preshStripECut_ = ps.getParameter<double>("preshStripEnergyCut");
61 
62  w0_ = ps.getParameter<double>("w0");
63 
64  PhotonPi0DiscriminatorAssociationMap_ = ps.getParameter<string>("Pi0Association");
65 
66  string debugString = ps.getParameter<string>("debugLevel");
67 
68  if (debugString == "DEBUG") debugL_pi0 = pDEBUG;
69  else if (debugString == "INFO") debugL_pi0 = pINFO;
70  else debugL_pi0 = pERROR;
71 
72  string tmpPath = ps.getUntrackedParameter<string>("pathToWeightFiles","RecoEcal/EgammaClusterProducers/data/");
73 
74  presh_pi0_algo = new EndcapPiZeroDiscriminatorAlgo(preshStripECut_, preshNst_, tmpPath.c_str());
75 
76  produces< PhotonPi0DiscriminatorAssociationMap >(PhotonPi0DiscriminatorAssociationMap_);
77 
78 
79  nEvt_ = 0;
80 
81 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
EndcapPiZeroDiscriminatorAlgo * presh_pi0_algo
PiZeroDiscriminatorProducer::~PiZeroDiscriminatorProducer ( )

Definition at line 84 of file PiZeroDiscriminatorProducer.cc.

84  {
85  delete presh_pi0_algo;
86 }
EndcapPiZeroDiscriminatorAlgo * presh_pi0_algo
PiZeroDiscriminatorProducer::PiZeroDiscriminatorProducer ( const edm::ParameterSet ps)
explicit
PiZeroDiscriminatorProducer::~PiZeroDiscriminatorProducer ( )

Member Function Documentation

void PiZeroDiscriminatorProducer::produce ( edm::Event evt,
const edm::EventSetup es 
)
virtual

Implements edm::EDProducer.

Definition at line 89 of file PiZeroDiscriminatorProducer.cc.

References gather_cfg::cout, PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, jptDQMConfig_cff::eMax, create_public_lumi_plots::exp, geometry, edm::EventSetup::get(), edm::Event::getByLabel(), edm::EventBase::id(), LogDebug, edm::Handle< T >::product(), edm::ESHandle< class >::product(), edm::Event::put(), funct::sin(), and mathSSE::sqrt().

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

89  {
90 
91  ostringstream ostr; // use this stream for all messages in produce
92 
93  if ( debugL_pi0 <= pDEBUG )
94  cout << "\n PiZeroDiscriminatorProducer: ....... Event " << evt.id() << " with Number = " << nEvt_+1
95  << " is analyzing ....... " << endl << endl;
96 
97  // Get ES clusters in X plane
98  Handle<reco::PreshowerClusterShapeCollection> pPreshowerShapeClustersX;
100  const reco::PreshowerClusterShapeCollection *clustersX = pPreshowerShapeClustersX.product();
101  if ( debugL_pi0 <= pDEBUG ) {
102  cout << "\n PiZeroDiscriminatorProducer: pPreshowerShapeClustersX->size() = " << clustersX->size() << endl;
103  }
104  // Get ES clusters in Y plane
105  Handle<reco::PreshowerClusterShapeCollection> pPreshowerShapeClustersY;
107  const reco::PreshowerClusterShapeCollection *clustersY = pPreshowerShapeClustersY.product();
108  if ( debugL_pi0 <= pDEBUG ) {
109  cout << "\n PiZeroDiscriminatorProducer: pPreshowerShapeClustersY->size() = " << clustersY->size() << endl;
110  }
111  auto_ptr<PhotonPi0DiscriminatorAssociationMap> Pi0Assocs_p(new PhotonPi0DiscriminatorAssociationMap);
112 
114  evt.getByLabel( barrelRecHitCollection_, pEBRecHits );
115  const EcalRecHitCollection *ebRecHits = pEBRecHits.product();
116 
118  evt.getByLabel( endcapRecHitCollection_, pEERecHits );
119  const EcalRecHitCollection *eeRecHits = pEERecHits.product();
120 
121  ESHandle<CaloGeometry> pGeometry;
122  es.get<CaloGeometryRecord>().get(pGeometry);
123  const CaloGeometry *geometry = pGeometry.product();
124 
125  ESHandle<CaloTopology> pTopology;
126  es.get<CaloTopologyRecord>().get(pTopology);
127  const CaloTopology *topology = pTopology.product();
128 
129  //make cycle over Photon Collection
130  Handle<PhotonCollection> correctedPhotonHandle;
132  const PhotonCollection corrPhoCollection = *(correctedPhotonHandle.product());
133  if ( debugL_pi0 <= pDEBUG ) {
134  cout << " PiZeroDiscriminatorProducer: Photon Collection size : " << corrPhoCollection.size() << endl;
135  }
136 
137  for( PhotonCollection::const_iterator iPho = corrPhoCollection.begin(); iPho != corrPhoCollection.end(); iPho++) {
138 
139  float Phot_En = iPho->energy();
140  float Phot_Et = Phot_En*sin(2*atan(exp(-iPho->eta())));
141  float Phot_eta = iPho->eta();
142  float Phot_phi = iPho->phi();
143  float Phot_R9 = iPho->r9();
144 
145  if ( debugL_pi0 <= pDEBUG ) {
146  cout << " PiZeroDiscriminatorProducer: Photon index : " << iPho - corrPhoCollection.begin()
147  << " with Energy = " << Phot_En
148  << " Et = " << Phot_Et
149  << " ETA = " << Phot_eta
150  << " PHI = " << Phot_phi
151  << " R9 = " << Phot_R9 << endl;
152  }
153  SuperClusterRef it_super = iPho->superCluster();
154 
155  float SC_En = it_super->energy();
156  float SC_Et = SC_En*sin(2*atan(exp(-it_super->eta())));
157  float SC_eta = it_super->eta();
158  float SC_phi = it_super->phi();
159 
160  if ( debugL_pi0 <= pDEBUG ) {
161  cout << " PiZeroDiscriminatorProducer: superE = " << SC_En
162  << " superEt = " << SC_Et
163  << " superETA = " << SC_eta
164  << " superPHI = " << SC_phi << endl;
165  }
166 
167  // New way to get ClusterShape info
168  // Find the entry in the map corresponding to the seed BasicCluster of the SuperCluster
169  // DetId id = it_super->seed()->hitsAndFractions()[0].first;
170 
171  // get on-the-fly the cluster shapes
172 // EcalClusterLazyTools lazyTool( evt, es, barrelRecHitCollection_, endcapRecHitCollection_ );
173 
174  float nnoutput = -1.;
175  if(fabs(SC_eta) >= 1.65 && fabs(SC_eta) <= 2.5) { // Use Preshower region only
176  const GlobalPoint pointSC(it_super->x(),it_super->y(),it_super->z()); // get the centroid of the SC
177  if ( debugL_pi0 <= pDEBUG ) cout << "SC centroind = " << pointSC << endl;
178  double SC_seed_energy = it_super->seed()->energy();
179 
180  const CaloClusterPtr seed = it_super->seed();
181 
182  EcalClusterTools::eMax( *seed, ebRecHits );
183 
184  double SC_seed_Shape_E1 = EcalClusterTools::eMax( *seed, eeRecHits );
185  double SC_seed_Shape_E3x3 = EcalClusterTools::e3x3( *seed, eeRecHits, topology );
186  double SC_seed_Shape_E5x5 = EcalClusterTools::e5x5( *seed, eeRecHits, topology );
187 
188  if ( debugL_pi0 <= pDEBUG ) {
189  cout << "PiZeroDiscriminatorProducer: ( SeedBC_energy, E1, E3x3, E5x5) = "
190  << SC_seed_energy << " "
191  << SC_seed_Shape_E1 << " "
192  << SC_seed_Shape_E3x3 << " "
193  << SC_seed_Shape_E5x5 << endl;
194  }
195 
196 // Get the Preshower 2-planes energy vectors associated with the given SC
197  vector<float> vout_stripE1;
198  vector<float> vout_stripE2;
199  for(reco::PreshowerClusterShapeCollection::const_iterator esClus = clustersX->begin();
200  esClus !=clustersX->end(); esClus++) {
201  SuperClusterRef sc_ref = esClus->superCluster();
202  float dR = sqrt((SC_eta-sc_ref->eta())*(SC_eta-sc_ref->eta()) +
203  (SC_phi-sc_ref->phi())*(SC_phi-sc_ref->phi()));
204  if(dR < 0.01 ) {
205 
206  vout_stripE1 = esClus->getStripEnergies();
207 
208  }
209  }
210  for(reco::PreshowerClusterShapeCollection::const_iterator esClus = clustersY->begin();
211  esClus !=clustersY->end(); esClus++) {
212  SuperClusterRef sc_ref = esClus->superCluster();
213  float dR = sqrt((SC_eta-sc_ref->eta())*(SC_eta-sc_ref->eta()) +
214  (SC_phi-sc_ref->phi())*(SC_phi-sc_ref->phi()));
215  if(dR < 0.01 ) {
216 
217  vout_stripE2 = esClus->getStripEnergies();
218 
219  }
220  }
221 
222  if(vout_stripE1.size() == 0 || vout_stripE2.size() == 0 ) {
223  if ( debugL_pi0 <= pDEBUG )
224  cout << " PiZeroDiscriminatorProducer: Attention!!!!! Not Valid ES NN input Variables Return NNout = -1" << endl;
225  Pi0Assocs_p->insert(Ref<PhotonCollection>(correctedPhotonHandle,iPho - corrPhoCollection.begin()), nnoutput);
226  continue;
227  }
228 
229  if ( debugL_pi0 <= pDEBUG ) {
230  cout << "PiZeroDiscriminatorProducer : vout_stripE1.size = " << vout_stripE1.size()
231  << " vout_stripE2.size = " << vout_stripE2.size() << endl;
232  cout << "PiZeroDiscriminatorProducer : ES_input_vector = " ;
233  for(int k1=0;k1<11;k1++) {
234  cout << vout_stripE1[k1] << " " ;
235  }
236  for(int k1=0;k1<11;k1++) {
237  cout << vout_stripE2[k1] << " " ;
238  }
239  cout << endl;
240  }
241 
242  bool valid_NNinput = presh_pi0_algo->calculateNNInputVariables(vout_stripE1, vout_stripE2,
243  SC_seed_Shape_E1, SC_seed_Shape_E3x3, SC_seed_Shape_E5x5, EScorr_);
244 
245  if(!valid_NNinput) {
246  if ( debugL_pi0 <= pDEBUG )
247  cout << " PiZeroDiscriminatorProducer: Attention!!!!! Not Valid ES NN input Variables Return NNout = -1" << endl;
248  Pi0Assocs_p->insert(Ref<PhotonCollection>(correctedPhotonHandle,iPho - corrPhoCollection.begin()), nnoutput);
249  continue;
250  }
251 
252  float* nn_input_var = presh_pi0_algo->get_input_vector();
253 
254  if ( debugL_pi0 <= pDEBUG ) {
255  cout << " PiZeroDiscriminatorProducer: NN_ESEndcap_input_vector+Et+Eta+Phi+R9 = " ;
256  for(int k1=0;k1<25;k1++) {
257  cout << nn_input_var[k1] << " " ;
258  }
259  cout << SC_Et << " " << SC_eta << " " << SC_phi << " " << Phot_R9 << endl;
260  }
261 
262  nnoutput = presh_pi0_algo->GetNNOutput(SC_Et);
263 
264  if ( debugL_pi0 <= pDEBUG ) {
265  cout << " PiZeroDiscriminatorProducer: Event : " << evt.id()
266  << " SC id = " << iPho - corrPhoCollection.begin()
267  << " with Pt = " << SC_Et
268  << " eta = " << SC_eta
269  << " phi = " << SC_phi
270  << " contains: " << it_super->clustersSize() << " BCs "
271  << " has NNout = " << nnoutput << endl;
272  }
273 
274  Pi0Assocs_p->insert(Ref<PhotonCollection>(correctedPhotonHandle,iPho - corrPhoCollection.begin()), nnoutput);
275 
276  } else if((fabs(SC_eta) <= 1.4442) || (fabs(SC_eta) < 1.65 && fabs(SC_eta) >= 1.566) || fabs(SC_eta) >= 2.5) {
277 
278  const CaloClusterPtr seed = it_super->seed();
279 
280  double SC_seed_Shape_E1 = EcalClusterTools::eMax( *seed, ebRecHits );
281  double SC_seed_Shape_E3x3 = EcalClusterTools::e3x3( *seed, ebRecHits, topology );
282  double SC_seed_Shape_E5x5 = EcalClusterTools::e5x5( *seed, ebRecHits, topology );
283  double SC_seed_Shape_E2 = EcalClusterTools::e2nd( *seed, ebRecHits );
284 
285  std::vector<float> vCov = EcalClusterTools::covariances( *seed, ebRecHits , topology, geometry, w0_ );
286 
287  double SC_seed_Shape_cEE = vCov[0];
288  double SC_seed_Shape_cEP = vCov[1];
289  double SC_seed_Shape_cPP = vCov[2];
290 
291  double SC_seed_Shape_E2x2 = EcalClusterTools::e2x2( *seed, ebRecHits, topology );
292  double SC_seed_Shape_E3x2 = EcalClusterTools::e3x2( *seed, ebRecHits, topology );
293 
294  double SC_seed_Shape_E3x2r = 0.0;
295  double SC_seed_Shape_ELeft = EcalClusterTools::eLeft( *seed, ebRecHits, topology );
296  double SC_seed_Shape_ERight = EcalClusterTools::eRight( *seed, ebRecHits, topology );
297  double SC_seed_Shape_ETop = EcalClusterTools::eTop( *seed, ebRecHits, topology );
298  double SC_seed_Shape_EBottom = EcalClusterTools::eBottom( *seed, ebRecHits, topology );
299 
300  double DA = SC_seed_Shape_E2x2 - SC_seed_Shape_E2 - SC_seed_Shape_E1;
301 
302  if(SC_seed_Shape_E2==SC_seed_Shape_ETop || SC_seed_Shape_E2==SC_seed_Shape_EBottom) {
303  if( SC_seed_Shape_ELeft > SC_seed_Shape_ERight ) {
304  SC_seed_Shape_E3x2r = (DA - SC_seed_Shape_ELeft)/(0.25+SC_seed_Shape_ELeft);
305  } else {
306  SC_seed_Shape_E3x2r = (DA - SC_seed_Shape_ERight)/(0.25+SC_seed_Shape_ERight);
307  }
308 
309  } else if(SC_seed_Shape_E2==SC_seed_Shape_ELeft || SC_seed_Shape_E2==SC_seed_Shape_ERight) {
310 
311  if( SC_seed_Shape_ETop > SC_seed_Shape_EBottom ) {
312  SC_seed_Shape_E3x2r = (DA - SC_seed_Shape_ETop)/(0.25+SC_seed_Shape_ETop);
313  } else {
314  SC_seed_Shape_E3x2r = (DA - SC_seed_Shape_EBottom)/(0.25+SC_seed_Shape_EBottom);
315  }
316 
317  }
318 
319  double SC_seed_Shape_xcog = EcalClusterTools::eRight( *seed, ebRecHits, topology ) - EcalClusterTools::e2x5Left( *seed, ebRecHits, topology );
320  double SC_seed_Shape_ycog = EcalClusterTools::e2x5Top( *seed, ebRecHits, topology ) - EcalClusterTools::e2x5Bottom( *seed, ebRecHits, topology );
321 
322 
323  if ( debugL_pi0 <= pDEBUG ) {
324  cout << "PiZeroDiscriminatorProduce: lazyTool (E1,E3x3,E5x5,E2,cEE,cEP,cPP,E2x2,E3x2_E3x2r,Xcog,Ycog,E2x5Bottom,E2x5Top,Et,Eta,PhiR9) = ( "
325  << SC_seed_Shape_E1 << " "
326  << SC_seed_Shape_E3x3 << " "
327  << SC_seed_Shape_E5x5 << " "
328  << SC_seed_Shape_E2 << " "
329  << SC_seed_Shape_cEE << " "
330  << SC_seed_Shape_cEP << " "
331  << SC_seed_Shape_cPP << " "
332  << SC_seed_Shape_E2x2 << " "
333  << SC_seed_Shape_E3x2 << " "
334  << SC_seed_Shape_E3x2r << " "
335  << SC_seed_Shape_xcog << " "
336  << SC_seed_Shape_ycog << " "
337  << EcalClusterTools::e2x5Bottom( *seed, ebRecHits, topology ) << " "
338  << EcalClusterTools::e2x5Top( *seed, ebRecHits, topology ) << " "
339  << SC_Et << " "
340  << SC_eta << " "
341  << SC_phi << " "
342  << Phot_R9 << " )" << endl;
343  }
344 
345  float SC_et = it_super->energy()*sin(2*atan(exp(-it_super->eta())));
346 
347  presh_pi0_algo->calculateBarrelNNInputVariables(SC_et, SC_seed_Shape_E1, SC_seed_Shape_E3x3,
348  SC_seed_Shape_E5x5, SC_seed_Shape_E2,
349  SC_seed_Shape_cEE, SC_seed_Shape_cEP,
350  SC_seed_Shape_cPP, SC_seed_Shape_E2x2,
351  SC_seed_Shape_E3x2, SC_seed_Shape_E3x2r,
352  SC_seed_Shape_xcog, SC_seed_Shape_ycog);
353 
354  float* nn_input_var = presh_pi0_algo->get_input_vector();
355 
356  if ( debugL_pi0 <= pDEBUG ) {
357  cout << " PiZeroDiscriminatorProducer : NN_barrel_nonESEndcap_variables+Et+Eta+Phi+R9 = " ;
358  for(int k3=0;k3<12;k3++) {
359  cout << nn_input_var[k3] << " " ;
360  }
361  cout << SC_Et << " " << SC_eta << " " << SC_phi << " " << Phot_R9 << endl;
362 
363  }
364 
365  nnoutput = presh_pi0_algo->GetBarrelNNOutput(SC_et);
366 
367 
368  if ( debugL_pi0 <= pDEBUG ) {
369  cout << "PiZeroDiscriminatorProducer : Event : " << evt.id()
370  << " SC id = " << iPho - corrPhoCollection.begin()
371  << " with Pt = " << SC_Et
372  << " eta = " << SC_eta
373  << " phi = " << SC_phi
374  << " contains: " << it_super->clustersSize() << " BCs "
375  << " has NNout = " << nnoutput
376  << endl;
377  }
378 
379  Pi0Assocs_p->insert(Ref<PhotonCollection>(correctedPhotonHandle,iPho - corrPhoCollection.begin()), nnoutput);
380  } else { Pi0Assocs_p->insert(Ref<PhotonCollection>(correctedPhotonHandle,iPho - corrPhoCollection.begin()), -1.);}
381  } // end of cycle over Photons
382 
384  if ( debugL_pi0 <= pDEBUG ) cout << "PiZeroDiscriminatorProducer: PhotonPi0DiscriminatorAssociationMap added to the event" << endl;
385 
386  nEvt_++;
387 
388  LogDebug("PiZeroDiscriminatorDebug") << ostr.str();
389 
390 
391 }
#define LogDebug(id)
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
void calculateBarrelNNInputVariables(float et, double s1, double s9, double s25, double m2, double cee, double cep, double cpp, double s4, double s6, double ratio, double xcog, double ycog)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:116
T sqrt(T t)
Definition: SSEVec.h:48
std::vector< PreshowerClusterShape > PreshowerClusterShapeCollection
collection of PreshowerClusterShape objects
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
std::vector< Photon > PhotonCollection
collectin of Photon objects
Definition: PhotonFwd.h:9
T const * product() const
Definition: Handle.h:81
ESHandle< TrackerGeometry > geometry
edm::EventID id() const
Definition: EventBase.h:56
bool calculateNNInputVariables(std::vector< float > &vph1, std::vector< float > &vph2, float pS1_max, float pS9_max, float pS25_max, int EScorr)
tuple cout
Definition: gather_cfg.py:121
EndcapPiZeroDiscriminatorAlgo * presh_pi0_algo
virtual void PiZeroDiscriminatorProducer::produce ( edm::Event evt,
const edm::EventSetup es 
)
virtual

Implements edm::EDProducer.

Member Data Documentation

std::string PiZeroDiscriminatorProducer::barrelClusterShapeMapCollection_
private

Definition at line 46 of file PiZeroDiscriminatorProducer.h.

std::string PiZeroDiscriminatorProducer::barrelClusterShapeMapProducer_
private

Definition at line 45 of file PiZeroDiscriminatorProducer.h.

edm::InputTag PiZeroDiscriminatorProducer::barrelRecHitCollection_
private

Definition at line 47 of file PiZeroDiscriminatorProducer.h.

std::string PiZeroDiscriminatorProducer::correctedPhotonCollection_
private

Definition at line 44 of file PiZeroDiscriminatorProducer.h.

EndcapPiZeroDiscriminatorAlgo::DebugLevel_pi0 PiZeroDiscriminatorProducer::debugL_pi0
private

Definition at line 56 of file PiZeroDiscriminatorProducer.h.

DebugLevel_pi0 PiZeroDiscriminatorProducer::debugL_pi0
private

Definition at line 60 of file PiZeroDiscriminatorProducer.h.

std::string PiZeroDiscriminatorProducer::endcapClusterShapeMapCollection_
private

Definition at line 48 of file PiZeroDiscriminatorProducer.h.

std::string PiZeroDiscriminatorProducer::endcapClusterShapeMapProducer_
private

Definition at line 47 of file PiZeroDiscriminatorProducer.h.

edm::InputTag PiZeroDiscriminatorProducer::endcapRecHitCollection_
private

Definition at line 48 of file PiZeroDiscriminatorProducer.h.

int PiZeroDiscriminatorProducer::EScorr_
private

Definition at line 50 of file PiZeroDiscriminatorProducer.h.

int PiZeroDiscriminatorProducer::nEvt_
private

Definition at line 36 of file PiZeroDiscriminatorProducer.h.

std::string PiZeroDiscriminatorProducer::photonCorrCollectionProducer_
private

Definition at line 43 of file PiZeroDiscriminatorProducer.h.

std::string PiZeroDiscriminatorProducer::PhotonPi0DiscriminatorAssociationMap_
private

Definition at line 45 of file PiZeroDiscriminatorProducer.h.

EndcapPiZeroDiscriminatorAlgo * PiZeroDiscriminatorProducer::presh_pi0_algo
private

Definition at line 58 of file PiZeroDiscriminatorProducer.h.

std::string PiZeroDiscriminatorProducer::preshClusterShapeCollectionX_
private

Definition at line 39 of file PiZeroDiscriminatorProducer.h.

std::string PiZeroDiscriminatorProducer::preshClusterShapeCollectionY_
private

Definition at line 40 of file PiZeroDiscriminatorProducer.h.

std::string PiZeroDiscriminatorProducer::preshClusterShapeProducer_
private

Definition at line 41 of file PiZeroDiscriminatorProducer.h.

int PiZeroDiscriminatorProducer::preshNst_
private

Definition at line 52 of file PiZeroDiscriminatorProducer.h.

double PiZeroDiscriminatorProducer::preshStripECut_
private

Definition at line 54 of file PiZeroDiscriminatorProducer.h.

double PiZeroDiscriminatorProducer::w0_
private

Definition at line 56 of file PiZeroDiscriminatorProducer.h.