43 cout<<
"calling PFRootEventManagerColin::readSpecificOptions"<<endl;
54 cout<<
"colin: Neutral mode"<<endl;
61 cout<<
"colin: highETaus mode"<<endl;
68 cerr<<
"colin: undefined mode"<<endl;
99 cerr<<
"colin: undefined mode"<<endl;
139 if( myGenEvent->particles_size() != 1 ) {
140 cerr<<
"wrong number of particles:"
141 <<myGenEvent->particles_size()<<endl;
149 if( particle->pdg_id() != 130 ) {
150 cerr<<
"not a K0L : "<<particle->pdg_id()<<endl;
156 double eta = particle->momentum().eta();
157 double phi = particle->momentum().phi();
165 double minDist2 = 9999999;
167 for(
unsigned i=0;
i<(*clustersECAL_).size(); ++
i) {
168 double deta = (*clustersECAL_)[
i].position().Eta() -
eta;
169 double dphi = (*clustersECAL_)[
i].position().Phi() -
phi;
170 double dist2 = deta*deta + dphi*dphi;
171 if(dist2 < minDist2) {
179 if( (*clustersHCAL_).size() == 1 ) {
202 unsigned nStableChargedHadrons=0;
214 nStableChargedHadrons++;
231 if( nStableChargedHadrons==0 ) {
235 assert( nStableChargedHadrons==1 );
303 unsigned nTracks = 0;
304 for(
unsigned ie=0; ie<elements.
size(); ie++) {
311 if(nTracks!=1)
continue;
313 std::multimap<double, unsigned> sortedElems;
321 typedef std::multimap<double, unsigned>::iterator IE;
322 for(IE ie = sortedElems.begin(); ie != sortedElems.end(); ++ie ) {
325 double chi2 = ie->first;
326 unsigned index = ie->second;
337 assert( !clusterRef.
isNull() );
348 assert( !clusterRef.
isNull() );
std::auto_ptr< reco::PFBlockCollection > pfBlocks_
reconstructed pfblocks
const std::vector< int > & daughterIds() const
void readSpecificOptions(const char *file)
IO * options_
options file parser
std::auto_ptr< reco::PFClusterCollection > clustersECAL_
const edm::OwnVector< reco::PFBlockElement > & elements() const
const LinkData & linkData() const
std::auto_ptr< reco::PFClusterCollection > clustersHCAL_
PFRootEventManagerColin(const char *file)
reco::PFRecTrackCollection recTracks_
bool GetOpt(const char *tag, const char *key, std::vector< T > &values) const
reads a vector of T
reco::PFSimParticleCollection trueParticles_
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
bool processHIGH_E_TAUS()
~PFRootEventManagerColin()
bool processEntry(int entry)
process one entry (pass the TTree entry)
bool isNull() const
Checks for null.
Point of closest approach from beam axis (initial point in the case of PFSimParticle) ...
TFile * outFile_
output file
std::pair< std::string, MonitorElement * > entry
virtual bool processEntry(int entry)
process one entry (pass the TTree entry)
NeutralEvent * neutralEvent_
true particle for particle flow
const HepMC::GenEvent * GetEvent() const
void associatedElements(unsigned i, const LinkData &linkData, std::multimap< double, unsigned > &sortedAssociates, reco::PFBlockElement::Type type=PFBlockElement::NONE, LinkTest test=LINKTEST_RECHIT) const
edm::HepMCProduct MCTruth_
ROOT interface to particle flow package.