The Tag ("Nano") level of the database contains variables useful for high-level event selection. These variables describe the event as a whole. They do not contain details of the individual candidates (clusters, tracks), except special ones like the highest-energy or highest-momentum candidates.

The variables are calculated by the following 5 modules in the EventTagTools package:

TagStoreCalorInfo | Calorimeter Information |

TagStoreTrackInfo | Track Information |

TagStoreEventShape | Event Shape variables |

TagStorePrimaryVtx | Primary Vertex Variables |

TagStoreSemileptonic | Variables helpful in semi-leptonic analyses |

The calculated variables are below in tabular form, with their C++ type, a short description, what frame of reference they are calculated in, and the selection applied to tracks in the calculation.

For information stored in the Nano database regarding particular physics channels, refer to the AWG pages.

At the bottom of this page, you can find **examples of the code**
you can use to access these variables.

## TagStoreCalorInfo |
||||

Nano-DatabaseVariable Name |
Type |
Description |
CMS or LAB Frame |
Candidate Selection(see here for a description of the lists used) |

eTotal | Float | Total visible LAB energy of tracks and neutrals in the event (uses the energy() method for both tracks and neutrals; see Kinematic Variables for discussion.) | LAB | TaggingList and CalorNeutral |

eCharShow | Float | Total LAB energy of Charged Candidates, by using the time-compenent of the associated Emc cluster's four-momentum. | LAB | TaggingList |

eNeutralMag | Float | Magnitude of the sum of the 3-momentum vectors. The magnitude of the 3-momenta is just the energy (implying zero mass - the photon), with the direction as that from the origin to the center of the cluster. | LAB | CalorNeutral not overlapping with any candidates in TaggingList |

eNeutralCosTh | Float | Cosine of the polar angle of the sum of the 3-momentum. See eNeutralMag for 3-momentum description. | LAB | Same as eNeutralMag |

eNeutralPhi | Float | Azimuthal angle of the sum of the 3-momentum. See eNeutralMag for 3-momentum description. | LAB | Same as eNeutralMag |

e1Mag | Float | Calibrated EMC energy. | CMS | Highest energy CalorNeutral item not overlapping with any candidate in TaggingList |

e1CosTheta | Float | Cosine of the polar angle of the candidate's 3-momentum. | CMS | Same as e1Mag |

e1Phi | Float | Azimuthal angle of the candidate's 3-momentum. | CMS | Same as e1Mag |

e2Mag | Float | Calibrated EMC energy. | CMS | 2nd highest energy CalorNeutral item not overlapping with any candidate in TaggingList |

e2CosTheta | Float | Cosine of the polar angle of the candidate's 3-momentum. | CMS | Same as e2Mag |

e2Phi | Float | Azimuthal angle of the candidate's 3-momentum. | CMS | Same as e2Mag |

## TagStoreTrackInfo |
||||

Quantity |
Type |
Description |
CMS or LAB Frame |
Candidate Selection(see here for a description of the lists used) |

pTotalMag | Float | Magnitude of the sum of the 3-momentum vectors | LAB | TaggingList |

pTotalCosTh | Float | Cosine of the polar angle of the sum of the 3-momentum vectors. | LAB | TaggingList |

pTotalPhi | Float | Azimuthal angle of the sum of the 3-momentum vectors. | LAB | TaggingList |

pTotalMass | Float | Magnitude of the sum of the
4-momentum vectors |
LAB | TaggingList |

pTotalScalar | Float | LAB | ||

p1Mag | Float | Magnitude of the candidate's 3-momentum. | CMS | TaggingList, highest momentum candidate |

p1CosTheta | Float | Cosine of the polar angle of the candidate's 3-momentum. | CMS | same as p1Mag |

p1Phi | Float | Azimuthal angle of the candidate's 3-momentum. | CMS | same as p1Mag |

p1EmcCandEnergy | Float | Calibrated calorimeter energy associated with the highest momentum charged track. | CMS | same as p1Mag |

p2Mag | Float | Magnitude of the candidate's 3-momentum. | CMS | TaggingList, 2nd highest momentum candidate |

p2CosTheta | Float | Cosine of the polar angle of the candidate's 3-momentum. | CMS | same as p2Mag |

p2Phi | Float | Azimuthal angle of the candidate's 3-momentum. | CMS | same as p2Mag |

p2EmcCandEnergy | Float | Calibrated calorimeter energy associated with the highest momentum charged track. | CMS | same as p2Mag |

nTracks | Int | number of entries in the TaggingList list | N/A | TaggingList |

nGoodTrkLoose | Int | number of entries in the GoodTracksLoose list | N/A | GoodTracksLoose |

nGoodTrkTight | Int | number of entries in the GoodTracksTight list | N/A | GoodTracksTight |

p1PidHypo | Int | particle hypothesis:
-1= none 0= electron 1= muon 2= pion 3= kaon 4= proton |
N/A | same as p1Mag |

p2PidHypo | Int | same as p1PidHypo | N/A | same as p2Mag |

totChargeLoose | Int | Sum of the candidates charges | N/A | GoodTracksLoose |

totChargeTight | Int | Sum of the candidates charges | N/A | GoodTracksTight |

## TagStoreEventShape |
||||

Quantity |
Type |
Description |
CMS or LAB Frame |
Candidate Selection(see here for a description of the lists used) |

thrustMag thrustMagAll |
Float | Magnitude of the Event's Thrust 3-Vector | CMS | ChargedTracks are used for non-'All'; ChargedTracksAcc and GoodNeutralLooseAcc for 'All' |

thrustCosTh thrustCosThAll |
Float | Cosine of the polar angle of the Event's Thrust 3-Vector | CMS | Same as above |

thrustPhi thrustPhiAll |
Float | Azimuthal angle of the Event's Thrust 3-Vector | CMS | Same as above |

R2 R2All |
Float | 2nd Fox-Wolfram Moment (divided by the 0th Fox-Wolfram Moment) | CMS | Same as above |

sphericityAll | Float | Sphericity of the Event | CMS | ChargedTracksAcc and GoodNeutralLooseAcc |

## TagStorePrimaryVtx |
||||

Quantity |
Type |
Description |
CMS or LAB Frame |
Candidate Selection(see here for a description of the lists used) |

xPrimaryVtx | Float | x-coordinate of the event's primary vertex | LAB | N/A |

yPrimaryVtx | Float | y-coordinate of the event's primary vertex | LAB | N/A |

zPrimaryVtx | Float | z-coordinate of the event's primary vertex | LAB | N/A |

probPrimaryVtx | Float | Significance Level of the Chi-Square for the
Primary Vertex Fit |
LAB | N/A |

## TagStoreSemileptonic |
||||

Quantity |
Type |
Description |
CMS or LAB Frame |
Candidate Selection(see here for a description of the lists used) |

The following tags give signed (corresponding to the particles charge) momentum of the named particle. Naming convention is [lepton name] [selection criteria] [1st or 2nd highest momentum particle satisfying criteria] [cms/lab frame]. A value of 0 indicates no track existed in the list. | The lists used are tag versions of the real lists found on the lists page. These are meant to be simpler, more robust selections very similar to the actual selectors. | |||

elecLoose1cm | Float | See above | CMS | tagElectronsLoose |

elecLoose2cm | Float | See above | CMS | tagElectronsLoose |

elecTight1cm | Float | See above | CMS | tagElectronsTight |

elecTight2cm | Float | See above | CMS | tagElectronsTight |

muonLoose1cm | Float | See above | CMS | tagMuonsLoose |

muonLoose2cm | Float | See above | CMS | tagMuonsLoose |

muonTight1cm | Float | See above | CMS | tagMuonsTight |

muonTight2cm | Float | See above | CMS | tagMuonsTight |

elecLoose1l | Float | See above | LAB | tagElectronsLoose |

elecLoose2l | Float | See above | LAB | tagElectronsLoose |

elecTight1l | Float | See above | LAB | tagElectronsTight |

elecTight2l | Float | See above | LAB | tagElectronsTight |

muonLoose1l | Float | See above | LAB | tagMuonsLoose |

muonLoose2l | Float | See above | LAB | tagMuonsLoose |

muonTight1l | Float | See above | LAB | tagMuonsTight |

muonTight2l | Float | See above | LAB | tagMuonsTight |

Here is the code that is needed to get one of these quantities. First, you get the tag of the event. Then, you access a particular type of variable with the member function tag->getXXX(), which takes 2 arguments - first, your variable name, and second, the stored variable's name in quotes.

In your module's event(AbsEvent *anEvent) function:

AbsEventTag* tag = Ifd<AbsEventTag>::get( anEvent ); // boolean example bool didItPass; if(tag->getBool(didItPass,"leptLoose1PassedTight") ){ if (didItPass) { ... } } // floating point examples float totalEnergy; if(tag->getFloat(totalEnergy,"eTotal") ){ if (totalEnergy > 9.5) { ... } } // integer example int numTracks; if(tag->getInt(numTracks,"nTracks") ){ if (numTracks > 4) { ... } }