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 Attributes
MultiTrackValidatorGenPs Class Reference

#include <MultiTrackValidatorGenPs.h>

Inheritance diagram for MultiTrackValidatorGenPs:
MultiTrackValidator edm::EDAnalyzer MultiTrackValidatorBase edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &)
 Method called once per event. More...
 
 MultiTrackValidatorGenPs (const edm::ParameterSet &pset)
 Constructor. More...
 
virtual ~MultiTrackValidatorGenPs ()
 Destructor. More...
 
- Public Member Functions inherited from MultiTrackValidator
void beginRun (edm::Run const &, edm::EventSetup const &)
 Method called before the event loop. More...
 
void endRun (edm::Run const &, edm::EventSetup const &)
 Method called at the end of the event loop. More...
 
 MultiTrackValidator (const edm::ParameterSet &pset)
 Constructor. More...
 
virtual ~MultiTrackValidator ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- 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 Attributes

const TrackAssociatorByChi2associatorByChi2
 
GenParticleCustomSelector gpSelector
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- 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::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)
 
- Protected Member Functions inherited from MultiTrackValidatorBase
 MultiTrackValidatorBase (const edm::ParameterSet &pset)
 Constructor. More...
 
virtual ~MultiTrackValidatorBase ()
 Destructor. More...
 
- Protected Attributes inherited from MultiTrackValidator
edm::InputTag associatormap
 
MTVHistoProducerAlgohistoProducerAlgo_
 
bool UseAssociators
 
- Protected Attributes inherited from MultiTrackValidatorBase
std::vector< const
TrackAssociatorBase * > 
associator
 
std::vector< std::string > associators
 
edm::InputTag bsSrc
 
DQMStoredbe_
 
bool ignoremissingtkcollection_
 
std::vector< edm::InputTaglabel
 
edm::InputTag label_pileupinfo
 
edm::InputTag label_tp_effic
 
edm::InputTag label_tp_fake
 
edm::InputTag label_tv
 
edm::InputTag m_dEdx1Tag
 
edm::InputTag m_dEdx2Tag
 
std::string out
 
std::string parametersDefiner
 
std::string sim
 
bool skipHistoFit
 
edm::ESHandle< MagneticFieldtheMF
 

Detailed Description

Class that prodecs histrograms to validate Track Reconstruction performances

Author
cerati

Definition at line 14 of file MultiTrackValidatorGenPs.h.

Constructor & Destructor Documentation

MultiTrackValidatorGenPs::MultiTrackValidatorGenPs ( const edm::ParameterSet pset)

Constructor.

Definition at line 40 of file MultiTrackValidatorGenPs.cc.

References edm::ParameterSet::getParameter(), and gpSelector.

40  :MultiTrackValidator(pset){
41 
42  gpSelector = GenParticleCustomSelector(pset.getParameter<double>("ptMinGP"),
43  pset.getParameter<double>("minRapidityGP"),
44  pset.getParameter<double>("maxRapidityGP"),
45  pset.getParameter<double>("tipGP"),
46  pset.getParameter<double>("lipGP"),
47  pset.getParameter<bool>("chargedOnlyGP"),
48  pset.getParameter<int>("statusGP"),
49  pset.getParameter<std::vector<int> >("pdgIdGP"));
50 
51 }
T getParameter(std::string const &) const
GenParticleCustomSelector gpSelector
MultiTrackValidator(const edm::ParameterSet &pset)
Constructor.
SingleObjectSelector< GenParticleCollection,::GenParticleCustomSelector > GenParticleCustomSelector
MultiTrackValidatorGenPs::~MultiTrackValidatorGenPs ( )
virtual

Destructor.

Definition at line 53 of file MultiTrackValidatorGenPs.cc.

53 {}

Member Function Documentation

void MultiTrackValidatorGenPs::analyze ( const edm::Event event,
const edm::EventSetup setup 
)
virtual

Method called once per event.

Reimplemented from MultiTrackValidator.

Definition at line 56 of file MultiTrackValidatorGenPs.cc.

References TrackAssociatorByChi2::associateGenToReco(), TrackAssociatorByChi2::associateRecoToGen(), MultiTrackValidatorBase::associator, associatorByChi2, MultiTrackValidator::associatormap, MultiTrackValidatorBase::associators, asciidump::at, MultiTrackValidatorBase::bsSrc, reco::TrackBase::charge(), edm::HandleBase::clear(), reco::GenParticle::collisionId(), funct::cos(), alignCSCRings::e, edm::AssociationMap< Tag >::end(), MTVHistoProducerAlgo::fill_dedx_recoTrack_histos(), MTVHistoProducerAlgo::fill_generic_recoTrack_histos(), MTVHistoProducerAlgo::fill_generic_simTrack_histos(), MTVHistoProducerAlgo::fill_recoAssociated_simTrack_histos(), MTVHistoProducerAlgo::fill_ResoAndPull_recoTrack_histos(), MTVHistoProducerAlgo::fill_simAssociated_recoTrack_histos(), MTVHistoProducerAlgo::fill_trackBased_histos(), edm::AssociationMap< Tag >::find(), first, edm::EventSetup::get(), edm::Ref< C, T, F >::get(), edm::Event::getByLabel(), gpSelector, MultiTrackValidator::histoProducerAlgo_, i, MultiTrackValidatorBase::ignoremissingtkcollection_, edm::InputTag::instance(), edm::InputTag::label(), MultiTrackValidatorBase::label, MultiTrackValidatorBase::label_pileupinfo, MultiTrackValidatorBase::label_tp_effic, MultiTrackValidatorBase::label_tp_fake, LogTrace, MultiTrackValidatorBase::m_dEdx1Tag, MultiTrackValidatorBase::m_dEdx2Tag, reco::LeafCandidate::momentum(), MultiTrackValidatorBase::parametersDefiner, edm::InputTag::process(), edm::Handle< T >::product(), reco::TrackBase::pt(), dt_dqm_sourceclient_common_cff::reco, funct::sin(), findQualityFiles::size, mathSSE::sqrt(), MultiTrackValidator::UseAssociators, reco::LeafCandidate::vertex(), w(), and cms::Exception::what().

56  {
57  using namespace reco;
58 
59  edm::LogInfo("TrackValidator") << "\n====================================================" << "\n"
60  << "Analyzing new event" << "\n"
61  << "====================================================\n" << "\n";
62 
63  edm::ESHandle<ParametersDefinerForTP> parametersDefinerTP;
64  setup.get<TrackAssociatorRecord>().get(parametersDefiner,parametersDefinerTP);
65 
66  edm::Handle<GenParticleCollection> TPCollectionHeff ;
67  event.getByLabel(label_tp_effic,TPCollectionHeff);
68  const GenParticleCollection tPCeff = *(TPCollectionHeff.product());
69 
70  edm::Handle<GenParticleCollection> TPCollectionHfake ;
71  event.getByLabel(label_tp_fake,TPCollectionHfake);
72  const GenParticleCollection tPCfake = *(TPCollectionHfake.product());
73 
74  //if (tPCeff.size()==0) {edm::LogInfo("TrackValidator")
75  //<< "TP Collection for efficiency studies has size = 0! Skipping Event." ; return;}
76  //if (tPCfake.size()==0) {edm::LogInfo("TrackValidator")
77  //<< "TP Collection for fake rate studies has size = 0! Skipping Event." ; return;}
78 
79  edm::Handle<reco::BeamSpot> recoBeamSpotHandle;
80  event.getByLabel(bsSrc,recoBeamSpotHandle);
81  reco::BeamSpot bs = *recoBeamSpotHandle;
82 
84  event.getByLabel(label_pileupinfo,puinfoH);
85  PileupSummaryInfo puinfo;
86 
87  for (unsigned int puinfo_ite=0;puinfo_ite<(*puinfoH).size();++puinfo_ite){
88  if ((*puinfoH)[puinfo_ite].getBunchCrossing()==0){
89  puinfo=(*puinfoH)[puinfo_ite];
90  break;
91  }
92  }
93 
94  int w=0; //counter counting the number of sets of histograms
95  for (unsigned int ww=0;ww<associators.size();ww++){
96 
97  associatorByChi2 = dynamic_cast<const TrackAssociatorByChi2*>(associator[ww]);
98  if (associatorByChi2==0) continue;
99 
100  for (unsigned int www=0;www<label.size();www++){
101  //
102  //get collections from the event
103  //
104  edm::Handle<View<Track> > trackCollection;
105  if(!event.getByLabel(label[www], trackCollection)&&ignoremissingtkcollection_)continue;
106  //if (trackCollection->size()==0)
107  //edm::LogInfo("TrackValidator") << "TrackCollection size = 0!" ;
108  //continue;
109  //}
110  reco::RecoToGenCollection recGenColl;
111  reco::GenToRecoCollection genRecColl;
112  //associate tracks
113  if(UseAssociators){
114  edm::LogVerbatim("TrackValidator") << "Analyzing "
115  << label[www].process()<<":"
116  << label[www].label()<<":"
117  << label[www].instance()<<" with "
118  << associators[ww].c_str() <<"\n";
119 
120  LogTrace("TrackValidator") << "Calling associateRecoToGen method" << "\n";
121  recGenColl=associatorByChi2->associateRecoToGen(trackCollection,
122  TPCollectionHfake,
123  &event);
124  LogTrace("TrackValidator") << "Calling associateGenToReco method" << "\n";
125  genRecColl=associatorByChi2->associateGenToReco(trackCollection,
126  TPCollectionHeff,
127  &event);
128  }
129  else{
130  edm::LogVerbatim("TrackValidator") << "Analyzing "
131  << label[www].process()<<":"
132  << label[www].label()<<":"
133  << label[www].instance()<<" with "
134  << associatormap.process()<<":"
135  << associatormap.label()<<":"
136  << associatormap.instance()<<"\n";
137 
138  Handle<reco::GenToRecoCollection > gentorecoCollectionH;
139  event.getByLabel(associatormap,gentorecoCollectionH);
140  genRecColl= *(gentorecoCollectionH.product());
141 
142  Handle<reco::RecoToGenCollection > recotogenCollectionH;
143  event.getByLabel(associatormap,recotogenCollectionH);
144  recGenColl= *(recotogenCollectionH.product());
145  }
146 
147 
148 
149  // ########################################################
150  // fill simulation histograms (LOOP OVER TRACKINGPARTICLES)
151  // ########################################################
152 
153  //compute number of tracks per eta interval
154  //
155  edm::LogVerbatim("TrackValidator") << "\n# of GenParticles: " << tPCeff.size() << "\n";
156  int ats(0); //This counter counts the number of simTracks that are "associated" to recoTracks
157  int st(0); //This counter counts the number of simulated tracks passing the MTV selection (i.e. tpSelector(tp) )
158  unsigned sts(0); //This counter counts the number of simTracks surviving the bunchcrossing cut
159  unsigned asts(0); //This counter counts the number of simTracks that are "associated" to recoTracks surviving the bunchcrossing cut
160  for (GenParticleCollection::size_type i=0; i<tPCeff.size(); i++){ //loop over TPs collection for tracking efficiency
161  GenParticleRef tpr(TPCollectionHeff, i);
162  GenParticle* tp=const_cast<GenParticle*>(tpr.get());
163  TrackingParticle::Vector momentumTP;
164  TrackingParticle::Point vertexTP;
165  double dxyGen(0);
166  double dzGen(0);
167 
168 
169  //---------- THIS PART HAS TO BE CLEANED UP. THE PARAMETER DEFINER WAS NOT MEANT TO BE USED IN THIS WAY ----------
170  //If the GenParticle is collison like, get the momentum and vertex at production state
171  if(parametersDefiner=="LhcParametersDefinerForTP")
172  {
173  //fixme this one shold be implemented
174  if(! gpSelector(*tp)) continue;
175  momentumTP = tp->momentum();
176  vertexTP = tp->vertex();
177  //Calcualte the impact parameters w.r.t. PCA
178  TrackingParticle::Vector momentum = parametersDefinerTP->momentum(event,setup,*tp);
179  TrackingParticle::Point vertex = parametersDefinerTP->vertex(event,setup,*tp);
180  dxyGen = (-vertex.x()*sin(momentum.phi())+vertex.y()*cos(momentum.phi()));
181  dzGen = vertex.z() - (vertex.x()*momentum.x()+vertex.y()*momentum.y())/sqrt(momentum.perp2())
182  * momentum.z()/sqrt(momentum.perp2());
183  }
184  //If the GenParticle is comics, get the momentum and vertex at PCA
185  if(parametersDefiner=="CosmicParametersDefinerForTP")
186  {
187  //if(! cosmictpSelector(*tp,&bs,event,setup)) continue;
188  momentumTP = parametersDefinerTP->momentum(event,setup,*tp);
189  vertexTP = parametersDefinerTP->vertex(event,setup,*tp);
190  dxyGen = (-vertexTP.x()*sin(momentumTP.phi())+vertexTP.y()*cos(momentumTP.phi()));
191  dzGen = vertexTP.z() - (vertexTP.x()*momentumTP.x()+vertexTP.y()*momentumTP.y())/sqrt(momentumTP.perp2())
192  * momentumTP.z()/sqrt(momentumTP.perp2());
193  }
194  //---------- THE PART ABOVE HAS TO BE CLEANED UP. THE PARAMETER DEFINER WAS NOT MEANT TO BE USED IN THIS WAY ----------
195 
196  st++; //This counter counts the number of simulated tracks passing the MTV selection (i.e. tpSelector(tp) )
197 
198  // in the coming lines, histos are filled using as input
199  // - momentumTP
200  // - vertexTP
201  // - dxyGen
202  // - dzGen
203 
204  histoProducerAlgo_->fill_generic_simTrack_histos(w,momentumTP,vertexTP, tp->collisionId());//fixme: check meaning of collisionId
205 
206 
207  // ##############################################
208  // fill RecoAssociated GenTracks' histograms
209  // ##############################################
210  // bool isRecoMatched(false); // UNUSED
211  const reco::Track* matchedTrackPointer=0;
212  std::vector<std::pair<RefToBase<Track>, double> > rt;
213  if(genRecColl.find(tpr) != genRecColl.end()){
214  rt = (std::vector<std::pair<RefToBase<Track>, double> >) genRecColl[tpr];
215  if (rt.size()!=0) {
216  ats++; //This counter counts the number of simTracks that have a recoTrack associated
217  // isRecoMatched = true; // UNUSED
218  matchedTrackPointer = rt.begin()->first.get();
219  edm::LogVerbatim("TrackValidator") << "GenParticle #" << st
220  << " with pt=" << sqrt(momentumTP.perp2())
221  << " associated with quality:" << rt.begin()->second <<"\n";
222  }
223  }else{
224  edm::LogVerbatim("TrackValidator")
225  << "GenParticle #" << st
226  << " with pt,eta,phi: "
227  << sqrt(momentumTP.perp2()) << " , "
228  << momentumTP.eta() << " , "
229  << momentumTP.phi() << " , "
230  << " NOT associated to any reco::Track" << "\n";
231  }
232 
233 
234 
235  /*
236  std::vector<PSimHit> simhits=tp->trackPSimHit(DetId::Tracker);
237  int nSimHits = simhits.end()-simhits.begin();
238  */
239  int nSimHits = 0;
240 
241  double vtx_z_PU = vertexTP.z();
242  /*
243  for (size_t j = 0; j < tv.size(); j++) {
244  if (tp->eventId().event() == tv[j].eventId().event()) {
245  vtx_z_PU = tv[j].position().z();
246  break;
247  }
248  }
249  */
250 
251  histoProducerAlgo_->fill_recoAssociated_simTrack_histos(w,*tp,momentumTP,vertexTP,dxyGen,dzGen,nSimHits,matchedTrackPointer,puinfo.getPU_NumInteractions(), vtx_z_PU);
252 
253  sts++;
254  if (matchedTrackPointer) asts++;
255 
256 
257 
258 
259  } // End for (GenParticleCollection::size_type i=0; i<tPCeff.size(); i++){
260 
261  //if (st!=0) h_tracksSIM[w]->Fill(st); // TO BE FIXED
262 
263 
264  // ##############################################
265  // fill recoTracks histograms (LOOP OVER TRACKS)
266  // ##############################################
267  edm::LogVerbatim("TrackValidator") << "\n# of reco::Tracks with "
268  << label[www].process()<<":"
269  << label[www].label()<<":"
270  << label[www].instance()
271  << ": " << trackCollection->size() << "\n";
272 
273  //int sat(0); //This counter counts the number of recoTracks that are associated to GenTracks from Signal only
274  int at(0); //This counter counts the number of recoTracks that are associated to GenTracks
275  int rT(0); //This counter counts the number of recoTracks in general
276 
277 
278  // dE/dx
279  // at some point this could be generalized, with a vector of tags and a corresponding vector of Handles
280  // I'm writing the interface such to take vectors of ValueMaps
283  std::vector<edm::ValueMap<reco::DeDxData> > v_dEdx;
284  v_dEdx.clear();
285  //std::cout << "PIPPO: label is " << label[www] << std::endl;
286  if (label[www].label()=="generalTracks") {
287  try {
288  event.getByLabel(m_dEdx1Tag, dEdx1Handle);
289  const edm::ValueMap<reco::DeDxData> dEdx1 = *dEdx1Handle.product();
290  event.getByLabel(m_dEdx2Tag, dEdx2Handle);
291  const edm::ValueMap<reco::DeDxData> dEdx2 = *dEdx2Handle.product();
292  v_dEdx.push_back(dEdx1);
293  v_dEdx.push_back(dEdx2);
294  } catch (cms::Exception e){
295  LogTrace("TrackValidator") << "exception found: " << e.what() << "\n";
296  }
297  }
298  //end dE/dx
299 
300  for(View<Track>::size_type i=0; i<trackCollection->size(); ++i){
301 
302  RefToBase<Track> track(trackCollection, i);
303  rT++;
304 
305  bool isSigGenMatched(false);
306  bool isGenMatched(false);
307  bool isChargeMatched(true);
308  int numAssocRecoTracks = 0;
309  int tpbx = 0;
310  int nSimHits = 0;
311  double sharedFraction = 0.;
312  std::vector<std::pair<GenParticleRef, double> > tp;
313  if(recGenColl.find(track) != recGenColl.end()){
314  tp = recGenColl[track];
315  if (tp.size()!=0) {
316  /*
317  std::vector<PSimHit> simhits=tp[0].first->trackPSimHit(DetId::Tracker);
318  nSimHits = simhits.end()-simhits.begin();
319  */
320  sharedFraction = tp[0].second;
321  isGenMatched = true;
322  if (tp[0].first->charge() != track->charge()) isChargeMatched = false;
323  if(genRecColl.find(tp[0].first) != genRecColl.end()) numAssocRecoTracks = genRecColl[tp[0].first].size();
324  //std::cout << numAssocRecoTracks << std::endl;
325  /*
326  tpbx = tp[0].first->eventId().bunchCrossing();
327  */
328  at++;
329  for (unsigned int tp_ite=0;tp_ite<tp.size();++tp_ite){
330  GenParticle trackpart = *(tp[tp_ite].first);
331  /*
332  if ((trackpart.eventId().event() == 0) && (trackpart.eventId().bunchCrossing() == 0)){
333  isSigGenMatched = true;
334  sat++;
335  break;
336  }
337  */
338  }
339  edm::LogVerbatim("TrackValidator") << "reco::Track #" << rT << " with pt=" << track->pt()
340  << " associated with quality:" << tp.begin()->second <<"\n";
341  }
342  } else {
343  edm::LogVerbatim("TrackValidator") << "reco::Track #" << rT << " with pt=" << track->pt()
344  << " NOT associated to any GenParticle" << "\n";
345  }
346 
347 
348  histoProducerAlgo_->fill_generic_recoTrack_histos(w,*track,bs.position(),isGenMatched,isSigGenMatched, isChargeMatched, numAssocRecoTracks, puinfo.getPU_NumInteractions(), tpbx, nSimHits, sharedFraction);
349 
350  // dE/dx
351  // reco::TrackRef track2 = reco::TrackRef( trackCollection, i );
352  if (v_dEdx.size() > 0) histoProducerAlgo_->fill_dedx_recoTrack_histos(w,track, v_dEdx);
353  //if (v_dEdx.size() > 0) histoProducerAlgo_->fill_dedx_recoTrack_histos(track2, v_dEdx);
354 
355 
356  //Fill other histos
357  //try{ //Is this really necessary ????
358 
359  if (tp.size()==0) continue;
360 
362 
363  GenParticleRef tpr = tp.begin()->first;
364 
365  /* TO BE FIXED LATER
366  if (associators[ww]=="TrackAssociatorByChi2"){
367  //association chi2
368  double assocChi2 = -tp.begin()->second;//in association map is stored -chi2
369  h_assochi2[www]->Fill(assocChi2);
370  h_assochi2_prob[www]->Fill(TMath::Prob((assocChi2)*5,5));
371  }
372  else if (associators[ww]=="quickTrackAssociatorByHits"){
373  double fraction = tp.begin()->second;
374  h_assocFraction[www]->Fill(fraction);
375  h_assocSharedHit[www]->Fill(fraction*track->numberOfValidHits());
376  }
377  */
378 
379 
380  //Get tracking particle parameters at point of closest approach to the beamline
381  TrackingParticle::Vector momentumTP = parametersDefinerTP->momentum(event,setup,*(tpr.get()));
382  TrackingParticle::Point vertexTP = parametersDefinerTP->vertex(event,setup,*(tpr.get()));
383  int chargeTP = tpr->charge();
384 
385  histoProducerAlgo_->fill_ResoAndPull_recoTrack_histos(w,momentumTP,vertexTP,chargeTP,
386  *track,bs.position());
387 
388 
389  //TO BE FIXED
390  //std::vector<PSimHit> simhits=tpr.get()->trackPSimHit(DetId::Tracker);
391  //nrecHit_vs_nsimHit_rec2sim[w]->Fill(track->numberOfValidHits(), (int)(simhits.end()-simhits.begin() ));
392 
393  /*
394  } // End of try{
395  catch (cms::Exception e){
396  LogTrace("TrackValidator") << "exception found: " << e.what() << "\n";
397  }
398  */
399 
400  } // End of for(View<Track>::size_type i=0; i<trackCollection->size(); ++i){
401 
403 
404  edm::LogVerbatim("TrackValidator") << "Total Simulated: " << st << "\n"
405  << "Total Associated (genToReco): " << ats << "\n"
406  << "Total Reconstructed: " << rT << "\n"
407  << "Total Associated (recoToGen): " << at << "\n"
408  << "Total Fakes: " << rT-at << "\n";
409 
410  w++;
411  } // End of for (unsigned int www=0;www<label.size();www++){
412  } //END of for (unsigned int ww=0;ww<associators.size();ww++){
413 
414 }
virtual char const * what() const
Definition: Exception.cc:141
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
int i
Definition: DBlmapReader.cc:9
const_iterator end() const
last iterator over the map (read only)
virtual const Point & vertex() const
vertex position (overwritten by PF...)
virtual void fill_dedx_recoTrack_histos(int count, edm::RefToBase< reco::Track > &trackref, const std::vector< edm::ValueMap< reco::DeDxData > > &v_dEdx)=0
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
const_iterator find(const key_type &k) const
find element with specified reference key
std::vector< const TrackAssociatorBase * > associator
virtual void fill_ResoAndPull_recoTrack_histos(int count, const TrackingParticle::Vector &momentumTP, const TrackingParticle::Point &vertexTP, int chargeTP, const reco::Track &track, const math::XYZPoint &bsPosition)=0
int collisionId() const
Definition: GenParticle.h:38
const TrackAssociatorByChi2 * associatorByChi2
uint16_t size_type
math::XYZPointD Point
point in the space
virtual void fill_recoAssociated_simTrack_histos(int count, const TrackingParticle &tp, const TrackingParticle::Vector &momentumTP, const TrackingParticle::Point &vertexTP, double dxy, double dz, int nSimHits, const reco::Track *track, int numVertices, double vertz)=0
std::vector< edm::InputTag > label
GenParticleCustomSelector gpSelector
T sqrt(T t)
Definition: SSEVec.h:48
virtual void fill_generic_recoTrack_histos(int count, const reco::Track &track, const math::XYZPoint &bsPosition, bool isMatched, bool isSigMatched, bool isChargeMatched, int numAssocRecoTracks, int numVertices, int tpbunchcrossing, int nSimHits, double sharedFraction)=0
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
edm::InputTag associatormap
unsigned int size_type
Definition: View.h:85
bool first
Definition: L1TdeRCT.cc:79
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
#define LogTrace(id)
MTVHistoProducerAlgo * histoProducerAlgo_
virtual void fill_simAssociated_recoTrack_histos(int count, const reco::Track &track)=0
reco::RecoToGenCollection associateRecoToGen(const edm::RefToBaseVector< reco::Track > &, const edm::RefVector< reco::GenParticleCollection > &, const edm::Event *event=0, const edm::EventSetup *setup=0) const
Association Sim To Reco with Collections (Gen Particle version)
const T & get() const
Definition: EventSetup.h:55
virtual Vector momentum() const GCC11_FINAL
spatial momentum vector
reco::GenToRecoCollection associateGenToReco(const edm::RefToBaseVector< reco::Track > &, const edm::RefVector< reco::GenParticleCollection > &, const edm::Event *event=0, const edm::EventSetup *setup=0) const
Association Sim To Reco with Collections (Gen Particle version)
virtual void fill_trackBased_histos(int count, int assTracks, int numRecoTracks, int numSimTracks)=0
T const * product() const
Definition: Handle.h:81
std::string const & label() const
Definition: InputTag.h:42
std::string const & process() const
Definition: InputTag.h:46
T w() const
std::vector< std::string > associators
math::XYZVectorD Vector
point in the space
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:242
virtual void fill_generic_simTrack_histos(int counter, const TrackingParticle::Vector &, const TrackingParticle::Point &vertex, int bx)=0
std::string const & instance() const
Definition: InputTag.h:43
tuple size
Write out results.
list at
Definition: asciidump.py:428

Member Data Documentation

const TrackAssociatorByChi2* MultiTrackValidatorGenPs::associatorByChi2
private

Definition at line 27 of file MultiTrackValidatorGenPs.h.

Referenced by analyze().

GenParticleCustomSelector MultiTrackValidatorGenPs::gpSelector
private

Definition at line 28 of file MultiTrackValidatorGenPs.h.

Referenced by analyze(), and MultiTrackValidatorGenPs().