Hall-D Software
alpha
|
#include <JEventProcessor_bcal_calib_cosmic_cdc.h>
Public Member Functions | |
JEventProcessor_bcal_calib_cosmic_cdc () | |
~JEventProcessor_bcal_calib_cosmic_cdc () | |
const char * | className (void) |
Public Attributes | |
TTree * | bcal_calib_cosmic_cdc_tree |
int | eventnum |
int | cell |
int | tlayer |
int | tmodule |
int | tsector |
int | tglobalsect |
int | numcells |
Number of BCAL cells intersected by the track. More... | |
float | tdist |
float | use |
float | dse |
float | track_m |
float | track_c |
float | chisq |
int | Ndof |
Private Member Functions | |
jerror_t | init (void) |
Called once at program start. More... | |
jerror_t | brun (jana::JEventLoop *eventLoop, int32_t runnumber) |
Called everytime a new run number is detected. More... | |
jerror_t | evnt (jana::JEventLoop *eventLoop, uint64_t eventnumber) |
Called every event. More... | |
jerror_t | erun (void) |
Called everytime run number changes, provided brun has been called. More... | |
jerror_t | fini (void) |
Called after last event of last event source has been processed. More... | |
Private Attributes | |
int | VERBOSE |
Command Line Parameters. More... | |
This class is used to project stright lines from cosmic rays in the CDC lines to the BCAL for the purposes of calibrating the BCAL.
Definition at line 22 of file JEventProcessor_bcal_calib_cosmic_cdc.h.
JEventProcessor_bcal_calib_cosmic_cdc::JEventProcessor_bcal_calib_cosmic_cdc | ( | ) |
Definition at line 56 of file JEventProcessor_bcal_calib_cosmic_cdc.cc.
JEventProcessor_bcal_calib_cosmic_cdc::~JEventProcessor_bcal_calib_cosmic_cdc | ( | ) |
Definition at line 64 of file JEventProcessor_bcal_calib_cosmic_cdc.cc.
|
private |
Called everytime a new run number is detected.
Definition at line 118 of file JEventProcessor_bcal_calib_cosmic_cdc.cc.
|
inline |
Definition at line 26 of file JEventProcessor_bcal_calib_cosmic_cdc.h.
|
private |
Called everytime run number changes, provided brun has been called.
Definition at line 404 of file JEventProcessor_bcal_calib_cosmic_cdc.cc.
|
private |
Called every event.
DTrackCandidate:CDCCOSMIC Get a vector of DTrackCandidate:CDCCOSMIC objects for this event
Create vectors to store the ID of the hit cells and the traversed distance
Only do anything if there is a track found
Get the parameters of the fitted track
Extract the slope and intercept
Store the parameters for both track intersections with the 5 layers
For each layer boundary, calculate the intersection of the DTrackCandidate with the circle and store the r and phi value for both intersections.
For each intersection set, step through each layer
For each layer, step through each sector
IN refers to inner radial boundary, OUT refers to outer radial boundary Find the global sector number for the entrance and exit sectors in this layer
Check that the cells are valid
If the track only goes through 1 sector in this layer, then you are done, get the distance from the (x,y) values of the layer inner and outer boundary intersections
If the track goes through multiple sectors then find the intersection of the DTrackCandidate with the sector boundary.
For each sector, get line boundary on each side and find the (x,y) point at which the track crosses that line
Edge sectors in each layer have
For a central sector, get line boundary on each side and find the distance the phi less side and the phi more side
DBCALHit Get a vector of DBCALHit objects for this event (1 object for each crate/slot/channel above threshold)
Creat maps from the BCAL cell ID to the DBCALHit object pointer
Loop over all DBCALHit objects in this event
Fill the maps with the hits for this event.
Loop over the intersected cells
Definition at line 128 of file JEventProcessor_bcal_calib_cosmic_cdc.cc.
References DTrackCandidate::chisq, DBCALHit::E, DBCALHit::end, getdistance(), getposphi(), japp, DBCALGeometry::kDownstream, DBCALGeometry::kUpstream, DBCALHit::layer, layer, DBCALHit::module, DKinematicData::momentum(), DTrackCandidate::Ndof, DKinematicData::position(), printf(), DBCALHit::sector, sqrt(), VERBOSE, x, and y.
|
private |
Called after last event of last event source has been processed.
Definition at line 415 of file JEventProcessor_bcal_calib_cosmic_cdc.cc.
|
private |
Called once at program start.
Setup the parameters
VERBOSE=1 Output every event VERBOSE=2 Output every intersection VERBOSE=3 Output every sector VERBOSE=4 Output every hit
Create the root tree
Definition at line 72 of file JEventProcessor_bcal_calib_cosmic_cdc.cc.
References VERBOSE.
TTree* JEventProcessor_bcal_calib_cosmic_cdc::bcal_calib_cosmic_cdc_tree |
Definition at line 28 of file JEventProcessor_bcal_calib_cosmic_cdc.h.
int JEventProcessor_bcal_calib_cosmic_cdc::cell |
Definition at line 30 of file JEventProcessor_bcal_calib_cosmic_cdc.h.
float JEventProcessor_bcal_calib_cosmic_cdc::chisq |
Definition at line 41 of file JEventProcessor_bcal_calib_cosmic_cdc.h.
float JEventProcessor_bcal_calib_cosmic_cdc::dse |
Definition at line 38 of file JEventProcessor_bcal_calib_cosmic_cdc.h.
int JEventProcessor_bcal_calib_cosmic_cdc::eventnum |
Definition at line 29 of file JEventProcessor_bcal_calib_cosmic_cdc.h.
int JEventProcessor_bcal_calib_cosmic_cdc::Ndof |
Definition at line 42 of file JEventProcessor_bcal_calib_cosmic_cdc.h.
int JEventProcessor_bcal_calib_cosmic_cdc::numcells |
Number of BCAL cells intersected by the track.
Definition at line 35 of file JEventProcessor_bcal_calib_cosmic_cdc.h.
float JEventProcessor_bcal_calib_cosmic_cdc::tdist |
Definition at line 36 of file JEventProcessor_bcal_calib_cosmic_cdc.h.
int JEventProcessor_bcal_calib_cosmic_cdc::tglobalsect |
Definition at line 34 of file JEventProcessor_bcal_calib_cosmic_cdc.h.
int JEventProcessor_bcal_calib_cosmic_cdc::tlayer |
Definition at line 31 of file JEventProcessor_bcal_calib_cosmic_cdc.h.
int JEventProcessor_bcal_calib_cosmic_cdc::tmodule |
Definition at line 32 of file JEventProcessor_bcal_calib_cosmic_cdc.h.
float JEventProcessor_bcal_calib_cosmic_cdc::track_c |
Definition at line 40 of file JEventProcessor_bcal_calib_cosmic_cdc.h.
float JEventProcessor_bcal_calib_cosmic_cdc::track_m |
Definition at line 39 of file JEventProcessor_bcal_calib_cosmic_cdc.h.
int JEventProcessor_bcal_calib_cosmic_cdc::tsector |
Definition at line 33 of file JEventProcessor_bcal_calib_cosmic_cdc.h.
float JEventProcessor_bcal_calib_cosmic_cdc::use |
Definition at line 37 of file JEventProcessor_bcal_calib_cosmic_cdc.h.
|
private |
Command Line Parameters.
Definition at line 52 of file JEventProcessor_bcal_calib_cosmic_cdc.h.