CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
PFSuperClusterTreeMaker Class Reference
Inheritance diagram for PFSuperClusterTreeMaker:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &)
 
 PFSuperClusterTreeMaker (const PSet &)
 
 ~PFSuperClusterTreeMaker ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Types

typedef TTree * treeptr
 

Private Member Functions

void processSuperClusterFillTree (const edm::Event &, const reco::SuperCluster &)
 
void setTreeArraysForSize (const size_t N_ECAL, const size_t N_PS)
 

Private Attributes

std::shared_ptr
< PFEnergyCalibration
_calib
 
bool _dogen
 
edm::Service< TFileService_fs
 
edm::InputTag _geninput
 
edm::InputTag _scInputEB
 
edm::InputTag _scInputEE
 
treeptr _tree
 
edm::InputTag _vtxsrc
 
std::shared_ptr< Float_t > clusterCalibEnergy
 
std::shared_ptr< Float_t > clusterDEtaToCentroid
 
std::shared_ptr< Float_t > clusterDEtaToGen
 
std::shared_ptr< Float_t > clusterDEtaToSeed
 
std::shared_ptr< Float_t > clusterDPhiToCentroid
 
std::shared_ptr< Float_t > clusterDPhiToGen
 
std::shared_ptr< Float_t > clusterDPhiToSeed
 
std::shared_ptr< Float_t > clusterEta
 
std::shared_ptr< Float_t > clusterHitFractionSharedWithSeed
 
std::shared_ptr< Int_t > clusterInDynDPhi
 
std::shared_ptr< Int_t > clusterInMustache
 
std::shared_ptr< Float_t > clusterPhi
 
std::shared_ptr< Float_t > clusterRawEnergy
 
Float_t genDRToCentroid
 
Float_t genDRToSeed
 
Float_t genEnergy
 
Float_t genEta
 
Float_t genPhi
 
Int_t N_ECALClusters
 
Int_t N_PSClusters
 
Int_t nVtx
 
std::shared_ptr< Float_t > psClusterEta
 
std::shared_ptr< Float_t > psClusterPhi
 
std::shared_ptr< Float_t > psClusterRawEnergy
 
Float_t scCalibratedEnergy
 
Float_t scEta
 
Float_t scEtaWidth
 
Float_t scPhi
 
Float_t scPhiWidth
 
Float_t scPreshowerEnergy
 
Float_t scR
 
Float_t scRawEnergy
 
Float_t scSeedCalibratedEnergy
 
Float_t scSeedEta
 
Float_t scSeedPhi
 
Float_t scSeedRawEnergy
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- 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 80 of file PFSuperClusterTreeMaker.cc.

Member Typedef Documentation

typedef TTree* PFSuperClusterTreeMaker::treeptr
private

Definition at line 81 of file PFSuperClusterTreeMaker.cc.

Constructor & Destructor Documentation

PFSuperClusterTreeMaker::PFSuperClusterTreeMaker ( const PSet p)

Definition at line 258 of file PFSuperClusterTreeMaker.cc.

References _calib, _dogen, _fs, _geninput, _scInputEB, _scInputEE, _tree, _vtxsrc, clusterCalibEnergy, clusterDEtaToCentroid, clusterDEtaToGen, clusterDEtaToSeed, clusterDPhiToCentroid, clusterDPhiToGen, clusterDPhiToSeed, clusterEta, clusterHitFractionSharedWithSeed, clusterInDynDPhi, clusterInMustache, clusterPhi, clusterRawEnergy, genDRToCentroid, genDRToSeed, genEnergy, genEta, genPhi, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), TFileDirectory::make(), N_ECALClusters, N_PSClusters, nVtx, psClusterEta, psClusterPhi, psClusterRawEnergy, scCalibratedEnergy, scEta, scEtaWidth, scPhi, scPhiWidth, scPreshowerEnergy, scR, scRawEnergy, scSeedCalibratedEnergy, scSeedEta, scSeedPhi, and scSeedRawEnergy.

258  {
259  _calib.reset(new PFEnergyCalibration());
260  N_ECALClusters = 1;
261  N_PSClusters = 1;
262  _tree = _fs->make<TTree>("SuperClusterTree","Dump of all available SC info");
263  _tree->Branch("N_ECALClusters",&N_ECALClusters,"N_ECALClusters/I");
264  _tree->Branch("N_PSClusters",&N_PSClusters,"N_PSClusters/I");
265  _tree->Branch("nVtx",&nVtx,"nVtx/I");
266  _tree->Branch("scRawEnergy",&scRawEnergy,"scRawEnergy/F");
267  _tree->Branch("scCalibratedEnergy",&scCalibratedEnergy,
268  "scCalibratedEnergy/F");
269  _tree->Branch("scPreshowerEnergy",&scPreshowerEnergy,"scPreshowerEnergy/F");
270  _tree->Branch("scEta",&scEta,"scEta/F");
271  _tree->Branch("scPhi",&scPhi,"scPhi/F");
272  _tree->Branch("scR",&scR,"scR/F");
273  _tree->Branch("scPhiWidth",&scPhiWidth,"scPhiWidth/F");
274  _tree->Branch("scEtaWidth",&scEtaWidth,"scEtaWidth/F");
275  _tree->Branch("scSeedRawEnergy",&scSeedRawEnergy,"scSeedRawEnergy/F");
276  _tree->Branch("scSeedCalibratedEnergy",&scSeedCalibratedEnergy,
277  "scSeedCalibratedEnergy/F");
278  _tree->Branch("scSeedEta",&scSeedEta,"scSeedEta/F");
279  _tree->Branch("scSeedPhi",&scSeedPhi,"scSeedPhi/F");
280  // ecal cluster information
281  clusterRawEnergy.reset(new Float_t[1],array_deleter<Float_t>());
282  _tree->Branch("clusterRawEnergy",clusterRawEnergy.get(),
283  "clusterRawEnergy[N_ECALClusters]/F");
284  clusterCalibEnergy.reset(new Float_t[1],array_deleter<Float_t>());
285  _tree->Branch("clusterCalibEnergy",clusterCalibEnergy.get(),
286  "clusterCalibEnergy[N_ECALClusters]/F");
287  clusterEta.reset(new Float_t[1],array_deleter<Float_t>());
288  _tree->Branch("clusterEta",clusterEta.get(),
289  "clusterEta[N_ECALClusters]/F");
290  clusterPhi.reset(new Float_t[1],array_deleter<Float_t>());
291  _tree->Branch("clusterPhi",clusterPhi.get(),
292  "clusterPhi[N_ECALClusters]/F");
293  clusterDPhiToSeed.reset(new Float_t[1],array_deleter<Float_t>());
294  _tree->Branch("clusterDPhiToSeed",clusterDPhiToSeed.get(),
295  "clusterDPhiToSeed[N_ECALClusters]/F");
296  clusterDEtaToSeed.reset(new Float_t[1],array_deleter<Float_t>());
297  _tree->Branch("clusterDEtaToSeed",clusterDEtaToSeed.get(),
298  "clusterDEtaToSeed[N_ECALClusters]/F");
299  clusterDPhiToCentroid.reset(new Float_t[1],array_deleter<Float_t>());
300  _tree->Branch("clusterDPhiToCentroid",clusterDPhiToCentroid.get(),
301  "clusterDPhiToCentroid[N_ECALClusters]/F");
302  clusterDEtaToCentroid.reset(new Float_t[1],array_deleter<Float_t>());
303  _tree->Branch("clusterDEtaToCentroid",clusterDEtaToCentroid.get(),
304  "clusterDEtaToCentroid[N_ECALClusters]/F");
305  clusterHitFractionSharedWithSeed.reset(new Float_t[1],
306  array_deleter<Float_t>());
307  _tree->Branch("clusterHitFractionSharedWithSeed",
309  "clusterHitFractionSharedWithSeed[N_ECALClusters]/F");
310  clusterInMustache.reset(new Int_t[1],array_deleter<Int_t>());
311  _tree->Branch("clusterInMustache",clusterInMustache.get(),
312  "clusterInMustache[N_ECALClusters]/I");
313  clusterInDynDPhi.reset(new Int_t[1],array_deleter<Int_t>());
314  _tree->Branch("clusterInDynDPhi",clusterInDynDPhi.get(),
315  "clusterInDynDPhi[N_ECALClusters]/I");
316  // preshower information
317  psClusterRawEnergy.reset(new Float_t[1],array_deleter<Float_t>());
318  _tree->Branch("psClusterRawEnergy",psClusterRawEnergy.get(),
319  "psClusterRawEnergy[N_PSClusters]/F");
320  psClusterEta.reset(new Float_t[1],array_deleter<Float_t>());
321  _tree->Branch("psClusterEta",psClusterEta.get(),
322  "psClusterEta[N_PSClusters]/F");
323  psClusterPhi.reset(new Float_t[1],array_deleter<Float_t>());
324  _tree->Branch("psClusterPhi",psClusterPhi.get(),
325  "psClusterPhi[N_PSClusters]/F");
326 
327 
328  if( (_dogen = p.getUntrackedParameter<bool>("doGen",false)) ) {
329  _geninput = p.getParameter<edm::InputTag>("genSrc");
330  _tree->Branch("genEta",&genEta,"genEta/F");
331  _tree->Branch("genPhi",&genPhi,"genPhi/F");
332  _tree->Branch("genEnergy",&genEnergy,"genEnergy/F");
333  _tree->Branch("genDRToCentroid",&genDRToCentroid,"genDRToCentroid/F");
334  _tree->Branch("genDRToSeed",&genDRToSeed,"genDRToSeed/F");
335 
336  clusterDPhiToGen.reset(new Float_t[1],array_deleter<Float_t>());
337  _tree->Branch("clusterDPhiToGen",clusterDPhiToGen.get(),
338  "clusterDPhiToGen[N_ECALClusters]/F");
339  clusterDEtaToGen.reset(new Float_t[1],array_deleter<Float_t>());
340  _tree->Branch("clusterDEtaToGen",clusterDEtaToGen.get(),
341  "clusterDPhiToGen[N_ECALClusters]/F");
342  }
343  _vtxsrc = p.getParameter<edm::InputTag>("primaryVertices");
344  _scInputEB = p.getParameter<edm::InputTag>("superClusterSrcEB");
345  _scInputEE = p.getParameter<edm::InputTag>("superClusterSrcEE");
346 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::shared_ptr< Float_t > psClusterRawEnergy
std::shared_ptr< Float_t > clusterPhi
std::shared_ptr< Float_t > clusterCalibEnergy
std::shared_ptr< PFEnergyCalibration > _calib
std::shared_ptr< Float_t > clusterDEtaToCentroid
std::shared_ptr< Float_t > clusterHitFractionSharedWithSeed
edm::Service< TFileService > _fs
std::shared_ptr< Float_t > psClusterPhi
std::shared_ptr< Float_t > clusterDPhiToSeed
std::shared_ptr< Float_t > clusterDPhiToGen
std::shared_ptr< Float_t > psClusterEta
std::shared_ptr< Int_t > clusterInMustache
std::shared_ptr< Float_t > clusterEta
std::shared_ptr< Float_t > clusterDEtaToSeed
T * make() const
make new ROOT object
std::shared_ptr< Int_t > clusterInDynDPhi
std::shared_ptr< Float_t > clusterRawEnergy
std::shared_ptr< Float_t > clusterDEtaToGen
std::shared_ptr< Float_t > clusterDPhiToCentroid
PFSuperClusterTreeMaker::~PFSuperClusterTreeMaker ( )
inline

Definition at line 84 of file PFSuperClusterTreeMaker.cc.

84 {}

Member Function Documentation

void PFSuperClusterTreeMaker::analyze ( const edm::Event e,
const edm::EventSetup es 
)
virtual

Implements edm::EDAnalyzer.

Definition at line 114 of file PFSuperClusterTreeMaker.cc.

References _scInputEB, _scInputEE, _vtxsrc, edm::hlt::Exception, edm::Event::getByLabel(), edm::HandleBase::isValid(), nVtx, and processSuperClusterFillTree().

115  {
117  e.getByLabel(_vtxsrc,vtcs);
118  if( vtcs.isValid() ) nVtx = vtcs->size();
119  else nVtx = -1;
120 
122  e.getByLabel(_scInputEB, ebSCs);
123  e.getByLabel(_scInputEE, eeSCs);
124 
125  if( ebSCs.isValid() ) {
126  for( const auto& sc : *ebSCs ) processSuperClusterFillTree(e,sc);
127  } else {
128  throw cms::Exception("PFSuperClusterTreeMaker")
129  << "Product ID for the EB SuperCluster collection was invalid!"
130  << std::endl;
131  }
132 
133  if( eeSCs.isValid() ) {
134  for( const auto& sc : *eeSCs ) processSuperClusterFillTree(e,sc);
135  } else {
136  throw cms::Exception("PFSuperClusterTreeMaker")
137  << "Product ID for the EE SuperCluster collection was invalid!"
138  << std::endl;
139  }
140 }
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
void processSuperClusterFillTree(const edm::Event &, const reco::SuperCluster &)
void PFSuperClusterTreeMaker::processSuperClusterFillTree ( const edm::Event e,
const reco::SuperCluster sc 
)
private

Definition at line 143 of file PFSuperClusterTreeMaker.cc.

References _calib, _dogen, _geninput, _tree, asciidump::at, clusterCalibEnergy, clusterDEtaToCentroid, clusterDEtaToGen, clusterDEtaToSeed, clusterDPhiToCentroid, clusterDPhiToGen, clusterDPhiToSeed, clusterEta, clusterHitFractionSharedWithSeed, clusterInDynDPhi, clusterInMustache, clusterPhi, clusterRawEnergy, reco::SuperCluster::clustersBegin(), reco::SuperCluster::clustersEnd(), reco::deltaR(), PFLayer::ECAL_BARREL, reco::CaloCluster::energy(), reco::CaloCluster::eta(), reco::SuperCluster::etaWidth(), edm::hlt::Exception, genDRToCentroid, genDRToSeed, genEnergy, genEta, EgammaValidation_cff::genp, genPhi, edm::Event::getByLabel(), i, reco::MustacheKernel::inDynamicDPhiWindow(), reco::MustacheKernel::inMustache(), edm::Ref< C, T, F >::isNonnull(), edm::HandleBase::isValid(), max(), N_ECALClusters, N_PSClusters, reco::CaloCluster::phi(), Phi_mpi_pi(), reco::SuperCluster::phiWidth(), reco::CaloCluster::position(), reco::SuperCluster::preshowerClustersBegin(), reco::SuperCluster::preshowerClustersEnd(), reco::SuperCluster::preshowerEnergy(), psClusterEta, psClusterPhi, psClusterRawEnergy, reco::SuperCluster::rawEnergy(), scCalibratedEnergy, scEta, scEtaWidth, scPhi, scPhiWidth, scPreshowerEnergy, scR, scRawEnergy, scSeedCalibratedEnergy, scSeedEta, scSeedPhi, scSeedRawEnergy, reco::SuperCluster::seed(), and setTreeArraysForSize().

Referenced by analyze().

144  {
145  const int N_ECAL = sc.clustersEnd() - sc.clustersBegin();
146  const int N_PS = ( sc.preshowerClustersEnd() -
147  sc.preshowerClustersBegin() );
148  if( sc.rawEnergy()/std::cosh(sc.position().Eta()) < 4.0 ) return;
149  N_ECALClusters = std::max(0,N_ECAL - 1); // minus 1 because of seed
150  N_PSClusters = N_PS;
151  reco::GenParticleRef genmatch;
152  // gen information (if needed)
153  if( _dogen ) {
155  e.getByLabel(_geninput,genp);
156  if( genp.isValid() ) {
157  double minDr = 1e6, this_dr;
158  reco::GenParticleRef bestmatch;
159  for(size_t i = 0; i < genp->size(); ++i) {
160  this_dr = reco::deltaR(genp->at(i),sc);
161  // oh hai, this is hard coded to photons for the time being
162  if( this_dr < minDr && genp->at(i).pdgId() == 22) {
163  minDr = this_dr;
164  bestmatch = reco::GenParticleRef(genp,i);
165  }
166  }
167  if( bestmatch.isNonnull() ) {
168  genmatch = bestmatch;
169  genEnergy = bestmatch->energy();
170  genEta = bestmatch->eta();
171  genPhi = bestmatch->phi();
172  genDRToCentroid = minDr;
173  genDRToSeed = reco::deltaR(*bestmatch,*(sc.seed()));
174  } else {
175  genEnergy = -1.0;
176  genEta = 999.0;
177  genPhi = 999.0;
178  genDRToCentroid = 999.0;
179  genDRToSeed = 999.0;
180  }
181  } else {
182  throw cms::Exception("PFSuperClusterTreeMaker")
183  << "Requested generator level information was not available!"
184  << std::endl;
185  }
186  }
187  // supercluster information
189  scRawEnergy = sc.rawEnergy();
190  scCalibratedEnergy = sc.energy();
192  scEta = sc.position().Eta();
193  scPhi = sc.position().Phi();
194  scR = sc.position().R();
195  scPhiWidth = sc.phiWidth();
196  scEtaWidth = sc.etaWidth();
197  // sc seed information
199  GetSharedRecHitFraction fractionOfSeed(theseed);
200  scSeedRawEnergy = theseed->energy();
201  scSeedCalibratedEnergy = _calib->energyEm(*theseed,0.0,0.0,false);
202  scSeedEta = theseed->eta();
203  scSeedPhi = theseed->phi();
204  // loop over all clusters that aren't the seed
205  auto clusend = sc.clustersEnd();
206  size_t iclus = 0;
208  for( auto clus = sc.clustersBegin(); clus != clusend; ++clus ) {
209  pclus = edm::Ptr<reco::PFCluster>(*clus);
210  if( theseed == pclus ) continue;
211  clusterRawEnergy.get()[iclus] = pclus->energy();
212  clusterCalibEnergy.get()[iclus] = _calib->energyEm(*pclus,0.0,0.0,false);
213  clusterEta.get()[iclus] = pclus->eta();
214  clusterPhi.get()[iclus] = pclus->phi();
215  clusterDPhiToSeed.get()[iclus] =
216  TVector2::Phi_mpi_pi(pclus->phi() - theseed->phi());
217  clusterDEtaToSeed.get()[iclus] = pclus->eta() - theseed->eta();
218  clusterDPhiToCentroid.get()[iclus] =
219  TVector2::Phi_mpi_pi(pclus->phi() - sc.phi());
220  clusterDEtaToCentroid.get()[iclus] = pclus->eta() - sc.eta();
221  clusterDPhiToCentroid.get()[iclus] =
222  TVector2::Phi_mpi_pi(pclus->phi() - sc.phi());
223  clusterDEtaToCentroid.get()[iclus] = pclus->eta() - sc.eta();
224  clusterHitFractionSharedWithSeed.get()[iclus] = fractionOfSeed(pclus);
225  if( _dogen && genmatch.isNonnull() ) {
226  clusterDPhiToGen.get()[iclus] =
227  TVector2::Phi_mpi_pi(pclus->phi() - genmatch->phi());
228  clusterDEtaToGen.get()[iclus] = pclus->eta() - genmatch->eta();
229  }
230  clusterInMustache.get()[iclus] = (Int_t) MK::inMustache(theseed->eta(),
231  theseed->phi(),
232  pclus->energy(),
233  pclus->eta(),
234  pclus->phi());
235  clusterInDynDPhi.get()[iclus] = (Int_t)
237  theseed->phi(),
238  pclus->energy(),
239  pclus->eta(),
240  pclus->phi());
241  ++iclus;
242  }
243  // loop over all preshower clusters
244  auto psclusend = sc.preshowerClustersEnd();
245  size_t ipsclus = 0;
247  for( auto psclus = sc.preshowerClustersBegin(); psclus != psclusend;
248  ++psclus ) {
249  ppsclus = edm::Ptr<reco::PFCluster>(*psclus);
250  psClusterRawEnergy.get()[ipsclus] = ppsclus->energy();
251  psClusterEta.get()[ipsclus] = ppsclus->eta();
252  psClusterPhi.get()[ipsclus] = ppsclus->phi();
253  ++ipsclus;
254  }
255  _tree->Fill();
256 }
const math::XYZPoint & position() const
cluster centroid position
Definition: CaloCluster.h:123
CaloCluster_iterator preshowerClustersBegin() const
fist iterator over PreshowerCluster constituents
Definition: SuperCluster.h:77
int i
Definition: DBlmapReader.cc:9
std::shared_ptr< Float_t > psClusterRawEnergy
double phiWidth() const
obtain phi and eta width of the Super Cluster
Definition: SuperCluster.h:57
bool inDynamicDPhiWindow(const bool isEE, const float seedPhi, const float ClustE, const float ClusEta, const float clusPhi)
Definition: Mustache.cc:74
std::shared_ptr< Float_t > clusterPhi
edm::Ref< GenParticleCollection > GenParticleRef
persistent reference to a GenParticle
std::shared_ptr< Float_t > clusterCalibEnergy
void setTreeArraysForSize(const size_t N_ECAL, const size_t N_PS)
double Phi_mpi_pi(double x)
Definition: JetUtil.h:24
std::shared_ptr< PFEnergyCalibration > _calib
std::shared_ptr< Float_t > clusterDEtaToCentroid
std::shared_ptr< Float_t > clusterHitFractionSharedWithSeed
double eta() const
pseudorapidity of cluster centroid
Definition: CaloCluster.h:160
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:250
double etaWidth() const
Definition: SuperCluster.h:58
const T & max(const T &a, const T &b)
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
double energy() const
cluster energy
Definition: CaloCluster.h:120
std::shared_ptr< Float_t > psClusterPhi
std::shared_ptr< Float_t > clusterDPhiToSeed
bool isValid() const
Definition: HandleBase.h:76
tuple genp
produce generated paricles in acceptance #
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:361
double rawEnergy() const
raw uncorrected energy (sum of energies of component BasicClusters)
Definition: SuperCluster.h:49
std::shared_ptr< Float_t > clusterDPhiToGen
std::shared_ptr< Float_t > psClusterEta
std::shared_ptr< Int_t > clusterInMustache
std::shared_ptr< Float_t > clusterEta
std::shared_ptr< Float_t > clusterDEtaToSeed
CaloCluster_iterator clustersBegin() const
fist iterator over BasicCluster constituents
Definition: SuperCluster.h:71
const CaloClusterPtr & seed() const
seed BasicCluster
Definition: SuperCluster.h:68
double preshowerEnergy() const
energy deposited in preshower
Definition: SuperCluster.h:52
std::shared_ptr< Int_t > clusterInDynDPhi
std::shared_ptr< Float_t > clusterRawEnergy
double phi() const
azimuthal angle of cluster centroid
Definition: CaloCluster.h:163
std::shared_ptr< Float_t > clusterDEtaToGen
std::shared_ptr< Float_t > clusterDPhiToCentroid
bool inMustache(const float maxEta, const float maxPhi, const float ClustE, const float ClusEta, const float ClusPhi)
Definition: Mustache.cc:9
CaloCluster_iterator preshowerClustersEnd() const
last iterator over PreshowerCluster constituents
Definition: SuperCluster.h:80
list at
Definition: asciidump.py:428
CaloCluster_iterator clustersEnd() const
last iterator over BasicCluster constituents
Definition: SuperCluster.h:74
void PFSuperClusterTreeMaker::setTreeArraysForSize ( const size_t  N_ECAL,
const size_t  N_PS 
)
private

Definition at line 349 of file PFSuperClusterTreeMaker.cc.

References _dogen, _tree, clusterCalibEnergy, clusterDEtaToCentroid, clusterDEtaToGen, clusterDEtaToSeed, clusterDPhiToCentroid, clusterDPhiToGen, clusterDPhiToSeed, clusterEta, clusterHitFractionSharedWithSeed, clusterInDynDPhi, clusterInMustache, clusterPhi, clusterRawEnergy, psClusterEta, psClusterPhi, and psClusterRawEnergy.

Referenced by processSuperClusterFillTree().

350  {
351  Float_t* cRE_new = new Float_t[N_ECAL];
352  clusterRawEnergy.reset(cRE_new,array_deleter<Float_t>());
353  _tree->GetBranch("clusterRawEnergy")->SetAddress(clusterRawEnergy.get());
354  Float_t* cCE_new = new Float_t[N_ECAL];
355  clusterCalibEnergy.reset(cCE_new,array_deleter<Float_t>());
356  _tree->GetBranch("clusterCalibEnergy")->SetAddress(clusterCalibEnergy.get());
357  Float_t* cEta_new = new Float_t[N_ECAL];
358  clusterEta.reset(cEta_new,array_deleter<Float_t>());
359  _tree->GetBranch("clusterEta")->SetAddress(clusterEta.get());
360  Float_t* cPhi_new = new Float_t[N_ECAL];
361  clusterPhi.reset(cPhi_new,array_deleter<Float_t>());
362  _tree->GetBranch("clusterPhi")->SetAddress(clusterPhi.get());
363  Float_t* cDPhiSeed_new = new Float_t[N_ECAL];
364  clusterDPhiToSeed.reset(cDPhiSeed_new,array_deleter<Float_t>());
365  _tree->GetBranch("clusterDPhiToSeed")->SetAddress(clusterDPhiToSeed.get());
366  Float_t* cDEtaSeed_new = new Float_t[N_ECAL];
367  clusterDEtaToSeed.reset(cDEtaSeed_new,array_deleter<Float_t>());
368  _tree->GetBranch("clusterDEtaToSeed")->SetAddress(clusterDEtaToSeed.get());
369  Float_t* cDPhiCntr_new = new Float_t[N_ECAL];
370  clusterDPhiToCentroid.reset(cDPhiCntr_new,array_deleter<Float_t>());
371  _tree->GetBranch("clusterDPhiToCentroid")->SetAddress(clusterDPhiToCentroid.get());
372  Float_t* cDEtaCntr_new = new Float_t[N_ECAL];
373  clusterDEtaToCentroid.reset(cDEtaCntr_new,array_deleter<Float_t>());
374  _tree->GetBranch("clusterDEtaToCentroid")->SetAddress(clusterDEtaToCentroid.get());
375  Float_t* cHitFracShared_new = new Float_t[N_ECAL];
376  clusterHitFractionSharedWithSeed.reset(cHitFracShared_new,
377  array_deleter<Float_t>());
378  _tree->GetBranch("clusterHitFractionSharedWithSeed")->SetAddress(clusterHitFractionSharedWithSeed.get());
379 
380  if( _dogen ) {
381  Float_t* cDPhiGen_new = new Float_t[N_ECAL];
382  clusterDPhiToGen.reset(cDPhiGen_new,array_deleter<Float_t>());
383  _tree->GetBranch("clusterDPhiToGen")->SetAddress(clusterDPhiToGen.get());
384  Float_t* cDEtaGen_new = new Float_t[N_ECAL];
385  clusterDEtaToGen.reset(cDEtaGen_new,array_deleter<Float_t>());
386  _tree->GetBranch("clusterDEtaToGen")->SetAddress(clusterDEtaToGen.get());
387  }
388  Int_t* cInMust_new = new Int_t[N_ECAL];
389  clusterInMustache.reset(cInMust_new,array_deleter<Int_t>());
390  _tree->GetBranch("clusterInMustache")->SetAddress(clusterInMustache.get());
391  Int_t* cInDynDPhi_new = new Int_t[N_ECAL];
392  clusterInDynDPhi.reset(cInDynDPhi_new,array_deleter<Int_t>());
393  _tree->GetBranch("clusterInDynDPhi")->SetAddress(clusterInDynDPhi.get());
394  Float_t* psRE_new = new Float_t[N_PS];
395  psClusterRawEnergy.reset(psRE_new,array_deleter<Float_t>());
396  _tree->GetBranch("psClusterRawEnergy")->SetAddress(psClusterRawEnergy.get());
397  Float_t* psEta_new = new Float_t[N_PS];
398  psClusterEta.reset(psEta_new,array_deleter<Float_t>());
399  _tree->GetBranch("psClusterEta")->SetAddress(psClusterEta.get());
400  Float_t* psPhi_new = new Float_t[N_PS];
401  psClusterPhi.reset(psPhi_new,array_deleter<Float_t>());
402  _tree->GetBranch("psClusterPhi")->SetAddress(psClusterPhi.get());
403 }
std::shared_ptr< Float_t > psClusterRawEnergy
std::shared_ptr< Float_t > clusterPhi
std::shared_ptr< Float_t > clusterCalibEnergy
std::shared_ptr< Float_t > clusterDEtaToCentroid
std::shared_ptr< Float_t > clusterHitFractionSharedWithSeed
std::shared_ptr< Float_t > psClusterPhi
std::shared_ptr< Float_t > clusterDPhiToSeed
std::shared_ptr< Float_t > clusterDPhiToGen
std::shared_ptr< Float_t > psClusterEta
std::shared_ptr< Int_t > clusterInMustache
std::shared_ptr< Float_t > clusterEta
std::shared_ptr< Float_t > clusterDEtaToSeed
std::shared_ptr< Int_t > clusterInDynDPhi
std::shared_ptr< Float_t > clusterRawEnergy
std::shared_ptr< Float_t > clusterDEtaToGen
std::shared_ptr< Float_t > clusterDPhiToCentroid

Member Data Documentation

std::shared_ptr<PFEnergyCalibration> PFSuperClusterTreeMaker::_calib
private
bool PFSuperClusterTreeMaker::_dogen
private
edm::Service<TFileService> PFSuperClusterTreeMaker::_fs
private

Definition at line 88 of file PFSuperClusterTreeMaker.cc.

Referenced by PFSuperClusterTreeMaker().

edm::InputTag PFSuperClusterTreeMaker::_geninput
private
edm::InputTag PFSuperClusterTreeMaker::_scInputEB
private

Definition at line 92 of file PFSuperClusterTreeMaker.cc.

Referenced by analyze(), and PFSuperClusterTreeMaker().

edm::InputTag PFSuperClusterTreeMaker::_scInputEE
private

Definition at line 92 of file PFSuperClusterTreeMaker.cc.

Referenced by analyze(), and PFSuperClusterTreeMaker().

treeptr PFSuperClusterTreeMaker::_tree
private
edm::InputTag PFSuperClusterTreeMaker::_vtxsrc
private

Definition at line 91 of file PFSuperClusterTreeMaker.cc.

Referenced by analyze(), and PFSuperClusterTreeMaker().

std::shared_ptr<Float_t> PFSuperClusterTreeMaker::clusterCalibEnergy
private
std::shared_ptr<Float_t> PFSuperClusterTreeMaker::clusterDEtaToCentroid
private
std::shared_ptr<Float_t> PFSuperClusterTreeMaker::clusterDEtaToGen
private
std::shared_ptr<Float_t> PFSuperClusterTreeMaker::clusterDEtaToSeed
private
std::shared_ptr<Float_t> PFSuperClusterTreeMaker::clusterDPhiToCentroid
private
std::shared_ptr<Float_t> PFSuperClusterTreeMaker::clusterDPhiToGen
private
std::shared_ptr<Float_t> PFSuperClusterTreeMaker::clusterDPhiToSeed
private
std::shared_ptr<Float_t> PFSuperClusterTreeMaker::clusterEta
private
std::shared_ptr<Float_t> PFSuperClusterTreeMaker::clusterHitFractionSharedWithSeed
private
std::shared_ptr<Int_t> PFSuperClusterTreeMaker::clusterInDynDPhi
private
std::shared_ptr<Int_t> PFSuperClusterTreeMaker::clusterInMustache
private
std::shared_ptr<Float_t> PFSuperClusterTreeMaker::clusterPhi
private
std::shared_ptr<Float_t> PFSuperClusterTreeMaker::clusterRawEnergy
private
Float_t PFSuperClusterTreeMaker::genDRToCentroid
private
Float_t PFSuperClusterTreeMaker::genDRToSeed
private
Float_t PFSuperClusterTreeMaker::genEnergy
private
Float_t PFSuperClusterTreeMaker::genEta
private
Float_t PFSuperClusterTreeMaker::genPhi
private
Int_t PFSuperClusterTreeMaker::N_ECALClusters
private
Int_t PFSuperClusterTreeMaker::N_PSClusters
private
Int_t PFSuperClusterTreeMaker::nVtx
private

Definition at line 99 of file PFSuperClusterTreeMaker.cc.

Referenced by analyze(), and PFSuperClusterTreeMaker().

std::shared_ptr<Float_t> PFSuperClusterTreeMaker::psClusterEta
private
std::shared_ptr<Float_t> PFSuperClusterTreeMaker::psClusterPhi
private
std::shared_ptr<Float_t> PFSuperClusterTreeMaker::psClusterRawEnergy
private
Float_t PFSuperClusterTreeMaker::scCalibratedEnergy
private
Float_t PFSuperClusterTreeMaker::scEta
private
Float_t PFSuperClusterTreeMaker::scEtaWidth
private
Float_t PFSuperClusterTreeMaker::scPhi
private
Float_t PFSuperClusterTreeMaker::scPhiWidth
private
Float_t PFSuperClusterTreeMaker::scPreshowerEnergy
private
Float_t PFSuperClusterTreeMaker::scR
private
Float_t PFSuperClusterTreeMaker::scRawEnergy
private
Float_t PFSuperClusterTreeMaker::scSeedCalibratedEnergy
private
Float_t PFSuperClusterTreeMaker::scSeedEta
private
Float_t PFSuperClusterTreeMaker::scSeedPhi
private
Float_t PFSuperClusterTreeMaker::scSeedRawEnergy
private