Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
zcl::SMMTriggerAna Class Reference
Inheritance diagram for zcl::SMMTriggerAna:
art::EDAnalyzer art::EventObserverBase art::Consumer art::EngineCreator

Public Types

using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

 SMMTriggerAna (fhicl::ParameterSet const &pset)
 
virtual ~SMMTriggerAna ()
 
void analyze (const art::Event &evt)
 
void beginJob ()
 
void endJob ()
 
std::string workerType () const
 
bool modifiesEvent () const
 
void registerProducts (MasterProductRegistry &, ProductDescriptions &, ModuleDescription const &)
 
std::string const & processName () const
 
bool wantAllEvents () const
 
bool wantEvent (Event const &e)
 
fhicl::ParameterSetID selectorConfig () const
 
art::Handle< art::TriggerResultsgetTriggerResults (Event const &e) const
 
template<typename T , BranchType = InEvent>
ProductToken< Tconsumes (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< Tconsumes (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< TconsumesView (InputTag const &it)
 
template<typename T , BranchType = InEvent>
ProductToken< TmayConsume (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< TmayConsume (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< TmayConsumeView (InputTag const &it)
 
base_engine_tcreateEngine (seed_t seed)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make, label_t const &engine_label)
 
seed_t get_seed_value (fhicl::ParameterSet const &pset, char const key[]="seed", seed_t const implicit_seed=-1)
 

Static Public Member Functions

static cet::exempt_ptr< Consumernon_module_context ()
 

Protected Member Functions

CurrentProcessingContext const * currentContext () const
 
detail::CachedProducts & cachedProducts ()
 
void validateConsumedProduct (BranchType const bt, ProductInfo const &pi)
 
void prepareForJob (fhicl::ParameterSet const &pset)
 
void showMissingConsumes () const
 

Private Member Functions

bool SurfAssign (art::Ptr< rb::CellHit > const &hptr)
 
bool ContaineAssign (art::Ptr< rb::CellHit > const &hptr)
 
bool ViewCheck (art::Ptr< rb::CellHit > const &, art::Ptr< rb::CellHit > const &)
 
float Dist (art::Ptr< rb::CellHit > const &, art::Ptr< rb::CellHit > const &)
 
unsigned IndexLocator (std::vector< art::Ptr< rb::CellHit > > &hit_ptrs, float tns)
 

Private Attributes

std::string fCellHitInput
 
float _hf_min
 
unsigned _sigmaT
 
unsigned _deltaT
 
unsigned _minHits
 
float _deltaP
 
float _deltaC
 
float _sigmaL
 
int _ADCmin
 
int _ADCmax
 
float _Xmax
 
float _Ymax
 
float _DistMin
 
float _vproMin
 
float _vproMax
 
float _df
 
TTree * RC_Tree
 
int evtID
 
int subRunID
 
int RunID
 
double beta_MC
 
double Edep_MC
 
double xi_MC
 
double xf_MC
 
double yi_MC
 
double yf_MC
 
double zi_MC
 
double zf_MC
 
double ti_MC
 
double tf_MC
 
int plane_entry
 
int plane_exit
 
int cell_entry
 
int cell_exit
 
int nxhits_MC
 
int nyhits_MC
 
bool trigger
 
double ti
 
double tf
 
double dist
 
int hitsAttach
 

Detailed Description

Definition at line 40 of file SMMTriggerAna_module.cc.

Member Typedef Documentation

Definition at line 39 of file EDAnalyzer.h.

Definition at line 38 of file EDAnalyzer.h.

Constructor & Destructor Documentation

zcl::SMMTriggerAna::SMMTriggerAna ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 106 of file SMMTriggerAna_module.cc.

106  :
107  EDAnalyzer(p),
108  fCellHitInput (p.get< std::string >("CellHitInput") ),
109  _hf_min (p.get< float >("hf_min")), //Min hit number density in unit distance(in cell unit)
110  _sigmaT (1000), //64TDC
111  _deltaT (2000), //128TDC
112  _minHits (20),
113  _deltaP (2),
114  _deltaC (6),
115  _sigmaL (0.02),
116  _ADCmin (p.get<int>("ADCmin")),
117  _ADCmax (p.get<int>("ADCmax")),
118  _Xmax (p.get<float>("Xmax")),
119  _Ymax (p.get<float>("Ymax")),
120  _DistMin (p.get<float>("DistMin")),
121  _vproMin (p.get<float>("vproMin")),
122  _vproMax (p.get<float>("vproMax")),
123  _df (0.1)
124 {
125 }
const char * p
Definition: xmltok.h:285
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:100
enum BeamMode string
zcl::SMMTriggerAna::~SMMTriggerAna ( )
virtual

Definition at line 127 of file SMMTriggerAna_module.cc.

128 {
129  // Clean up dynamic memory and other resources here.
130 }

Member Function Documentation

void zcl::SMMTriggerAna::analyze ( const art::Event evt)

Definition at line 167 of file SMMTriggerAna_module.cc.

References _ADCmax, _ADCmin, _deltaP, _deltaT, _df, _DistMin, _hf_min, _minHits, _sigmaL, _sigmaT, _vproMax, _vproMin, rawdata::RawDigit::ADC(), sim::ParticleNavigator::begin(), beta_MC, rb::CellHit::Cell(), geo::PlaneGeo::Cell(), cell_entry, cell_exit, Dist(), dist, Edep_MC, sim::ParticleNavigator::end(), art::EventID::event(), evtID, fCellHitInput, Fill(), fin, geom(), art::DataViewImpl::getByLabel(), make_syst_table_plots::h, hitsAttach, MECModelEnuComparisons::i, art::Event::id(), IndexLocator(), calib::j, geo::kY, local, geo::CellGeo::LocalToWorld(), simb::MCParticle::Mass(), std::max(), std::min(), nxhits_MC, nyhits_MC, simb::MCParticle::P(), cheat::BackTracker::ParticleNavigator(), cheat::BackTracker::ParticleToFLSHit(), simb::MCParticle::PdgCode(), python.hepunit::pi, rb::CellHit::Plane(), geo::GeometryBase::Plane(), plane_entry, plane_exit, RC_Tree, art::Event::run(), RunID, rb::SortByTime(), std::sqrt(), art::Event::subRun(), subRunID, SurfAssign(), confusionMatrixTree::t, getGoodRuns4SAM::t1, t2, tf_MC, ti, ti_MC, rb::CellHit::TNS(), simb::MCParticle::TrackId(), trigger, registry_explorer::v, rb::CellHit::View(), ViewCheck(), xf_MC, xi_MC, yf_MC, yi_MC, zf_MC, and zi_MC.

168 {
169  evtID = evt.id().event();
170  subRunID = evt.subRun();
171  RunID = evt.run();
172 
173  trigger = false;
174  ti = -10000;
175  tf = -10000;
176  dist = 0;
177  hitsAttach = 0;
178 
179  //First record the MC truth Info:
182  const sim::ParticleNavigator& pnav = bt->ParticleNavigator();
183  for (sim::ParticleNavigator::const_iterator i = pnav.begin(); i != pnav.end(); ++i) {
184  nxhits_MC = 0;
185  nyhits_MC = 0;
186  const sim::Particle *p = (*i).second;
187  if (p->PdgCode()!=42 ) continue;
188  const std::vector<sim::FLSHit>& flshits = bt->ParticleToFLSHit(p->TrackId());
189  unsigned ntruehits_Tot = flshits.size();
190 
191  if ( ntruehits_Tot==0 ) continue;
192  double momentum2 = (p->P())*(p->P());
193  double mass2 = (p->Mass())*(p->Mass());
194  beta_MC = sqrt(momentum2 / (momentum2+mass2) );
195 
196  ti_MC = flshits[0].GetEntryT();
197  xi_MC = flshits[0].GetEntryX();
198  yi_MC = flshits[0].GetEntryY();
199  zi_MC = flshits[0].GetEntryZ();
200  tf_MC = flshits[0].GetExitT();
201  xf_MC = flshits[0].GetExitX();
202  yf_MC = flshits[0].GetExitY();
203  zf_MC = flshits[0].GetExitZ();
204  Edep_MC = flshits[0].GetEdep();
205 
206  size_t planeID_i = flshits[0].GetPlaneID();
207  size_t cellID_i = flshits[0].GetCellID();
208  size_t planeID_f = planeID_i;
209  size_t cellID_f = cellID_i;
210 
211  if (planeID_i%2) ++nxhits_MC;
212  else ++nyhits_MC;
213 
214 
215  for (size_t h =1; h!= flshits.size(); ++h) {
216  double ti_tmp = flshits[h].GetEntryT();
217  double tf_tmp = flshits[h].GetExitT();
218 
219  if (ti_tmp < ti_MC) {
220  ti_MC = ti_tmp;
221  xi_MC = flshits[h].GetEntryX();
222  yi_MC = flshits[h].GetEntryY();
223  zi_MC = flshits[h].GetEntryZ();
224  planeID_i = flshits[h].GetPlaneID();
225  cellID_i = flshits[h].GetCellID();
226  }
227  if (tf_tmp > tf_MC) {
228  tf_MC = tf_tmp;
229  xf_MC = flshits[h].GetExitX();
230  yf_MC = flshits[h].GetExitY();
231  zf_MC = flshits[h].GetExitZ();
232  planeID_f = flshits[h].GetPlaneID();
233  cellID_f = flshits[h].GetCellID();
234  }
235 
236  if (flshits[h].GetPlaneID() % 2) ++nxhits_MC;
237  else ++nyhits_MC;
238 
239  Edep_MC += flshits[h].GetEdep();
240  }
241 
242  //By now, you have got the local coordinate, you have to translate it to world:
243  const geo::CellGeo* startCell = geom->Plane(planeID_i)->Cell(cellID_i);
244  double local[3], world[3];
245  local[0] = xi_MC;
246  local[1] = yi_MC;
247  local[2] = zi_MC;
248  startCell->LocalToWorld(local,world);
249  xi_MC = world[0];
250  yi_MC = world[1];
251  zi_MC = world[2];
252  plane_entry = planeID_i;
253  cell_entry = cellID_i;
254 
255  const geo::CellGeo* stopCell = geom->Plane(planeID_f)->Cell(cellID_f);
256  local[0] = xf_MC;
257  local[1] = yf_MC;
258  local[2] = zf_MC;
259  stopCell->LocalToWorld(local,world);
260  xf_MC = world[0];
261  yf_MC = world[1];
262  zf_MC = world[2];
263  plane_exit = planeID_f;
264  cell_exit = cellID_f;
265 
266 
267  //1 monopole per event, so you can break out from the loop:
268  break;
269  }
270 
271  // std::cout<<"Truth info obtained!"<<std::endl;
272 
273  //Now, pseudo trigger process:
275  evt.getByLabel(fCellHitInput, hitcol);
276  // Load the cell hits into a vector for easy use
277  std::vector<art::Ptr<rb::CellHit > > hitlist[2];
278 
279  //This process imitated the ADC filtering process
280  for(unsigned int i = 0; i < hitcol->size(); ++i){
281  art::Ptr<rb::CellHit> hit_ptr(hitcol, i);
282  // if (bt->IsNoise(hit_ptr) ) continue;
283 
284  if (hit_ptr->ADC()>_ADCmax || hit_ptr->ADC()<_ADCmin) continue;
285  unsigned v = 0;
286  if (hit_ptr->View()==geo::kY ) v = 1;
287  hitlist[v].emplace_back(hit_ptr);
288  }
289 
290  if (hitlist[0].empty() || hitlist[1].empty()) {
291  RC_Tree -> Fill();
292  return;
293  }
294 
295 
296  //Sort the hits by time:
297  rb::SortByTime(hitlist[0]);
298  rb::SortByTime(hitlist[1]);
299 
300  //X, Y, T (plane, cell, tns)
301  std::vector<art::Ptr<rb::CellHit> > c_PS; //They will contain all Valid non surface hits on X view
302  std::vector<art::Ptr<rb::CellHit> > s_PS; //They will contain all Valid surface and mate hits on X view
303 
304 
305  //View Check and doing surface hits collecion
306  for (unsigned i = 0; i!= hitlist[0].size(); ++i ) {
307  art::Ptr<rb::CellHit> const& hit = hitlist[0][i];
308  float t = hit->TNS();
309  unsigned start_id = IndexLocator(hitlist[1], t-_deltaT);
310  unsigned stop_id = IndexLocator(hitlist[1], t+_deltaT);
311  bool met = false;
312  for (unsigned j = start_id; j<stop_id; ++j ) {
313  art::Ptr<rb::CellHit> const& buddy = hitlist[1][j];
314  if (ViewCheck(hit, buddy)) {
315  if (SurfAssign(hit) || SurfAssign(buddy)) {
316  s_PS.emplace_back(hit);
317  break;
318  }
319  else if (!met ) c_PS.emplace_back(hit);
320  met=true;
321  }
322  }
323  }
324  // std::cout<<"contained hits: "<<c_PS.size()<<" surf hits: "<<s_PS.size()<<std::endl;
325 
326  if (c_PS.size()<_minHits) {
327  RC_Tree->Fill();
328  return;
329  }
330  if (s_PS.size()<2) {
331  RC_Tree->Fill();
332  return;
333  }
334 
335 
336  //Try to find entry hit on valid surface hits containers
337  for (unsigned i=0; i<s_PS.size()-1; ++i) {
338  // bool found = false;
339  art::Ptr<rb::CellHit> hit1 = s_PS[i];
340  ti = hit1->TNS();
341  int pi = hit1->Plane();
342  int ci = hit1->Cell();
343  // std::cout<<"ci: "<<ci <<" pi: "<<pi<<std::endl;
344 
345  unsigned ini = IndexLocator(c_PS, ti) + 1;
346 
347  if (ini+_minHits >= c_PS.size() ) break;
348 
349  for (unsigned j=s_PS.size()-1; j>i && ini+_minHits+1 < c_PS.size(); --j) {
350  art::Ptr<rb::CellHit> hit2 = s_PS[j];
351  tf = hit2->TNS();
352  int pf = hit2->Plane();
353  int cf = hit2->Cell();
354 
355  // std::cout<<"cf: "<<cf<<" pf: "<<pf<<std::endl;
356 
357  if (tf+ _deltaT < c_PS[ini+_minHits]->TNS()) break;
358  else if (tf > c_PS[c_PS.size()-1]->TNS() + _deltaT ) continue;
359 
360 
361  int p_max = std::max(pi,pf);
362  int p_min = std::min(pi,pf);
363  int c_max = std::max(ci,cf);
364  int c_min = std::min(ci,cf);
365 
366  if (p_max < p_min+_deltaP) continue;
367 
368  unsigned fin = IndexLocator(c_PS, tf+_deltaT);
369  dist = Dist(hit1, hit2);
370 
371  if (dist < _DistMin) continue;
372  if (fin<ini+dist*_hf_min) continue;
373 
374  float vpro = (tf-ti)/dist;
375  // std::cout<<"vpro: "<<vpro<<" Dist: "<<dist<<std::endl;
376  if (tf > ti+dist*_vproMax+_sigmaT) continue;
377 
378  else if (tf+_sigmaT < ti+dist*_vproMin) continue;
379 
380  //Here we implemente the CCB(continuity-check and break) mechanisim
381  //First, calculate the time window for checking the previous hit on track:
382  int _dP = (p_max-p_min)*_df;
383  float dt = (tf-ti)*_df;
384 
385  if (_dP<2) _dP = 2;
386  else if (_dP>4) _dP = 4;
387 
388  if (dt>256) dt = 256;
389 
390  //Fish is coming!
391  int hitsOnline = 0;
392  double disCut = dist*_sigmaL;
393 
394  int h_cut = dist*_hf_min;
395 
396  int last_C = ci;
397  int last_P = pi;
398  float last_T = ti;
399  for (unsigned k=ini; k!=fin; ++k) {
400  art::Ptr<rb::CellHit> Mid = c_PS[k];
401  int pk = Mid->Plane();
402  int ck = Mid->Cell();
403  float tk = Mid->TNS();
404 
405  if (pk > p_max || pk < p_min) continue;
406  if (ck > c_max || ck < c_min) continue;
407 
408  //Now check if it is forward going:
409  if (pf>pi) {
410  if (pk < last_P || pk> last_P+_dP ) {
411  if (tk>last_T+dt) break;
412  else continue;
413  }
414  if (cf > ci && ck < last_C) continue;
415  if (cf < ci && ck > last_C) continue;
416  }
417 
418  else {
419  if ( pk+_dP< last_P || pk>last_P ) {
420  if (tk>last_T+dt) break;
421  else continue;
422  }
423  if (pk > last_P || pk+_dP < last_P) continue;
424  if (cf > ci && ck < last_C) continue;
425  if (cf < ci && ck > last_C) continue;
426  }
427 
428 
429 
430  float t1 = tk-ti;
431  float t2 = tf-tk;
432  float d1 = Dist(hit1, Mid);
433  float d2 = Dist(hit2, Mid);
434 
435  if (d1+d2 > dist+disCut) continue;
436 
437  if (d1>d2) {
438  if (t1 < d1*vpro + _sigmaT && t1 > d1*vpro - _sigmaT) {
439  ++hitsAttach;
440  last_C= ck;
441  last_P= pk;
442  last_T= tk;
443  }
444  }
445  else {
446  if (t2 > d2*vpro - _sigmaT && t2 < d2*vpro + _sigmaT) {
447  ++hitsOnline;
448  last_C= ck;
449  last_P= pk;
450  last_T= tk;
451  }
452  }
453  }
454 
455  if (hitsOnline > h_cut ) {
456  trigger = true;
457  if (hitsOnline > hitsAttach)
458  hitsAttach = hitsOnline;
459  }
460  }
461  } // X view finished
462 
463 
464  RC_Tree->Fill();
465  /*
466  if (beta_MC < 0.005 && beta_MC > 0.0001 && nxhits_MC > 20 && !trigger) {
467  std::cout<<"beta: "<<beta_MC<<" xhitsMC: "<<nxhits_MC<<" yhitsMC: "<<nyhits_MC<<"\n"
468  <<" Plane entry: "<<plane_entry<<" Cell entry: "<<cell_entry<<"\n"
469  <<" Plane exit: "<<plane_exit<<" Cell exit: "<<cell_exit<<"\n"
470  //<<" tiMC: "<<ti_MC
471  <<" xiMC: "<<xi_MC<<" yiMC: "<<yi_MC<<" ziMC: "<<zi_MC<<"\n"
472  //<<" tf_MC: "<<tf_MC
473  <<" xfMC: "<<xf_MC<<" yfMC: "<<yf_MC<<" zfMC: "<<zf_MC<<"\n"
474  <<" edep: "<<Edep_MC
475  <<" ti: "<<ti<<" tf: "<<tf<<" hitsAttach: "<<hitsAttach<<std::endl;
476 
477  }
478  */
479 } //end production function
float TNS() const
Definition: CellHit.h:46
T max(const caf::Proxy< T > &a, T b)
TString fin
Definition: Style.C:24
SubRunNumber_t subRun() const
Definition: Event.h:72
bool SurfAssign(art::Ptr< rb::CellHit > const &hptr)
int PdgCode() const
Definition: MCParticle.h:211
const sim::ParticleNavigator & ParticleNavigator() const
Get a reference to the ParticleNavigator.
Definition: BackTracker.h:744
void LocalToWorld(const double *local, double *world) const
Definition: CellGeo.cxx:80
unsigned short Plane() const
Definition: CellHit.h:39
bool ViewCheck(art::Ptr< rb::CellHit > const &, art::Ptr< rb::CellHit > const &)
const CellGeo * Cell(int icell) const
Definition: PlaneGeo.h:48
const char * p
Definition: xmltok.h:285
T sqrt(T number)
Definition: d0nt_math.hpp:156
std::vector< sim::FLSHit > ParticleToFLSHit(const int &trackID) const
All the FLSHits that were created by the track id trackID, sorted from most to least light...
double Mass() const
Definition: MCParticle.h:238
list_type::const_iterator const_iterator
void SortByTime(std::vector< art::Ptr< rb::CellHit > > &c)
Sort c in time order (earliest to latest).
Definition: CellHit.cxx:134
const PlaneGeo * Plane(unsigned int i) const
Timing fit.
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
int TrackId() const
Definition: MCParticle.h:209
unsigned short Cell() const
Definition: CellHit.h:40
Definition: Cand.cxx:23
float Dist(art::Ptr< rb::CellHit > const &, art::Ptr< rb::CellHit > const &)
#define local
Definition: gzguts.h:107
correl_yv Fill(-(dy[iP-1][iC-1]), hyv->GetBinContent(iP, iC))
double P(const int i=0) const
Definition: MCParticle.h:233
const double j
Definition: BetheBloch.cxx:29
double t2
EventNumber_t event() const
Definition: EventID.h:116
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
Definition: structs.h:12
void geom(int which=0)
Definition: geom.C:163
unsigned IndexLocator(std::vector< art::Ptr< rb::CellHit > > &hit_ptrs, float tns)
T min(const caf::Proxy< T > &a, T b)
RunNumber_t run() const
Definition: Event.h:77
Encapsulate the cell geometry.
Definition: CellGeo.h:25
EventID id() const
Definition: Event.h:56
void zcl::SMMTriggerAna::beginJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 132 of file SMMTriggerAna_module.cc.

References beta_MC, cell_entry, cell_exit, dist, Edep_MC, evtID, hitsAttach, art::TFileDirectory::make(), nxhits_MC, nyhits_MC, plane_entry, plane_exit, RC_Tree, RunID, subRunID, tf_MC, ti, ti_MC, trigger, xf_MC, xi_MC, yf_MC, yi_MC, zf_MC, and zi_MC.

133 {
135 
136  RC_Tree = tfs->make<TTree>("RC_Tree","Information from RC track info");
137  RC_Tree -> Branch("event", &evtID, "event/I");
138  RC_Tree -> Branch("subRun", &subRunID, "subRun/I");
139  RC_Tree -> Branch("Run", &RunID, "Run/I");
140 
141  //Cheater info ntuple part
142  RC_Tree -> Branch("betaMC", &beta_MC, "betaMC/D");
143  RC_Tree -> Branch("edepMC", &Edep_MC, "edepMC/D");
144  RC_Tree -> Branch("tiMC", &ti_MC, "tiMC/D");
145  RC_Tree -> Branch("xiMC", &xi_MC, "xiMC/D");
146  RC_Tree -> Branch("yiMC", &yi_MC, "yiMC/D");
147  RC_Tree -> Branch("ziMC", &zi_MC, "ziMC/D");
148  RC_Tree -> Branch("tfMC", &tf_MC, "tfMC/D");
149  RC_Tree -> Branch("xfMC", &xf_MC, "xfMC/D");
150  RC_Tree -> Branch("yfMC", &yf_MC, "yfMC/D");
151  RC_Tree -> Branch("zfMC", &zf_MC, "zfMC/D");
152  RC_Tree -> Branch("xhitsMC", &nxhits_MC, "xhitsMC/I");
153  RC_Tree -> Branch("yhitsMC", &nyhits_MC, "yhitsMC/I");
154  RC_Tree -> Branch("plane_entry", &plane_entry, "plane_entry/I");
155  RC_Tree -> Branch("cell_entry", &cell_entry, "cell_entry/I");
156  RC_Tree -> Branch("plane_exit", &plane_exit, "plane_exit/I");
157  RC_Tree -> Branch("cell_exit", &cell_exit, "cell_exit/I");
158 
159  //Trigger info
160  RC_Tree -> Branch("trigger", &trigger, "trigger/O");
161  RC_Tree -> Branch("ti", &ti, "ti/D");
162  RC_Tree -> Branch("tf", &tf, "tf/D");
163  RC_Tree -> Branch("dist", &dist, "dist/D");
164  RC_Tree -> Branch("hitsAttach", &hitsAttach, "hitsAttach/I");
165 }
Timing fit.
T * make(ARGS...args) const
detail::CachedProducts& art::EventObserverBase::cachedProducts ( )
inlineprotectedinherited

Definition at line 79 of file EventObserverBase.h.

References art::EventObserverBase::selectors_.

80  {
81  return selectors_;
82  }
detail::CachedProducts selectors_
template<typename T , BranchType = InEvent>
ProductToken<T> art::Consumer::consumes ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::consumes ( InputTag const &  it)
inherited

Definition at line 146 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

147 {
148  if (!moduleContext_)
149  return ProductToken<T>::invalid();
150 
151  consumables_[BT].emplace_back(ConsumableType::Product,
152  TypeID{typeid(T)},
153  it.label(),
154  it.instance(),
155  it.process());
156  return ProductToken<T>{it};
157 }
set< int >::iterator it
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename T , art::BranchType BT>
void art::Consumer::consumesMany ( )
inherited

Definition at line 161 of file Consumer.h.

References T.

162 {
163  if (!moduleContext_)
164  return;
165 
166  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
167 }
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::consumesView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::consumesView ( InputTag const &  it)
inherited

Definition at line 171 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

172 {
173  if (!moduleContext_)
174  return ViewToken<T>::invalid();
175 
176  consumables_[BT].emplace_back(ConsumableType::ViewElement,
177  TypeID{typeid(T)},
178  it.label(),
179  it.instance(),
180  it.process());
181  return ViewToken<T>{it};
182 }
set< int >::iterator it
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
bool zcl::SMMTriggerAna::ContaineAssign ( art::Ptr< rb::CellHit > const &  hptr)
private
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed)
inherited
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make 
)
inherited
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make,
label_t const &  engine_label 
)
inherited
CurrentProcessingContext const* art::EDAnalyzer::currentContext ( ) const
protectedinherited
float zcl::SMMTriggerAna::Dist ( art::Ptr< rb::CellHit > const &  hptr1,
art::Ptr< rb::CellHit > const &  hptr2 
)
private

Definition at line 510 of file SMMTriggerAna_module.cc.

References rb::CellHit::Cell(), dx, dy, rb::CellHit::Plane(), and std::sqrt().

Referenced by analyze().

512 {
513  float dx = ((hptr1->Plane() )- (hptr2->Plane()) )*1.6795;
514  float dy = (hptr1->Cell() ) - (hptr2->Cell());
515  return sqrt(dx*dx+dy*dy);
516 }
unsigned short Plane() const
Definition: CellHit.h:39
T sqrt(T number)
Definition: d0nt_math.hpp:156
unsigned short Cell() const
Definition: CellHit.h:40
double dy[NP][NC]
double dx[NP][NC]
void zcl::SMMTriggerAna::endJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 481 of file SMMTriggerAna_module.cc.

481  {
482 
483 }
seed_t art::EngineCreator::get_seed_value ( fhicl::ParameterSet const &  pset,
char const  key[] = "seed",
seed_t const  implicit_seed = -1 
)
inherited
art::Handle<art::TriggerResults> art::EventObserverBase::getTriggerResults ( Event const &  e) const
inlineinherited

Definition at line 61 of file EventObserverBase.h.

References art::detail::CachedProducts::getOneTriggerResults(), and art::EventObserverBase::selectors_.

62  {
64  }
detail::CachedProducts selectors_
art::Handle< art::TriggerResults > getOneTriggerResults(Event const &) const
Float_t e
Definition: plot.C:35
unsigned zcl::SMMTriggerAna::IndexLocator ( std::vector< art::Ptr< rb::CellHit > > &  hit_ptrs,
float  tns 
)
private

Definition at line 519 of file SMMTriggerAna_module.cc.

References DEFINE_ART_MODULE(), MakeMiniprodValidationCuts::f, MECModelEnuComparisons::i, and m.

Referenced by analyze().

521 {
522  unsigned i = 0;
523  unsigned f = hit_ptrs.size()-1;
524 
525  if (tns < (hit_ptrs[0])->TNS()) return i;
526  if (tns > (hit_ptrs[f])->TNS()) return f;
527 
528  while (f>i+1) {
529  unsigned m = (f+i)/2;
530  if (tns >= (hit_ptrs[m])->TNS() ) i = m;
531  else f = m;
532  }
533  return i;
534 }
template<typename T , BranchType = InEvent>
ProductToken<T> art::Consumer::mayConsume ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::mayConsume ( InputTag const &  it)
inherited

Definition at line 189 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

190 {
191  if (!moduleContext_)
192  return ProductToken<T>::invalid();
193 
194  consumables_[BT].emplace_back(ConsumableType::Product,
195  TypeID{typeid(T)},
196  it.label(),
197  it.instance(),
198  it.process());
199  return ProductToken<T>{it};
200 }
set< int >::iterator it
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename T , art::BranchType BT>
void art::Consumer::mayConsumeMany ( )
inherited

Definition at line 204 of file Consumer.h.

References T.

205 {
206  if (!moduleContext_)
207  return;
208 
209  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
210 }
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::mayConsumeView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::mayConsumeView ( InputTag const &  it)
inherited

Definition at line 214 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

215 {
216  if (!moduleContext_)
217  return ViewToken<T>::invalid();
218 
219  consumables_[BT].emplace_back(ConsumableType::ViewElement,
220  TypeID{typeid(T)},
221  it.label(),
222  it.instance(),
223  it.process());
224  return ViewToken<T>{it};
225 }
set< int >::iterator it
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
bool art::EventObserverBase::modifiesEvent ( ) const
inlineinherited

Definition at line 25 of file EventObserverBase.h.

26  {
27  return false;
28  }
static cet::exempt_ptr<Consumer> art::Consumer::non_module_context ( )
staticinherited
void art::Consumer::prepareForJob ( fhicl::ParameterSet const &  pset)
protectedinherited
std::string const& art::EventObserverBase::processName ( ) const
inlineinherited
void art::EventObserverBase::registerProducts ( MasterProductRegistry ,
ProductDescriptions ,
ModuleDescription const &   
)
inlineinherited

Definition at line 33 of file EventObserverBase.h.

References string.

36  {}
fhicl::ParameterSetID art::EventObserverBase::selectorConfig ( ) const
inlineinherited

Definition at line 56 of file EventObserverBase.h.

References art::EventObserverBase::selector_config_id_.

57  {
58  return selector_config_id_;
59  }
fhicl::ParameterSetID selector_config_id_
void art::Consumer::showMissingConsumes ( ) const
protectedinherited

Referenced by art::RootOutput::endJob().

bool zcl::SMMTriggerAna::SurfAssign ( art::Ptr< rb::CellHit > const &  hptr)
private

Definition at line 485 of file SMMTriggerAna_module.cc.

References _deltaC, _deltaP, _Xmax, _Ymax, rb::CellHit::Cell(), and rb::CellHit::Plane().

Referenced by analyze().

486 {
487  if ( hptr->Cell() > _Ymax - _deltaC ) return true;
488  else if ( hptr->Cell() < _deltaC ) return true;
489  else if ( hptr->Plane() < _deltaP ) return true;
490  else if ( hptr->Plane() > _Xmax - _deltaP ) return true;
491 
492  return false;
493 
494 }
unsigned short Plane() const
Definition: CellHit.h:39
unsigned short Cell() const
Definition: CellHit.h:40
void art::Consumer::validateConsumedProduct ( BranchType const  bt,
ProductInfo const &  pi 
)
protectedinherited
bool zcl::SMMTriggerAna::ViewCheck ( art::Ptr< rb::CellHit > const &  hptr1,
art::Ptr< rb::CellHit > const &  hptr2 
)
private

Definition at line 498 of file SMMTriggerAna_module.cc.

References _deltaP, _deltaT, rb::CellHit::Plane(), and rb::CellHit::TNS().

Referenced by analyze().

500 {
501  if (hptr1->TNS() > hptr2->TNS()+_deltaT) return false;
502  if (hptr2->TNS() > hptr1->TNS()+_deltaT) return false;
503  if (hptr1->Plane() > hptr2->Plane() ) {
504  if (hptr1->Plane() - hptr2->Plane() < _deltaP ) return true;
505  }
506  else if (hptr2->Plane() - hptr1->Plane() < _deltaP ) return true;
507  return false;
508 }
float TNS() const
Definition: CellHit.h:46
unsigned short Plane() const
Definition: CellHit.h:39
bool art::EventObserverBase::wantAllEvents ( ) const
inlineinherited

Definition at line 46 of file EventObserverBase.h.

References art::EventObserverBase::wantAllEvents_.

Referenced by art::RootOutput::RootOutput().

47  {
48  return wantAllEvents_;
49  }
bool art::EventObserverBase::wantEvent ( Event const &  e)
inlineinherited

Definition at line 51 of file EventObserverBase.h.

References art::EventObserverBase::selectors_, and art::detail::CachedProducts::wantEvent().

52  {
53  return selectors_.wantEvent(e);
54  }
detail::CachedProducts selectors_
Float_t e
Definition: plot.C:35
bool wantEvent(Event const &)
std::string art::EDAnalyzer::workerType ( ) const
inlineinherited

Definition at line 109 of file EDAnalyzer.h.

References art::EDAnalyzer::currentContext().

110  {
111  return "WorkerT<EDAnalyzer>";
112  }

Member Data Documentation

int zcl::SMMTriggerAna::_ADCmax
private

Definition at line 79 of file SMMTriggerAna_module.cc.

Referenced by analyze().

int zcl::SMMTriggerAna::_ADCmin
private

Definition at line 78 of file SMMTriggerAna_module.cc.

Referenced by analyze().

float zcl::SMMTriggerAna::_deltaC
private

Definition at line 76 of file SMMTriggerAna_module.cc.

Referenced by SurfAssign().

float zcl::SMMTriggerAna::_deltaP
private

Definition at line 75 of file SMMTriggerAna_module.cc.

Referenced by analyze(), SurfAssign(), and ViewCheck().

unsigned zcl::SMMTriggerAna::_deltaT
private

Definition at line 72 of file SMMTriggerAna_module.cc.

Referenced by analyze(), and ViewCheck().

float zcl::SMMTriggerAna::_df
private

Definition at line 85 of file SMMTriggerAna_module.cc.

Referenced by analyze().

float zcl::SMMTriggerAna::_DistMin
private

Definition at line 82 of file SMMTriggerAna_module.cc.

Referenced by analyze().

float zcl::SMMTriggerAna::_hf_min
private

Definition at line 68 of file SMMTriggerAna_module.cc.

Referenced by analyze().

unsigned zcl::SMMTriggerAna::_minHits
private

Definition at line 73 of file SMMTriggerAna_module.cc.

Referenced by analyze().

float zcl::SMMTriggerAna::_sigmaL
private

Definition at line 77 of file SMMTriggerAna_module.cc.

Referenced by analyze().

unsigned zcl::SMMTriggerAna::_sigmaT
private

Definition at line 71 of file SMMTriggerAna_module.cc.

Referenced by analyze().

float zcl::SMMTriggerAna::_vproMax
private

Definition at line 84 of file SMMTriggerAna_module.cc.

Referenced by analyze().

float zcl::SMMTriggerAna::_vproMin
private

Definition at line 83 of file SMMTriggerAna_module.cc.

Referenced by analyze().

float zcl::SMMTriggerAna::_Xmax
private

Definition at line 80 of file SMMTriggerAna_module.cc.

Referenced by SurfAssign().

float zcl::SMMTriggerAna::_Ymax
private

Definition at line 81 of file SMMTriggerAna_module.cc.

Referenced by SurfAssign().

double zcl::SMMTriggerAna::beta_MC
private

Definition at line 90 of file SMMTriggerAna_module.cc.

Referenced by analyze(), and beginJob().

int zcl::SMMTriggerAna::cell_entry
private

Definition at line 97 of file SMMTriggerAna_module.cc.

Referenced by analyze(), and beginJob().

int zcl::SMMTriggerAna::cell_exit
private

Definition at line 97 of file SMMTriggerAna_module.cc.

Referenced by analyze(), and beginJob().

double zcl::SMMTriggerAna::dist
private

Definition at line 102 of file SMMTriggerAna_module.cc.

Referenced by analyze(), and beginJob().

double zcl::SMMTriggerAna::Edep_MC
private

Definition at line 91 of file SMMTriggerAna_module.cc.

Referenced by analyze(), and beginJob().

int zcl::SMMTriggerAna::evtID
private

Definition at line 89 of file SMMTriggerAna_module.cc.

Referenced by analyze(), and beginJob().

std::string zcl::SMMTriggerAna::fCellHitInput
private

Definition at line 67 of file SMMTriggerAna_module.cc.

Referenced by analyze().

int zcl::SMMTriggerAna::hitsAttach
private

Definition at line 103 of file SMMTriggerAna_module.cc.

Referenced by analyze(), and beginJob().

int zcl::SMMTriggerAna::nxhits_MC
private

Definition at line 99 of file SMMTriggerAna_module.cc.

Referenced by analyze(), and beginJob().

int zcl::SMMTriggerAna::nyhits_MC
private

Definition at line 99 of file SMMTriggerAna_module.cc.

Referenced by analyze(), and beginJob().

int zcl::SMMTriggerAna::plane_entry
private

Definition at line 96 of file SMMTriggerAna_module.cc.

Referenced by analyze(), and beginJob().

int zcl::SMMTriggerAna::plane_exit
private

Definition at line 96 of file SMMTriggerAna_module.cc.

Referenced by analyze(), and beginJob().

TTree* zcl::SMMTriggerAna::RC_Tree
private

Definition at line 88 of file SMMTriggerAna_module.cc.

Referenced by analyze(), and beginJob().

int zcl::SMMTriggerAna::RunID
private

Definition at line 89 of file SMMTriggerAna_module.cc.

Referenced by analyze(), and beginJob().

int zcl::SMMTriggerAna::subRunID
private

Definition at line 89 of file SMMTriggerAna_module.cc.

Referenced by analyze(), and beginJob().

double zcl::SMMTriggerAna::tf
private

Definition at line 101 of file SMMTriggerAna_module.cc.

double zcl::SMMTriggerAna::tf_MC
private

Definition at line 95 of file SMMTriggerAna_module.cc.

Referenced by analyze(), and beginJob().

double zcl::SMMTriggerAna::ti
private

Definition at line 101 of file SMMTriggerAna_module.cc.

Referenced by analyze(), and beginJob().

double zcl::SMMTriggerAna::ti_MC
private

Definition at line 95 of file SMMTriggerAna_module.cc.

Referenced by analyze(), and beginJob().

bool zcl::SMMTriggerAna::trigger
private

Definition at line 100 of file SMMTriggerAna_module.cc.

Referenced by analyze(), and beginJob().

double zcl::SMMTriggerAna::xf_MC
private

Definition at line 92 of file SMMTriggerAna_module.cc.

Referenced by analyze(), and beginJob().

double zcl::SMMTriggerAna::xi_MC
private

Definition at line 92 of file SMMTriggerAna_module.cc.

Referenced by analyze(), and beginJob().

double zcl::SMMTriggerAna::yf_MC
private

Definition at line 93 of file SMMTriggerAna_module.cc.

Referenced by analyze(), and beginJob().

double zcl::SMMTriggerAna::yi_MC
private

Definition at line 93 of file SMMTriggerAna_module.cc.

Referenced by analyze(), and beginJob().

double zcl::SMMTriggerAna::zf_MC
private

Definition at line 94 of file SMMTriggerAna_module.cc.

Referenced by analyze(), and beginJob().

double zcl::SMMTriggerAna::zi_MC
private

Definition at line 94 of file SMMTriggerAna_module.cc.

Referenced by analyze(), and beginJob().


The documentation for this class was generated from the following file: