Belle II Software  release-08-01-10
arich modules
Collaboration diagram for arich modules:

Classes

class  arichBtestModule
 The UserTutorial module. More...
 
class  ARICHChannelMaskModule
 Testing module for collection of calibration data. More...
 
class  ARICHDigitizerModule
 ARICH digitizer module. More...
 
class  ARICHDQMModule
 Make summary of data quality from reconstruction. More...
 
class  ARICHFillHitsModule
 Fill ARICHHit collection from ARICHDigits. More...
 
class  ARICHMCParticlesModule
 Module to match ARICH hits to MCParticles. More...
 
class  ARICHNtupleModule
 ARICH reconstruction efficiency test module. More...
 
class  ARICHPackerModule
 Raw data packer for ARICH. More...
 
class  ARICHRateCalModule
 Fill ARICHHit collection from ARICHDigits. More...
 
class  ARICHRawUnpackerModule
 Fill ARICHHit collection from ARICHDigits. More...
 
class  ARICHReconstruction
 Internal ARICH track reconstruction. More...
 
class  ARICHReconstructorModule
 ARICH subdetector main module. More...
 
class  ARICHRelateModule
 Creates relations between ARICHAeroHits and ExtHits. More...
 
class  arichToNtupleModule
 This module extends existing variablesToNtuple to append detailed arich information to candidates in the analysis output ntuple. More...
 
struct  ARICHRawHeader
 
class  ARICHUnpackerModule
 Raw data unpacker for ARICH. More...
 

Macros

#define ARICH_BUFFER_NWORDS   252
 
#define ARICHFEB_HEADER_SIZE   10
 
#define ARICHRAW_HEADER_SIZE   12
 

Functions

 REG_MODULE (arichBtest)
 Register the Module.
 
 REG_MODULE (ARICHDigitizer)
 Register the Module.
 
TH2 * moduleHitMap (TH1 *hitMap, int moduleID)
 Make hit map in HAPD view (12*12 channels) More...
 
TH2 * moduleDeadMap (TH1 *hitMap, int moduleID)
 Make chip dead/alive map in HAPD view (2*2 chips) More...
 
TH1 * mergerClusterHitMap1D (TH1 *hitMap, int mergerID)
 Make 1D hit map of specified Merger Board. More...
 
TCanvas * mergerClusterHitMap2D (TH1 *hitMap, int mergerID)
 Make display of 6 HAPDs' 2D hit map of the Merger Board. More...
 
TCanvas * sectorHitMap (TH1 *hitMap, int sector)
 Make display of 70 HAPDs' 2D hit map of the sector. More...
 
TCanvas * sectorDeadMap (TH1 *hitMap, int sector)
 Make display of 70 HAPDs' 2D dead/alive map of the sector. More...
 
 REG_MODULE (ARICHDQM)
 
void deadPalette ()
 
 REG_MODULE (ARICHFillHits)
 Register module.
 
 REG_MODULE (ARICHMCParticles)
 Register module.
 
 REG_MODULE (ARICHNtuple)
 Register module.
 
 REG_MODULE (ARICHPacker)
 Register module.
 
 REG_MODULE (ARICHRateCal)
 
 REG_MODULE (ARICHRawUnpacker)
 
 REG_MODULE (ARICHReconstructor)
 Register the Module.
 
 REG_MODULE (ARICHRelate)
 Register module.
 
 REG_MODULE (ARICHUnpacker)
 Register module.
 
 arichBtestModule ()
 Constructor. More...
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void beginRun () override
 Called when entering a new run. More...
 
int skipdata (gzFile fp)
 Skip the data part of the record.
 
void readmwpc (unsigned int *dbuf, unsigned int len, int print=0)
 Read the MWPC information from the data buffer.
 
int readhapd (unsigned int len, unsigned int *data)
 Read the HAPD hits from the data buffer.
 
int getTrack (int mask, TVector3 &r, TVector3 &dir)
 Beamtest Track reconstruction.
 
int readdata (gzFile fp, int rec_id, int print)
 Read the data from the file (can be compressed)
 
virtual void event () override
 Running over all events. More...
 
virtual void endRun () override
 Is called after processing the last event of a run. More...
 
virtual void terminate () override
 Is called at the end of your Module. More...
 
 ARICHDigitizerModule ()
 Constructor.
 
virtual ~ARICHDigitizerModule ()
 Destructor.
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void beginRun () override
 Called when entering a new run. More...
 
virtual void event () override
 Event processor. More...
 
void magFieldDistorsion (TVector2 &hit, int copyno)
 Apply correction to hit position due to non-perpendicular component of magnetic field. More...
 
 ARICHDQMModule ()
 Constructor.
 
virtual ~ARICHDQMModule ()
 Destructor.
 
virtual void defineHisto () override
 Function to define histograms. More...
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void beginRun () override
 Called when entering a new run. More...
 
virtual void event () override
 Event processor.
 
virtual void endRun () override
 End-of-run action. More...
 
 ARICHFillHitsModule ()
 Constructor.
 
virtual ~ARICHFillHitsModule ()
 Destructor.
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void event () override
 Event processor.
 
void magFieldCorrection (TVector3 &hitpos)
 Corrects hit position for distorsion due to non-perpendicular magnetic field component.
 
 ARICHMCParticlesModule ()
 Constructor.
 
virtual ~ARICHMCParticlesModule ()
 Destructor.
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void event () override
 Event processor.
 
 ARICHNtupleModule ()
 Constructor.
 
virtual ~ARICHNtupleModule ()
 Destructor.
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void event () override
 Event processor.
 
virtual void terminate () override
 Termination action. More...
 
 ARICHPackerModule ()
 Constructor.
 
virtual ~ARICHPackerModule ()
 Destructor.
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void event () override
 Event processor.
 
void writeHeader (int *buffer, unsigned &ibyte, const ARICHRawHeader &head)
 TODO!
 
unsigned int calbyte (const int *buf)
 
unsigned int calword (const int *buf)
 
 ARICHRateCalModule ()
 Constructor.
 
virtual ~ARICHRateCalModule ()
 Destructor.
 
virtual void defineHisto () override
 Function to define histograms. More...
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void beginRun () override
 Called when entering a new run. More...
 
virtual void event () override
 Event processor.
 
unsigned int calbyte (const int *buf)
 
unsigned int calword (const int *buf)
 
 ARICHRawUnpackerModule ()
 Constructor.
 
virtual ~ARICHRawUnpackerModule ()
 Destructor.
 
virtual void defineHisto () override
 Function to define histograms. More...
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void event () override
 Event processor.
 
 ARICHReconstruction (int storePhotons=0)
 Constructor.
 
void initialize ()
 read geomerty parameters from xml and initialize class memebers
 
int InsideDetector (TVector3 a, int copyno)
 Returns 1 if vector "a" lies on "copyno"-th detector active surface of detector and 0 else.
 
int smearTrack (ARICHTrack &arichTrack)
 Smeares track parameters ("simulate" the uncertainties of tracking).
 
TVector3 FastTracking (TVector3 dirf, TVector3 r, double *refind, double *z, int n, int opt)
 Calculates the intersection of the Cherenkov photon emitted from point "r" in "dirf" direction with the detector plane. More...
 
TVector3 HitVirtualPosition (const TVector3 &hitpos, int mirrorID)
 Returns the hit virtual position, assuming that it was reflected from mirror. More...
 
bool HitsMirror (const TVector3 &pos, const TVector3 &dir, int mirrorID)
 returns true if photon at position pos with direction dir hits mirror plate with ID mirrorID
 
int CherenkovPhoton (TVector3 r, TVector3 rh, TVector3 &rf, TVector3 &dirf, double *refind, double *z, int n, int mirrorID=0)
 Calculates the direction of photon emission. More...
 
int likelihood2 (ARICHTrack &arichTrack, const StoreArray< ARICHHit > &arichHits, ARICHLikelihood &arichLikelihood)
 Computes the value of identity likelihood function for different particle hypotheses.
 
void setTrackPositionResolution (double pRes)
 Sets track position resolution (from tracking)
 
void setTrackAngleResolution (double aRes)
 Sets track direction resolution (from tracking)
 
TVector3 getTrackMeanEmissionPosition (const ARICHTrack &track, int iAero)
 Returns mean emission position of Cherenkov photons from i-th aerogel layer.
 
TVector3 getTrackPositionAtZ (const ARICHTrack &track, double zout)
 Returns track direction at point with z coordinate "zout" (assumes straight track).
 
void transformTrackToLocal (ARICHTrack &arichTrack, bool align)
 Transforms track parameters from global Belle2 to ARICH local frame.
 
TVector3 getMirrorPoint (int mirrorID)
 Returns point on the mirror plate with id mirrorID.
 
TVector3 getMirrorNorm (int mirrorID)
 Returns normal vector of the mirror plate with id mirrorID.
 
void correctEmissionPoint (int tileID, double r)
 correct mean emission point z position
 
 ARICHReconstructorModule ()
 Constructor.
 
virtual ~ARICHReconstructorModule ()
 Destructor.
 
virtual void initialize () override
 Initialize the Module.
 
virtual void beginRun () override
 Called when entering a new run.
 
virtual void event () override
 Event processor.
 
void printModuleParams ()
 Print module parameters.
 
 ARICHRelateModule ()
 Constructor.
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void event () override
 Event processor.
 
unsigned int calbyte (const int *buf)
 calculate number of bytes in raw Unpacker
 
unsigned int cal2byte (const int *buf)
 calculate number of lines (2 bytes) in raw Unpacker
 
unsigned int calword (const int *buf)
 calculate number of words in raw Unpacker
 
 ARICHUnpackerModule ()
 Constructor.
 
virtual ~ARICHUnpackerModule ()
 Destructor.
 
virtual void initialize () override
 Initialize the Module. More...
 
virtual void event () override
 Event processor. More...
 
void readHeader (const int *buffer, unsigned &ibyte, ARICHRawHeader &head)
 
void readFEHeader (const int *buffer, unsigned &ibyte, ARICHRawHeader &head)
 read Merger header
 
void printBits (const int *buffer, int bufferSize)
 Unpack raw data given in production format. More...
 

Variables

TNtuple * m_tuple
 ntuple containing hapd hits
 
TH1F * hapd [6]
 histogram of hits for each hapd
 
TH1F * mwpc_tdc [4][5]
 tdc information from mwpcs
 
TH1F * mwpc_diff [4][2]
 tdc difference from mwpcs
 
TH1F * mwpc_sum [4][2]
 tdc sum from mwpcs
 
TH1F * mwpc_sum_cut [4][2]
 tdc sum from mwpcs, with sum cut applied
 
TH1F * mwpc_residuals [4][2]
 residuals from mwpcs
 
TH2F * mwpc_xy [4]
 calculated x-y track positions
 
TH2F * mwpc_residualsz [4][2]
 z-residuals from mwpcs
 

Detailed Description

Function Documentation

◆ arichBtestModule()

Constructor.

Sets the module parameters.

Definition at line 62 of file arichBtestModule.cc.

62  : Module(), m_end(0), m_events(0), m_file(NULL), m_timestart(0), m_mwpc(NULL)
63  {
64  //Set module properties
65  setDescription("Module for the ARICH Beamtest data analysis. It creates track form the MWPC hits and reads the HAPD hits");
66 
67  //Parameter definition
68  addParam("outputFileName", m_outFile, "Output Root Filename", std::string("output.root"));
69  std::vector<std::string> defaultList;
70  addParam("runList", m_runList, "Data Filenames.", defaultList);
71  std::vector<int> defaultMask;
72  addParam("mwpcTrackMask", m_MwpcTrackMask, "Create track from MWPC layers", defaultMask);
73  m_fp = NULL;
74  addParam("beamMomentum", m_beamMomentum, "Momentum of the beam [GeV]", 0.0);
75 
76  for (int i = 0; i < 32; i++) m_tdc[i] = 0;
77 
78  }
void setDescription(const std::string &description)
Sets the description of the module.
Definition: Module.cc:214
Module()
Constructor.
Definition: Module.cc:30
std::string m_outFile
output file name
time_t m_timestart
time of the first processed event
ARICHTracking * m_mwpc
Pointer to the tracking chambers.
int m_tdc[32]
raw MWPC TDC buffer
TFile * m_file
pointer to the root file
double m_beamMomentum
Momentum of the particles in the beam [GeV].
std::vector< std::string > m_runList
The filenames of the runs.
int m_events
number of events
std::vector< int > m_MwpcTrackMask
Bit mask of the MWPC tracking chambers used for the track creation.
gzFile m_fp
file desriptor of the data file
void addParam(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Definition: Module.h:560

◆ beginRun() [1/4]

void beginRun ( void  )
overridevirtual

Called when entering a new run.

At the beginning of each run, the function gives you the chance to change run dependent constants like alignment parameters, etc.

Reimplemented from Module.

Definition at line 148 of file arichBtestModule.cc.

◆ beginRun() [2/4]

void beginRun ( void  )
overridevirtual

Called when entering a new run.

Set run dependent things like run header parameters, alignment, etc.

Reimplemented from Module.

Definition at line 89 of file ARICHDigitizerModule.cc.

90  {
91  if (m_simPar->getNBkgHits() > 0) m_bkgLevel = m_simPar->getNBkgHits();
92  }
double m_bkgLevel
Number of background hits ped hapd per readout (electronics noise)
DBObjPtr< ARICHSimulationPar > m_simPar
simulation parameters from the DB

◆ beginRun() [3/4]

void beginRun ( void  )
overridevirtual

Called when entering a new run.

Set run dependent things like run header parameters, alignment, etc.

Reimplemented from HistoModule.

Definition at line 176 of file ARICHDQMModule.cc.

177  {
178 
179  h_chStat->Reset();
180  h_aeroStat->Reset();
181  h_chDigit->Reset();
182  h_chipDigit->Reset();
183  h_hapdDigit->Reset();
184 
185  h_chHit->Reset();
186  h_chipHit->Reset();
187  h_hapdHit->Reset();
188  h_mergerHit->Reset();
189  h_bitsPerMergerNorm->Reset();
190  h_bitsPerHapdMerger->Reset();
191 
192  h_aerogelHit->Reset();
193  h_bits->Reset();
194  h_bitsPerChannel->Reset();
195  h_hitsPerTrack2D->Reset();
196  h_tracks2D->Reset();
197  h_aerogelHits3D->Reset();
198 
199  h_hitsPerEvent->Reset();
200  h_theta->Reset();
201  h_hitsPerTrack->Reset();
202  h_trackPerEvent->Reset();
203  h_flashPerAPD->Reset();
204  h_mirrorThetaPhi->Reset();
205  h_thetaPhi->Reset();
206 
207  for (int i = 0; i < 6; i++) {
208  h_secTheta[i]->Reset();
209  h_secHitsPerTrack[i]->Reset();
210  }
211 
212  h_ARICHOccAfterInjLer->Reset();
213  h_ARICHEOccAfterInjLer->Reset();
214  h_ARICHOccAfterInjHer->Reset();
215  h_ARICHEOccAfterInjHer->Reset();
216  }
TH1 * h_chipDigit
The number of raw digits in each ASIC chip.
TH2 * h_hitsPerTrack2D
Sum of 2D hit/track map on each position of track.
TH1 * h_chipHit
The number of hits in each ASIC chip.
TH1 * h_ARICHEOccAfterInjHer
Histogram for Nr Entries (=Triggrs) for normalization after HER injection.
TH3 * h_aerogelHits3D
3D histogram of
TH1 * h_flashPerAPD
Number of flashes in each APD.
TH1 * h_hitsPerTrack
Average hits/track calculated from h_hits2D and h_track2D.
TH1 * h_trackPerEvent
Number of tracks in ARICH per event (with p>0.5 GeV)
TH1 * h_ARICHOccAfterInjLer
Histogram Ndigits after LER injection.
TH1 * h_chDigit
The number of raw digits in each channel.
TH1 * h_aerogelHit
The number of reconstructed photons in each aerogel tiles.
TH1 * h_mergerHit
The number of hits in each Merger Boards.
TH1 * h_theta
Reconstructed Cherenkov angles.
TH2 * h_thetaPhi
cherenkov theta vs phi for non-mirror-reflected photons
TH1 * h_aeroStat
Status of each aerogel tiles.
TH1 * h_ARICHOccAfterInjHer
Histogram Ndigits after HER injection.
TH3 * h_mirrorThetaPhi
cherenkov theta vs phi for mirror reflected photons (for each mirror plate)
TH1 * h_hapdDigit
The number of raw digits in each HAPD.
TH1 * h_chHit
The number of hits in each channel.
TH1 * h_chStat
Status of each channels.
TH1 * h_secHitsPerTrack[6]
Detailed average hits/track for each sector.
TH1 * h_hapdHit
The number of hits in each HAPD.
TH1 * h_ARICHEOccAfterInjLer
Histogram for Nr Entries (=Triggrs) for normalization after LER injection.
TH1 * h_secTheta[6]
Detailed view of Cherenkov angle for each sector.
TH1 * h_hitsPerEvent
Ihe number of all hits in each event.
TH2 * h_tracks2D
2D track distribution of whole ARICH
TH1 * h_bits
Timing bits.

◆ beginRun() [4/4]

void beginRun ( void  )
overridevirtual

Called when entering a new run.

Set run dependent things like run header parameters, alignment, etc.

Reimplemented from HistoModule.

Definition at line 104 of file ARICHRateCalModule.cc.

105  {
106  StoreObjPtr<EventMetaData> evtmetadata;
107  //int expno = evtmetadata->getExperiment();
108  int runno = evtmetadata->getRun();
109  if (runno == 100 && !m_internalmode) {
110  terminate();
111  }
112  }
virtual void terminate() override
Function to terminate module.
Definition: HistoModule.h:46

◆ CherenkovPhoton()

int CherenkovPhoton ( TVector3  r,
TVector3  rh,
TVector3 &  rf,
TVector3 &  dirf,
double *  refind,
double *  z,
int  n,
int  mirrorID = 0 
)
private

Calculates the direction of photon emission.

Giving the Cherenkov photon emission point "r" and its position on detector plane "rh" (hit position) this methods calculates the direction "dirf" in which photon was emitted, under the assumption that it was reflected from "nmir"-th mirror plate (nmir=-1 for no reflection).

Parameters
rvector of photon emission point
rhphoton hit position
dirfvector of photon emission direction (this is output of method)
rfvector of photon position on aerogel exit
refindarray of layers refractive indices
nnumber of aerogel layers through which photon passes
zarray of z coordinates of borders between layers
nmirid of mirror from which the foton was reflected (assuming).

Definition at line 250 of file ARICHReconstruction.cc.

253  {
254  //
255  // Description:
256  // The method calculates the direction of the cherenkov photon
257  // and intersection with the aerogel exit point
258  //
259  // Called by: CerenkovAngle
260 
261 
262  // Arguments:
263  // Input:
264  // dir, r track position
265  // rh photon hit
266 
267 
268  // Output:
269  // rf aerogel exit from which the photon was emitted
270  // dirf photon direction in aerogel
271  static TVector3 norm(0, 0, 1); // detector plane normal vector
272 
273  double dwin = m_arichgp->getHAPDGeometry().getWinThickness();
274  double refractiveInd0 = m_arichgp->getHAPDGeometry().getWinRefIndex();
275 
276  // iteration is stoped when the difference of photon positions on first aerogel exit
277  // between two iterations is smaller than this value.
278  const double dmin = 0.0000001;
279  const int niter = 100; // maximal number of iterations
280  TVector3 dirw;
281  TVector3 rh1 = rh - dwin * norm;
282 
283  std::vector <TVector3> rf0(n + 2);
284  // rf0[0] .. track point
285  // rf0[1] 1. 1st aerogel exit
286  // rf0[n] n. aerogel exit ...
287  std::vector <TVector3> dirf0(n + 2);
288  // dirf0[0] .. 1st aerogel direction
289  // dirf0[1] .. 2nd aerogel direction
290  // dirf0[n] .. direction after aerogels
291 
292  // z[0] .. 1st aerogel exit
293  // z[n-1] .. 2nd aerogel exit
294  // z[n] .. detector position
295  // z[n+1] .. detector + window
296 
297  rf0[0] = r;
298  rf0[1] = rf;
299 
300  for (int iter = 0; iter < niter; iter++) {
301 
302  // direction in the space between aerogels and detector
303  // *************************************
304  if (iter == 0) dirf0[n] = (rh1 - rf0[1]).Unit();
305  else dirf0[n] = (rh1 - rf0[n]).Unit();
306 
307  // *************************************
308  // n-layers of aerogel // refractiveInd relative refractive index
309  for (int a = n - 1; a >= 0 ; a--) {
310  double rind = refractiveInd[a] / refractiveInd[a + 1];
311  dirf0[a] = Refraction(dirf0[a + 1], rind);
312  }
313 
314  double path = (z[0] - r.Z()) / dirf0[0].Z();
315  double x1 = rf0[1].X();
316  double y1 = rf0[1].Y();
317  for (int a = 0; a < n ; a++) {
318  rf0[a + 1] = rf0[a] + dirf0[a] * path;
319  path = (z[a + 1] - rf0[a + 1].Z()) / dirf0[a + 1].Z();
320  }
321 
322  Refraction(dirf0[n], norm, refractiveInd0, dirw);
323 
324  // *************************************
325 
326  path = dwin / (dirw * norm);
327  rh1 = rh - dirw * path;
328 
329  double d2 = (rf0[1].X() - x1) * (rf0[1].X() - x1) + (rf0[1].Y() - y1) * (rf0[1].Y() - y1);
330 
331  if ((d2 < dmin) && (iter)) {
332 
333  // if mirror hypothesis check if reflection point lies on mirror plate
334  if (mirrorID) {
335  if (!HitsMirror(rf0[n], dirf0[n], mirrorID)) return -1;
336  }
337 
338  rf = rf0[1];
339  dirf = dirf0[0];
340  return iter;
341  }
342  }
343  return -1;
344  }
DBObjPtr< ARICHGeometryConfig > m_arichgp
geometry configuration parameters from the DB
bool HitsMirror(const TVector3 &pos, const TVector3 &dir, int mirrorID)
returns true if photon at position pos with direction dir hits mirror plate with ID mirrorID

◆ defineHisto() [1/3]

void defineHisto ( )
overridevirtual

Function to define histograms.

This function is hooked to HistoManager by calling RbTupleManager::Instance().register_module ( this ) or using a macro REG_HISTOGRAM. It is supposed to be done in initialize() function.

Reimplemented from HistoModule.

Definition at line 62 of file ARICHDQMModule.cc.

◆ defineHisto() [2/3]

void defineHisto ( )
overridevirtual

Function to define histograms.

This function is hooked to HistoManager by calling RbTupleManager::Instance().register_module ( this ) or using a macro REG_HISTOGRAM. It is supposed to be done in initialize() function.

Reimplemented from HistoModule.

Definition at line 65 of file ARICHRateCalModule.cc.

◆ defineHisto() [3/3]

void defineHisto ( )
overridevirtual

Function to define histograms.

This function is hooked to HistoManager by calling RbTupleManager::Instance().register_module ( this ) or using a macro REG_HISTOGRAM. It is supposed to be done in initialize() function.

Reimplemented from HistoModule.

Definition at line 46 of file ARICHRawUnpackerModule.cc.

47  {
48  h_rate_a_all = new TH1F("h_rate_a_all", ";Channel ID", 144 * 6, 0, 144 * 6); //yone
49  h_rate_b_all = new TH1F("h_rate_b_all", ";Channel ID", 144 * 6, 0, 144 * 6); //yone
50  h_rate_c_all = new TH1F("h_rate_c_all", ";Channel ID", 144 * 6, 0, 144 * 6); //yone
51  h_rate_d_all = new TH1F("h_rate_d_all", ";Channel ID", 144 * 6, 0, 144 * 6); //yone
52  }

◆ endRun() [1/2]

void endRun ( void  )
overridevirtual

Is called after processing the last event of a run.

Good e.g. for storing stuff, that you want to aggregate over one run.

Reimplemented from Module.

Definition at line 554 of file arichBtestModule.cc.

◆ endRun() [2/2]

void endRun ( void  )
overridevirtual

End-of-run action.

Save run-related stuff, such as statistics.

Reimplemented from HistoModule.

Definition at line 398 of file ARICHDQMModule.cc.

◆ event() [1/3]

void event ( void  )
overridevirtual

Running over all events.

Function is called for each evRunning over all events This means, this function is called very often, and good performance of the code is of strong interest.

Reimplemented from Module.

Definition at line 465 of file arichBtestModule.cc.

◆ event() [2/3]

void event ( void  )
overridevirtual

Event processor.

Convert ARICHSimHits of the event to arichDigits.

Reimplemented from Module.

Definition at line 94 of file ARICHDigitizerModule.cc.

◆ event() [3/3]

void event ( void  )
overridevirtual

Event processor.

temporary! FEB Slots on merger should be 1-6 (now 0-5). Remove when firmware is updated!

Reimplemented from Module.

Definition at line 90 of file ARICHUnpackerModule.cc.

91  {
92 
93  StoreArray<RawARICH> rawData(m_inputRawDataName);
94  StoreArray<ARICHDigit> digits(m_outputDigitsName);
95  StoreArray<ARICHRawDigit> rawdigits(m_outputRawDigitsName);
96  StoreObjPtr<ARICHInfo> arichinfo(m_outputarichinfoName);
97  arichinfo.create();
98  StoreObjPtr<EventMetaData> evtMetaData;
99 
100  digits.clear();
101  bool m_pciedata = false;
102  int trgtype = 16;
103  double vth_thscan = 0.0;
104 
105  if (m_debug) {
106  std::cout << std::endl << "------------------------" << std::endl;
107  std::cout << "Run: " << evtMetaData->getRun() << " Event: " << evtMetaData->getEvent() << std::endl;
108  std::cout << "------------------------" << std::endl << std::endl;
109  }
110 
111  unsigned thscan_mode = 0;
112  // regular Unpacker mode, fill ARICHDigit
113 // if (m_disable_unpacker == 0) {
114 
115  for (auto& raw : rawData) {
116  // Check PCIe40 data or Copper data
117  if (raw.GetMaxNumOfCh(0) == 48) { m_pciedata = true; } // Could be 36 or 48
118  else if (raw.GetMaxNumOfCh(0) == 4) { m_pciedata = false; }
119  else { B2FATAL("ARICHUnpackerModule: Invalid value of GetMaxNumOfCh from raw data: " << LogVar("Number of ch: ", raw.GetMaxNumOfCh(0))); }
120 
121  for (int finesse = 0; finesse < raw.GetMaxNumOfCh(0); finesse++) {
122  const int* buffer = raw.GetDetectorBuffer(0, finesse);
123  int bufferSize = raw.GetDetectorNwords(0, finesse);
124 
125  if (bufferSize < 1)
126  continue;
127 
128  // record the trigger type from the B2L data
129  trgtype = raw.GetTRGType(0);
130 
131  // read merger header
132  unsigned ibyte = 0;
133  ARICHRawHeader head;
134 
135  readHeader(buffer, ibyte, head);
136 
137  if (m_debug > 1) printBits(buffer, bufferSize);
138 
139  if (m_debug) {
140  std::cout << "Merger header" << std::endl;
141  head.print();
142  }
143  //-- RawDigit for Merger info
144  int type = (int)head.type;
145  int ver = (int)head.version;
146  int boardid = (int)head.mergerID;
147  int febno = (int)head.FEBSlot;
148  unsigned int length_all = (unsigned int)head.length;
149  unsigned int mrg_evtno = (unsigned int)head.trigger;
150  ARICHRawDigit* rawdigit = rawdigits.appendNew(type, ver, boardid, febno, length_all, mrg_evtno);
151 
152  if (!m_pciedata) {
153  rawdigit->setCopperId(raw.GetNodeID(0));
154  rawdigit->setHslbId(finesse);
155  } else {
156  if (raw.GetNodeID(0) == 0x4000001) {
157  rawdigit->setCopperId(raw.GetNodeID(0) + (int)(finesse / 4));
158  } else if (raw.GetNodeID(0) == 0x4000002) {
159  rawdigit->setCopperId(0x400000A + (int)(finesse / 4));
160  } else {
161  B2FATAL("ARICHUnpackerModule: Invalid Node ID from readout: " << LogVar("NodeID: ", raw.GetNodeID(0)));
162  }
163 
164  rawdigit->setHslbId(finesse % 4);
165  rawdigit->setPcieId(raw.GetNodeID(0));
166  rawdigit->setPcieChId(finesse);
167  }
168 
169  //-- end of RawDigit for Merger info
170 
171  // record the ibyte here
172  unsigned begin = ibyte;
173 
174  while (ibyte < head.length) {
175 
176  // new feb
177  ARICHRawHeader febHead;
178  readFEHeader(buffer, ibyte, febHead);
179  if (febHead.thscan_mode) {thscan_mode++;}
180  if (m_debug) febHead.print();
181 
182  if (/*febHead.type != head.type ||*/ febHead.version != head.version || febHead.mergerID != head.mergerID
183  || febHead.trigger != head.trigger) {
184  B2ERROR("ARICHUnpackerModule: data in FEB header not consistent with data in merger HEADER " << LogVar("FEB ID",
185  (unsigned)febHead.FEBSlot) <<
186  LogVar("merger ID", (unsigned)head.mergerID)); break;
187  }
188 
189  // feb header shift
190  ibyte += ARICHFEB_HEADER_SIZE;
191  int dataLen = febHead.length - ARICHFEB_HEADER_SIZE;
192 
193  febHead.FEBSlot += 1;
194 
195  unsigned mergID = m_mergerMap->getMergerIDfromSN((unsigned)head.mergerID);
196 
197  if (mergID == 99) { B2ERROR("ARICHUnpackerModule: unknown merger number. Merger data will be skipped. " << LogVar("merger ID", mergID) << LogVar("Serial Number", (unsigned)head.mergerID)); break;}
198 
199  unsigned moduleID = m_mergerMap->getModuleID(mergID, (unsigned)febHead.FEBSlot);
200 
201  if (!moduleID) { B2ERROR("ARICHUnpackerModule: no merger to FEB mapping. Merger data will be skipped. " << LogVar("merger ID", mergID) << LogVar("Serial Number", (unsigned)head.mergerID) << LogVar("FEB slot", (unsigned)febHead.FEBSlot)); break;}
202 
203  // read data
204  if (m_debug) std::cout << "Hit channels: " << std::endl;
205  if (febHead.type == 1) {
206  for (int i = 0; i < dataLen / 2; i++) {
207  int shift = (3 - ibyte % 4) * 8;
208  uint8_t asicCh = buffer[ibyte / 4] >> shift;
209  ibyte++;
210  shift = (3 - ibyte % 4) * 8;
211  uint8_t hitBitSet = buffer[ibyte / 4] >> shift;
212  if (m_debug && hitBitSet) std::cout << "ch: " << (unsigned)asicCh << " " << std::bitset<8>(hitBitSet) << std::endl;
213  // store digit
214  digits.appendNew(moduleID, (unsigned)asicCh, hitBitSet);
215  ibyte++;
216  }
217  } else if (febHead.type == 2) {
218  unsigned asicCh = 143;
219  for (int i = 0; i < dataLen; i++) {
220  int shift = (3 - ibyte % 4) * 8;
221  uint8_t hitBitSet = buffer[ibyte / 4] >> shift;
222  // store digit if hit
223  if (hitBitSet & m_bitMask) {
224  digits.appendNew(moduleID, asicCh, hitBitSet);
225  }
226  asicCh--;
227  ibyte++;
228  }
229  } else B2ERROR("ARICHUnpackerModule: Unknown data type" << LogVar("type", febHead.type));
230 
231  }
232 
233  if (ceil(ibyte / 4.) != (unsigned)bufferSize)
234  B2WARNING("ARICHUnpackerModule: data buffer size mismatch " << LogVar("size from copper", bufferSize) << LogVar("size from merger",
235  ceil(
236  ibyte / 4.)));
237 
238 
239  //-- If thscan_mode detected from header: proceed to fill ARICHRawDigit
240  //-- If m_rawmode is set to 1: proceed to fill ARICHRawDigit
241  if (thscan_mode == 0 && m_rawmode == 0) continue;
242  //-- go back to beginning again for second loop in case of thscan
243  m_ibyte = begin;
244 
245  while (m_ibyte < length_all) {
246  ARICHRawHeader febHead;
247  readFEHeader(buffer, m_ibyte, febHead);
248  int type_feb = febHead.type;
249  ver = febHead.version;
250  boardid = febHead.mergerID;
251  febno = febHead.FEBSlot;
252 
253  vth_thscan = (febHead.vth * 0.0024) - 1.27;
254  unsigned int length = febHead.length;
255  int evtno = febHead.trigger;
256  unsigned int jbyte = 0;
257  std::stringstream ss;
258  ss << "type=" << type_feb << ", ver=" << ver << " "
259  << ", boardid=" << boardid << ", febno=" << febno
260  << ", length=" << length << ", evtno=" << evtno << " ";
261  bool hasHit = false;
262  long long feb_trigno = 0;
263  for (int i = 0; i < 10; i++) {
264  int val = calbyte(buffer);
265  jbyte++;
266  if (i > 1 && i < 6) {
267  feb_trigno |= (0xff & val) << (5 - i) * 8;
268  }
269  }
270  ARICHRawDigit::FEBDigit feb;
271  if (type_feb == 0x02) {//Raw mode
272  int ch = 143;
273  //B2INFO("raw mode");
274  while (jbyte < length) {
275  int val = calbyte(buffer);
276  if (val != 0) {
277  jbyte++;
278  ss << "ch# " << ch << "(" << val << ") ";
279  hasHit = true;
280  if (febno < 0 || febno > 6) {
281  B2ERROR("FEB is bad : " << LogVar("FEB no.", febno) << LogVar("hslb", finesse) << LogVar("type", type_feb) << LogVar("ver",
282  ver) << LogVar("boardid", boardid) << LogVar("febno", febno) << LogVar("length", length) << LogVar("evtno", evtno));
283  }
284  feb.push_back(ch, val);
285  }
286  ch--;
287  if (ch < 0) break;
288  }
289  } else if (type_feb == 0x01) { // Suppressed mode
290  // The below line is commented since it sometimes causes problem during processing threshold scan data.
291  // No harm to comment this line since it is only utilized for threshold scan data.
292  //if (length > 144 * 2 + 10) B2FATAL("error " << LogVar("length", length));
293  //B2INFO("suppreed mode");
294  while (jbyte < length) {
295  int ch = calbyte(buffer);
296  jbyte++;
297  int val = calbyte(buffer);
298  jbyte++;
299  if (val != 0) {
300  ss << "ch# " << ch << "(" << val << ") ";
301  hasHit = true;
302  if (febno < 0 || febno > 6) {
303  B2ERROR("FEB is bad : " << LogVar("FEB no.", febno) << LogVar("hslb", finesse) << LogVar("type", type_feb) << LogVar("ver",
304  ver) << LogVar("boardid", boardid) << LogVar("febno", febno) << LogVar("length", length) << LogVar("evtno", evtno));
305  return;
306  }
307  feb.push_back(ch, val);
308  }
309  }
310  }
311  rawdigit->addFEB(feb, type, ver, boardid, febno, length, evtno, feb_trigno);
312  if (m_debug && hasHit) {
313  B2INFO(ss.str());
314  }
315  }
316 
317 
318 
319  }
320  } // end of rawData loop
321 
322 // } // end of regular unpacker
323  /*
324  // RawUnpacker mode, fill ARICHRawDigit
325  if (m_rawmode == 1) {
326  for (auto& raw : rawData) {
327  for (int finesse = 0; finesse < 4; finesse++) {
328  const int* buf = (const int*)raw.GetDetectorBuffer(0, finesse);
329  int bufSize = raw.GetDetectorNwords(0, finesse);
330  if (bufSize < 1) continue;
331  m_ibyte = 0;
332  // read merger header
333  int type = calbyte(buf);
334  int ver = calbyte(buf);
335  int boardid = calbyte(buf);
336  int febno = calbyte(buf);
337  unsigned int length_all = calword(buf);
338  unsigned int mrg_evtno = calword(buf);
339  ARICHRawDigit* rawdigit = rawdigits.appendNew(type, ver, boardid, febno, length_all, mrg_evtno);
340  rawdigit->setCopperId(raw.GetNodeID(0));
341  rawdigit->setHslbId(finesse);
342  int nfebs = 0;
343  //--done
344  while (m_ibyte < length_all) {
345  int type_feb = calbyte(buf);
346  ver = calbyte(buf);
347  boardid = calbyte(buf);
348  febno = calbyte(buf);
349 
350  // first line: vth value
351  unsigned int vth_int = cal2byte(buf);
352  if (vth_int > 0) { vth_thscan = (vth_int * 0.0024) - 1.27; }
353  // second line: length
354  unsigned int length = cal2byte(buf);
355  int evtno = calword(buf);
356  unsigned int ibyte = 0;
357  std::stringstream ss;
358  ss << "type=" << type_feb << ", ver=" << ver << " "
359  << ", boardid=" << boardid << ", febno=" << febno
360  << ", length=" << length << ", evtno=" << evtno << " ";
361  bool hasHit = false;
362  long long feb_trigno = 0;
363  for (int i = 0; i < 10; i++) {
364  int val = calbyte(buf);
365  ibyte++;
366  if (i < 6) {
367  feb_trigno |= (0xff & val) << (5 - i) * 8;
368  }
369  }
370  ARICHRawDigit::FEBDigit feb;
371  nfebs++;
372  if (type_feb == 0x02) {//Raw mode
373  int ch = 143;
374  //B2INFO("raw mode");
375  while (ibyte < length) {
376  int val = calbyte(buf);
377  if (val != 0) {
378  ibyte++;
379  ss << "ch# " << ch << "(" << val << ") ";
380  hasHit = true;
381  if (febno < 0 || febno > 6) {
382  B2ERROR("FEB is bad : " << LogVar("FEB no.", febno) << LogVar("hslb", finesse) << LogVar("type", type_feb) << LogVar("ver",
383  ver) << LogVar("boardid", boardid) << LogVar("febno", febno) << LogVar("length", length) << LogVar("evtno", evtno));
384  }
385  feb.push_back(ch, val);
386  }
387  ch--;
388  if (ch < 0) break;
389  }
390  } else if (type_feb == 0x01) { // Suppressed mode
391  // The below line is commented since it sometimes causes problem during processing threshold scan data.
392  // No harm to comment this line since it is only utilized for threshold scan data.
393  //if (length > 144 * 2 + 10) B2FATAL("error " << LogVar("length", length));
394  //B2INFO("suppreed mode");
395  while (ibyte < length) {
396  int ch = calbyte(buf);
397  ibyte++;
398  int val = calbyte(buf);
399  ibyte++;
400  if (val != 0) {
401  ss << "ch# " << ch << "(" << val << ") ";
402  hasHit = true;
403  if (febno < 0 || febno > 6) {
404  B2ERROR("FEB is bad : " << LogVar("FEB no.", febno) << LogVar("hslb", finesse) << LogVar("type", type_feb) << LogVar("ver",
405  ver) << LogVar("boardid", boardid) << LogVar("febno", febno) << LogVar("length", length) << LogVar("evtno", evtno));
406  return;
407  }
408  feb.push_back(ch, val);
409  }
410  }
411  }
412  rawdigit->addFEB(feb, type, ver, boardid, febno, length, evtno, feb_trigno);
413  if (m_debug && hasHit) {
414  B2INFO(ss.str());
415  }
416  }
417  }
418  }
419 
420  } // end of raw unpacker
421  */
422  arichinfo->settrgtype(trgtype);
423  arichinfo->setpciedata(m_pciedata);
424  if (vth_thscan > -1.27) { arichinfo->setvth_thscan(vth_thscan); }
425  arichinfo->setntrack(0);
426  arichinfo->setnexthit(0);
427  arichinfo->setnhit(0);
428  if (thscan_mode > 0 || m_rawmode != 0)
429  { arichinfo->setthscan_mode(true); }
430  else
431  { arichinfo->setthscan_mode(false); }
432 
433  }
DBObjPtr< ARICHMergerMapping > m_mergerMap
mapping of modules to mergers
std::string m_outputarichinfoName
name of ARICHInfo store object
int m_rawmode
Activate Raw Unpacker.
std::string m_outputRawDigitsName
name of ARICHRawDigit store array
uint8_t m_bitMask
read FE header
std::string m_outputDigitsName
name of ARICHDigit store array
std::string m_inputRawDataName
name of RawARICH store array
unsigned int m_ibyte
bye index of raw unpacker
Class to store variables with their name which were sent to the logging service.
unsigned int calbyte(const int *buf)
calculate number of bytes in raw Unpacker
void printBits(const int *buffer, int bufferSize)
Unpack raw data given in production format.
void readFEHeader(const int *buffer, unsigned &ibyte, ARICHRawHeader &head)
read Merger header

◆ FastTracking()

TVector3 FastTracking ( TVector3  dirf,
TVector3  r,
double *  refind,
double *  z,
int  n,
int  opt 
)
private

Calculates the intersection of the Cherenkov photon emitted from point "r" in "dirf" direction with the detector plane.

Parameters
rvector of photon emission point
dirfdirection of photon emission
nnumber of aerogel layers through which photon passes
refindarray of layers refractive indices
zarray of z coordinates of borders between layers

Definition at line 149 of file ARICHReconstruction.cc.

◆ HitVirtualPosition()

TVector3 HitVirtualPosition ( const TVector3 &  hitpos,
int  mirrorID 
)
private

Returns the hit virtual position, assuming that it was reflected from mirror.

Parameters
hitposvector of hit position
mirrorIDid of mirror from which the photon was reflected

Definition at line 223 of file ARICHReconstruction.cc.

◆ initialize() [1/11]

void initialize ( void  )
overridevirtual

Initialize the Module.

Function is called only once at the beginning of your job at the beginning of the corresponding module. Things that can be done here, should be done here, as it is relatively cheap in terms of CPU time.

Reimplemented from Module.

Definition at line 92 of file arichBtestModule.cc.

◆ initialize() [2/11]

void initialize ( void  )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 73 of file ARICHDigitizerModule.cc.

◆ initialize() [3/11]

void initialize ( void  )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

better use isRequired(), but RawFTSW is not in sim

Reimplemented from HistoModule.

Definition at line 161 of file ARICHDQMModule.cc.

◆ initialize() [4/11]

void initialize ( void  )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 57 of file ARICHFillHitsModule.cc.

58  {
59 
60  StoreArray<ARICHDigit> digits;
61  digits.isRequired();
62 
63  StoreArray<ARICHHit> arichHits;
64  arichHits.registerInDataStore();
65 
66  arichHits.registerRelationTo(digits);
67  }

◆ initialize() [5/11]

void initialize ( void  )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 52 of file ARICHMCParticlesModule.cc.

54  {
55  // Dependecies check
56  m_tracks.isRequired();
57  m_extHits.isRequired();
58 
60  m_tracks.registerRelationTo(m_arichMCPs);
61 
62  }
StoreArray< MCParticle > m_arichMCPs
Required input array of MCParticles.
StoreArray< Track > m_tracks
Required input array of Tracks.
StoreArray< ExtHit > m_extHits
Required input array of ExtHits.
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.

◆ initialize() [6/11]

void initialize ( void  )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 69 of file ARICHNtupleModule.cc.

70  {
71 
72  if (m_file) delete m_file;
73  m_file = new TFile(m_outputFile.c_str(), "RECREATE");
74  if (m_file->IsZombie()) {
75  B2FATAL("Couldn't open file '" << m_outputFile << "' for writing!");
76  return;
77  }
78 
79  m_tree = new TTree("arich", "ARICH validation ntuple");
80 
81  m_tree->Branch("evt", &m_arich.evt, "evt/I");
82  m_tree->Branch("run", &m_arich.run, "run/I");
83  m_tree->Branch("exp", &m_arich.exp, "exp/I");
84 
85  m_tree->Branch("charge", &m_arich.charge, "charge/S");
86  m_tree->Branch("pValue", &m_arich.pValue, "pValue/F");
87  m_tree->Branch("d0", &m_arich.z0, "d0/F");
88  m_tree->Branch("z0", &m_arich.d0, "z0/F");
89 
90 #ifdef ALIGNMENT_USING_BHABHA
91  m_tree->Branch("eop", &m_arich.eop, "eop/F");
92  m_tree->Branch("e9e21", &m_arich.e9e21, "e9e21/F");
93  m_tree->Branch("etot", &m_arich.etot, "etot/F");
94 #endif
95 
96  m_tree->Branch("PDG", &m_arich.PDG, "PDG/I");
97  m_tree->Branch("motherPDG", &m_arich.motherPDG, "motherPDG/I");
98  m_tree->Branch("primary", &m_arich.primary, "primary/S");
99  m_tree->Branch("seen", &m_arich.seen, "seen/S");
100  m_tree->Branch("scatter", &m_arich.scatter, "scatter/I");
101 
102  m_tree->Branch("rhoProd", &m_arich.rhoProd, "rhoProd/F");
103  m_tree->Branch("zProd", &m_arich.zProd, "zProd/F");
104  m_tree->Branch("phiProd", &m_arich.phiProd, "phiProd/F");
105  m_tree->Branch("rhoDec", &m_arich.rhoDec, "rhoDec/F");
106  m_tree->Branch("zDec", &m_arich.zDec, "zDec/F");
107  m_tree->Branch("phiDec", &m_arich.phiDec, "phiDec/F");
108  m_tree->Branch("status", &m_arich.status, "status/I");
109 
110  m_tree->Branch("detPhot", &m_arich.detPhot, "detPhot/I");
111  m_tree->Branch("numBkg", &m_arich.numBkg, "e/F:mu:pi:K:p:d");
112  m_tree->Branch("expPhot", &m_arich.expPhot, "e/F:mu:pi:K:p:d");
113  m_tree->Branch("logL", &m_arich.logL, "e/F:mu:pi:K:p:d");
114 
115  m_tree->Branch("recHit", &m_arich.recHit, "PDG/I:x/F:y:z:p:theta:phi");
116  m_tree->Branch("mcHit", &m_arich.mcHit, "PDG/I:x/F:y:z:p:theta:phi");
117  m_tree->Branch("winHit", &m_arich.winHit, "x/F:y");
118  m_tree->Branch("nrec", &m_arich.nRec, "nRec/I");
119  m_tree->Branch("nCDC", &m_arich.nCDC, "nCDC/I");
120  m_tree->Branch("inAcceptance", &m_arich.inAcc, "inAcc/O");
121  m_tree->Branch("photons", "std::vector<Belle2::ARICHPhoton>", &m_arich.photons);
122 
123  // required input
124  m_arichTracks.isRequired();
125  m_arichLikelihoods.isRequired();
126 
127  // optional input
128  m_tracks.isOptional();
130  m_arichAeroHits.isOptional();
131  m_arichInfo.isOptional();
132 
133  StoreArray<ARICHHit> arichHits;
134  arichHits.isRequired();
135 
136  }
TTree * m_tree
pointer to output tree
StoreArray< ARICHAeroHit > m_arichAeroHits
Optional input array of ARICHAeroHits.
std::string m_outputFile
output root file
StoreArray< ARICHTrack > m_arichTracks
Required array of input ARICHTracks.
ARICH::ARICHTree m_arich
ntuple structure
StoreArray< MCParticle > m_arichMCPs
Optional input array of MCParticles.
StoreArray< Track > m_tracks
Optional input array of Tracks.
StoreArray< ARICHLikelihood > m_arichLikelihoods
Required array of input ARICHLikelihoods.
TFile * m_file
pointer to output root file
StoreArray< ARICHInfo > m_arichInfo
Optional input array of ARICHInfo.
bool isOptional(const std::string &name="")
Tell the DataStore about an optional input.
Float_t zDec
decay vertex (cylindrical coordinate z) of MCParticle
Int_t detPhot
number of detected photons
Int_t nCDC
number of track CDC hits
Float_t winHit[2]
vector of reconstructed photons
Float_t rhoDec
decay vertex (cylindrical coordinate r) of MCParticle
ParticlesArray logL
log likelihoods
Int_t scatter
1 if particle scattered (i.e.
Int_t nRec
number of reconstructed photons
Short_t primary
is a primary particle (from related MCParticle)
Short_t seen
is seen in ARICH (from related MCParticle)
TrackHit recHit
extrapolated Track hit
Int_t motherPDG
PDG code of related mother MCParticle.
ParticlesArray numBkg
number of expected background photons
ParticlesArray expPhot
number of expected photons (signal + bkg)
Float_t phiProd
production vertex (cylindrical coordinate phi) of MCParticle
Float_t rhoProd
production vertex (cylindrical coordinate r) of MCParticle
Float_t phiDec
decay vertex (cylindrical coordinate phi) of MCParticle
Bool_t inAcc
track in detector acceptance, i.e.
TrackHit mcHit
related MC particle hit
Int_t PDG
PDG code of related MCParticle.
Int_t status
track status (add proper description)
Float_t pValue
p-value of Track fit
Float_t zProd
production vertex (cylindrical coordinate z) of MCParticle

◆ initialize() [7/11]

void initialize ( void  )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 62 of file ARICHPackerModule.cc.

63  {
64 
65  StoreArray<ARICHDigit> digits(m_inputDigitsName);
66  digits.isRequired();
67 
68  StoreArray<RawARICH> rawData(m_outputRawDataName);
69  rawData.registerInDataStore();
70  }
std::string m_inputDigitsName
name of ARICHDigit store array
std::string m_outputRawDataName
name of RawARICH store array

◆ initialize() [8/11]

void initialize ( void  )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from HistoModule.

Definition at line 94 of file ARICHRateCalModule.cc.

◆ initialize() [9/11]

void initialize ( void  )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from HistoModule.

Definition at line 54 of file ARICHRawUnpackerModule.cc.

◆ initialize() [10/11]

void initialize ( void  )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 49 of file ARICHRelateModule.cc.

51  {
52  // Dependecies check
54  m_mdstTracks.isRequired();
55  m_aeroHits.isRequired();
56  m_extHits.isRequired();
57  m_extHits.registerRelationTo(m_aeroHits);
58  }
StoreArray< ARICHAeroHit > m_aeroHits
Required array of input ARICHAeroHits.
StoreArray< Track > m_mdstTracks
Required array of input Tracks.
StoreArray< ExtHit > m_extHits
Required array of input ExtHits.
StoreArray< MCParticle > m_mcParticles
Required array of input MCParticles.
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.

◆ initialize() [11/11]

void initialize ( void  )
overridevirtual

Initialize the Module.

This method is called at the beginning of data processing.

Reimplemented from Module.

Definition at line 73 of file ARICHUnpackerModule.cc.

◆ magFieldDistorsion()

void magFieldDistorsion ( TVector2 &  hit,
int  copyno 
)

Apply correction to hit position due to non-perpendicular component of magnetic field.

Parameters
hitlocal position of simhit
copynocopy number of hapd

Definition at line 190 of file ARICHDigitizerModule.cc.

◆ mergerClusterHitMap1D()

TH1 * mergerClusterHitMap1D ( TH1 *  hitMap,
int  mergerID 
)

Make 1D hit map of specified Merger Board.

Parameters
1Dhit map of all channels
Merferboard identifier [1:72]
Returns
1D hit map of the merger board

Definition at line 95 of file hitMapMaker.cc.

96  {
97 
98  int m_mergerID = mergerID;
99 
100  DBObjPtr<ARICHChannelMapping> arichChMap;
101  DBObjPtr<ARICHMergerMapping> arichMergerMap;
102 
103  TH1* m_hitMap = hitMap;
104 
105  std::vector<int> moduleIDs;
106  for (int i = 1; i < 7; i++) {
107  moduleIDs.push_back(arichMergerMap->getModuleID(m_mergerID, i));
108  }
109 
110  TH1D* m_mergerHitMap1D = new TH1D("MergerHitMap1D", Form("Hit map in Merger Board %d", m_mergerID), 144 * 6, -0.5, 144 * 6 - 0.5);
111  for (int i = 1; i < 7; i++) {
112  for (int j = 0; j < 144; j++) {
113  int hitsNum = m_hitMap->GetBinContent((moduleIDs[i] - 1) * 144 + i);
114  m_mergerHitMap1D->Fill(144 * (i - 1) + j, hitsNum);
115  }
116  }
117  return m_mergerHitMap1D;
118  }

◆ mergerClusterHitMap2D()

TCanvas * mergerClusterHitMap2D ( TH1 *  hitMap,
int  mergerID 
)

Make display of 6 HAPDs' 2D hit map of the Merger Board.

Parameters
1Dhit map of all channels
Merferboard identifier [1:72]
Returns
Display of 6 HAPDs' 2D hit map

Definition at line 120 of file hitMapMaker.cc.

◆ moduleDeadMap()

TH2 * moduleDeadMap ( TH1 *  hitMap,
int  moduleID 
)

Make chip dead/alive map in HAPD view (2*2 chips)

Parameters
1Dhit map of all channels
Moduleidentifier [1:420]
Returns
2D dead/alive map on HAPD

Definition at line 62 of file hitMapMaker.cc.

◆ moduleHitMap()

TH2 * moduleHitMap ( TH1 *  hitMap,
int  moduleID 
)

Make hit map in HAPD view (12*12 channels)

Parameters
1Dhit map of all channels
Moduleidentifier [1:420]
Returns
2D hit map on HAPD

Definition at line 38 of file hitMapMaker.cc.

◆ printBits()

void printBits ( const int *  buffer,
int  bufferSize 
)
private

Unpack raw data given in production format.

Parameters
bufferraw data buffer
bufferSizebuffer size

Definition at line 529 of file ARICHUnpackerModule.cc.

◆ sectorDeadMap()

TCanvas * sectorDeadMap ( TH1 *  hitMap,
int  sector 
)

Make display of 70 HAPDs' 2D dead/alive map of the sector.

Parameters
1Dhit map of all channels
Sectoridentifier [1:6]
Returns
Display of 70 HAPDs' 2D dead/alive map

Definition at line 176 of file hitMapMaker.cc.

◆ sectorHitMap()

TCanvas * sectorHitMap ( TH1 *  hitMap,
int  sector 
)

Make display of 70 HAPDs' 2D hit map of the sector.

Parameters
1Dhit map of all channels
Sectoridentifier [1:6]
Returns
Display of 70 HAPDs' 2D hit map

Definition at line 144 of file hitMapMaker.cc.

◆ terminate() [1/2]

void terminate ( void  )
overridevirtual

Is called at the end of your Module.

Function is called only once at the end of your job at the end of the corresponding module. This function is for cleaning up, closing files, etc.

Reimplemented from Module.

Definition at line 567 of file arichBtestModule.cc.

◆ terminate() [2/2]

void terminate ( void  )
overridevirtual

Termination action.

Clean-up, close files, summarize statistics, etc.

Reimplemented from Module.

Definition at line 336 of file ARICHNtupleModule.cc.