11 #include "Utilities/func/MathUtil.h" 30 #include "TLorentzVector.h" 107 MM_MC = tfs->
make<TTree>(
"MM_MC",
"monopole_mc_info");
108 MM_MC -> Branch(
"x0",&
x0,
"x0/D");
109 MM_MC -> Branch(
"y0",&
y0,
"y0/D");
110 MM_MC -> Branch(
"z0",&
z0,
"z0/D");
119 MM_MC -> Branch(
"dE",&
dE,
"dE/D");
120 MM_MC -> Branch(
"dPE",&
dPE,
"dPE/D");
168 if (p->
PdgCode()!=42 )
continue;
179 for (
unsigned h =0;
h!= flshits.size(); ++
h) {
183 exit_x = flshits[
h].GetExitX();
185 exit_y = flshits[
h].GetExitY();
187 exit_z = flshits[
h].GetExitZ();
189 exit_t = flshits[
h].GetExitT();
191 chpl = flshits[
h].GetTotalPathLength();
205 const int sliceMax = slices->size();
206 for(
int sliceIdx = 0; sliceIdx < sliceMax; ++sliceIdx){
218 for(
int hitIdx = 0; hitIdx <
nCell; ++hitIdx){
220 plane = chit->
Plane();
222 int module = cell/32;
223 if (plane!=pStore or module!=mStore)
nModule++;
228 std::vector<cheat::TrackIDE> trackides= bt->
HitToTrackIDE(chit);
236 double w = position[0];
241 const double rbTime = recohit.
T();
243 if (!hitIdx)
rcTi = rbTime;
246 dE += (trackides[0].energy) / (trackides[0].energyFrac);
259 catch (...) {
continue;}
void analyze(const art::Event &evt)
back track the reconstruction to the simulation
std::string fFLSHitListLabel
unsigned int NCell(geo::View_t view) const
Number of cells in view view.
double Py(const int i=0) const
Simple module to analyze MC cosmics distributions.
std::vector< TrackIDE > HitToTrackIDE(const rb::CellHit &hit, bool useBirksE=false) const
Convenience function. HitsToTrackIDE but for a single hit.
const sim::ParticleNavigator & ParticleNavigator() const
Get a reference to the ParticleNavigator.
unsigned short Plane() const
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...
void reconfigure(fhicl::ParameterSet const &pset)
list_type::const_iterator const_iterator
Vertical planes which measure X.
double Px(const int i=0) const
rb::RecoHit MakeRecoHit(rb::CellHit const &cellhit, double w)
A collection of associated CellHits.
DEFINE_ART_MODULE(TestTMapFile)
bool IsNoise(const art::Ptr< rb::CellHit > &hit) const
Is this hit not associated with any particles?
Calibrated quantities relying on position in the orthogonal view. To generate a rb::CellHit from a rb...
unsigned short Cell() const
std::string fClusterInput
double P(const int i=0) const
T get(std::string const &key) const
MonopoleAna(fhicl::ParameterSet const &pset)
EDAnalyzer(Table< Config > const &config)
art::Ptr< rb::CellHit > Cell(geo::View_t view, unsigned int viewIdx) const
Get the ith cell from view view.
double Vx(const int i=0) const
const std::vector< sim::PhotonSignal > HitToPhotonSignal(const art::Ptr< rb::CellHit > &hit) const
Returns the PhotonSignals contributing the signal in the specified hit.
T * make(ARGS...args) const
int16_t ADC(uint32_t i) const
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
double Pz(const int i=0) const
std::string fRawDataLabel
double Vz(const int i=0) const
bool IsNoise() const
Is the noise flag set?
TVector3 HitToXYZ(art::Ptr< rb::CellHit > const &hit, bool useBirksE=false) const
Returns the XYZ position of the energy deposition for a given hit.
double Vy(const int i=0) const
Encapsulate the geometry of one entire detector (near, far, ndos)