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

Public Types

using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

 DataSliceEva (fhicl::ParameterSet const &pset)
 
virtual ~DataSliceEva ()
 
void analyze (const art::Event &evt)
 
void beginJob ()
 
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 Attributes

std::string _slicelabel
 
std::string _sliceinstance
 
int _ADCthr
 
int _xMin
 
int _xMax
 
int _yMin
 
int _yMax
 
int _zMin
 
int _zMax
 
int _deltx
 
int _delty
 
int _deltz
 
TTree * _slicetree
 
float ADC_mean
 
unsigned long long TDC_min
 
unsigned long long TDC_max
 
int X_min
 
int X_max
 
int Y_min
 
int Y_max
 
int P_min
 
int P_max
 
int N_hits
 
int N_sh
 
int eventID
 
bool PassThrough
 

Detailed Description

Definition at line 50 of file DataSliceEva_module.cc.

Member Typedef Documentation

Definition at line 39 of file EDAnalyzer.h.

Definition at line 38 of file EDAnalyzer.h.

Constructor & Destructor Documentation

ddt::DataSliceEva::DataSliceEva ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 88 of file DataSliceEva_module.cc.

89  : EDAnalyzer(p),
90  _slicelabel(p.get<std::string>("slice_label")),
91  _sliceinstance(p.get<std::string>("slice_instance")),
92  _ADCthr(p.get<float>("ADC_thr")),
93  _xMin(p.get<float>("x_min")),
94  _xMax(p.get<float>("x_max")),
95  _yMin(p.get<float>("y_min")),
96  _yMax(p.get<float>("y_max")),
97  _deltx(p.get<float>("x_delt")),
98  _delty(p.get<float>("y_delt"))
99 {
100 }
const char * p
Definition: xmltok.h:285
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:100
enum BeamMode string
ddt::DataSliceEva::~DataSliceEva ( )
virtual

Definition at line 103 of file DataSliceEva_module.cc.

103 {}

Member Function Documentation

void ddt::DataSliceEva::analyze ( const art::Event evt)

Definition at line 127 of file DataSliceEva_module.cc.

References _ADCthr, _deltx, _delty, _deltz, _sliceinstance, _slicelabel, _slicetree, _xMax, _xMin, _yMax, _yMin, _zMax, _zMin, ADC_mean, DEFINE_ART_MODULE(), art::EventID::event(), eventID, Fill(), art::DataViewImpl::getByLabel(), hits(), MECModelEnuComparisons::i, art::Event::id(), N_hits, N_sh, P_max, P_min, PassThrough, TDC_max, TDC_min, X_max, X_min, daqchannelmap::X_VIEW, Y_max, and Y_min.

128 {
129  eventID = e.id().event();
130 
131  //Get the Slice Info:
133  e.getByLabel(_slicelabel, _sliceinstance, slices);
134 
135  for (unsigned i = 0; i!= slices->size(); ++i) {
136  novaddt::HitList const &hits = slices->at(i);
137  TDC_min = hits.begin()->TDC().val;
138  TDC_max = TDC_min;
139  P_min = 9999;
140  P_max = -99;
141  X_min = 9999;
142  X_max = -99;
143  Y_min = 9999;
144  Y_max = -99;
145 
146  int ADC_sum = 0;
147  N_hits = hits.size();
148  N_sh = 0;
149 
150  for (auto const hit: hits) {
151  if (TDC_min > hit.TDC().val ) TDC_min = hit.TDC().val;
152  if (TDC_max < hit.TDC().val ) TDC_max = hit.TDC().val;
153  if (P_min > hit.Plane().val) P_min = hit.Plane().val;
154  if (P_max < hit.Plane().val) P_max = hit.Plane().val;
155  if (hit.View().val == daqchannelmap::X_VIEW) {
156  if (X_max < hit.Cell().val) X_max = hit.Cell().val;
157  if (X_min > hit.Cell().val) X_min = hit.Cell().val;
158  }
159  else {
160  if (Y_max < hit.Cell().val) Y_max = hit.Cell().val;
161  if (Y_min > hit.Cell().val) Y_min = hit.Cell().val;
162  }
163 
164  if (hit.ADC().val > _ADCthr) ++N_sh;
165  ADC_sum += hit.ADC().val;
166  }
167  ADC_mean = ADC_sum/(N_hits+0.);
168 
169  int number =0;
170  if (X_min<_xMin+_deltx) ++number;
171  if (X_max>_xMax-_deltx) ++number;
172  if (Y_min<_yMin+_delty) ++number;
173  if (Y_max>_yMax-_delty) ++number;
174  if (P_min<_zMin+_deltz) ++number;
175  if (P_max>_zMax-_deltz) ++number;
176 
177  if (number>1) PassThrough = true;
178  else PassThrough = false;
179  _slicetree -> Fill();
180  }
181  return;
182 }
unsigned long long TDC_min
std::vector< DAQHit > HitList
Definition: HitList.h:15
void hits()
Definition: readHits.C:15
correl_yv Fill(-(dy[iP-1][iC-1]), hyv->GetBinContent(iP, iC))
Identifier for the X measuring view of the detector (top)
Definition: structs.h:12
Float_t e
Definition: plot.C:35
unsigned long long TDC_max
void ddt::DataSliceEva::beginJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 107 of file DataSliceEva_module.cc.

References _slicetree, ADC_mean, art::TFileDirectory::make(), N_hits, N_sh, P_max, P_min, PassThrough, TDC_max, TDC_min, X_max, X_min, Y_max, and Y_min.

108 {
110  _slicetree = tfs->make<TTree>("slicetree","hit information");
111  _slicetree -> Branch("ADC_mean",&ADC_mean,"ADC_mean/F");
112  _slicetree -> Branch("TDC_min",&TDC_min,"TDC_min/l");
113  _slicetree -> Branch("TDC_max",&TDC_max,"TDC_max/l");
114  _slicetree -> Branch("X_min",&X_min,"X_min/I");
115  _slicetree -> Branch("X_max",&X_max,"X_max/I");
116  _slicetree -> Branch("Y_min",&Y_min,"Y_min/I");
117  _slicetree -> Branch("Y_max",&Y_max,"Y_max/I");
118  _slicetree -> Branch("P_min",&P_min,"P_min/I");
119  _slicetree -> Branch("P_max",&P_max,"P_max/I");
120  _slicetree -> Branch("N_hits",&N_hits,"N_hits/I"); //Number of hits in the slice
121  _slicetree -> Branch("N_sh",&N_sh,"N_sh/I");
122  _slicetree -> Branch("though",&PassThrough,"through/O");
123 
124  return;
125 }
unsigned long long TDC_min
T * make(ARGS...args) const
unsigned long long TDC_max
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
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
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
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().

void art::Consumer::validateConsumedProduct ( BranchType const  bt,
ProductInfo const &  pi 
)
protectedinherited
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 ddt::DataSliceEva::_ADCthr
private

Definition at line 63 of file DataSliceEva_module.cc.

Referenced by analyze().

int ddt::DataSliceEva::_deltx
private

Definition at line 70 of file DataSliceEva_module.cc.

Referenced by analyze().

int ddt::DataSliceEva::_delty
private

Definition at line 71 of file DataSliceEva_module.cc.

Referenced by analyze().

int ddt::DataSliceEva::_deltz
private

Definition at line 72 of file DataSliceEva_module.cc.

Referenced by analyze().

std::string ddt::DataSliceEva::_sliceinstance
private

Definition at line 62 of file DataSliceEva_module.cc.

Referenced by analyze().

std::string ddt::DataSliceEva::_slicelabel
private

Definition at line 61 of file DataSliceEva_module.cc.

Referenced by analyze().

TTree* ddt::DataSliceEva::_slicetree
private

Definition at line 74 of file DataSliceEva_module.cc.

Referenced by analyze(), and beginJob().

int ddt::DataSliceEva::_xMax
private

Definition at line 65 of file DataSliceEva_module.cc.

Referenced by analyze().

int ddt::DataSliceEva::_xMin
private

Definition at line 64 of file DataSliceEva_module.cc.

Referenced by analyze().

int ddt::DataSliceEva::_yMax
private

Definition at line 67 of file DataSliceEva_module.cc.

Referenced by analyze().

int ddt::DataSliceEva::_yMin
private

Definition at line 66 of file DataSliceEva_module.cc.

Referenced by analyze().

int ddt::DataSliceEva::_zMax
private

Definition at line 69 of file DataSliceEva_module.cc.

Referenced by analyze().

int ddt::DataSliceEva::_zMin
private

Definition at line 68 of file DataSliceEva_module.cc.

Referenced by analyze().

float ddt::DataSliceEva::ADC_mean
private

Definition at line 76 of file DataSliceEva_module.cc.

Referenced by analyze(), and beginJob().

int ddt::DataSliceEva::eventID
private

Definition at line 82 of file DataSliceEva_module.cc.

Referenced by analyze().

int ddt::DataSliceEva::N_hits
private

Definition at line 81 of file DataSliceEva_module.cc.

Referenced by analyze(), and beginJob().

int ddt::DataSliceEva::N_sh
private

Definition at line 81 of file DataSliceEva_module.cc.

Referenced by analyze(), and beginJob().

int ddt::DataSliceEva::P_max
private

Definition at line 80 of file DataSliceEva_module.cc.

Referenced by analyze(), and beginJob().

int ddt::DataSliceEva::P_min
private

Definition at line 80 of file DataSliceEva_module.cc.

Referenced by analyze(), and beginJob().

bool ddt::DataSliceEva::PassThrough
private

Definition at line 83 of file DataSliceEva_module.cc.

Referenced by analyze(), and beginJob().

unsigned long long ddt::DataSliceEva::TDC_max
private

Definition at line 77 of file DataSliceEva_module.cc.

Referenced by analyze(), and beginJob().

unsigned long long ddt::DataSliceEva::TDC_min
private

Definition at line 77 of file DataSliceEva_module.cc.

Referenced by analyze(), and beginJob().

int ddt::DataSliceEva::X_max
private

Definition at line 78 of file DataSliceEva_module.cc.

Referenced by analyze(), and beginJob().

int ddt::DataSliceEva::X_min
private

Definition at line 78 of file DataSliceEva_module.cc.

Referenced by analyze(), and beginJob().

int ddt::DataSliceEva::Y_max
private

Definition at line 79 of file DataSliceEva_module.cc.

Referenced by analyze(), and beginJob().

int ddt::DataSliceEva::Y_min
private

Definition at line 79 of file DataSliceEva_module.cc.

Referenced by analyze(), and beginJob().


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